Skip to content

Commit

Permalink
feat(Table): extracting Table as a standalone package (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini authored Sep 17, 2024
1 parent fc4edff commit d2ad0f5
Show file tree
Hide file tree
Showing 22 changed files with 127 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"packages/ui-menu": "1.0.0",
"packages/ui-panel": "1.0.0",
"packages/ui-pill": "1.0.0",
"packages/ui-spinner": "1.0.0"
"packages/ui-spinner": "1.0.0",
"packages/ui-table": "0.0.0"
}
11 changes: 3 additions & 8 deletions packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"build:check": "tsc",
"build:js": "vite build",
Expand All @@ -32,8 +30,6 @@
"stats:release": "bundlesize -c bundlesize.config.js -p \"$npm_package_version\" -o stats/stats.json --silent",
"stats:report": "bundlesize -c bundlesize.config.js --type report -o tmp/pr-stats.md --silent",
"stats": "bundlesize -c bundlesize.config.js -p \"$npm_package_version\"",
"test:coverage:ui": "vitest --coverage --ui",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"test": "vitest run"
},
Expand Down Expand Up @@ -61,10 +57,9 @@
"@versini/ui-pill": "workspace:../ui-pill",
"@versini/ui-private": "workspace:../ui-private",
"@versini/ui-spinner": "workspace:../ui-spinner",
"@versini/ui-table": "workspace:../ui-table",
"clsx": "2.1.1",
"tailwindcss": "3.4.11"
},
"sideEffects": [
"**/*.css"
]
"sideEffects": ["**/*.css"]
}
4 changes: 2 additions & 2 deletions packages/ui-components/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import {
TableBody,
TableCell,
TableCellSort,
TableCellSortDirections,
TableFooter,
TableHead,
TableRow,
} from "./Table/Table";
import { TableCellSortDirections } from "./Table/utilities";
} from "@versini/ui-table";

export {
Anchor,
Expand Down
3 changes: 3 additions & 0 deletions packages/ui-table/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @versini/ui-table

A simple table component for React.
51 changes: 51 additions & 0 deletions packages/ui-table/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "@versini/ui-table",
"version": "0.0.0",
"license": "MIT",
"author": "Arno Versini",
"publishConfig": {
"access": "public"
},
"homepage": "https://github.com/aversini/ui-components",
"repository": {
"type": "git",
"url": "[email protected]:aversini/ui-components.git"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"scripts": {
"build:check": "tsc",
"build:js": "vite build",
"build:types": "tsup",
"build": "npm-run-all --serial clean build:check build:js build:types",
"clean": "rimraf dist tmp",
"dev:js": "vite build --watch --mode development",
"dev:types": "tsup --watch src",
"dev": "npm-run-all clean --parallel dev:js dev:types",
"lint": "biome lint src",
"start": "static-server dist --port 5173",
"test:coverage:ui": "vitest --coverage --ui",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"test": "vitest run"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@versini/ui-styles": "workspace:../ui-styles"
},
"dependencies": {
"@floating-ui/react": "0.26.24",
"@tailwindcss/typography": "0.5.15",
"@versini/ui-button": "workspace:../ui-button",
"@versini/ui-icons": "workspace:../ui-icons",
"@versini/ui-private": "workspace:../ui-private",
"clsx": "2.1.1",
"tailwindcss": "3.4.11"
},
"sideEffects": ["**/*.css"]
}
6 changes: 6 additions & 0 deletions packages/ui-table/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
2 changes: 2 additions & 0 deletions packages/ui-table/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { TableCellSortDirections } from "./Table/utilities";
export * from "./Table/Table";
3 changes: 3 additions & 0 deletions packages/ui-table/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
1 change: 1 addition & 0 deletions packages/ui-table/src/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./index.css";
1 change: 1 addition & 0 deletions packages/ui-table/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
2 changes: 2 additions & 0 deletions packages/ui-table/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { commonTailwindConfigForComponent } from "../../configuration/tailwind.common";
export default commonTailwindConfigForComponent();
4 changes: 4 additions & 0 deletions packages/ui-table/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../configuration/tsconfig.common.json",
"include": ["src"]
}
2 changes: 2 additions & 0 deletions packages/ui-table/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { commonTsupConfig } from "../../configuration/tsup.common";
export default commonTsupConfig;
2 changes: 2 additions & 0 deletions packages/ui-table/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { commonViteConfigForComponent } from "../../configuration/vite.common";
export default commonViteConfigForComponent();
4 changes: 4 additions & 0 deletions packages/ui-table/vitest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { commonVitestConfig } from "../../configuration/vitestconfig.common";
import viteConfig from "./vite.config";

export default commonVitestConfig(viteConfig);
37 changes: 37 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"packages/ui-menu": {},
"packages/ui-panel": {},
"packages/ui-pill": {},
"packages/ui-spinner": {}
"packages/ui-spinner": {},
"packages/ui-table": {}
},
"plugins": ["node-workspace"],
"pull-request-header": ":rocket: Automated Release"
Expand Down

0 comments on commit d2ad0f5

Please sign in to comment.