Skip to content

Commit

Permalink
feat: add button component styles
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Jan 10, 2023
1 parent 9b87c00 commit 5a31b67
Show file tree
Hide file tree
Showing 48 changed files with 1,245 additions and 1,907 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
auto-install-peers=true
auto-install-peers=true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-ve
13 changes: 6 additions & 7 deletions configs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";

export default defineConfig({
plugins: [solidPlugin()],
build: {
target: 'esnext',
polyfillDynamicImport: false,
},
plugins: [solidPlugin()],
build: {
target: "esnext",
},
});
1 change: 0 additions & 1 deletion packages/hello/CHANGELOG.md

This file was deleted.

36 changes: 0 additions & 36 deletions packages/hello/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions packages/hello/jest.config.ssr.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/hello/jest.config.ts

This file was deleted.

66 changes: 0 additions & 66 deletions packages/hello/package.json

This file was deleted.

17 changes: 0 additions & 17 deletions packages/hello/src/index.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions packages/hello/test/index.ssr.test.tsx

This file was deleted.

49 changes: 0 additions & 49 deletions packages/hello/test/index.test.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions packages/hello/tsconfig.json

This file was deleted.

14 changes: 14 additions & 0 deletions packages/kit/dev/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Component } from "solid-js";
import { Button, theme } from "@codeui/kit";

const App: Component = () => {
return (
<div class={theme}>
<Button theme={"primary"}>Button</Button>
<Button theme={"secondary"}>Button</Button>
<Button theme={"tertiary"}>Button</Button>
</div>
);
};

export default App;
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: hsl(246 6.0% 9.0%);
}

code {
Expand Down
18 changes: 18 additions & 0 deletions packages/kit/dev/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>Playground | @codeui/kit</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@radix-ui/colors@latest/blackA.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@radix-ui/colors@latest/mauve.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@radix-ui/colors@latest/violet.css" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="./index.tsx" type="module"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions packages/kit/dev/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* @refresh reload */
import { render } from "solid-js/web";

import "./index.css";
import App from "./App";

render(() => <App />, document.getElementById("root") as HTMLElement);
File renamed without changes
11 changes: 11 additions & 0 deletions packages/kit/dev/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";
import { vanillaExtractPlugin } from "@codeimage/vanilla-extract";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
plugins: [solidPlugin(), vanillaExtractPlugin(), tsconfigPaths()],
build: {
target: "esnext",
},
});
11 changes: 8 additions & 3 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@
},
"scripts": {
"dev": "pnpm run build -w",
"build": "rollup -c ../../configs/rollup.config.ts",
"playground": "vite serve ./dev --host",
"build": "rollup -c rollup.config.js",
"test": "pnpm run test:client && pnpm run test:ssr",
"test:client": "jest --config jest.config.ts",
"test:ssr": "jest --config jest.config.ssr.ts",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@codeimage/vanilla-extract": "workspace:^0.2.0",
"@testing-library/jest-dom": "^5.16.4",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
Expand All @@ -57,16 +59,19 @@
"solid-js": "^1.4.8",
"solid-testing-library": "^0.3.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"vite-tsconfig-paths": "^4.0.3"
},
"peerDependencies": {
"solid-js": "^1.4.4"
},
"packageManager": "[email protected]",
"dependencies": {
"@kobalte/core": "^0.1.0",
"@radix-ui/colors": "^0.1.8",
"@vanilla-extract/css": "^1.9.2",
"@vanilla-extract/dynamic": "^2.0.3",
"@vanilla-extract/recipes": "^0.3.0"
"@vanilla-extract/recipes": "^0.3.0",
"@vanilla-extract/vite-plugin": "^3.7.0"
}
}
10 changes: 10 additions & 0 deletions packages/kit/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import withSolid from "rollup-preset-solid";

export default withSolid({
input: "src/index.tsx",
targets: ["esm"],
output: {
preserveModules: true,
dir: "dist/esm",
},
});
Loading

0 comments on commit 5a31b67

Please sign in to comment.