altitude-design 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +76 -2
- package/dist/altitude.css +1634 -0
- package/dist/altitude.iife.js +4 -0
- package/dist/index.cjs +3388 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.js +3356 -0
- package/dist/index.js.map +7 -0
- package/dist/tokens.css +205 -0
- package/dist/tokens.json +724 -0
- package/dist/types/collections.d.ts +135 -0
- package/dist/types/command.d.ts +59 -0
- package/dist/types/controls.d.ts +248 -0
- package/dist/types/core.d.ts +106 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/nav.d.ts +18 -0
- package/dist/types/overlays.d.ts +129 -0
- package/dist/types/pile.d.ts +27 -0
- package/dist/types/select.d.ts +67 -0
- package/dist/types/sheet.d.ts +27 -0
- package/dist/types/stepper.d.ts +23 -0
- package/package.json +59 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Richard
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Altitude
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React component library where **height is the interface**. Its one idea: the ground is the record. Settled content sits on the ground; anything live rises above it; anything waiting to receive sinks below it.
|
|
4
|
+
|
|
5
|
+
- **Storybook:** every component, with its guidelines and a live preview in all four schemes: `https://<owner>.github.io/<repo>/`
|
|
6
|
+
- **The design guide:** [`project/README.md`](project/README.md), then [Elevation](project/Elevation.md), [Motion](project/Motion.md), [Theming](project/Theming.md) and [Research](project/Research.md)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install altitude-design
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
React 18.2 or 19 is a peer dependency.
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { AltitudeProvider, Button, Field, Input } from 'altitude-design';
|
|
18
|
+
import 'altitude-design/altitude.css';
|
|
19
|
+
|
|
20
|
+
export function App() {
|
|
21
|
+
return (
|
|
22
|
+
<AltitudeProvider scheme="daylight">
|
|
23
|
+
<Field label="Workspace name"><Input placeholder="Northwind Studio" /></Field>
|
|
24
|
+
<Button variant="primary">Save changes</Button>
|
|
25
|
+
</AltitudeProvider>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Render `AltitudeProvider` once around your app. Schemes are `daylight`, `nightfall`, `mesa` and `alpine`; `accent="#0f8a6b"` swaps in your own colour. The components are client components (`"use client"`), so they work in frameworks with server components.
|
|
31
|
+
|
|
32
|
+
| Import | What it is |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `altitude-design` | the components (ESM and CommonJS, with types) |
|
|
35
|
+
| `altitude-design/altitude.css` | tokens and component styles in one file (it also loads Instrument Sans and JetBrains Mono from Google Fonts) |
|
|
36
|
+
| `altitude-design/tokens.css`, `altitude-design/tokens.json` | the tokens on their own |
|
|
37
|
+
| `altitude-design/altitude.iife.js` | a `<script>` build that sets `window.Altitude`, for pages without a bundler; it expects React 18's UMD builds as `window.React` and `window.ReactDOM` |
|
|
38
|
+
|
|
39
|
+
## How the repository is laid out
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
project/ the design system itself: guides, tokens.json, components/src/*.tsx, bundle.css,
|
|
43
|
+
and the built bundle.js and previews (the same files as the design system on claude.ai)
|
|
44
|
+
build/ the kit that builds and checks project/ (see build/SETUP.md)
|
|
45
|
+
scripts/ the npm package build and the Storybook story generator
|
|
46
|
+
.storybook/
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
There is one source for each thing. Components live in `project/components/src`, styles in `project/components/bundle.css`, tokens in `project/tokens.json`, and each component's preview in `build/previews.txt`. The npm package, the Storybook stories and the design system's own previews are all generated from those.
|
|
50
|
+
|
|
51
|
+
## Working on it
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npm install && npm install --prefix build
|
|
55
|
+
npm run storybook # http://localhost:6006
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
After changing a component, rebuild the design system's bundle and previews, and commit what they produce:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
cd build && node build.mjs && node previews.mjs
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
CI fails if `project/` doesn't match its sources, so the design system on claude.ai can always be published straight from this folder.
|
|
65
|
+
|
|
66
|
+
## What happens on push
|
|
67
|
+
|
|
68
|
+
Every push and pull request runs the checks: the bundle and previews are rebuilt and must match what's committed, every preview is rendered in all four schemes with no errors, the interaction checks run, the sources type-check against React 19, and the package and Storybook are built.
|
|
69
|
+
|
|
70
|
+
A push to `main` then also:
|
|
71
|
+
|
|
72
|
+
- deploys Storybook to GitHub Pages;
|
|
73
|
+
- publishes to npm **if the version in `package.json` isn't published yet**, and tags the commit `v<version>`. To release, bump the version (`npm version patch`, `minor` or `major`) and push.
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
[MIT](LICENSE)
|