Skip to content

Commit

Permalink
Kvaak kvaak
Browse files Browse the repository at this point in the history
  • Loading branch information
pekkis committed May 27, 2024
1 parent d4d5b7f commit 8f17de2
Show file tree
Hide file tree
Showing 12 changed files with 1,212 additions and 1,088 deletions.
2 changes: 2 additions & 0 deletions packages/quack-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
3 changes: 3 additions & 0 deletions packages/quack-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Quack UI

Quack UI is the official UI toolkit of Gaylord McDuck Enterprises.
38 changes: 38 additions & 0 deletions packages/quack-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "@gaylordmcduck/quack-ui",
"version": "1.0.0",
"description": "Quack UI",
"license": "MIT",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"exports": {
"./style.css": "./dist/style.css",
".": {
"import": "./dist/index.js"
}
},
"scripts": {
"build": "tsc && vite build",
"dev": "pnpm run build --watch"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.2.1",
"rollup-plugin-node-externals": "^7.1.1",
"typescript": "^5.4.5",
"vite": "^5.2.10",
"react": ">= 18.3.1",
"react-dom": ">= 18.3.1"
},
"dependencies": {},
"peerDependencies": {
"react": ">= 18.3.1",
"react-dom": ">= 18.3.1"
}
}
4 changes: 4 additions & 0 deletions packages/quack-ui/src/components/Button.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.button {
border: 10px solid rgb(0 0 0);
padding: 2rem;
}
10 changes: 10 additions & 0 deletions packages/quack-ui/src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { ComponentProps, FC } from "react";
import styles from "./Button.module.css";

type Props = ComponentProps<"button">;

const Button: FC<Props> = (props) => {
return <button {...props} className={styles.button} />;
};

export default Button;
9 changes: 9 additions & 0 deletions packages/quack-ui/src/components/Input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { ComponentProps, FC } from "react";

type Props = ComponentProps<"input">;

const Input: FC<Props> = (props) => {
return <input {...props} />;
};

export default Input;
2 changes: 2 additions & 0 deletions packages/quack-ui/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as Button } from "./components/Button";
export { default as Input } from "./components/Input";
2 changes: 2 additions & 0 deletions packages/quack-ui/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable */
/// <reference types="vite/client" />
28 changes: 28 additions & 0 deletions packages/quack-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"jsx": "react-jsx",
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"*": ["src/*"]
},

/* Bundler mode */
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
31 changes: 31 additions & 0 deletions packages/quack-ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import typescript from "@rollup/plugin-typescript";
import react from "@vitejs/plugin-react";
import { resolve } from "path";
import externals from "rollup-plugin-node-externals";
import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, "src/index.tsx"),
formats: ["es"],
fileName: "index"
},
rollupOptions: {
external: [/^react/]
}
},
plugins: [
react(),
typescript({
target: "es2020",
rootDir: resolve(__dirname, "src"),
declaration: true,
declarationDir: resolve(__dirname, "dist"),
exclude: resolve(__dirname, "node_modules/**"),
allowSyntheticDefaultImports: true
}),
externals()
]
});
2,169 changes: 1,081 additions & 1,088 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- 'packages/*'

0 comments on commit 8f17de2

Please sign in to comment.