Skip to content

Commit 9f19d8f

Browse files
authored
Migrate Tailwind styles to design-system package (#5794)
## Summary Consolidates Tailwind configuration and styles into a shared `@comfyorg/design-system` package for reuse across monorepo apps. The goal was not to make changes to how the design system works; merely to separate it cleanly. I _would_ strongly recommend some drastic sweeping changes, however I believe that should be done after the migration. ## Changes - **What**: Migrates CSS files, Tailwind config, and custom icons to design-system package - **Dependencies**: Moves `@iconify-json/lucide` and `@iconify/tailwind` to design-system package
1 parent d954336 commit 9f19d8f

21 files changed

+1318
-1051
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const config: StorybookConfig = {
4545
compiler: 'vue3',
4646
customCollections: {
4747
comfy: FileSystemIconLoader(
48-
process.cwd() + '/src/assets/icons/custom'
48+
process.cwd() + '/packages/design-system/src/icons'
4949
)
5050
}
5151
}),

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ The project supports three types of icons, all with automatic imports (no manual
265265
2. **Iconify Icons** - 200,000+ icons from various libraries: `<i-lucide:settings />`, `<i-mdi:folder />`
266266
3. **Custom Icons** - Your own SVG icons: `<i-comfy:workflow />`
267267

268-
Icons are powered by the unplugin-icons system, which automatically discovers and imports icons as Vue components. Custom icons are stored in `src/assets/icons/custom/` and processed by `build/customIconCollection.ts` with automatic validation.
268+
Icons are powered by the unplugin-icons system, which automatically discovers and imports icons as Vue components. Custom icons are stored in `packages/design-system/src/icons/` and processed by `packages/design-system/src/iconCollection.ts` with automatic validation.
269269

270-
For detailed instructions and code examples, see [src/assets/icons/README.md](src/assets/icons/README.md).
270+
For detailed instructions and code examples, see [packages/design-system/src/icons/README.md](packages/design-system/src/icons/README.md).
271271

272272
## Working with litegraph.js
273273

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
},
4343
"devDependencies": {
4444
"@eslint/js": "^9.35.0",
45-
"@iconify-json/lucide": "^1.2.66",
46-
"@iconify/tailwind": "^1.2.0",
4745
"@intlify/eslint-plugin-vue-i18n": "^4.1.0",
4846
"@lobehub/i18n-cli": "^1.25.1",
4947
"@nx/eslint": "21.4.1",
@@ -107,6 +105,7 @@
107105
"@alloc/quick-lru": "^5.2.0",
108106
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
109107
"@comfyorg/comfyui-electron-types": "0.4.73-0",
108+
"@comfyorg/design-system": "workspace:*",
110109
"@comfyorg/tailwind-utils": "workspace:*",
111110
"@iconify/json": "^2.2.380",
112111
"@primeuix/forms": "0.0.2",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@comfyorg/design-system",
3+
"version": "1.0.0",
4+
"description": "Shared design system for ComfyUI Frontend",
5+
"type": "module",
6+
"exports": {
7+
"./tailwind-config": {
8+
"import": "./tailwind.config.ts",
9+
"types": "./tailwind.config.ts"
10+
},
11+
"./css/*": "./src/css/*"
12+
},
13+
"scripts": {
14+
"typecheck": "tsc --noEmit"
15+
},
16+
"nx": {
17+
"tags": [
18+
"scope:shared",
19+
"type:design"
20+
]
21+
},
22+
"dependencies": {
23+
"@iconify-json/lucide": "^1.1.178",
24+
"@iconify/tailwind": "^1.1.3"
25+
},
26+
"devDependencies": {
27+
"tailwindcss": "^3.4.17",
28+
"typescript": "^5.4.5"
29+
},
30+
"packageManager": "[email protected]"
31+
}
File renamed without changes.

0 commit comments

Comments
 (0)