Skip to content

Commit 0a9dce3

Browse files
committed
update new shadcn/ui components
0.2.0
1 parent c34e3c0 commit 0a9dce3

File tree

1,124 files changed

+58112
-10573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,124 files changed

+58112
-10573
lines changed

.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
9-
101
node_modules
112
dist
12-
dist-ssr
13-
*.local
14-
.next
15-
src-tauri/target
3+
tauri-ui
4+
others
165

17-
# Editor directories and files
18-
.vscode/*
19-
!.vscode/extensions.json
20-
.idea
21-
.DS_Store
22-
*.suo
23-
*.ntvs*
24-
*.njsproj
25-
*.sln
26-
*.sw?
6+
templates/**/.next/
7+
templates/**/dist/
8+
templates/**/node_modules/
9+
templates/**/src-tauri/target/

README.md

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,57 @@
1-
![tauri-ui](https://github.com/agmmnn/tauri-ui/assets/16024979/28295bae-8a36-4eff-8c33-2ed2bda82d84)
1+
![tauri-ui](https://github.com/agmmnn/tauri-ui/assets/16024979/c4c62dad-4ea7-4874-9ef4-b5d0b6ec10a1)
22

3-
# Tauri UI Template
3+
# Tauri UI
44

5-
Tauri UI Template is a starting point for building modern desktop applications with web technologies. Customizable UI components with [shadcn/ui](https://github.com/shadcn/ui), a lightweight and secure desktop app framework [Tauri 2](https://github.com/tauri-apps/tauri), the React-based framework [Next.js 13](https://beta.nextjs.org/docs), the utility-first CSS framework [Tailwind](https://tailwindcss.com/).
5+
Create modern Tauri desktop apps in just a few simple steps. Tauri UI Templates is a starting point for building modern desktop applications with web technologies with using [shadcn/ui](https://github.com/shadcn/ui), [Tauri](https://github.com/tauri-apps/tauri).
66

77
> _You can download pre-built final bundles from the [Releases](https://github.com/agmmnn/tauri-ui/releases) section._
88
99
## Getting Started
1010

11-
Use [create-tauri-ui](https://github.com/agmmnn/create-tauri-ui) to quickly scaffold a Tauri UI project.
11+
Use [create-tauri-ui](https://npmjs.com/package/create-tauri-ui) to quickly scaffold a Tauri UI project.
1212

1313
```bash
1414
pnpm create tauri-ui
1515
```
1616

17-
![](https://i.imgur.com/ONV0z45.png)
17+
<details>
18+
19+
```bash
20+
npx create-tauri-ui@latest
21+
pnpm create tauri-ui
22+
npm create tauri-ui@latest
23+
yarn create tauri-ui
24+
```
25+
26+
Then follow the prompts!
27+
28+
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Tauri-UI project, run:
29+
30+
```bash
31+
# npm 7+, extra double-dash is needed:
32+
npm create tauri-ui@latest my-tauri-app -- --template vite
33+
34+
# yarn
35+
yarn create tauri-ui my-tauri-app --template next
36+
37+
# pnpm
38+
pnpm create tauri-ui my-tauri-app --template sveltekit
39+
```
40+
41+
</details>
42+
43+
![](/others/Animation.gif)
44+
You can use `.` for the project name to scaffold in the current directory.
45+
46+
<details>
1847

19-
<details>
2048
<summary>
2149
Or clone the repository
2250
</summary>
2351

2452
```bash
2553
gh repo clone agmmnn/tauri-ui
26-
cd tauri-ui
54+
cd tauri-ui/templates/<template>
2755

2856
pnpm i
2957
pnpm tauri dev
@@ -40,56 +68,21 @@ pnpm tauri build
4068
- [Radix UI](https://www.radix-ui.com/) for UI primitives
4169
- [Lucide Icons](https://lucide.dev/)
4270
- [Bundle size optimized](https://github.com/johnthagen/min-sized-rust) [`Cargo.toml`](/src-tauri/Cargo.toml) (.msi 2.2mb, .dmg 1.9mb, .deb 2mb)
43-
- [Tauri GitHub Action](https://github.com/tauri-apps/tauri-action)
71+
- [Tauri GitHub Action](https://github.com/tauri-apps/tauri-action) Cross-Platform release
4472

4573
![tauri-ui](https://user-images.githubusercontent.com/16024979/232823230-19d22434-8e28-43c2-bb70-e45a2fc2da88.gif)
4674

47-
> _[Next.js](https://nextjs.org/) is used in this template to facilitate quick integration of the [`/examples`](https://github.com/shadcn/ui/tree/main/apps/www/app/examples) directory of shadcn/ui. You can also easily use shadcn/ui with the [React + Vite](https://tauri.app/v1/guides/getting-started/setup/vite/) stack and any [React router library](https://react.libhunt.com/libs/router) (optionally) in Tauri._
48-
49-
## Customization
50-
51-
The template can be customized by editing the following files:
52-
53-
- [src-tauri/tauri.conf.json](src-tauri/tauri.conf.json)
54-
- [package.json](/package.json)
55-
- [src-tauri/cargo.toml](src-tauri/Cargo.toml)
56-
- To change the app icon, update `app-icon.png`, and then run `pnpm tauri icon`. This will automatically generate icon files into _src-tauri/icons_.
57-
5875
## Update Components
5976

60-
Note that **shadcn/ui** [is not a library](https://ui.shadcn.com/docs#faqs), therefore you will need to update the components manually. To do so, you can [download](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fshadcn%2Fui%2Ftree%2Fmain%2Fapps%2Fwww%2Fcomponents%2Fui) the _[shadcn/ui/apps/www/components/ui](https://github.com/shadcn/ui/tree/main/apps/www/components/ui)_ directory and paste it into _[src/components/ui](/src/components/ui)_.
61-
62-
## Folder Structure
63-
64-
```js
65-
.
66-
├── next-env.d.ts
67-
├── next.config.js //nextjs config file https://nextjs.org/docs/pages/api-reference/next-config-js
68-
├── package.json
69-
├── postcss.config.js
70-
├── README.md
71-
├── public
72-
├── src //frontend src:
73-
│ ├── app //next.js appdir https://nextjs.org/docs/app/building-your-application/routing
74-
│ ├── assets
75-
│ ├── components //from shadcn/ui
76-
│ │ └── ui
77-
│ ├── data
78-
│ ├── hooks
79-
│ ├── lib
80-
│ └── styles
81-
├── src-tauri //backend src:
82-
│ ├── build.rs
83-
│ ├── Cargo.lock
84-
│ ├── Cargo.toml //https://doc.rust-lang.org/cargo/reference/manifest.html
85-
│ ├── icons //https://tauri.app/v1/guides/features/icons/
86-
│ ├── src
87-
│ └── tauri.conf.json //tauri config file https://next--tauri.netlify.app/next/api/config
88-
├── prettier.config.js //prettier config file https://prettier.io/docs/en/configuration.html
89-
├── tailwind.config.js //tailwind config file https://tailwindcss.com/docs/configuration
90-
└── tsconfig.json //typescript config file https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
9177
```
78+
npx shadcn-ui@latest add [component] --overwrite
79+
```
80+
81+
## Acknowledgements
9282

93-
## Recommended IDE Setup
83+
This project utilizes code from the following repository:
9484

95-
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
85+
- [vitejs/create-vite](https://github.com/vitejs/vite/blob/main/packages/create-vite) - Used in _[create-tauri-ui](https://www.npmjs.com/package/create-tauri-ui)_
86+
- [shadcn/ui](https://github.com/shadcn/ui/tree/main/apps/www) - Used in _[Next.js](https://github.com/vercel/next.js/)_ and _[Vite](https://github.com/vitejs/vite)_ templates
87+
- [huntabyte/shadcn-svelte](https://github.com/huntabyte/shadcn-svelte) - Used in _[SvelteKit](https://github.com/sveltejs/svelte)_ template
88+
- [fisand/uno-shadcn-ui](https://github.com/fisand/uno-shadcn-ui) - Used in _[Vite](https://github.com/vitejs/vite)+[UnoCSS](https://github.com/unocss/unocss)_ template

build.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import path from "node:path";
2+
import url from "node:url";
3+
import { defineBuildConfig } from "unbuild";
4+
5+
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
6+
7+
export default defineBuildConfig({
8+
entries: ["src/index"],
9+
clean: true,
10+
rollup: {
11+
inlineDependencies: true,
12+
esbuild: {
13+
minify: true,
14+
},
15+
},
16+
alias: {
17+
// we can always use non-transpiled code since we support 14.18.0+
18+
prompts: "prompts/lib/index.js",
19+
},
20+
});

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env node
2+
3+
import "./dist/index.mjs";

package.json

Lines changed: 43 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,54 @@
11
{
2-
"name": "tauri-ui",
3-
"private": true,
2+
"name": "create-tauri-ui",
3+
"version": "0.2.0",
4+
"description": "🦀 Create modern Tauri desktop apps in just a few simple steps.",
5+
"main": "index.js",
6+
"author": "agmmnn",
47
"license": "MIT",
5-
"version": "0.1.3",
8+
"type": "module",
69
"scripts": {
7-
"dev": "next dev -p 1420",
8-
"build": "next build",
10+
"dev": "unbuild --stub",
11+
"build": "unbuild",
12+
"start": "unbuild --stub && node index.js",
13+
"typecheck": "tsc --noEmit",
14+
"prepublishOnly": "npm run build",
915
"format": "npx prettier --write . --ignore-path .gitignore ",
10-
"taze": "taze major -I",
11-
"taze:minor": "taze minor -w",
12-
"tauri": "tauri"
16+
"taze": "taze minor -r -w -i false -I",
17+
"taze:major": "taze major -r -w -i false -I",
18+
"updatesub": "git submodule update --init --recursive --remote"
1319
},
20+
"bin": {
21+
"create-tauri-ui": "index.js"
22+
},
23+
"files": [
24+
"index.js",
25+
"templates",
26+
"dist"
27+
],
28+
"repository": {
29+
"type": "git",
30+
"url": "git+https://github.com/agmmnn/tauri-ui.git"
31+
},
32+
"bugs": {
33+
"url": "https://github.com/agmmnn/tauri-ui/issues"
34+
},
35+
"homepage": "https://github.com/agmmnn/tauri-ui",
1436
"dependencies": {
15-
"@faker-js/faker": "^8.0.1",
16-
"@hookform/resolvers": "^3.1.0",
17-
"@radix-ui/react-accessible-icon": "^1.0.3",
18-
"@radix-ui/react-accordion": "^1.1.2",
19-
"@radix-ui/react-alert-dialog": "^1.0.4",
20-
"@radix-ui/react-aspect-ratio": "^1.0.3",
21-
"@radix-ui/react-avatar": "^1.0.3",
22-
"@radix-ui/react-checkbox": "^1.0.4",
23-
"@radix-ui/react-collapsible": "^1.0.3",
24-
"@radix-ui/react-context-menu": "^2.1.4",
25-
"@radix-ui/react-dialog": "^1.0.4",
26-
"@radix-ui/react-dropdown-menu": "^2.0.5",
27-
"@radix-ui/react-hover-card": "^1.0.6",
28-
"@radix-ui/react-label": "^2.0.2",
29-
"@radix-ui/react-menubar": "^1.0.3",
30-
"@radix-ui/react-navigation-menu": "^1.1.3",
31-
"@radix-ui/react-popover": "^1.0.6",
32-
"@radix-ui/react-progress": "^1.0.3",
33-
"@radix-ui/react-radio-group": "^1.1.3",
34-
"@radix-ui/react-scroll-area": "^1.0.4",
35-
"@radix-ui/react-select": "^1.2.2",
36-
"@radix-ui/react-separator": "^1.0.3",
37-
"@radix-ui/react-slider": "^1.1.2",
38-
"@radix-ui/react-slot": "^1.0.2",
39-
"@radix-ui/react-switch": "^1.0.3",
40-
"@radix-ui/react-tabs": "^1.0.4",
41-
"@radix-ui/react-toast": "^1.1.4",
42-
"@radix-ui/react-toggle": "^1.0.3",
43-
"@radix-ui/react-toggle-group": "^1.0.4",
44-
"@radix-ui/react-tooltip": "^1.0.6",
45-
"@tailwindcss/line-clamp": "^0.4.4",
46-
"@tanstack/react-table": "^8.9.1",
47-
"@tauri-apps/api": "2.0.0-alpha.4",
48-
"@tauri-apps/plugin-window": "2.0.0-alpha.0",
49-
"class-variance-authority": "^0.6.0",
50-
"clsx": "^1.2.1",
51-
"cmdk": "^0.2.0",
52-
"date-fns": "^2.30.0",
53-
"lucide-react": "^0.221.0",
54-
"nanoid": "^4.0.2",
55-
"next": "^13.4.4",
56-
"next-themes": "^0.2.1",
57-
"react": "^18.2.0",
58-
"react-day-picker": "^8.7.1",
59-
"react-dom": "^18.2.0",
60-
"react-hook-form": "^7.44.1",
61-
"react-wrap-balancer": "^0.5.0",
62-
"recharts": "^2.6.2",
63-
"tailwind-merge": "^1.12.0",
64-
"tailwindcss-animate": "^1.0.5",
37+
"@clack/core": "^0.3.2",
38+
"@clack/prompts": "^0.6.3",
39+
"picocolors": "^1.0.0",
40+
"sisteransi": "^1.0.5",
6541
"zod": "^3.21.4"
6642
},
6743
"devDependencies": {
68-
"@ianvs/prettier-plugin-sort-imports": "^4.0.0",
69-
"@tauri-apps/cli": "2.0.0-alpha.9",
70-
"@types/node": "^20.2.5",
71-
"@types/react": "^18.2.7",
72-
"@types/react-dom": "^18.2.4",
73-
"autoprefixer": "^10.4.14",
74-
"postcss": "^8.4.23",
75-
"prettier": "^2.8.8",
76-
"prettier-plugin-tailwindcss": "^0.3.0",
77-
"tailwind-scrollbar": "^3.0.4",
78-
"tailwindcss": "^3.3.2",
79-
"taze": "^0.10.1",
80-
"typescript": "^5.0.4"
44+
"@types/minimist": "^1.2.2",
45+
"@types/node": "^20.4.1",
46+
"@types/prompts": "^2.4.4",
47+
"commander": "^11.0.0",
48+
"kolorist": "^1.8.0",
49+
"minimist": "^1.2.8",
50+
"prompts": "^2.4.2",
51+
"typescript": "^5.1.6",
52+
"unbuild": "^1.2.1"
8153
}
8254
}

0 commit comments

Comments
 (0)