@adres/thinkprop-ui 0.0.1 → 0.0.2

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/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # @adres/thinkprop-ui
2
+
3
+ ThinkProp design system: React components and the ThinkProp theme in one package.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @adres/thinkprop-ui
9
+ ```
10
+
11
+ The package is public on npmjs.com. No `.npmrc` or token is needed to install it.
12
+
13
+ Peer dependencies: `react@19`, `react-dom@19`, `tailwindcss@4`.
14
+
15
+ ## Wire CSS
16
+
17
+ In the app's global CSS (`app/globals.css`), import Tailwind first, then scan the package source, then the styles. Tailwind 4 does not scan `node_modules` on its own, so component classes are missing without `@source`. `prefix(ax)` makes utilities `ax:bg-primary`, `ax:text-foreground`, and so on. `styles` includes the ThinkProp theme; do not import `theme.css` yourself.
18
+
19
+ ```css
20
+ @import "tailwindcss" prefix(ax);
21
+
22
+ /* Scan the design-system source so component classes are emitted. */
23
+ @source "../node_modules/@adres/thinkprop-ui/src";
24
+
25
+ @import "@adres/thinkprop-ui/styles";
26
+ ```
27
+
28
+ `@source` is relative to the CSS file. `src/app/globals.css` uses `../../node_modules/@adres/thinkprop-ui/src`. Import the file once from the root layout. Dark mode: add `class="dark"` (or `data-theme="dark"`) on `<html>`.
29
+
30
+ ```tsx
31
+ import "./globals.css"
32
+
33
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
34
+ return (
35
+ <html lang="en">
36
+ <head>
37
+ <link
38
+ rel="stylesheet"
39
+ href="https://api.fontshare.com/v2/css?f[]=switzer@300,400,500,600,700&display=swap"
40
+ />
41
+ </head>
42
+ <body>{children}</body>
43
+ </html>
44
+ )
45
+ }
46
+ ```
47
+
48
+ ## Fonts
49
+
50
+ Switzer is not bundled (its licence forbids redistribution). Load it with the `<link>` above. A CSS `@import` of that URL gets reordered by Vite and breaks the Tailwind import order.
51
+
52
+ ## Develop
53
+
54
+ ```bash
55
+ npm install
56
+ npm run storybook # http://localhost:6006
57
+ npm run verify # typecheck, tests, build
58
+ npm run validate # theme variables + component knowledge
59
+ ```
60
+
61
+ - Components live in `packages/design-system/src/components/` beside their stories.
62
+ - The theme is `packages/design-system/src/theme/theme.css`; type and component tweaks are in `src/styles/overrides.css`.
63
+ - After editing a component with a knowledge file, run `npm run knowledge:sync`.
64
+
65
+ ## Release
66
+
67
+ Changesets: `npm run changeset`, then `npm run version:packages`. `release.yml` publishes from `main`. Publish copies this README into the package, which is the file npmjs shows.
package/knowledge.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "generatedBy": "scripts/sync-component-knowledge.mjs",
4
4
  "package": {
5
5
  "name": "@adres/thinkprop-ui",
6
- "version": "0.0.1"
6
+ "version": "0.0.2"
7
7
  },
8
8
  "totals": {
9
9
  "components": 117,
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@adres/thinkprop-ui",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
7
+ "README.md",
7
8
  "src",
8
9
  "knowledge",
9
10
  "knowledge.json",
@@ -34,7 +35,8 @@
34
35
  "test:storybook": "node scripts/test-storybook.mjs",
35
36
  "storybook": "storybook dev -p 6006",
36
37
  "build-storybook": "storybook build -o storybook-static",
37
- "clean": "rm -rf .turbo *.tsbuildinfo"
38
+ "clean": "rm -rf .turbo *.tsbuildinfo",
39
+ "prepack": "cp ../../README.md README.md"
38
40
  },
39
41
  "dependencies": {
40
42
  "@radix-ui/react-accordion": "^1.2.12",