@lessly/ui 1.5.0 → 2.0.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.
@@ -37,7 +37,29 @@ var lesslyPreset = {
37
37
  500: "500ms"
38
38
  },
39
39
  zIndex: { ...upstreamTheme.zIndex, 10: "10", 20: "20", 50: "50" },
40
- boxShadow: { ...upstreamTheme.boxShadow, none: "none" }
40
+ boxShadow: { ...upstreamTheme.boxShadow, none: "none" },
41
+ extend: {
42
+ ...upstreamTheme.extend,
43
+ // Colours *extend* rather than replace, so the missing-step rule above does not reach
44
+ // them — but an opacity modifier does. A semantic colour is `var(--bg-secondary)`, a
45
+ // whole colour with no `<alpha-value>` placeholder for Tailwind to substitute into, so
46
+ // `bg-bg-secondary/50` compiles to nothing at all on Tailwind 3 while Tailwind 4 answers
47
+ // it with `color-mix`. `bg-black/50` is a hex palette colour and survives both, which is
48
+ // why a `/90` never looked dangerous. These three name the alphas the kit writes; `a50`
49
+ // reads as alpha where a bare `50` would read as a lightness step. No solid token can
50
+ // stand in for them: in light `bg-secondary` at 50% over the ground is exactly
51
+ // `--bg-surface`, and in dark it lands below the ground while `--bg-surface` sits above
52
+ // it. Each maps onto a variable rather than carrying the colour itself, because that is
53
+ // the shape the v4 `@theme` bridge carries (scripts/build-styles.mjs) — the values live
54
+ // in src/styles.css. Delete each the day `@lessly/tokens` gives its colours an
55
+ // `<alpha-value>` placeholder.
56
+ colors: {
57
+ ...upstreamTheme.extend.colors,
58
+ "bg-secondary-a50": "var(--bg-secondary-a50)",
59
+ "bg-secondary-a80": "var(--bg-secondary-a80)",
60
+ "bg-danger-a90": "var(--bg-danger-a90)"
61
+ }
62
+ }
41
63
  },
42
64
  darkMode: "class"
43
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lessly/ui",
3
- "version": "1.5.0",
3
+ "version": "2.0.0",
4
4
  "description": "Lessly design system — shared UI primitives, tokens, and theme",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.30.3",
@@ -15,6 +15,10 @@
15
15
  "types": "./dist/index.d.ts",
16
16
  "default": "./dist/index.js"
17
17
  },
18
+ "./router": {
19
+ "types": "./dist/router.d.ts",
20
+ "default": "./dist/router.js"
21
+ },
18
22
  "./tailwind-preset": {
19
23
  "types": "./dist/tailwind-preset.d.ts",
20
24
  "default": "./dist/tailwind-preset.js"
@@ -42,6 +46,7 @@
42
46
  "release:publish": "node scripts/release-publish.mjs",
43
47
  "release:tag": "changeset tag",
44
48
  "dev-site": "vite --config site/vite.config.ts",
49
+ "dev-css-stale": "node scripts/dev-css-stale.mjs",
45
50
  "build-site": "pnpm build && vite build --config site/vite.config.ts",
46
51
  "test-site": "node --test site/*.test.mjs",
47
52
  "test-site-app": "vitest run --config site/vitest.config.ts",
@@ -54,10 +59,13 @@
54
59
  "peerDependencies": {
55
60
  "react": "^19.0.0",
56
61
  "react-dom": "^19.0.0",
57
- "react-router": "^7.0.0",
62
+ "react-router": "^7.0.0 || ^8.0.0",
58
63
  "tailwindcss": ">=3.4.0"
59
64
  },
60
65
  "peerDependenciesMeta": {
66
+ "react-router": {
67
+ "optional": true
68
+ },
61
69
  "tailwindcss": {
62
70
  "optional": true
63
71
  }
@@ -93,7 +101,7 @@
93
101
  "cmdk": "^1.1.1",
94
102
  "embla-carousel-react": "^8.6.0",
95
103
  "input-otp": "^1.4.2",
96
- "lucide-react": "^0.577.0",
104
+ "lucide-react": "^1.33.0",
97
105
  "react-day-picker": "^10.0.1",
98
106
  "react-hook-form": "^7.81.0",
99
107
  "sonner": "^2.0.7",