@nxds/claude-design 0.7.0 → 0.8.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/README.md +8 -8
- package/coverage.md +2 -2
- package/files.json +8 -8
- package/package.json +1 -1
- package/project/README.md +37 -4
- package/project/components/ToggleGroup/README.md +1 -1
- package/project/components/bundle.css +463 -903
- package/project/components/bundle.js +2 -2
- package/project/components/index.d.ts +1 -1
- package/project/design-system.json +4 -4
- package/project/tokens.css +341 -672
- package/project/tokens.json +484 -2148
package/README.md
CHANGED
|
@@ -10,13 +10,13 @@ npx nxds-cli@latest export claude-design
|
|
|
10
10
|
|
|
11
11
|
The command writes a `nxds-design-system/project/` folder. Publish that folder as a Design System artifact in Claude, unchanged.
|
|
12
12
|
|
|
13
|
-
| File | What it holds
|
|
14
|
-
| ------------------------------------------- |
|
|
15
|
-
| `project/tokens.json`, `project/tokens.css` |
|
|
16
|
-
| `project/components/bundle.js` | Every component as `window.Nxds`, for React 18.3.1 globals
|
|
17
|
-
| `project/components/bundle.css` | The component styles
|
|
18
|
-
| `project/components/index.d.ts` | One `<Name>Props` interface per component part
|
|
19
|
-
| `project/components/<Name>/` | A preview card and a README per component
|
|
20
|
-
| `coverage.md` | The props the canvas can't set, and why
|
|
13
|
+
| File | What it holds |
|
|
14
|
+
| ------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
15
|
+
| `project/tokens.json`, `project/tokens.css` | The tokens the components read, at the default appearance, in Light and Dark |
|
|
16
|
+
| `project/components/bundle.js` | Every component as `window.Nxds`, for React 18.3.1 globals |
|
|
17
|
+
| `project/components/bundle.css` | The component styles |
|
|
18
|
+
| `project/components/index.d.ts` | One `<Name>Props` interface per component part |
|
|
19
|
+
| `project/components/<Name>/` | A preview card and a README per component |
|
|
20
|
+
| `coverage.md` | The props the canvas can't set, and why |
|
|
21
21
|
|
|
22
22
|
Docs: <https://nxds.dev>
|
package/coverage.md
CHANGED
package/files.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"path": "README.md",
|
|
4
|
-
"sha256": "
|
|
4
|
+
"sha256": "ddcdccf84d6da9746ea2a3278118ef3c5c39dcfed0eef0aeda883fcf59338ef0"
|
|
5
5
|
},
|
|
6
6
|
{
|
|
7
7
|
"path": "components/Accordion/README.md",
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
547
|
"path": "components/ToggleGroup/README.md",
|
|
548
|
-
"sha256": "
|
|
548
|
+
"sha256": "491595cbc0134963d95f8946e184bd73cfca35b85a9cf97c8d96ac36f7d8f335"
|
|
549
549
|
},
|
|
550
550
|
{
|
|
551
551
|
"path": "components/ToggleGroup/preview.html",
|
|
@@ -569,26 +569,26 @@
|
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
"path": "components/bundle.css",
|
|
572
|
-
"sha256": "
|
|
572
|
+
"sha256": "825c98e626eb3495f9a74985cda28d6424495a454843ee8c3e24f11c3c87c33b"
|
|
573
573
|
},
|
|
574
574
|
{
|
|
575
575
|
"path": "components/bundle.js",
|
|
576
|
-
"sha256": "
|
|
576
|
+
"sha256": "ed86d6b02bcb0680fd1820e1913ba24ab80f211575f78a7ed6680ff5a4eaf57d"
|
|
577
577
|
},
|
|
578
578
|
{
|
|
579
579
|
"path": "components/index.d.ts",
|
|
580
|
-
"sha256": "
|
|
580
|
+
"sha256": "3a9ac4b610e1f710c44d5b3fae4370189088e18e9ccf078d172899491c168044"
|
|
581
581
|
},
|
|
582
582
|
{
|
|
583
583
|
"path": "design-system.json",
|
|
584
|
-
"sha256": "
|
|
584
|
+
"sha256": "ac176019190d8f49fae0b32ab19d162bc154a38f0a10d2eb44af753d549ca4f7"
|
|
585
585
|
},
|
|
586
586
|
{
|
|
587
587
|
"path": "tokens.css",
|
|
588
|
-
"sha256": "
|
|
588
|
+
"sha256": "5e39516b7872b3fc46d629315ad566b06e5e01589c85eafcd5e9e586ddf050b3"
|
|
589
589
|
},
|
|
590
590
|
{
|
|
591
591
|
"path": "tokens.json",
|
|
592
|
-
"sha256": "
|
|
592
|
+
"sha256": "7d631a7f08f85eaeff57030f4aeb9dea7e4666366aa4e9e81fc0909dea311c0c"
|
|
593
593
|
}
|
|
594
594
|
]
|
package/package.json
CHANGED
package/project/README.md
CHANGED
|
@@ -28,7 +28,6 @@ nxds is neutral-first. Surfaces are near-white in Light and near-black in Dark.
|
|
|
28
28
|
- Separate regions with `nx-color-border-default`. Use `nx-color-border-hairline` between rows.
|
|
29
29
|
- Show focus with `nx-color-focus-default`, and `nx-color-focus-error` on an invalid control.
|
|
30
30
|
- Plot chart series with `nx-color-chart-categorical-1` to `nx-color-chart-categorical-5`, in order.
|
|
31
|
-
- Use the raw palette (`nx-color-blue-500` and its neighbours) only for one-off illustration. Components read semantic tokens only.
|
|
32
31
|
|
|
33
32
|
Status is never colour alone. Every alert, badge and toast carries a word or an icon too.
|
|
34
33
|
|
|
@@ -59,13 +58,13 @@ Body copy is 14px. Keep one heading level per region, and step down one size at
|
|
|
59
58
|
## Shape and elevation
|
|
60
59
|
|
|
61
60
|
- Round controls, inputs and cards with `nx-radius-md`. Buttons use `nx-radius-base`. Pills and avatars use `nx-radius-full`.
|
|
62
|
-
- Draw every border at `nx-borderwidth-default
|
|
61
|
+
- Draw every border at `nx-borderwidth-default`, and a selected or focused edge at `nx-borderwidth-thick`.
|
|
63
62
|
- Prefer borders to shadows. Cards sit at `nx-shadow-sm`. Popovers, menus, dialogs and sheets lift with `nx-shadow-lg` on a frosted `nx-color-popover-alpha` surface. Flat content takes no shadow.
|
|
64
63
|
- Stack layers with the z-index tokens: `nx-z-index-sticky`, `nx-z-index-modal`, `nx-z-index-popover`, `nx-z-index-toast`.
|
|
65
64
|
|
|
66
65
|
## Motion
|
|
67
66
|
|
|
68
|
-
Motion answers input and then gets out of the way. Popovers, menus and routine state changes take 200ms, small fades and indicators 150ms, and pressed states 100ms.
|
|
67
|
+
Motion answers input and then gets out of the way. Popovers, menus and routine state changes take `nx-motion-duration-default` (200ms), small fades and indicators `nx-motion-duration-fast` (150ms), and pressed states `nx-motion-duration-faster` (100ms). Elements ease in on `nx-motion-ease-enter`. Nothing bounces.
|
|
69
68
|
|
|
70
69
|
## Iconography
|
|
71
70
|
|
|
@@ -88,7 +87,41 @@ The system has a Light and a Dark theme. Set `data-theme="dark"` on `<html>` to
|
|
|
88
87
|
|
|
89
88
|
## Appearance
|
|
90
89
|
|
|
91
|
-
This system shows the default nxds appearance: a near-black brand colour on zinc surfaces, default density, subtle corners, quiet shadows and normal strokes.
|
|
90
|
+
This system shows the default nxds appearance: a near-black brand colour on zinc surfaces, default density, subtle corners, quiet shadows and normal strokes.
|
|
91
|
+
|
|
92
|
+
Set an attribute on any element to change density, corners, elevation or stroke for everything inside it:
|
|
93
|
+
|
|
94
|
+
| Attribute | Values |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `data-density` | `tight`, `compact`, `default`, `comfortable`, `relaxed`, `spacious` |
|
|
97
|
+
| `data-radius` | `square`, `subtle`, `smooth`, `round`, `extra-round` |
|
|
98
|
+
| `data-shadow` | `flat`, `quiet`, `soft`, `standard`, `strong` |
|
|
99
|
+
| `data-borderwidth` | `fine`, `normal`, `strong` |
|
|
100
|
+
|
|
101
|
+
Brand colour, surface tone and contrast are app-wide settings in nxds apps. They have no attribute.
|
|
102
|
+
|
|
103
|
+
## On a Design canvas
|
|
104
|
+
|
|
105
|
+
Install these files with the system under `project/ds/<folder>/`. Link them in each artboard right after the `support.js` line, in this order:
|
|
106
|
+
|
|
107
|
+
1. `tokens.css`: every token value, both themes and the text style classes. The components read their variables from it.
|
|
108
|
+
2. `components/bundle.css`: the component styles and the appearance presets. It sets a token only inside a preset attribute.
|
|
109
|
+
3. `components/bundle.js`: the components, as `window.Nxds`. The artboard supplies React 18, so skip `react` and `react-dom`.
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<link rel="stylesheet" href="ds/<folder>/tokens.css" />
|
|
113
|
+
<link rel="stylesheet" href="ds/<folder>/components/bundle.css" />
|
|
114
|
+
<script src="ds/<folder>/components/bundle.js"></script>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Add one `../` in front of each path for each folder the artboard is in.
|
|
118
|
+
|
|
119
|
+
The System page is read-only for this system. An edit there recompiles tokens.css without the theme layer, the font variables and the text style rules, so presets, fonts and text styles stop applying. Change the token in nxds and export again.
|
|
120
|
+
|
|
121
|
+
- Switch to dark with `data-theme="dark"` or the `dark` class on the artboard's root.
|
|
122
|
+
- Set a `data-density`, `data-radius`, `data-borderwidth` or `data-shadow` attribute from Appearance on any element to change everything inside it.
|
|
123
|
+
- Override a token by setting its variable on an element, such as `style="--nx-radius-md: 8px"`. Components inside that element follow.
|
|
124
|
+
- Read `components/<Name>/README.md` before you mount a component. It lists the component's parts and props.
|
|
92
125
|
|
|
93
126
|
## Canvas rules
|
|
94
127
|
|
|
@@ -46,7 +46,7 @@ Attributes set props, kebab-case to camelCase. Element content becomes `children
|
|
|
46
46
|
| `asChild` | `boolean` | | toggle |
|
|
47
47
|
| `variant` | `"default" \| "outline" \| "outline-primary"` | `"default"` | dropdown |
|
|
48
48
|
| `size` | `"default" \| "sm" \| "lg"` | `"default"` | dropdown |
|
|
49
|
-
| `spacing` | `
|
|
49
|
+
| `spacing` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 0.5 \| 1.5 \| 2.5 \| 3.5 \| 9 \| 10 \| 11 \| 12 \| 14 \| 16 \| 20 \| 24 \| 28 \| 32 \| 36 \| 40 \| 44 \| 48 \| 52 \| 56 \| 60 \| 64 \| 72 \| 80 \| 96` | `0` | dropdown |
|
|
50
50
|
|
|
51
51
|
### ToggleGroupItem
|
|
52
52
|
|