From 5421c2346a0a83c0296561f9527e2ebce685c92c Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Fri, 18 Jul 2025 23:30:48 -0400 Subject: [PATCH] Most simple components created --- .gitignore | 11 + README.md | 69 + eslint.config.js | 37 + index.html | 13 + lib/component/button.ts | 26 + lib/component/button/Button.tsx | 57 + lib/component/button/DangerButton.tsx | 46 + lib/component/button/DarkButton.tsx | 46 + lib/component/button/InfoButton.tsx | 46 + lib/component/button/LightButton.tsx | 46 + lib/component/button/MoltenButton.tsx | 46 + lib/component/button/PrimaryButton.tsx | 46 + lib/component/button/SecondaryButton.tsx | 46 + lib/component/button/SuccessButton.tsx | 46 + lib/component/button/TertiaryButton.tsx | 46 + lib/component/button/WarningButton.tsx | 46 + lib/component/input.ts | 10 + lib/component/input/OptionInput.tsx | 27 + lib/component/input/SelectInput.tsx | 41 + lib/component/input/TextInput.tsx | 57 + lib/component/input/switch/DangerSwitch.tsx | 7 + lib/component/input/switch/DarkSwitch.tsx | 7 + lib/component/input/switch/LightSwitch.tsx | 7 + lib/component/input/switch/PlainSwitch.tsx | 7 + lib/component/input/switch/PrimarySwitch.tsx | 7 + .../input/switch/SecondarySwitch.tsx | 7 + .../input/switch/SuccessDangerSwitch.tsx | 7 + lib/component/input/switch/SuccessSwitch.tsx | 7 + lib/component/input/switch/Switch.tsx | 7 + lib/component/input/switch/TertiarySwitch.tsx | 7 + lib/component/input/switch/WarningSwitch.tsx | 7 + lib/component/loading.ts | 90 + .../loading/bar/CenterGrowingBars.tsx | 157 + lib/component/loading/bar/CircleBars.tsx | 109 + lib/component/loading/bar/FadingBars.tsx | 81 + .../loading/bar/FadingGrowingBars.tsx | 123 + lib/component/loading/bar/GrowingBars.tsx | 157 + lib/component/loading/block/PulsingBlocks.tsx | 183 + .../loading/block/SlidingBlocks2.tsx | 111 + .../loading/block/SlidingBlocks3.tsx | 154 + lib/component/loading/block/WaveBlocks.tsx | 333 + lib/component/loading/dot/BouncingDots.tsx | 76 + .../loading/dot/CircleCenterDots.tsx | 240 + .../loading/dot/CircleFadingDots.tsx | 94 + .../loading/dot/CirclePulsingDots.tsx | 251 + .../loading/dot/CircleRotatingDots.tsx | 97 + .../loading/dot/CircleShrinkingDots.tsx | 264 + .../loading/dot/CircleSpinningDot.tsx | 46 + lib/component/loading/dot/CyclingDots.tsx | 240 + lib/component/loading/dot/FadingDots.tsx | 79 + lib/component/loading/dot/PulsingDots.tsx | 67 + lib/component/loading/dot/RotatingDots.tsx | 56 + lib/component/loading/dot/SwellingDots.tsx | 72 + lib/component/loading/drop/DoubleDrop.tsx | 81 + lib/component/loading/drop/DoubleWaveDrop.tsx | 97 + lib/component/loading/drop/Drop.tsx | 49 + lib/component/loading/drop/QuickDrop.tsx | 109 + lib/component/loading/drop/QuickWaveDrop.tsx | 133 + lib/component/loading/drop/TripleDrop.tsx | 109 + lib/component/loading/drop/TripleWaveDrop.tsx | 133 + lib/component/loading/drop/WaveDrop.tsx | 59 + lib/component/loading/spinner/HalfSpinner.tsx | 45 + .../loading/spinner/QuarterSpinner.tsx | 45 + .../loading/spinner/RubberSpinner.tsx | 70 + .../loading/spinner/ThreeQuarterSpinner.tsx | 45 + lib/component/loading/various/BouncingDot.tsx | 79 + lib/component/loading/various/PulsingLine.tsx | 95 + .../loading/various/SpinningBinary.tsx | 91 + .../loading/various/SpinningClock.tsx | 64 + .../loading/various/SpinningEclipse.tsx | 38 + .../loading/various/SpinningEclipseHalf.tsx | 38 + .../loading/various/SpinningGalaxy.tsx | 38 + .../loading/various/SpinningTadpole.tsx | 38 + lib/component/loading/various/Wifi.tsx | 99 + lib/component/message.ts | 26 + lib/component/message/DangerMessageBlock.tsx | 22 + lib/component/message/DarkMessageBlock.tsx | 22 + lib/component/message/InfoMessageBlock.tsx | 22 + lib/component/message/LightMessageBlock.tsx | 22 + lib/component/message/MessageBlock.tsx | 36 + lib/component/message/MoltenMessageBlock.tsx | 22 + .../message/PrimaryMessagteBlock.tsx | 22 + .../message/SecondaryMessageBlock.tsx | 22 + lib/component/message/SuccessMessageBlock.tsx | 22 + .../message/TertiaryMessageBlock.tsx | 23 + lib/component/message/WarningMessageBlock.tsx | 22 + lib/component/modal.ts | 13 + lib/component/modal/Modal.tsx | 71 + lib/component/modal/ModalBody.tsx | 22 + lib/component/modal/ModalFooter.tsx | 26 + lib/component/modal/ModalHeader.tsx | 41 + lib/component/nav.ts | 10 + lib/component/nav/DarkModeSwitch.tsx | 46 + lib/component/nav/NavBar.tsx | 23 + lib/component/nav/PopoverMenu.tsx | 35 + lib/component/tab.ts | 14 + lib/component/tab/MattrixwvTab.tsx | 23 + lib/component/tab/MattrixwvTabGroup.tsx | 48 + lib/component/tab/MattrixwvTabList.tsx | 18 + lib/component/tab/MattrixwvTabPanel.tsx | 18 + lib/component/tab/MattrixwvTabPanels.tsx | 18 + lib/component/toaster.ts | 1 + lib/providers/theme/ThemeProvider.tsx | 61 + lib/types/Button.d.ts | 16 + lib/types/Input.d.ts | 28 + lib/types/Loading.d.ts | 65 + lib/types/Message.d.ts | 7 + lib/types/Modal.d.ts | 32 + lib/types/Nav.d.ts | 15 + lib/types/Tab.d.ts | 25 + lib/types/Theme.d.ts | 18 + package-lock.json | 5891 +++++++++++++++++ package.json | 45 + public/vite.svg | 1 + src/assets/react.svg | 1 + src/index.css | 82 + src/main.tsx | 23 + src/routeTree.gen.ts | 210 + src/routes/__root.tsx | 50 + src/routes/buttons/index.tsx | 139 + src/routes/index.tsx | 15 + src/routes/input/index.tsx | 11 + src/routes/loading/index.tsx | 27 + src/routes/message/index.tsx | 48 + src/routes/modal/index.tsx | 111 + src/routes/switch/index.tsx | 11 + src/routes/tab/index.tsx | 26 + src/util/LoadingUtils.tsx | 490 ++ src/vite-env.d.ts | 1 + tsconfig.app.json | 33 + tsconfig.json | 8 + tsconfig.lib.json | 4 + tsconfig.node.json | 25 + vite.config.ts | 56 + 134 files changed, 13805 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 eslint.config.js create mode 100644 index.html create mode 100644 lib/component/button.ts create mode 100644 lib/component/button/Button.tsx create mode 100644 lib/component/button/DangerButton.tsx create mode 100644 lib/component/button/DarkButton.tsx create mode 100644 lib/component/button/InfoButton.tsx create mode 100644 lib/component/button/LightButton.tsx create mode 100644 lib/component/button/MoltenButton.tsx create mode 100644 lib/component/button/PrimaryButton.tsx create mode 100644 lib/component/button/SecondaryButton.tsx create mode 100644 lib/component/button/SuccessButton.tsx create mode 100644 lib/component/button/TertiaryButton.tsx create mode 100644 lib/component/button/WarningButton.tsx create mode 100644 lib/component/input.ts create mode 100644 lib/component/input/OptionInput.tsx create mode 100644 lib/component/input/SelectInput.tsx create mode 100644 lib/component/input/TextInput.tsx create mode 100644 lib/component/input/switch/DangerSwitch.tsx create mode 100644 lib/component/input/switch/DarkSwitch.tsx create mode 100644 lib/component/input/switch/LightSwitch.tsx create mode 100644 lib/component/input/switch/PlainSwitch.tsx create mode 100644 lib/component/input/switch/PrimarySwitch.tsx create mode 100644 lib/component/input/switch/SecondarySwitch.tsx create mode 100644 lib/component/input/switch/SuccessDangerSwitch.tsx create mode 100644 lib/component/input/switch/SuccessSwitch.tsx create mode 100644 lib/component/input/switch/Switch.tsx create mode 100644 lib/component/input/switch/TertiarySwitch.tsx create mode 100644 lib/component/input/switch/WarningSwitch.tsx create mode 100644 lib/component/loading.ts create mode 100644 lib/component/loading/bar/CenterGrowingBars.tsx create mode 100644 lib/component/loading/bar/CircleBars.tsx create mode 100644 lib/component/loading/bar/FadingBars.tsx create mode 100644 lib/component/loading/bar/FadingGrowingBars.tsx create mode 100644 lib/component/loading/bar/GrowingBars.tsx create mode 100644 lib/component/loading/block/PulsingBlocks.tsx create mode 100644 lib/component/loading/block/SlidingBlocks2.tsx create mode 100644 lib/component/loading/block/SlidingBlocks3.tsx create mode 100644 lib/component/loading/block/WaveBlocks.tsx create mode 100644 lib/component/loading/dot/BouncingDots.tsx create mode 100644 lib/component/loading/dot/CircleCenterDots.tsx create mode 100644 lib/component/loading/dot/CircleFadingDots.tsx create mode 100644 lib/component/loading/dot/CirclePulsingDots.tsx create mode 100644 lib/component/loading/dot/CircleRotatingDots.tsx create mode 100644 lib/component/loading/dot/CircleShrinkingDots.tsx create mode 100644 lib/component/loading/dot/CircleSpinningDot.tsx create mode 100644 lib/component/loading/dot/CyclingDots.tsx create mode 100644 lib/component/loading/dot/FadingDots.tsx create mode 100644 lib/component/loading/dot/PulsingDots.tsx create mode 100644 lib/component/loading/dot/RotatingDots.tsx create mode 100644 lib/component/loading/dot/SwellingDots.tsx create mode 100644 lib/component/loading/drop/DoubleDrop.tsx create mode 100644 lib/component/loading/drop/DoubleWaveDrop.tsx create mode 100644 lib/component/loading/drop/Drop.tsx create mode 100644 lib/component/loading/drop/QuickDrop.tsx create mode 100644 lib/component/loading/drop/QuickWaveDrop.tsx create mode 100644 lib/component/loading/drop/TripleDrop.tsx create mode 100644 lib/component/loading/drop/TripleWaveDrop.tsx create mode 100644 lib/component/loading/drop/WaveDrop.tsx create mode 100644 lib/component/loading/spinner/HalfSpinner.tsx create mode 100644 lib/component/loading/spinner/QuarterSpinner.tsx create mode 100644 lib/component/loading/spinner/RubberSpinner.tsx create mode 100644 lib/component/loading/spinner/ThreeQuarterSpinner.tsx create mode 100644 lib/component/loading/various/BouncingDot.tsx create mode 100644 lib/component/loading/various/PulsingLine.tsx create mode 100644 lib/component/loading/various/SpinningBinary.tsx create mode 100644 lib/component/loading/various/SpinningClock.tsx create mode 100644 lib/component/loading/various/SpinningEclipse.tsx create mode 100644 lib/component/loading/various/SpinningEclipseHalf.tsx create mode 100644 lib/component/loading/various/SpinningGalaxy.tsx create mode 100644 lib/component/loading/various/SpinningTadpole.tsx create mode 100644 lib/component/loading/various/Wifi.tsx create mode 100644 lib/component/message.ts create mode 100644 lib/component/message/DangerMessageBlock.tsx create mode 100644 lib/component/message/DarkMessageBlock.tsx create mode 100644 lib/component/message/InfoMessageBlock.tsx create mode 100644 lib/component/message/LightMessageBlock.tsx create mode 100644 lib/component/message/MessageBlock.tsx create mode 100644 lib/component/message/MoltenMessageBlock.tsx create mode 100644 lib/component/message/PrimaryMessagteBlock.tsx create mode 100644 lib/component/message/SecondaryMessageBlock.tsx create mode 100644 lib/component/message/SuccessMessageBlock.tsx create mode 100644 lib/component/message/TertiaryMessageBlock.tsx create mode 100644 lib/component/message/WarningMessageBlock.tsx create mode 100644 lib/component/modal.ts create mode 100644 lib/component/modal/Modal.tsx create mode 100644 lib/component/modal/ModalBody.tsx create mode 100644 lib/component/modal/ModalFooter.tsx create mode 100644 lib/component/modal/ModalHeader.tsx create mode 100644 lib/component/nav.ts create mode 100644 lib/component/nav/DarkModeSwitch.tsx create mode 100644 lib/component/nav/NavBar.tsx create mode 100644 lib/component/nav/PopoverMenu.tsx create mode 100644 lib/component/tab.ts create mode 100644 lib/component/tab/MattrixwvTab.tsx create mode 100644 lib/component/tab/MattrixwvTabGroup.tsx create mode 100644 lib/component/tab/MattrixwvTabList.tsx create mode 100644 lib/component/tab/MattrixwvTabPanel.tsx create mode 100644 lib/component/tab/MattrixwvTabPanels.tsx create mode 100644 lib/component/toaster.ts create mode 100644 lib/providers/theme/ThemeProvider.tsx create mode 100644 lib/types/Button.d.ts create mode 100644 lib/types/Input.d.ts create mode 100644 lib/types/Loading.d.ts create mode 100644 lib/types/Message.d.ts create mode 100644 lib/types/Modal.d.ts create mode 100644 lib/types/Nav.d.ts create mode 100644 lib/types/Tab.d.ts create mode 100644 lib/types/Theme.d.ts create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 public/vite.svg create mode 100644 src/assets/react.svg create mode 100644 src/index.css create mode 100644 src/main.tsx create mode 100644 src/routeTree.gen.ts create mode 100644 src/routes/__root.tsx create mode 100644 src/routes/buttons/index.tsx create mode 100644 src/routes/index.tsx create mode 100644 src/routes/input/index.tsx create mode 100644 src/routes/loading/index.tsx create mode 100644 src/routes/message/index.tsx create mode 100644 src/routes/modal/index.tsx create mode 100644 src/routes/switch/index.tsx create mode 100644 src/routes/tab/index.tsx create mode 100644 src/util/LoadingUtils.tsx create mode 100644 src/vite-env.d.ts create mode 100644 tsconfig.app.json create mode 100644 tsconfig.json create mode 100644 tsconfig.lib.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.ts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4e2cbe --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Logs +logs +*.log + +node_modules +dist +*.local +.tanstack + +# Editor directories and files +.vscode diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b1bacc --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default tseslint.config([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + + // Remove tseslint.configs.recommended and replace with this + ...tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + ...tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + ...tseslint.configs.stylisticTypeChecked, + + // Other configs... + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default tseslint.config([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + // Enable lint rules for React + reactX.configs['recommended-typescript'], + // Enable lint rules for React DOM + reactDom.configs.recommended, + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..6f17939 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,37 @@ +import js from "@eslint/js"; +import pluginRouter from "@tanstack/eslint-plugin-router"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import { globalIgnores } from "eslint/config"; +import globals from "globals"; +import tseslint from "typescript-eslint"; + + +export default tseslint.config([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommendedTypeChecked, + reactHooks.configs['recommended-latest'], + reactRefresh.configs.vite, + ...pluginRouter.configs["flat/recommended"] + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser + }, + plugins: { + "react-hooks": reactHooks, + "react-refresh": reactRefresh + }, + rules: { + ...reactHooks.configs.recommended.rules, + "react-refresh/only-export-components": [ + "warn", + { allowConstantExport: true } + ] + } + } +]); diff --git a/index.html b/index.html new file mode 100644 index 0000000..ef80c79 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/lib/component/button.ts b/lib/component/button.ts new file mode 100644 index 0000000..f94bd57 --- /dev/null +++ b/lib/component/button.ts @@ -0,0 +1,26 @@ +import Button from "./button/Button"; +import DangerButton from "./button/DangerButton"; +import DarkButton from "./button/DarkButton"; +import InfoButton from "./button/InfoButton"; +import LightButton from "./button/LightButton"; +import MoltenButton from "./button/MoltenButton"; +import PrimaryButton from "./button/PrimaryButton"; +import SecondaryButton from "./button/SecondaryButton"; +import SuccessButton from "./button/SuccessButton"; +import TertiaryButton from "./button/TertiaryButton"; +import WarningButton from "./button/WarningButton"; + + +export { + Button, + DangerButton, + DarkButton, + InfoButton, + LightButton, + MoltenButton, + PrimaryButton, + SecondaryButton, + SuccessButton, + TertiaryButton, + WarningButton +}; diff --git a/lib/component/button/Button.tsx b/lib/component/button/Button.tsx new file mode 100644 index 0000000..eba83f0 --- /dev/null +++ b/lib/component/button/Button.tsx @@ -0,0 +1,57 @@ +import type { ButtonProps } from "$/types/Button"; +import clsx from "clsx"; + + +export default function Button(props: ButtonProps){ + const { + className, + rounding = "lg", + shape = "rectangle", + size = "md", + variant = "standard", + disabled, + ...buttonProps + } = props; + + + return ( +