mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-07 06:03:58 -05:00
Most simple components created
This commit is contained in:
1
src/assets/react.svg
Normal file
1
src/assets/react.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
82
src/index.css
Normal file
82
src/index.css
Normal file
@@ -0,0 +1,82 @@
|
||||
@import "tailwindcss";
|
||||
@custom-variant dark (&:where(.dark, .dark *));
|
||||
|
||||
@theme {
|
||||
--color-neutral-825: oklch(0.253 0 0);
|
||||
--color-neutral-850: oklch(0.237 0 0);
|
||||
|
||||
|
||||
--light-text-color: #213547;
|
||||
--light-bg-color: #FFFFFF;
|
||||
|
||||
--dark-text-color: #FFFFFFDE;
|
||||
--dark-bg-color: #242424;
|
||||
}
|
||||
|
||||
|
||||
:root.light {
|
||||
--text-color: var(--light-text-color);
|
||||
--bg-color: var(--light-bg-color);
|
||||
}
|
||||
|
||||
:root.dark {
|
||||
--text-color: var(--dark-text-color);
|
||||
--bg-color: var(--dark-bg-color);
|
||||
}
|
||||
|
||||
input::-webkit-calendar-picker-indicator {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:root {
|
||||
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
color: var(--text-color);
|
||||
background-color: var(--bg-color);
|
||||
}
|
||||
|
||||
#root {
|
||||
padding-top: 4rem;
|
||||
padding-inline: 1rem;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-inline: auto;
|
||||
|
||||
min-width: 320px;
|
||||
height: 100vh;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a.active {
|
||||
color: var(--color-blue-400);
|
||||
}
|
||||
|
||||
nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-btween;
|
||||
align-items: center;
|
||||
margin-inline: auto;
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
|
||||
@keyframes spinnerAnimate {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
23
src/main.tsx
Normal file
23
src/main.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import ThemeProvider from "$/providers/theme/ThemeProvider";
|
||||
import { RouterProvider, createRouter } from "@tanstack/react-router";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import "./index.css";
|
||||
import { routeTree } from "./routeTree.gen";
|
||||
|
||||
|
||||
const router = createRouter({ routeTree });
|
||||
declare module "@tanstack/react-router" {
|
||||
interface Register {
|
||||
router: typeof router
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<ThemeProvider defaultTheme="dark">
|
||||
<RouterProvider router={router}/>
|
||||
</ThemeProvider>
|
||||
</StrictMode>
|
||||
);
|
||||
210
src/routeTree.gen.ts
Normal file
210
src/routeTree.gen.ts
Normal file
@@ -0,0 +1,210 @@
|
||||
/* eslint-disable */
|
||||
|
||||
// @ts-nocheck
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
// This file was automatically generated by TanStack Router.
|
||||
// You should NOT make any changes in this file as it will be overwritten.
|
||||
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
||||
|
||||
import { Route as rootRouteImport } from './routes/__root'
|
||||
import { Route as IndexRouteImport } from './routes/index'
|
||||
import { Route as TabIndexRouteImport } from './routes/tab/index'
|
||||
import { Route as SwitchIndexRouteImport } from './routes/switch/index'
|
||||
import { Route as ModalIndexRouteImport } from './routes/modal/index'
|
||||
import { Route as MessageIndexRouteImport } from './routes/message/index'
|
||||
import { Route as LoadingIndexRouteImport } from './routes/loading/index'
|
||||
import { Route as InputIndexRouteImport } from './routes/input/index'
|
||||
import { Route as ButtonsIndexRouteImport } from './routes/buttons/index'
|
||||
|
||||
const IndexRoute = IndexRouteImport.update({
|
||||
id: '/',
|
||||
path: '/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const TabIndexRoute = TabIndexRouteImport.update({
|
||||
id: '/tab/',
|
||||
path: '/tab/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const SwitchIndexRoute = SwitchIndexRouteImport.update({
|
||||
id: '/switch/',
|
||||
path: '/switch/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const ModalIndexRoute = ModalIndexRouteImport.update({
|
||||
id: '/modal/',
|
||||
path: '/modal/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const MessageIndexRoute = MessageIndexRouteImport.update({
|
||||
id: '/message/',
|
||||
path: '/message/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const LoadingIndexRoute = LoadingIndexRouteImport.update({
|
||||
id: '/loading/',
|
||||
path: '/loading/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const InputIndexRoute = InputIndexRouteImport.update({
|
||||
id: '/input/',
|
||||
path: '/input/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const ButtonsIndexRoute = ButtonsIndexRouteImport.update({
|
||||
id: '/buttons/',
|
||||
path: '/buttons/',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
|
||||
export interface FileRoutesByFullPath {
|
||||
'/': typeof IndexRoute
|
||||
'/buttons': typeof ButtonsIndexRoute
|
||||
'/input': typeof InputIndexRoute
|
||||
'/loading': typeof LoadingIndexRoute
|
||||
'/message': typeof MessageIndexRoute
|
||||
'/modal': typeof ModalIndexRoute
|
||||
'/switch': typeof SwitchIndexRoute
|
||||
'/tab': typeof TabIndexRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof IndexRoute
|
||||
'/buttons': typeof ButtonsIndexRoute
|
||||
'/input': typeof InputIndexRoute
|
||||
'/loading': typeof LoadingIndexRoute
|
||||
'/message': typeof MessageIndexRoute
|
||||
'/modal': typeof ModalIndexRoute
|
||||
'/switch': typeof SwitchIndexRoute
|
||||
'/tab': typeof TabIndexRoute
|
||||
}
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRouteImport
|
||||
'/': typeof IndexRoute
|
||||
'/buttons/': typeof ButtonsIndexRoute
|
||||
'/input/': typeof InputIndexRoute
|
||||
'/loading/': typeof LoadingIndexRoute
|
||||
'/message/': typeof MessageIndexRoute
|
||||
'/modal/': typeof ModalIndexRoute
|
||||
'/switch/': typeof SwitchIndexRoute
|
||||
'/tab/': typeof TabIndexRoute
|
||||
}
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
fullPaths:
|
||||
| '/'
|
||||
| '/buttons'
|
||||
| '/input'
|
||||
| '/loading'
|
||||
| '/message'
|
||||
| '/modal'
|
||||
| '/switch'
|
||||
| '/tab'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to:
|
||||
| '/'
|
||||
| '/buttons'
|
||||
| '/input'
|
||||
| '/loading'
|
||||
| '/message'
|
||||
| '/modal'
|
||||
| '/switch'
|
||||
| '/tab'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/'
|
||||
| '/buttons/'
|
||||
| '/input/'
|
||||
| '/loading/'
|
||||
| '/message/'
|
||||
| '/modal/'
|
||||
| '/switch/'
|
||||
| '/tab/'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
export interface RootRouteChildren {
|
||||
IndexRoute: typeof IndexRoute
|
||||
ButtonsIndexRoute: typeof ButtonsIndexRoute
|
||||
InputIndexRoute: typeof InputIndexRoute
|
||||
LoadingIndexRoute: typeof LoadingIndexRoute
|
||||
MessageIndexRoute: typeof MessageIndexRoute
|
||||
ModalIndexRoute: typeof ModalIndexRoute
|
||||
SwitchIndexRoute: typeof SwitchIndexRoute
|
||||
TabIndexRoute: typeof TabIndexRoute
|
||||
}
|
||||
|
||||
declare module '@tanstack/react-router' {
|
||||
interface FileRoutesByPath {
|
||||
'/': {
|
||||
id: '/'
|
||||
path: '/'
|
||||
fullPath: '/'
|
||||
preLoaderRoute: typeof IndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/tab/': {
|
||||
id: '/tab/'
|
||||
path: '/tab'
|
||||
fullPath: '/tab'
|
||||
preLoaderRoute: typeof TabIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/switch/': {
|
||||
id: '/switch/'
|
||||
path: '/switch'
|
||||
fullPath: '/switch'
|
||||
preLoaderRoute: typeof SwitchIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/modal/': {
|
||||
id: '/modal/'
|
||||
path: '/modal'
|
||||
fullPath: '/modal'
|
||||
preLoaderRoute: typeof ModalIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/message/': {
|
||||
id: '/message/'
|
||||
path: '/message'
|
||||
fullPath: '/message'
|
||||
preLoaderRoute: typeof MessageIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/loading/': {
|
||||
id: '/loading/'
|
||||
path: '/loading'
|
||||
fullPath: '/loading'
|
||||
preLoaderRoute: typeof LoadingIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/input/': {
|
||||
id: '/input/'
|
||||
path: '/input'
|
||||
fullPath: '/input'
|
||||
preLoaderRoute: typeof InputIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/buttons/': {
|
||||
id: '/buttons/'
|
||||
path: '/buttons'
|
||||
fullPath: '/buttons'
|
||||
preLoaderRoute: typeof ButtonsIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const rootRouteChildren: RootRouteChildren = {
|
||||
IndexRoute: IndexRoute,
|
||||
ButtonsIndexRoute: ButtonsIndexRoute,
|
||||
InputIndexRoute: InputIndexRoute,
|
||||
LoadingIndexRoute: LoadingIndexRoute,
|
||||
MessageIndexRoute: MessageIndexRoute,
|
||||
ModalIndexRoute: ModalIndexRoute,
|
||||
SwitchIndexRoute: SwitchIndexRoute,
|
||||
TabIndexRoute: TabIndexRoute,
|
||||
}
|
||||
export const routeTree = rootRouteImport
|
||||
._addFileChildren(rootRouteChildren)
|
||||
._addFileTypes<FileRouteTypes>()
|
||||
50
src/routes/__root.tsx
Normal file
50
src/routes/__root.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import { DarkModeSwitch } from "$/component/nav";
|
||||
import NavBar from "$/component/nav/NavBar";
|
||||
import { createRootRoute, Link, Outlet } from "@tanstack/react-router";
|
||||
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
||||
|
||||
|
||||
const navLinks = [
|
||||
{ to: "/", label: "Home" },
|
||||
{ to: "/buttons", label: "Buttons" },
|
||||
{ to: "/input", label: "Input" },
|
||||
{ to: "/loading", label: "Loading" },
|
||||
{ to: "/message", label: "Message" },
|
||||
{ to: "/modal", label: "Modal" },
|
||||
{ to: "/switch", label: "Switch" },
|
||||
{ to: "/tab", label: "Tab" },
|
||||
];
|
||||
|
||||
|
||||
export const Route = createRootRoute({
|
||||
component: () => (
|
||||
<>
|
||||
<NavBar
|
||||
className="bg-neutral-300 dark:bg-neutral-900 h-12"
|
||||
>
|
||||
<div
|
||||
className="flex flex-row items-center justify-end gap-x-4"
|
||||
>
|
||||
{
|
||||
navLinks.map((link) => (
|
||||
<Link
|
||||
to={link.to}
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<DarkModeSwitch/>
|
||||
</div>
|
||||
</NavBar>
|
||||
<Outlet/>
|
||||
{/* */}
|
||||
<TanStackRouterDevtools
|
||||
position="bottom-right"
|
||||
/>
|
||||
{/* */}
|
||||
</>
|
||||
)
|
||||
});
|
||||
139
src/routes/buttons/index.tsx
Normal file
139
src/routes/buttons/index.tsx
Normal file
@@ -0,0 +1,139 @@
|
||||
import { DangerButton, DarkButton, LightButton, PrimaryButton, SecondaryButton, SuccessButton, TertiaryButton, WarningButton } from "$/component/button";
|
||||
import InfoButton from "$/component/button/InfoButton";
|
||||
import MoltenButton from "$/component/button/MoltenButton";
|
||||
import { MattrixwvTabGroup } from "$/component/tab";
|
||||
import type { ButtonProps, ButtonSize } from "$/types/Button";
|
||||
import type { TabGroupContent } from "$/types/Tab";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { useState, type JSX } from "react";
|
||||
import { BsBag } from "react-icons/bs";
|
||||
|
||||
|
||||
export const Route = createFileRoute("/buttons/")({
|
||||
component: ButtonPage
|
||||
});
|
||||
|
||||
|
||||
function ButtonPage(){
|
||||
const [ clickCount, setClickCount ] = useState(0);
|
||||
|
||||
|
||||
const tabs: TabGroupContent[] = [
|
||||
{ tab: "Primary", content: generateTabContent(PrimaryButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Secondary", content: generateTabContent(SecondaryButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Tertiary", content: generateTabContent(TertiaryButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Info", content: generateTabContent(InfoButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Success", content: generateTabContent(SuccessButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Warning", content: generateTabContent(WarningButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Danger", content: generateTabContent(DangerButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Molten", content: generateTabContent(MoltenButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Dark", content: generateTabContent(DarkButton, () => setClickCount(clickCount + 1)) },
|
||||
{ tab: "Light", content: generateTabContent(LightButton, () => setClickCount(clickCount + 1)) }
|
||||
];
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<h1
|
||||
className="text-4xl"
|
||||
>
|
||||
Count {clickCount}
|
||||
</h1>
|
||||
<MattrixwvTabGroup
|
||||
tabs={tabs}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function generateTabContent(Fn: (props: ButtonProps) => JSX.Element, onClick: () => void): React.ReactNode{
|
||||
const sizes: { size: ButtonSize; title: string; }[] = [
|
||||
{ size: "xl", title: "X-Large" },
|
||||
{ size: "lg", title: "Large" },
|
||||
{ size: "md", title: "Medium" },
|
||||
{ size: "sm", title: "Small" },
|
||||
{ size: "xs", title: "X-Small" },
|
||||
];
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center gap-y-8 mt-8"
|
||||
>
|
||||
<ButtonDisplay
|
||||
title="Rectangle"
|
||||
>
|
||||
{sizes.map((size) => (<Fn shape="rectangle" size={size.size} key={size.size} onClick={onClick}>{size.title}</Fn>))}
|
||||
<Fn shape="rectangle" size="md" disabled={true} onClick={onClick}>Disabled</Fn>
|
||||
</ButtonDisplay>
|
||||
|
||||
<ButtonDisplay
|
||||
title="Square"
|
||||
>
|
||||
{sizes.map((size) => (<Fn shape="square" size={size.size} key={size.size} onClick={onClick}><BsBag size={20}/></Fn>))}
|
||||
</ButtonDisplay>
|
||||
|
||||
<ButtonDisplay
|
||||
title="Rounding"
|
||||
>
|
||||
<Fn rounding="none" onClick={onClick}>None</Fn>
|
||||
<Fn rounding="sm" onClick={onClick}>Small</Fn>
|
||||
<Fn rounding="md" onClick={onClick}>Medium</Fn>
|
||||
<Fn rounding="lg" onClick={onClick}>Large</Fn>
|
||||
<Fn rounding="full" onClick={onClick}>Full</Fn>
|
||||
</ButtonDisplay>
|
||||
|
||||
<ButtonDisplay
|
||||
title="Outline"
|
||||
>
|
||||
{sizes.map((size) => (<Fn variant="outline" size={size.size} key={size.size} onClick={onClick}>{size.title}</Fn>))}
|
||||
<Fn variant="outline" size="md" disabled={true} onClick={onClick}>Disabled</Fn>
|
||||
</ButtonDisplay>
|
||||
|
||||
<ButtonDisplay
|
||||
title="Ghost"
|
||||
>
|
||||
{sizes.map((size) => (<Fn variant="ghost" size={size.size} key={size.size} onClick={onClick}>{size.title}</Fn>))}
|
||||
<Fn variant="ghost" size="md" disabled={true} onClick={onClick}>Disabled</Fn>
|
||||
</ButtonDisplay>
|
||||
|
||||
<ButtonDisplay
|
||||
title="Outline-Ghost"
|
||||
>
|
||||
{sizes.map((size) => (<Fn variant="outline-ghost" size={size.size} key={size.size} onClick={onClick}>{size.title}</Fn>))}
|
||||
<Fn variant="outline-ghost" size="md" disabled={true} onClick={onClick}>Disabled</Fn>
|
||||
</ButtonDisplay>
|
||||
|
||||
<ButtonDisplay
|
||||
title="Icon"
|
||||
>
|
||||
{sizes.map((size) => (<Fn variant="icon" size={size.size} key={size.size} onClick={onClick}>{<BsBag size={20}/>}</Fn>))}
|
||||
<Fn variant="icon" size="md" disabled={true} onClick={onClick}><BsBag size={20}/></Fn>
|
||||
</ButtonDisplay>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ButtonDisplay({
|
||||
title,
|
||||
children
|
||||
}:{
|
||||
title: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
}){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center gap-y-2"
|
||||
>
|
||||
<h2 className="text-2xl">{title}</h2>
|
||||
<div
|
||||
className="flex flex-row items-center justify-center gap-x-4"
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
15
src/routes/index.tsx
Normal file
15
src/routes/index.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
|
||||
export const Route = createFileRoute("/")({
|
||||
component: HomePage
|
||||
});
|
||||
|
||||
|
||||
function HomePage(){
|
||||
return (
|
||||
<div>
|
||||
Home Page
|
||||
</div>
|
||||
);
|
||||
}
|
||||
11
src/routes/input/index.tsx
Normal file
11
src/routes/input/index.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
|
||||
export const Route = createFileRoute('/input/')({
|
||||
component: InputPage
|
||||
});
|
||||
|
||||
|
||||
function InputPage(){
|
||||
return <div>Hello "/input/"!</div>
|
||||
}
|
||||
27
src/routes/loading/index.tsx
Normal file
27
src/routes/loading/index.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { MattrixwvTabGroup } from "$/component/tab";
|
||||
import type { TabGroupContent } from "$/types/Tab";
|
||||
import { generateBarsContent, generateBlocksContent, generateDotsContent, generatePulsesContent, generateSpinnersContent, generateVariousContent } from "@/util/LoadingUtils";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
|
||||
export const Route = createFileRoute("/loading/")({
|
||||
component: LoadingPage
|
||||
});
|
||||
|
||||
|
||||
function LoadingPage(){
|
||||
const tabs: TabGroupContent[] = [
|
||||
{ tab: "Spinners", content: generateSpinnersContent() },
|
||||
{ tab: "Dots", content: generateDotsContent() },
|
||||
{ tab: "Bars", content: generateBarsContent() },
|
||||
{ tab: "Blocks", content: generateBlocksContent() },
|
||||
{ tab: "Pulses", content: generatePulsesContent() },
|
||||
{ tab: "Various", content: generateVariousContent() }
|
||||
];
|
||||
|
||||
return (
|
||||
<MattrixwvTabGroup
|
||||
tabs={tabs}
|
||||
/>
|
||||
);
|
||||
}
|
||||
48
src/routes/message/index.tsx
Normal file
48
src/routes/message/index.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import { DangerMessageBlock, DarkMessageBlock, LightMessageBlock, PrimaryMessageBlock, SecondaryMessageBlock, SuccessMessageBlock, TertiaryMessageBlock, WarningMessageBlock } from '$/component/message';
|
||||
import InfoMessageBlock from '$/component/message/InfoMessageBlock';
|
||||
import MoltenMessageBlock from '$/component/message/MoltenMessageBlock';
|
||||
import { MattrixwvTabGroup } from '$/component/tab';
|
||||
import type { MessageBlockProps } from '$/types/Message';
|
||||
import type { TabGroupContent } from '$/types/Tab';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
|
||||
export const Route = createFileRoute('/message/')({
|
||||
component: MessagePage
|
||||
});
|
||||
|
||||
|
||||
function MessagePage(){
|
||||
const tabs: TabGroupContent[] = [
|
||||
{ tab: "Primary", content: generateTabContent(PrimaryMessageBlock) },
|
||||
{ tab: "Secondary", content: generateTabContent(SecondaryMessageBlock) },
|
||||
{ tab: "Tertiary", content: generateTabContent(TertiaryMessageBlock) },
|
||||
{ tab: "Info", content: generateTabContent(InfoMessageBlock) },
|
||||
{ tab: "Success", content: generateTabContent(SuccessMessageBlock) },
|
||||
{ tab: "Warning", content: generateTabContent(WarningMessageBlock) },
|
||||
{ tab: "Danger", content: generateTabContent(DangerMessageBlock) },
|
||||
{ tab: "Molten", content: generateTabContent(MoltenMessageBlock) },
|
||||
{ tab: "Dark", content: generateTabContent(DarkMessageBlock) },
|
||||
{ tab: "Light", content: generateTabContent(LightMessageBlock) }
|
||||
];
|
||||
|
||||
|
||||
return (
|
||||
<MattrixwvTabGroup
|
||||
tabs={tabs}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function generateTabContent(Fn: (props: MessageBlockProps) => React.ReactNode): React.ReactNode{
|
||||
return (
|
||||
<Fn
|
||||
className="flex flex-col items-center justify-center mt-8"
|
||||
>
|
||||
<span>This is a test message across multiple lines</span>
|
||||
<span>just to make sure it</span>
|
||||
<span>looks correct.</span>
|
||||
</Fn>
|
||||
);
|
||||
}
|
||||
111
src/routes/modal/index.tsx
Normal file
111
src/routes/modal/index.tsx
Normal file
@@ -0,0 +1,111 @@
|
||||
import { DangerButton, PrimaryButton, SuccessButton, WarningButton } from "$/component/button";
|
||||
import { Modal } from "$/component/modal";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { useState } from "react";
|
||||
|
||||
|
||||
export const Route = createFileRoute("/modal/")({
|
||||
component: ModalPage
|
||||
});
|
||||
|
||||
|
||||
function ModalPage(){
|
||||
const [ displayCenteredModal, setDisplayCenteredModal ] = useState(false);
|
||||
const [ displayTopModal, setDisplayTopModal ] = useState(false);
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center gap-y-16"
|
||||
>
|
||||
<h1
|
||||
className="text-4xl"
|
||||
>
|
||||
Modals
|
||||
</h1>
|
||||
<PrimaryButton
|
||||
onClick={() => setDisplayCenteredModal(true)}
|
||||
>
|
||||
Centered Modal
|
||||
</PrimaryButton>
|
||||
<PrimaryButton
|
||||
onClick={() => setDisplayTopModal(true)}
|
||||
>
|
||||
Top Modal
|
||||
</PrimaryButton>
|
||||
<div
|
||||
className="flex flex-row items-center justify-center gap-x-4">
|
||||
<PrimaryButton
|
||||
onClick={() => {}}
|
||||
>
|
||||
Timed Modal
|
||||
</PrimaryButton>
|
||||
<SuccessButton
|
||||
onClick={() => {}}
|
||||
>
|
||||
Timed Modal
|
||||
</SuccessButton>
|
||||
<WarningButton
|
||||
onClick={() => {}}
|
||||
>
|
||||
Timed Modal
|
||||
</WarningButton>
|
||||
<DangerButton
|
||||
onClick={() => {}}
|
||||
>
|
||||
Timed Modal
|
||||
</DangerButton>
|
||||
</div>
|
||||
|
||||
<DemoCenteredModal
|
||||
display={displayCenteredModal}
|
||||
onClose={() => setDisplayCenteredModal(false)}
|
||||
/>
|
||||
<DemoTopModal
|
||||
display={displayTopModal}
|
||||
onClose={() => setDisplayTopModal(false)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function DemoCenteredModal({
|
||||
display,
|
||||
onClose
|
||||
}:{
|
||||
display: boolean;
|
||||
onClose: () => void;
|
||||
}){
|
||||
return (
|
||||
<Modal
|
||||
display={display}
|
||||
onClose={onClose}
|
||||
className="bg-(--bg-color) text-(--text-color)"
|
||||
>
|
||||
<span>This is the centered modal.</span>
|
||||
<span>I am giving multiple lines so we can</span>
|
||||
<span>see how it looks.</span>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
function DemoTopModal({
|
||||
display,
|
||||
onClose
|
||||
}:{
|
||||
display: boolean;
|
||||
onClose: () => void;
|
||||
}){
|
||||
return (
|
||||
<Modal
|
||||
display={display}
|
||||
onClose={onClose}
|
||||
className="bg-(--bg-color) text-(--text-color)"
|
||||
top={true}
|
||||
>
|
||||
<span>This is the top modal.</span>
|
||||
<span>I am giving multiple lines so we can</span>
|
||||
<span>see how it looks.</span>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
11
src/routes/switch/index.tsx
Normal file
11
src/routes/switch/index.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
|
||||
export const Route = createFileRoute("/switch/")({
|
||||
component: RouteComponent
|
||||
});
|
||||
|
||||
|
||||
function RouteComponent(){
|
||||
return <div>Hello "/switch/"!</div>
|
||||
}
|
||||
26
src/routes/tab/index.tsx
Normal file
26
src/routes/tab/index.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { MattrixwvTabGroup } from '$/component/tab';
|
||||
import type { TabGroupContent } from '$/types/Tab';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import { BsXLg } from 'react-icons/bs';
|
||||
|
||||
|
||||
export const Route = createFileRoute('/tab/')({
|
||||
component: RouteComponent
|
||||
});
|
||||
|
||||
|
||||
function RouteComponent(){
|
||||
const tabs: TabGroupContent[] = [
|
||||
{ tab: "Tab 1", content: "Tab 1 Content" },
|
||||
{ tab: "Tab 2", content: "Tab 2 Content" },
|
||||
{ tab: "Tab 3", content: "Tab 3 Content" },
|
||||
{ tab: "Tab 4", content: "Tab 4 Content" },
|
||||
{ tab: <div className="flex flex-row items-center justify-center gap-x-2">Tab <BsXLg/></div>, content: <div className="flex flex-row items-center justify-center gap-x-2">Tab <BsXLg/> Content</div> }
|
||||
];
|
||||
|
||||
return (
|
||||
<MattrixwvTabGroup
|
||||
tabs={tabs}
|
||||
/>
|
||||
);
|
||||
}
|
||||
490
src/util/LoadingUtils.tsx
Normal file
490
src/util/LoadingUtils.tsx
Normal file
@@ -0,0 +1,490 @@
|
||||
import CenterGrowingBars from "$/component/loading/bar/CenterGrowingBars";
|
||||
import CircleBars from "$/component/loading/bar/CircleBars";
|
||||
import FadingBars from "$/component/loading/bar/FadingBars";
|
||||
import FadingGrowingBars from "$/component/loading/bar/FadingGrowingBars";
|
||||
import GrowingBars from "$/component/loading/bar/GrowingBars";
|
||||
import PulsingBlocks from "$/component/loading/block/PulsingBlocks";
|
||||
import SlidingBlocks2 from "$/component/loading/block/SlidingBlocks2";
|
||||
import SlidingBlocks3 from "$/component/loading/block/SlidingBlocks3";
|
||||
import WaveBlocks from "$/component/loading/block/WaveBlocks";
|
||||
import BouncingDots from "$/component/loading/dot/BouncingDots";
|
||||
import CircleCenterDots from "$/component/loading/dot/CircleCenterDots";
|
||||
import CircleFadingDots from "$/component/loading/dot/CircleFadingDots";
|
||||
import CirclePulsingDots from "$/component/loading/dot/CirclePulsingDots";
|
||||
import CircleRotatingDots from "$/component/loading/dot/CircleRotatingDots";
|
||||
import CircleShrinkingDots from "$/component/loading/dot/CircleShrinkingDots";
|
||||
import CircleSpinningDot from "$/component/loading/dot/CircleSpinningDot";
|
||||
import CyclingDots from "$/component/loading/dot/CyclingDots";
|
||||
import FadingDots from "$/component/loading/dot/FadingDots";
|
||||
import PulsingDots from "$/component/loading/dot/PulsingDots";
|
||||
import RotatingDots from "$/component/loading/dot/RotatingDots";
|
||||
import SwellingDots from "$/component/loading/dot/SwellingDots";
|
||||
import DoubleDrop from "$/component/loading/drop/DoubleDrop";
|
||||
import DoubleWaveDrop from "$/component/loading/drop/DoubleWaveDrop";
|
||||
import Drop from "$/component/loading/drop/Drop";
|
||||
import QuickDrop from "$/component/loading/drop/QuickDrop";
|
||||
import QuickWaveDrop from "$/component/loading/drop/QuickWaveDrop";
|
||||
import TripleDrop from "$/component/loading/drop/TripleDrop";
|
||||
import TripleWaveDrop from "$/component/loading/drop/TripleWaveDrop";
|
||||
import WaveDrop from "$/component/loading/drop/WaveDrop";
|
||||
import HalfSpinner from "$/component/loading/spinner/HalfSpinner";
|
||||
import QuarterSpinner from "$/component/loading/spinner/QuarterSpinner";
|
||||
import RubberSpinner from "$/component/loading/spinner/RubberSpinner";
|
||||
import ThreeQuarterSpinner from "$/component/loading/spinner/ThreeQuarterSpinner";
|
||||
import BouncingDot from "$/component/loading/various/BouncingDot";
|
||||
import PulsingLine from "$/component/loading/various/PulsingLine";
|
||||
import SpinningBinary from "$/component/loading/various/SpinningBinary";
|
||||
import SpinningClock from "$/component/loading/various/SpinningClock";
|
||||
import SpinningEclipse from "$/component/loading/various/SpinningEclipse";
|
||||
import SpinningEclipseHalf from "$/component/loading/various/SpinningEclipseHalf";
|
||||
import SpinningGalaxy from "$/component/loading/various/SpinningGalaxy";
|
||||
import SpinningTadpole from "$/component/loading/various/SpinningTadpole";
|
||||
import Wifi from "$/component/loading/various/Wifi";
|
||||
import type { JSX } from "react";
|
||||
|
||||
|
||||
function LoadingGroup({
|
||||
label,
|
||||
elements
|
||||
}:{
|
||||
label: React.ReactNode;
|
||||
elements: JSX.Element[];
|
||||
}){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<h1
|
||||
className="text-2xl"
|
||||
>
|
||||
{label}
|
||||
</h1>
|
||||
<div
|
||||
className="flex flex-row items-center justify-center gap-x-8"
|
||||
>
|
||||
{
|
||||
elements.map((spinner, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className="w-32 h-32"
|
||||
>
|
||||
{spinner}
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export function generateSpinnersContent(){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center gap-y-16"
|
||||
>
|
||||
<LoadingGroup
|
||||
label="Quarter Spinner"
|
||||
elements={[
|
||||
<QuarterSpinner
|
||||
className="fill-blue-600"
|
||||
/>,
|
||||
<QuarterSpinner
|
||||
trackClassName="fill-neutral-700 dark:fill-zinc-700"
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Half Spinner"
|
||||
elements={[
|
||||
<HalfSpinner
|
||||
className="fill-blue-600"
|
||||
/>,
|
||||
<HalfSpinner
|
||||
trackClassName="fill-neutral-700 dark:fill-zinc-700"
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Three-Quarter Spinner"
|
||||
elements={[
|
||||
<ThreeQuarterSpinner
|
||||
className="fill-blue-600"
|
||||
/>,
|
||||
<ThreeQuarterSpinner
|
||||
trackClassName="fill-neutral-700 dark:fill-zinc-700"
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Rubber Spinner"
|
||||
elements={[
|
||||
<RubberSpinner
|
||||
stroke="#155dfc"
|
||||
/>,
|
||||
<RubberSpinner
|
||||
trackClassName="fill-neutral-700 dark:fill-zinc-700"
|
||||
stroke="#155dfc"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function generateDotsContent(){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<LoadingGroup
|
||||
label="Bouncing"
|
||||
elements={[
|
||||
<BouncingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Fading"
|
||||
elements={[
|
||||
<FadingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Cycling"
|
||||
elements={[
|
||||
<CyclingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Rotating"
|
||||
elements={[
|
||||
<RotatingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Swelling"
|
||||
elements={[
|
||||
<SwellingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Pulsing"
|
||||
elements={[
|
||||
<PulsingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Fading"
|
||||
elements={[
|
||||
<CircleFadingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Shrinking"
|
||||
elements={[
|
||||
<CircleShrinkingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Center"
|
||||
elements={[
|
||||
<CircleCenterDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Rotating"
|
||||
elements={[
|
||||
<CircleRotatingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Pulsing"
|
||||
elements={[
|
||||
<CirclePulsingDots
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Spinning"
|
||||
elements={[
|
||||
<CircleSpinningDot
|
||||
trackClassName="fill-neutral-700 dark:fill-zinc-700"
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function generateBarsContent(){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<LoadingGroup
|
||||
label="Fading Bars"
|
||||
elements={[
|
||||
<FadingBars
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Growing Bars"
|
||||
elements={[
|
||||
<GrowingBars
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Fading Growing Bars"
|
||||
elements={[
|
||||
<FadingGrowingBars
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Center Growing Bars"
|
||||
elements={[
|
||||
<CenterGrowingBars
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Circle Bars"
|
||||
elements={[
|
||||
<CircleBars
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function generateBlocksContent(){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<LoadingGroup
|
||||
label="Pulsing Blocks"
|
||||
elements={[
|
||||
<PulsingBlocks
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Sliding Blocks 2"
|
||||
elements={[
|
||||
<SlidingBlocks2
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Sliding Blocks 3"
|
||||
elements={[
|
||||
<SlidingBlocks3
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Wave Blocks"
|
||||
elements={[
|
||||
<WaveBlocks
|
||||
className="fill-blue-600 stroke-0 stroke-black"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function generatePulsesContent(){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<LoadingGroup
|
||||
label="Drop"
|
||||
elements={[
|
||||
<Drop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Double Drop"
|
||||
elements={[
|
||||
<DoubleDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Triple Drop"
|
||||
elements={[
|
||||
<TripleDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Quick Drop"
|
||||
elements={[
|
||||
<QuickDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Wave Drop"
|
||||
elements={[
|
||||
<WaveDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Double Wave Drop"
|
||||
elements={[
|
||||
<DoubleWaveDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Triple Wave Drop"
|
||||
elements={[
|
||||
<TripleWaveDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Quick Wave Drop"
|
||||
elements={[
|
||||
<QuickWaveDrop
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function generateVariousContent(){
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col items-center justify-center"
|
||||
>
|
||||
<LoadingGroup
|
||||
label="Bouncing Dot"
|
||||
elements={[
|
||||
<BouncingDot
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Spinning Clock"
|
||||
elements={[
|
||||
<SpinningClock
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Spinning Eclipse"
|
||||
elements={[
|
||||
<SpinningEclipse
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Spinning Eclipse Half"
|
||||
elements={[
|
||||
<SpinningEclipseHalf
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Pulsing Line"
|
||||
elements={[
|
||||
<PulsingLine
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Spinning Binary"
|
||||
elements={[
|
||||
<SpinningBinary
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Spinning Tadpole"
|
||||
elements={[
|
||||
<SpinningTadpole
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Wifi"
|
||||
elements={[
|
||||
<Wifi
|
||||
className="fill-blue-600"
|
||||
/>,
|
||||
<Wifi
|
||||
className="fill-blue-600"
|
||||
fadeDuration={0.25}
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
<LoadingGroup
|
||||
label="Spinning Galaxy"
|
||||
elements={[
|
||||
<SpinningGalaxy
|
||||
className="fill-blue-600"
|
||||
/>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
1
src/vite-env.d.ts
vendored
Normal file
1
src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user