@soli92/solids 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +46 -27
- package/dist/tailwind/preset.cjs +89 -0
- package/package.json +21 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.1.0](https://github.com/Soli92/solids/compare/v1.0.0...v1.1.0) (2026-03-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* tailwind preset, shadcn registry [@solids](https://github.com/solids), Storybook button showcase ([2df67ce](https://github.com/Soli92/solids/commit/2df67ce8e1b810348775a717a0a106eac614378f))
|
|
7
|
+
|
|
1
8
|
# 1.0.0 (2026-03-24)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ npm install @soli92/solids
|
|
|
32
32
|
|
|
33
33
|
### Con Tailwind + shadcn/ui (Next.js, Vite…)
|
|
34
34
|
|
|
35
|
+
**Consigliato:** usa il **preset Tailwind** del pacchetto così tema, colori shadcn, font e shadow restano allineati ai token in un solo punto.
|
|
36
|
+
|
|
35
37
|
```css
|
|
36
38
|
/* globals.css */
|
|
37
39
|
@import "@soli92/solids/css/index.css";
|
|
@@ -44,33 +46,19 @@ npm install @soli92/solids
|
|
|
44
46
|
```js
|
|
45
47
|
// tailwind.config.js
|
|
46
48
|
module.exports = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
extend: {
|
|
50
|
-
colors: {
|
|
51
|
-
background: "var(--background)",
|
|
52
|
-
foreground: "var(--foreground)",
|
|
53
|
-
primary: { DEFAULT: "var(--primary)", foreground: "var(--primary-foreground)" },
|
|
54
|
-
secondary: { DEFAULT: "var(--secondary)", foreground: "var(--secondary-foreground)" },
|
|
55
|
-
muted: { DEFAULT: "var(--muted)", foreground: "var(--muted-foreground)" },
|
|
56
|
-
accent: { DEFAULT: "var(--accent)", foreground: "var(--accent-foreground)" },
|
|
57
|
-
destructive: { DEFAULT: "var(--destructive)",foreground: "var(--destructive-foreground)" },
|
|
58
|
-
card: { DEFAULT: "var(--card)", foreground: "var(--card-foreground)" },
|
|
59
|
-
popover: { DEFAULT: "var(--popover)", foreground: "var(--popover-foreground)" },
|
|
60
|
-
border: "var(--border)",
|
|
61
|
-
input: "var(--input)",
|
|
62
|
-
ring: "var(--ring)",
|
|
63
|
-
},
|
|
64
|
-
borderRadius: {
|
|
65
|
-
lg: "var(--radius)",
|
|
66
|
-
md: "calc(var(--radius) - 2px)",
|
|
67
|
-
sm: "calc(var(--radius) - 4px)",
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
49
|
+
presets: [require("@soli92/solids/tailwind-preset")],
|
|
50
|
+
content: ["./app/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
|
|
71
51
|
};
|
|
72
52
|
```
|
|
73
53
|
|
|
54
|
+
Serve anche `tailwindcss-animate` (dipendenza tipica di shadcn):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install tailwindcss-animate
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Poi inizializza shadcn e aggiungi i componenti con la CLI (`npx shadcn@latest init` → `add button`, …). I componenti useranno le variabili `--background`, `--primary`, ecc., già mappate da SoliDS. Un esempio di `components.json` è in [templates/components.json.example](./templates/components.json.example).
|
|
61
|
+
|
|
74
62
|
➡️ Guida completa: [docs/shadcn-integration.md](./docs/shadcn-integration.md)
|
|
75
63
|
|
|
76
64
|
### Senza framework
|
|
@@ -93,6 +81,8 @@ import "@soli92/solids/css/base.css"; // solo base
|
|
|
93
81
|
import "@soli92/solids/css/utilities.css"; // solo utilities
|
|
94
82
|
```
|
|
95
83
|
|
|
84
|
+
Preset Tailwind (shadcn): `require("@soli92/solids/tailwind-preset")` nel `tailwind.config`.
|
|
85
|
+
|
|
96
86
|
---
|
|
97
87
|
|
|
98
88
|
## Token Reference
|
|
@@ -195,13 +185,33 @@ npm install
|
|
|
195
185
|
# Build (genera dist/)
|
|
196
186
|
npm run build
|
|
197
187
|
|
|
198
|
-
# Storybook
|
|
188
|
+
# Storybook (build token + Tailwind preview, poi dev server)
|
|
199
189
|
npm run storybook
|
|
200
190
|
|
|
201
191
|
# Release (semantic-release — solo da CI)
|
|
202
192
|
npm run release
|
|
193
|
+
|
|
194
|
+
# Registry shadcn (sync src → registry/solids + JSON in registry/r)
|
|
195
|
+
npm run registry:build
|
|
203
196
|
```
|
|
204
197
|
|
|
198
|
+
Per Storybook, il CSS Tailwind viene precompilato in `.storybook/preview-tw.built.css` (file ignorato da git) dallo script `build:storybook-css`.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Framework UI (progetti personali + shadcn)
|
|
203
|
+
|
|
204
|
+
SoliDS resta **agnostico**: i componenti UI vivono nelle tue app (modello shadcn: codice in repo, non solo in `node_modules`). Il flusso consigliato:
|
|
205
|
+
|
|
206
|
+
1. **Token e CSS** — `@soli92/solids` (`index.css` + opzionale solo layer).
|
|
207
|
+
2. **Tailwind** — `presets: [require("@soli92/solids/tailwind-preset")]` + `tailwindcss-animate`.
|
|
208
|
+
3. **shadcn/ui** — `npx shadcn@latest init` e `add` per ogni blocco (Radix + CVA + le tue classi).
|
|
209
|
+
4. **Tema** — `data-theme` / `next-themes` come in [docs/shadcn-integration.md](./docs/shadcn-integration.md).
|
|
210
|
+
|
|
211
|
+
In questo repository, **Storybook** include un esempio **Button** in stile shadcn in `src/components/ui/button.tsx` (solo sorgente di riferimento: **non** è incluso nell’artifact npm `dist/`; nei progetti veri aggiungi i componenti con la CLI shadcn).
|
|
212
|
+
|
|
213
|
+
Il **registry shadcn** per il modello 1 è in `registry/` (sorgenti) e `registry/r/` (JSON generati). Guida operativa: [docs/registry-model-1.md](./docs/registry-model-1.md).
|
|
214
|
+
|
|
205
215
|
---
|
|
206
216
|
|
|
207
217
|
## Struttura
|
|
@@ -214,14 +224,23 @@ src/
|
|
|
214
224
|
│ └── themes/
|
|
215
225
|
│ ├── light.json # Override tema light
|
|
216
226
|
│ └── dark.json # Override tema dark
|
|
227
|
+
├── tailwind/
|
|
228
|
+
│ └── preset.cjs # Preset Tailwind (shadcn + token SD)
|
|
229
|
+
├── components/ui/ # Esempio shadcn in Storybook
|
|
217
230
|
├── css/
|
|
218
231
|
│ ├── shadcn.css # Compatibility layer shadcn/ui
|
|
219
232
|
│ ├── base.css # Reset + global styles
|
|
220
233
|
│ └── utilities.css # Classi utility sd-*
|
|
221
234
|
scripts/
|
|
222
|
-
|
|
235
|
+
├── build.mjs # Build script → genera dist/
|
|
236
|
+
└── sync-registry.mjs # Copia src → registry/solids (per shadcn build)
|
|
237
|
+
registry/
|
|
238
|
+
│ └── solids/ # Sorgenti registry (sync da src/)
|
|
239
|
+
registry.json # Indice item shadcn (root repo)
|
|
240
|
+
registry/r/ # JSON pubblicati (`npm run registry:build`)
|
|
223
241
|
docs/
|
|
224
|
-
|
|
242
|
+
├── shadcn-integration.md # Guida integrazione completa
|
|
243
|
+
└── registry-model-1.md # Modello shadcn in repo + @solids
|
|
225
244
|
```
|
|
226
245
|
|
|
227
246
|
---
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SoliDS — Tailwind preset (shadcn/ui + token bridge).
|
|
3
|
+
* Install: tailwindcss, tailwindcss-animate, @soli92/solids.
|
|
4
|
+
* In tailwind.config: presets: [require("@soli92/solids/tailwind-preset")].
|
|
5
|
+
* In globals.css: import SoliDS index.css, then Tailwind layers.
|
|
6
|
+
*/
|
|
7
|
+
const { fontFamily } = require("tailwindcss/defaultTheme");
|
|
8
|
+
|
|
9
|
+
/** @type {import("tailwindcss").Config} */
|
|
10
|
+
module.exports = {
|
|
11
|
+
darkMode: ["class", '[data-theme="dark"]'],
|
|
12
|
+
theme: {
|
|
13
|
+
extend: {
|
|
14
|
+
colors: {
|
|
15
|
+
background: "var(--background)",
|
|
16
|
+
foreground: "var(--foreground)",
|
|
17
|
+
card: {
|
|
18
|
+
DEFAULT: "var(--card)",
|
|
19
|
+
foreground: "var(--card-foreground)",
|
|
20
|
+
},
|
|
21
|
+
popover: {
|
|
22
|
+
DEFAULT: "var(--popover)",
|
|
23
|
+
foreground: "var(--popover-foreground)",
|
|
24
|
+
},
|
|
25
|
+
primary: {
|
|
26
|
+
DEFAULT: "var(--primary)",
|
|
27
|
+
foreground: "var(--primary-foreground)",
|
|
28
|
+
},
|
|
29
|
+
secondary: {
|
|
30
|
+
DEFAULT: "var(--secondary)",
|
|
31
|
+
foreground: "var(--secondary-foreground)",
|
|
32
|
+
},
|
|
33
|
+
muted: {
|
|
34
|
+
DEFAULT: "var(--muted)",
|
|
35
|
+
foreground: "var(--muted-foreground)",
|
|
36
|
+
},
|
|
37
|
+
accent: {
|
|
38
|
+
DEFAULT: "var(--accent)",
|
|
39
|
+
foreground: "var(--accent-foreground)",
|
|
40
|
+
},
|
|
41
|
+
destructive: {
|
|
42
|
+
DEFAULT: "var(--destructive)",
|
|
43
|
+
foreground: "var(--destructive-foreground)",
|
|
44
|
+
},
|
|
45
|
+
border: "var(--border)",
|
|
46
|
+
input: "var(--input)",
|
|
47
|
+
ring: "var(--ring)",
|
|
48
|
+
chart: {
|
|
49
|
+
1: "var(--chart-1)",
|
|
50
|
+
2: "var(--chart-2)",
|
|
51
|
+
3: "var(--chart-3)",
|
|
52
|
+
4: "var(--chart-4)",
|
|
53
|
+
5: "var(--chart-5)",
|
|
54
|
+
},
|
|
55
|
+
sidebar: {
|
|
56
|
+
DEFAULT: "var(--sidebar)",
|
|
57
|
+
foreground: "var(--sidebar-foreground)",
|
|
58
|
+
primary: "var(--sidebar-primary)",
|
|
59
|
+
"primary-foreground": "var(--sidebar-primary-foreground)",
|
|
60
|
+
accent: "var(--sidebar-accent)",
|
|
61
|
+
"accent-foreground": "var(--sidebar-accent-foreground)",
|
|
62
|
+
border: "var(--sidebar-border)",
|
|
63
|
+
ring: "var(--sidebar-ring)",
|
|
64
|
+
},
|
|
65
|
+
"sd-primary": "var(--sd-color-primary-default)",
|
|
66
|
+
"sd-success": "var(--sd-color-intent-success)",
|
|
67
|
+
"sd-warning": "var(--sd-color-intent-warning)",
|
|
68
|
+
"sd-danger": "var(--sd-color-intent-danger)",
|
|
69
|
+
"sd-info": "var(--sd-color-intent-info)",
|
|
70
|
+
},
|
|
71
|
+
borderRadius: {
|
|
72
|
+
lg: "var(--radius)",
|
|
73
|
+
md: "calc(var(--radius) - 2px)",
|
|
74
|
+
sm: "calc(var(--radius) - 4px)",
|
|
75
|
+
},
|
|
76
|
+
fontFamily: {
|
|
77
|
+
sans: ["var(--sd-font-body)", ...fontFamily.sans],
|
|
78
|
+
mono: ["var(--sd-font-mono)", ...fontFamily.mono],
|
|
79
|
+
},
|
|
80
|
+
boxShadow: {
|
|
81
|
+
sm: "var(--sd-shadow-sm)",
|
|
82
|
+
md: "var(--sd-shadow-md)",
|
|
83
|
+
lg: "var(--sd-shadow-lg)",
|
|
84
|
+
xl: "var(--sd-shadow-xl)",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
plugins: [require("tailwindcss-animate")],
|
|
89
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soli92/solids",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "SoliDS – agnostic design system foundations (tokens + CSS) with shadcn/ui compatibility.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"./css/themes.css": "./dist/css/themes.css",
|
|
39
39
|
"./css/shadcn.css": "./dist/css/shadcn.css",
|
|
40
40
|
"./css/base.css": "./dist/css/base.css",
|
|
41
|
-
"./css/utilities.css": "./dist/css/utilities.css"
|
|
41
|
+
"./css/utilities.css": "./dist/css/utilities.css",
|
|
42
|
+
"./tailwind-preset": "./dist/tailwind/preset.cjs"
|
|
42
43
|
},
|
|
43
44
|
"publishConfig": {
|
|
44
45
|
"access": "public"
|
|
@@ -48,10 +49,14 @@
|
|
|
48
49
|
"clean": "node -e \"import('node:fs').then(({rmSync})=>rmSync('dist',{recursive:true,force:true}))\"",
|
|
49
50
|
"prepublishOnly": "npm run build",
|
|
50
51
|
"release": "semantic-release",
|
|
51
|
-
"storybook": "
|
|
52
|
-
"
|
|
52
|
+
"build:storybook-css": "tailwindcss -c ./tailwind.config.cjs -i ./.storybook/preview-tw.input.css -o ./.storybook/preview-tw.built.css",
|
|
53
|
+
"storybook": "npm run build && npm run build:storybook-css && storybook dev -p 6006",
|
|
54
|
+
"build-storybook": "npm run build && npm run build:storybook-css && storybook build",
|
|
55
|
+
"registry:sync": "node ./scripts/sync-registry.mjs",
|
|
56
|
+
"registry:build": "node ./scripts/sync-registry.mjs && shadcn build --output ./registry/r"
|
|
53
57
|
},
|
|
54
58
|
"devDependencies": {
|
|
59
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
55
60
|
"@semantic-release/changelog": "^6.0.0",
|
|
56
61
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
57
62
|
"@semantic-release/git": "^10.0.0",
|
|
@@ -62,7 +67,18 @@
|
|
|
62
67
|
"@storybook/addon-essentials": "^8.6.14",
|
|
63
68
|
"@storybook/blocks": "^8.6.14",
|
|
64
69
|
"@storybook/react-vite": "^8.6.14",
|
|
70
|
+
"@types/react": "^18.3.18",
|
|
71
|
+
"@types/react-dom": "^18.3.5",
|
|
72
|
+
"autoprefixer": "^10.4.20",
|
|
73
|
+
"class-variance-authority": "^0.7.1",
|
|
74
|
+
"clsx": "^2.1.1",
|
|
75
|
+
"postcss": "^8.4.49",
|
|
65
76
|
"semantic-release": "^25.0.0",
|
|
66
|
-
"
|
|
77
|
+
"shadcn": "^4.1.0",
|
|
78
|
+
"storybook": "^8.6.14",
|
|
79
|
+
"tailwind-merge": "^2.6.0",
|
|
80
|
+
"tailwindcss": "^3.4.17",
|
|
81
|
+
"tailwindcss-animate": "^1.0.7",
|
|
82
|
+
"typescript": "^5.7.2"
|
|
67
83
|
}
|
|
68
84
|
}
|