@dybo-ai/design 1.0.1 → 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.
Files changed (3) hide show
  1. package/CLAUDE.md +13 -10
  2. package/README.md +12 -12
  3. package/package.json +6 -6
package/CLAUDE.md CHANGED
@@ -12,13 +12,13 @@ This `CLAUDE.md` is itself shipped to consumers (it's in `package.json`'s `files
12
12
 
13
13
  `tokens.json` is canonical (values + original Figma variable names). Every other token surface is a **manually maintained mirror** of it — there is no code generation:
14
14
 
15
- | File | Mirrors tokens.json as... |
16
- |---|---|
17
- | `tokens.mjs` | ESM flat exports (`color`, `space`, `radius`, etc.) |
18
- | `tokens.cjs` | CommonJS mirror of `tokens.mjs` |
19
- | `theme.css` | CSS custom properties + `.dybo-*` helper classes (`.dybo-glass`, `.dybo-btn`, `.dybo-input`, `.dybo-badge`) |
20
- | `tailwind-preset.cjs` | Tailwind theme extension (`dybo-*` utilities) |
21
- | `react/index.jsx` | Thin React wrappers (`Button`, `Card`, `Input`, `Badge`) over the `theme.css` classes — requires the consumer to import `theme.css` separately |
15
+ | File | Mirrors tokens.json as... |
16
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `tokens.mjs` | ESM flat exports (`color`, `space`, `radius`, etc.) |
18
+ | `tokens.cjs` | CommonJS mirror of `tokens.mjs` |
19
+ | `theme.css` | CSS custom properties + `.dybo-*` helper classes (`.dybo-glass`, `.dybo-btn`, `.dybo-input`, `.dybo-badge`) |
20
+ | `tailwind-preset.cjs` | Tailwind theme extension (`dybo-*` utilities) |
21
+ | `react/index.jsx` | Thin React wrappers (`Button`, `Card`, `Input`, `Badge`) over the `theme.css` classes — requires the consumer to import `theme.css` separately |
22
22
 
23
23
  **When changing a token value or adding a new one, update all five in the same change.** There's no automated check that catches drift between them (a Style Dictionary generation pipeline is proposed but not implemented — see `docs/SETUP.md` Part E).
24
24
 
@@ -31,11 +31,13 @@ This `CLAUDE.md` is itself shipped to consumers (it's in `package.json`'s `files
31
31
  There is no build, lint, or test tooling in this repo — don't invent npm scripts that don't exist (`package.json` has no `scripts` field).
32
32
 
33
33
  Publishing (manual, no CI):
34
+
34
35
  ```bash
35
36
  npm version patch # or minor / major — see docs/SETUP.md Part D for the semver rule
36
37
  npm publish
37
38
  git push --follow-tags
38
39
  ```
40
+
39
41
  `npm publish --dry-run` is useful to confirm the packed file list matches `package.json`'s `files` array before actually publishing. Publishing requires a `.npmrc` (git-ignored, copy from `.npmrc.example`) with a `GITHUB_TOKEN` that has `write:packages`.
40
42
 
41
43
  ## Design system rules for consuming apps
@@ -49,9 +51,10 @@ When building UI in a DYBO app, use `@dybo-ai/design`. Do not hard-code hex valu
49
51
  - **Radius:** 12 (buttons/inputs), 20 (cards), 999 (pills).
50
52
 
51
53
  How to consume (pick per app):
52
- - Tailwind app → `presets: [require("@dybo-ai/design/tailwind")]`, use `dybo-*` utilities.
54
+
55
+ - Tailwind app → `@import "@dybo-ai/design/theme.css"` in CSS, use `dybo-*` utilities.
53
56
  - Non-Tailwind → `import "@dybo-ai/design/theme.css"` and use `.dybo-glass`, `.dybo-btn`, `.dybo-input`, `.dybo-badge`.
54
- - React → `import { Button, Card, Input, Badge } from "@dybo-ai/design/react"` (also import the CSS).
55
- - Programmatic values → `import { color, space, radius } from "@dybo-ai/design"`.
57
+ - React → `import { Button, Card, Input, Badge } from "@dybo-ai/design"` (also import the CSS).
58
+ - Programmatic values → `import { color, space, radius } from "@dybo-ai/design/tokens"`.
56
59
 
57
60
  Reference `tokens.json` for the full token list and `docs/design-system.md` for rationale. Semantic "danger" is red `#a21a17` — ignore Figma's mislabeled orange "Feedback/Error".
package/README.md CHANGED
@@ -55,7 +55,7 @@ import "@dybo-ai/design/theme.css";
55
55
 
56
56
  ```tsx
57
57
  import "@dybo-ai/design/theme.css";
58
- import { Button, Card, Input, Badge } from "@dybo-ai/design/react";
58
+ import { Button, Card, Input, Badge } from "@dybo-ai/design";
59
59
  ```
60
60
 
61
61
  All components are TypeScript with `I`-prefixed interfaces.
@@ -87,7 +87,7 @@ import {
87
87
  TopBar,
88
88
  NavItem,
89
89
  NavSection,
90
- } from "@dybo-ai/design/react";
90
+ } from "@dybo-ai/design";
91
91
 
