add ui components

This commit is contained in:
nflnkr 2023-08-21 14:10:34 +03:00
parent f3b5c1862a
commit 0fadd8fc76
17 changed files with 796 additions and 65 deletions

@ -6,7 +6,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs', "vite.config.ts", "src"],
ignorePatterns: ['dist', '.eslintrc.cjs', "vite.config.ts"],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
@ -15,7 +15,7 @@ module.exports = {
{ allowConstantExport: true },
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"no-restricted-exports": ["error", {
"restrictDefaultExports": {
direct: true,

@ -0,0 +1,52 @@
import { Avatar, IconButton, IconButtonProps, Typography, useTheme } from "@mui/material";
import { deepmerge } from "@mui/utils";
export function AvatarButton(props: IconButtonProps) {
const theme = useTheme();
return (
<IconButton
{...deepmerge({
sx:{
height: 36,
width: 36,
p: 0,
"&:hover .MuiAvatar-root": {
border: `2px solid ${theme.palette.grey2.main}`,
},
"&:active .MuiAvatar-root": {
backgroundColor: theme.palette.brightPurple.main,
color: theme.palette.brightPurple.main,
border: "1px solid black",
},
}
}, props)}
>
<Avatar sx={{
height: "100%",
width: "100%",
backgroundColor: theme.palette.orange.main,
color: theme.palette.orange.light,
transition: "all 100ms",
}}>
<Typography sx={{
fontWeight: 500,
fontSize: "14px",
lineHeight: "20px",
zIndex: 1,
textTransform: "uppercase",
position: "absolute",
color: "white",
}}>
{props.children ?? "AA"}
</Typography>
<svg width="100%" height="100%" viewBox="0 0 36 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fillRule="evenodd" clipRule="evenodd" d="M15.348 16.146c.1-5.981 6.823-10.034 12.62-11.479 6.055-1.508 13.264-.719 17.31 4.023 3.673 4.303.83 10.565-.085 16.16-.678 4.152-1.209 8.41-4.383 11.171-3.418 2.973-8.742 6.062-12.43 3.452-3.663-2.593 1.412-8.88-.78-12.8-2.764-4.95-12.347-4.85-12.252-10.527Z" fill="currentColor" />
<circle cx="28.052" cy="-3.333" r="5.519" transform="rotate(-32.339 28.052 -3.333)" fill="currentColor" />
<circle cx="24.363" cy="29.03" r="1.27" transform="rotate(-32.339 24.363 29.03)" fill="currentColor" />
</svg>
</Avatar>
</IconButton>
);
}

@ -0,0 +1,35 @@
import { IconButton, IconButtonProps, SxProps, Theme, useTheme } from "@mui/material";
interface Props {
onClick?: IconButtonProps["onClick"];
sx?: SxProps<Theme>;
color?: string;
}
export function BurgerButton({ onClick, sx, color = "white" }: Props) {
const theme = useTheme();
return (
<IconButton
onClick={onClick}
sx={{
height: 30,
width: 30,
p: 0,
color,
"&:hover": {
color: theme.palette.brightPurple.main,
},
"&:active": {
color: theme.palette.brightPurple.main,
},
...sx,
}}
>
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M28 8.005H3M28 16.005H3M28 24.005H3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
</svg>
</IconButton>
);
}

@ -0,0 +1,34 @@
import { IconButton, IconButtonProps, SxProps, Theme, useTheme } from "@mui/material";
interface Props {
onClick?: IconButtonProps["onClick"];
sx?: SxProps<Theme>;
}
export function CloseButton({ onClick, sx }: Props) {
const theme = useTheme();
return (
<IconButton
onClick={onClick}
sx={{
height: 30,
width: 30,
p: 0,
color: "black",
"&:hover": {
color: theme.palette.orange.main,
},
"&:active": {
color: theme.palette.orange.main,
},
...sx,
}}
>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 30 31" fill="none">
<path d="m3 3.605 24 24m-24 0 24-24" stroke="currentColor" />
</svg>
</IconButton>
);
}

@ -0,0 +1,34 @@
import { IconButton, IconButtonProps, SxProps, Theme, useTheme } from "@mui/material";
interface Props {
onClick?: IconButtonProps["onClick"];
sx?: SxProps<Theme>;
}
export function CloseButtonSmall({ onClick, sx }: Props) {
const theme = useTheme();
return (
<IconButton
onClick={onClick}
sx={{
height: 12,
width: 12,
p: 0,
color: theme.palette.brightPurple.main,
"&:hover": {
color: theme.palette.orange.main,
},
"&:active": {
color: theme.palette.orange.main,
},
...sx,
}}
>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 14 14" fill="none">
<path d="m13 1.176-12 12M13 13.176l-12-12" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</IconButton>
);
}

@ -1,14 +0,0 @@
import { Typography } from "@mui/material";
interface Props {
name?: string;
}
export function HelloWorld({ name }: Props) {
name ??= "world";
return (
<Typography variant="h2">Hello {name}</Typography>
);
}

@ -0,0 +1,39 @@
import { IconButton, IconButtonProps, useTheme } from "@mui/material";
import { deepmerge } from "@mui/utils";
export function LogoutButton(props: IconButtonProps) {
const theme = useTheme();
return (
<IconButton
{...deepmerge({
sx: {
height: 36,
width: 36,
p: 0,
borderRadius: "6px",
backgroundColor: theme.palette.background.default,
color: theme.palette.grey2.main,
"&:hover": {
color: theme.palette.background.default,
backgroundColor: theme.palette.grey2.main,
},
"&:active": {
backgroundColor: theme.palette.brightPurple.main,
color: "white",
},
}
}, props)}
>
<svg width="100%" height="100%" viewBox="0 0 36 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M22.559 22.052v2.95a2 2 0 0 1-2 2h-6.865a2 2 0 0 1-2-2v-12.5a2 2 0 0 1 2-2h6.865a2 2 0 0 1 2 2v2.95M25.067 21.227l1.786-1.763a1 1 0 0 0 0-1.423l-1.786-1.764M26.737 18.752H16.71"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
</svg>
</IconButton>
);
}

@ -1,25 +1,26 @@
import { Link, LinkProps, Typography, useTheme } from "@mui/material";
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import { deepmerge } from "@mui/utils";
export function PenaLink(props: LinkProps) {
const theme = useTheme();
const propsSx = props.sx;
delete props.sx;
return (
<Link
sx={{
display: "flex",
gap: "3px",
textUnderlinePosition: "under",
color: theme.palette.brightPurple.main,
textDecorationColor: theme.palette.brightPurple.main,
textUnderlineOffset: "3px",
...propsSx,
}}
{...props}
{...deepmerge({
sx: {
display: "flex",
gap: "3px",
textUnderlinePosition: "under",
color: theme.palette.brightPurple.main,
textDecorationColor: theme.palette.brightPurple.main,
textUnderlineOffset: "3px",
"&:active": {
color: "#FFFFFF",
},
}
}, props)}
>
<Typography variant="body2">{props.children}</Typography>
<ArrowForwardIcon sx={{ height: "20px", width: "20px" }} />

@ -0,0 +1,120 @@
import { FormControl, InputLabel, SxProps, TextField, TextFieldProps, Theme, useMediaQuery, useTheme } from "@mui/material";
interface Props {
id?: string;
label?: string;
labelSx?: SxProps<Theme>;
bold?: boolean;
gap?: string;
backgroundColor?: string;
FormControlSx?: SxProps<Theme>;
TextFieldSx?: SxProps<Theme>;
placeholder?: TextFieldProps["placeholder"];
value?: TextFieldProps["value"];
helperText?: TextFieldProps["helperText"];
error?: TextFieldProps["error"];
type?: TextFieldProps["type"];
onBlur?: TextFieldProps["onBlur"];
onChange?: TextFieldProps["onChange"];
fullWidth?: boolean;
}
export function PenaTextField({
id = "pena-textfield",
label,
labelSx,
bold = false,
gap = "10px",
onChange,
error,
helperText,
onBlur,
placeholder,
type,
value,
backgroundColor,
FormControlSx,
TextFieldSx,
fullWidth = true,
}: Props) {
const theme = useTheme();
const upMd = useMediaQuery(theme.breakpoints.up("md"));
const labelFont = upMd
? bold
? theme.typography.p1
: { ...theme.typography.body1, fontWeight: 500 }
: theme.typography.body2;
const placeholderFont = upMd ? undefined : { fontWeight: 400, fontSize: "16px", lineHeight: "19px" };
return (
<FormControl
fullWidth={fullWidth}
variant="standard"
sx={{
gap,
...FormControlSx,
}}
>
{label && (
<InputLabel
shrink
htmlFor={id}
sx={{
position: "inherit",
color: "black",
transform: "none",
...labelFont,
...labelSx,
}}
>
{label}
</InputLabel>
)}
<TextField
fullWidth
id={id}
error={error}
helperText={helperText}
onBlur={onBlur}
placeholder={placeholder}
type={type}
value={value}
sx={{
"& .MuiInputBase-root": {
height: "48px",
borderRadius: "8px",
"& fieldset": {
border: `1px solid ${theme.palette.grey2.main}`,
},
"&:hover fieldset": {
border: `1px solid ${theme.palette.grey3.main}`,
},
"&.Mui-focused fieldset": {
border: `2px solid ${theme.palette.brightPurple.main}`,
},
},
"& .MuiFormHelperText-root.MuiFormHelperText-contained.MuiFormHelperText-filled.Mui-error": {
position: "absolute",
top: "45px",
},
...TextFieldSx,
}}
inputProps={{
sx: {
boxSizing: "border-box",
backgroundColor: backgroundColor ?? theme.palette.background.default,
borderRadius: "8px",
height: "48px",
py: 0,
color: theme.palette.grey3.main,
...placeholderFont,
},
}}
onChange={onChange}
/>
</FormControl>
);
}

@ -0,0 +1,39 @@
import { IconButton, IconButtonProps, SxProps, Theme, useTheme } from "@mui/material";
interface Props {
onClick?: IconButtonProps["onClick"];
sx?: SxProps<Theme>;
size?: string | number;
}
export function WalletButton({ onClick, size = 36, sx }: Props) {
const theme = useTheme();
return (
<IconButton
onClick={onClick}
sx={{
height: size,
width: size,
p: 0,
borderRadius: "6px",
backgroundColor: theme.palette.background.default,
color: theme.palette.grey2.main,
"&:hover": {
color: theme.palette.background.default,
backgroundColor: theme.palette.grey2.main,
},
"&:active": {
backgroundColor: theme.palette.brightPurple.main,
color: "white",
},
...sx,
}}
>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 36 37" fill="none">
<path d="M26.571 16.051v-5c0-.789-.64-1.428-1.428-1.428H9.429c-.79 0-1.429.64-1.429 1.428v14.286c0 .789.64 1.428 1.429 1.428h15.714c.789 0 1.428-.64 1.428-1.428v-5m1.33-5h-7.044a2.857 2.857 0 0 0 0 5.714h7.044a.099.099 0 0 0 .099-.099v-5.516a.1.1 0 0 0-.099-.1Z" stroke="currentColor" strokeWidth="1.5" />
</svg>
</IconButton>
);
}

@ -1,2 +1,9 @@
export * from "./HelloWorld";
export * from "./AvatarButton";
export * from "./BurgerButton";
export * from "./CloseButton";
export * from "./CloseButtonSmall";
export * from "./LogoutButton";
export * from "./PenaLink";
export * from "./PenaTextField";
export * from "./theme";
export * from "./WalletButton";

@ -49,6 +49,7 @@ export const penaMuiTheme = createTheme({
},
orange: {
main: "#FB5607",
light: "#FC712F",
},
navbarbg: {
main: "#FFFFFF",
@ -58,12 +59,13 @@ export const penaMuiTheme = createTheme({
MuiButton: {
variants: [
{
props: { variant: "pena-contained" },
props: { variant: "pena-contained-dark" },
style: ({ theme }) => theme.unstable_sx({
border: `1px solid ${theme.palette.brightPurple.main}`,
backgroundColor: theme.palette.brightPurple.main,
minWidth: "180px",
py: "9px",
px: "43px",
borderRadius: "8px",
boxShadow: "none",
fontSize: "18px",
@ -73,6 +75,7 @@ export const penaMuiTheme = createTheme({
color: "white",
"&:hover": {
backgroundColor: "#944FEE",
border: `1px solid #944FEE`,
},
"&:active": {
backgroundColor: "#FFFFFF",
@ -81,12 +84,13 @@ export const penaMuiTheme = createTheme({
}),
},
{
props: { variant: "pena-outlined" },
props: { variant: "pena-outlined-dark" },
style: ({ theme }) => theme.unstable_sx({
border: `1px solid white`,
backgroundColor: "rgb(0 0 0 / 0)",
minWidth: "180px",
py: "9px",
px: "43px",
borderRadius: "8px",
boxShadow: "none",
fontSize: "18px",
@ -95,7 +99,7 @@ export const penaMuiTheme = createTheme({
textTransform: "none",
color: "white",
"&:hover": {
backgroundColor: "#252734",
backgroundColor: theme.palette.darkPurple.main,
},
"&:active": {
backgroundColor: theme.palette.brightPurple.main,
@ -103,11 +107,128 @@ export const penaMuiTheme = createTheme({
}
}),
},
{
props: { variant: "pena-contained-light" },
style: ({ theme }) => theme.unstable_sx({
border: `1px solid white`,
backgroundColor: "white",
minWidth: "180px",
py: "9px",
px: "43px",
borderRadius: "8px",
boxShadow: "none",
fontSize: "18px",
lineHeight: "24px",
fontWeight: 400,
textTransform: "none",
color: theme.palette.darkPurple.main,
"&:hover": {
backgroundColor: theme.palette.background.default,
},
"&:active": {
backgroundColor: "black",
color: "white",
border: `1px solid black`,
}
}),
},
{
props: { variant: "pena-outlined-light" },
style: ({ theme }) => theme.unstable_sx({
border: `1px solid white`,
backgroundColor: "rgb(0 0 0 / 0)",
minWidth: "180px",
py: "9px",
px: "43px",
borderRadius: "8px",
boxShadow: "none",
fontSize: "18px",
lineHeight: "24px",
fontWeight: 400,
textTransform: "none",
color: "white",
"&:hover": {
backgroundColor: "#581CA7",
},
"&:active": {
backgroundColor: "black",
borderColor: "black",
}
}),
},
{
props: { variant: "pena-outlined-purple" },
style: ({ theme }) => theme.unstable_sx({
border: `1px solid ${theme.palette.brightPurple.main}`,
backgroundColor: "rgb(0 0 0 / 0)",
minWidth: "180px",
py: "9px",
px: "43px",
borderRadius: "8px",
boxShadow: "none",
fontSize: "18px",
lineHeight: "24px",
fontWeight: 400,
textTransform: "none",
color: theme.palette.brightPurple.main,
"&:hover": {
backgroundColor: theme.palette.background.default,
},
"&:active": {
backgroundColor: "#581CA7",
borderColor: "#581CA7",
color: "white",
}
}),
},
{
props: { variant: "pena-navitem-dark" },
style: ({ theme }) => theme.unstable_sx({
backgroundColor: "rgb(0 0 0 / 0)",
p: 0,
boxShadow: "none",
fontSize: "16px",
lineHeight: "20px",
fontWeight: 500,
textTransform: "none",
color: "white",
"&:hover": {
color: "#944FEE",
},
"&:active": {
color: "#944FEE",
}
}),
},
{
props: { variant: "pena-navitem-light" },
style: ({ theme }) => theme.unstable_sx({
backgroundColor: "rgb(0 0 0 / 0)",
p: 0,
boxShadow: "none",
fontSize: "16px",
lineHeight: "20px",
fontWeight: 500,
textTransform: "none",
color: "black",
"&:hover": {
color: theme.palette.brightPurple.main,
},
"&:active": {
color: theme.palette.brightPurple.main,
}
}),
},
],
defaultProps: {
disableTouchRipple: true,
},
},
MuiIconButton: {
defaultProps: {
disableTouchRipple: true,
},
},
MuiTypography: {
defaultProps: {
variantMapping: {
@ -116,7 +237,7 @@ export const penaMuiTheme = createTheme({
},
},
},
typography: {
typography: palette => ({
h5: {
fontSize: "24px",
lineHeight: "28.44px",
@ -147,14 +268,14 @@ export const penaMuiTheme = createTheme({
fontWeight: 500,
fontSize: "20px",
lineHeight: "24px",
color: "#4D4D4D",
color: palette.grey3.main,
},
oldPrice: {
fontWeight: 400,
fontSize: "18px",
lineHeight: "21px",
textDecorationLine: "line-through",
color: "#FB5607",
color: palette.orange.main,
},
fontFamily: [
"Rubik",
@ -168,17 +289,21 @@ export const penaMuiTheme = createTheme({
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(","),
},
}),
});
declare module '@mui/material/Button' {
interface ButtonPropsVariantOverrides {
"pena-contained": true;
"pena-outlined": true;
"pena-contained-light": true;
"pena-outlined-light": true;
"pena-contained-dark": true;
"pena-outlined-dark": true;
"pena-outlined-purple": true;
"pena-navitem-light": true;
"pena-navitem-dark": true;
}
}
declare module "@mui/material/styles" {
interface Palette {
lightPurple: Palette["primary"],

@ -3,19 +3,19 @@
export interface CreateTicketRequest {
Title: string;
Message: string;
};
}
export interface CreateTicketResponse {
Ticket: string;
sess: string;
};
}
export interface SendTicketMessageRequest {
message: string;
ticket: string;
lang: string;
files: string[];
};
}
export type TicketStatus = "open";
@ -25,12 +25,12 @@ export interface GetTicketsRequest {
page: number;
srch?: string;
status?: TicketStatus;
};
}
export interface GetTicketsResponse {
count: number;
data: Ticket[] | null;
};
}
export interface Ticket {
id: string;
@ -43,7 +43,7 @@ export interface Ticket {
created_at: string;
updated_at: string;
rate: number;
};
}
export interface TicketMessage {
id: string;
@ -55,13 +55,13 @@ export interface TicketMessage {
shown: { [key: string]: number; },
request_screenshot: string,
created_at: string;
};
}
export interface GetMessagesRequest {
amt: number;
page: number;
srch?: string;
ticket: string;
};
}
export type GetMessagesResponse = TicketMessage[];

@ -1,6 +1,6 @@
{
"name": "@frontend/kitui",
"version": "1.0.27",
"version": "1.0.28",
"description": "test",
"main": "./dist/index.js",
"module": "./dist/index.js",
@ -39,6 +39,7 @@
"@mui/material": "^5.14.4",
"@types/node": "^20.5.0",
"@types/react-dom": "^18.2.7",
"@types/react-syntax-highlighter": "^15.5.7",
"@types/react": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
@ -47,8 +48,9 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"eslint": "^8.45.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-syntax-highlighter": "^15.5.0",
"react": "^18.2.0",
"typescript": "^5.0.2",
"vite-plugin-dts": "^3.5.2",
"vite": "^4.4.5",

@ -1,12 +1,22 @@
import { Box, Button, Container, Typography } from "@mui/material";
import { Box, Button, Container, useTheme } from "@mui/material";
import { PenaLink } from "../lib/components/PenaLink";
import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter";
import { oneDark } from "react-syntax-highlighter/dist/esm/styles/prism";
import jsx from "react-syntax-highlighter/dist/esm/languages/prism/tsx";
import { ReactNode } from "react";
import { BurgerButton, CloseButton, CloseButtonSmall, PenaTextField, WalletButton } from "../lib";
import { AvatarButton } from "../lib/components/AvatarButton";
import { LogoutButton } from "../lib/components/LogoutButton";
function App() {
SyntaxHighlighter.registerLanguage("jsx", jsx);
export function App() {
const theme = useTheme();
return (
<Box sx={{
backgroundColor: "#333647",
backgroundColor: theme.palette.lightPurple.main,
minHeight: "100dvh",
width: "100%",
}}>
@ -14,15 +24,99 @@ function App() {
py: 4,
display: "flex",
flexDirection: "column",
gap: 2,
gap: 3,
alignItems: "start",
color: "white",
}}>
<Button variant="pena-outlined">Личный кабинет</Button>
<Button variant="pena-contained">Подробнее</Button>
<PenaLink>Подробнее</PenaLink>
<ComponentWithCode
code={`<Button variant="pena-contained-dark">Подробнее</Button>`}
element={<Button variant="pena-contained-dark">Подробнее</Button>}
/>
<ComponentWithCode
code={`<Button variant="pena-contained-light">Подробнее</Button>`}
element={<Button variant="pena-contained-light">Подробнее</Button>}
/>
<ComponentWithCode
code={`<Button variant="pena-outlined-dark">Подробнее</Button>`}
element={<Button variant="pena-outlined-dark">Подробнее</Button>}
/>
<ComponentWithCode
code={`<Button variant="pena-outlined-light">Подробнее</Button>`}
element={<Button variant="pena-outlined-light">Подробнее</Button>}
/>
<ComponentWithCode
code={`<Button variant="pena-outlined-purple">Перейти</Button>`}
element={<Button variant="pena-outlined-purple">Перейти</Button>}
/>
<ComponentWithCode
code={`<Button variant="pena-navitem-dark">Подробнее</Button>`}
element={<Button variant="pena-navitem-dark">Подробнее</Button>}
/>
<ComponentWithCode
code={`<Button variant="pena-navitem-light">Подробнее</Button>`}
element={<Button variant="pena-navitem-light">Подробнее</Button>}
/>
<ComponentWithCode
code={`<PenaLink>Подробнее</PenaLink>`}
element={<PenaLink href="/">Подробнее</PenaLink>}
/>
<ComponentWithCode
code={`<PenaTextField />`}
element={<PenaTextField />}
/>
<ComponentWithCode
code={`<AvatarButton>AB</AvatarButton>`}
element={<AvatarButton>AB</AvatarButton>}
/>
<ComponentWithCode
code={`<LogoutButton />`}
element={<LogoutButton />}
/>
<ComponentWithCode
code={`<WalletButton />`}
element={<WalletButton />}
/>
<ComponentWithCode
code={`<CloseButton />`}
element={<CloseButton />}
/>
<ComponentWithCode
code={`<CloseButtonSmall />`}
element={<CloseButtonSmall />}
/>
<ComponentWithCode
code={`<BurgerButton />`}
element={<BurgerButton />}
/>
</Container>
</Box>
);
}
export default App;
function ComponentWithCode({ code, element }: {
code: string;
element: ReactNode;
}) {
return (
<Box sx={{
display: "flex",
flexDirection: "column",
gap: 1,
alignItems: "start",
}}>
<SyntaxHighlighter
language="jsx"
style={oneDark}
customStyle={{
padding: "4px",
fontSize: "16px",
margin: 0,
}}
>
{code}
</SyntaxHighlighter>
{element}
</Box>
);
}

@ -1,10 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import { CssBaseline, ThemeProvider } from '@mui/material';
import { penaMuiTheme } from '../lib/index.ts';
import React from "react";
import ReactDOM from "react-dom/client";
import { App } from "./App.tsx";
import { CssBaseline, ThemeProvider } from "@mui/material";
import { penaMuiTheme } from "../lib/index.ts";
ReactDOM.createRoot(document.getElementById('root')!).render(
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<ThemeProvider theme={penaMuiTheme}>
<CssBaseline />

164
yarn.lock

@ -179,7 +179,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.6", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.6", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
version "7.22.10"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682"
integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==
@ -731,6 +731,13 @@
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194"
integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==
"@types/hast@^2.0.0":
version "2.3.5"
resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.5.tgz#08caac88b44d0fdd04dc17a19142355f43bd8a7a"
integrity sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==
dependencies:
"@types/unist" "^2"
"@types/json-schema@^7.0.12":
version "7.0.12"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb"
@ -765,6 +772,13 @@
dependencies:
"@types/react" "*"
"@types/react-syntax-highlighter@^15.5.7":
version "15.5.7"
resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-15.5.7.tgz#bd29020ccb118543d88779848f99059b64b02d0f"
integrity sha512-bo5fEO5toQeyCp0zVHBeggclqf5SQ/Z5blfFmjwO5dkMVGPgmiwZsJh9nu/Bo5L7IHTuGWrja6LxJVE2uB5ZrQ==
dependencies:
"@types/react" "*"
"@types/react-transition-group@^4.4.6":
version "4.4.6"
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.6.tgz#18187bcda5281f8e10dfc48f0943e2fdf4f75e2e"
@ -791,6 +805,11 @@
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a"
integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==
"@types/unist@^2":
version "2.0.7"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.7.tgz#5b06ad6894b236a1d2bd6b2f07850ca5c59cf4d6"
integrity sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==
"@typescript-eslint/eslint-plugin@^6.0.0":
version "6.3.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.3.0.tgz#e751e148aab7ccaf8a7bfd370f7ce9e6bdd1f3f4"
@ -1103,6 +1122,21 @@ chalk@^4.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
character-entities-legacy@^1.0.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1"
integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==
character-entities@^1.0.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b"
integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==
character-reference-invalid@^1.0.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560"
integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==
clsx@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b"
@ -1144,6 +1178,11 @@ combined-stream@^1.0.8:
dependencies:
delayed-stream "~1.0.0"
comma-separated-tokens@^1.0.0:
version "1.0.8"
resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea"
integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==
commander@^10.0.0:
version "10.0.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
@ -1420,6 +1459,13 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"
fault@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13"
integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==
dependencies:
format "^0.2.0"
file-entry-cache@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
@ -1474,6 +1520,11 @@ form-data@^4.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"
format@^0.2.0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b"
integrity sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==
fs-extra@~7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
@ -1580,11 +1631,32 @@ has@^1.0.3:
dependencies:
function-bind "^1.1.1"
hast-util-parse-selector@^2.0.0:
version "2.2.5"
resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a"
integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==
hastscript@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640"
integrity sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==
dependencies:
"@types/hast" "^2.0.0"
comma-separated-tokens "^1.0.0"
hast-util-parse-selector "^2.0.0"
property-information "^5.0.0"
space-separated-tokens "^1.0.0"
he@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
highlight.js@^10.4.1, highlight.js@~10.7.0:
version "10.7.3"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531"
integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==
hoist-non-react-statics@^3.3.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
@ -1633,6 +1705,19 @@ inherits@2:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
is-alphabetical@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d"
integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==
is-alphanumerical@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf"
integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==
dependencies:
is-alphabetical "^1.0.0"
is-decimal "^1.0.0"
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@ -1645,6 +1730,11 @@ is-core-module@^2.1.0, is-core-module@^2.13.0:
dependencies:
has "^1.0.3"
is-decimal@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5"
integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@ -1657,6 +1747,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
dependencies:
is-extglob "^2.1.1"
is-hexadecimal@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7"
integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==
is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
@ -1773,6 +1868,14 @@ loose-envify@^1.1.0, loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
lowlight@^1.17.0:
version "1.20.0"
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.20.0.tgz#ddb197d33462ad0d93bf19d17b6c301aa3941888"
integrity sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==
dependencies:
fault "^1.0.0"
highlight.js "~10.7.0"
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@ -1901,6 +2004,18 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"
parse-entities@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8"
integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==
dependencies:
character-entities "^1.0.0"
character-entities-legacy "^1.0.0"
character-reference-invalid "^1.0.0"
is-alphanumerical "^1.0.0"
is-decimal "^1.0.0"
is-hexadecimal "^1.0.0"
parse-json@^5.0.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
@ -1960,6 +2075,16 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prismjs@^1.27.0:
version "1.29.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12"
integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==
prismjs@~1.27.0:
version "1.27.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057"
integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==
prop-types@^15.6.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
@ -1969,6 +2094,13 @@ prop-types@^15.6.2, prop-types@^15.8.1:
object-assign "^4.1.1"
react-is "^16.13.1"
property-information@^5.0.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.6.0.tgz#61675545fb23002f245c6540ec46077d4da3ed69"
integrity sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==
dependencies:
xtend "^4.0.0"
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
@ -2007,6 +2139,17 @@ react-refresh@^0.14.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==
react-syntax-highlighter@^15.5.0:
version "15.5.0"
resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz#4b3eccc2325fa2ec8eff1e2d6c18fa4a9e07ab20"
integrity sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==
dependencies:
"@babel/runtime" "^7.3.1"
highlight.js "^10.4.1"
lowlight "^1.17.0"
prismjs "^1.27.0"
refractor "^3.6.0"
react-transition-group@^4.4.5:
version "4.4.5"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1"
@ -2029,6 +2172,15 @@ reconnecting-eventsource@^1.6.2:
resolved "https://registry.yarnpkg.com/reconnecting-eventsource/-/reconnecting-eventsource-1.6.2.tgz#b7f5b03b1c76291f6fbcb0203004892a57ae253b"
integrity sha512-vHhoxVLbA2YcfljWMKEbgR1KVTgwIrnyh/bzVJc+gfQbGcUIToLL6jNhkUL4E+9FbnAcfUVNLIw2YCiliTg/4g==
refractor@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.6.0.tgz#ac318f5a0715ead790fcfb0c71f4dd83d977935a"
integrity sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==
dependencies:
hastscript "^6.0.0"
parse-entities "^2.0.0"
prismjs "~1.27.0"
regenerator-runtime@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
@ -2133,6 +2285,11 @@ source-map@~0.6.1:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
space-separated-tokens@^1.0.0:
version "1.1.5"
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899"
integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
@ -2305,6 +2462,11 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
xtend@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
yallist@^3.0.2:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"