92
92
  function MyApp() {
93
93
  return (
@@ -116,7 +116,7 @@ function MyApp() {
116
116
  ### Glassmorphism card
117
117
 
118
118
  ```tsx
119
- import { Card, Button, Input } from "@dybo-ai/design/react";
119
+ import { Card, Button, Input } from "@dybo-ai/design";
120
120
 
121
121
  <Card>
122
122
  <Input label="Name" placeholder="Enter your name" />
@@ -129,8 +129,8 @@ import { Card, Button, Input } from "@dybo-ai/design/react";
129
129
  ### DataTable
130
130
 
131
131
  ```tsx
132
- import { DataTable } from "@dybo-ai/design/react";
133
- import type { IColumn } from "@dybo-ai/design/react";
132
+ import { DataTable } from "@dybo-ai/design";
133
+ import type { IColumn } from "@dybo-ai/design";
134
134
 
135
135
  interface IUser {
136
136
  id: number;
@@ -161,7 +161,7 @@ const columns: IColumn<IUser>[] = [
161
161
 
162
162
  ```tsx
163
163
  import { useState } from "react";
164
- import { Tabs } from "@dybo-ai/design/react";
164
+ import { Tabs } from "@dybo-ai/design";
165
165
 
166
166
  const TABS = [
167
167
  { key: "federal", label: "Federal (IRS)" },
@@ -185,7 +185,7 @@ function ProjectDetail() {
185
185
  ### Overview grid
186
186
 
187
187
  ```tsx
188
- import { OverviewGrid } from "@dybo-ai/design/react";
188
+ import { OverviewGrid } from "@dybo-ai/design";
189
189
 
190
190
  <OverviewGrid
191
191
  fields={[
@@ -200,7 +200,7 @@ import { OverviewGrid } from "@dybo-ai/design/react";
200
200
  ### Alert
201
201
 
202
202
  ```tsx
203
- import { Alert } from "@dybo-ai/design/react";
203
+ import { Alert } from "@dybo-ai/design";
204
204
 
205
205
  <Alert variant="danger" onClose={() => setError(null)}>
206
206
  Failed to save. Please check the data and try again.
@@ -211,7 +211,7 @@ import { Alert } from "@dybo-ai/design/react";
211
211
 
212
212
  ```tsx
213
213
  import { useState } from "react";
214
- import { Modal, Button } from "@dybo-ai/design/react";
214
+ import { Modal, Button } from "@dybo-ai/design";
215
215
 
216
216
  function ConfirmDelete() {
217
217
  const [open, setOpen] = useState(false);
@@ -245,7 +245,7 @@ function ConfirmDelete() {
245
245
  ### Login card
246
246
 
247
247
  ```tsx
248
- import { LoginCard, Input, Button } from "@dybo-ai/design/react";
248
+ import { LoginCard, Input, Button } from "@dybo-ai/design";
249
249
 
250
250
  <LoginCard
251
251
  logo={<img src="/logo.png" alt="DYBO" height={44} />}
@@ -273,7 +273,7 @@ import { LoginCard, Input, Button } from "@dybo-ai/design/react";
273
273
  ### Select
274
274
 
275
275
  ```tsx
276
- import { Select } from "@dybo-ai/design/react";
276
+ import { Select } from "@dybo-ai/design";
277
277
 
278
278
  <Select
279
279
  label="State"
@@ -292,7 +292,7 @@ import { Select } from "@dybo-ai/design/react";
292
292
  ## Tokens in JS/TS
293
293
 
294
294
  ```ts
295
- import { color, space, radius } from "@dybo-ai/design";
295
+ import { color, space, radius } from "@dybo-ai/design/tokens";
296
296
 
297
297
  color.brand.blue; // "#5878a7"
298
298
  color.semantic.danger.solid; // "#a21a17"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dybo-ai/design",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "DYBO design system — tokens, Tailwind V4 theme, theme CSS, and React components.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -10,16 +10,16 @@
10
10
  ],
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.cjs"
16
+ },
17
+ "./tokens": {
13
18
  "import": "./tokens.mjs",
14
19
  "require": "./tokens.cjs"
15
20
  },
16
21
  "./tokens.json": "./tokens.json",
17
22
  "./theme.css": "./theme.css",
18
- "./react": {
19
- "types": "./dist/index.d.ts",
20
- "import": "./dist/index.mjs",
21
- "require": "./dist/index.js"
22
- },
23
23
  "./assets/*": "./assets/*"
24
24
  },
25
25
  "main": "./tokens.cjs",