Add per-package README and LICENSE for npm
Each published package now includes its own README (shown on npm) and a copy of the MIT license so both travel with the tarball. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
21
packages/web/LICENSE
Normal file
21
packages/web/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Dangerous Things
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
84
packages/web/README.md
Normal file
84
packages/web/README.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# @dangerousthings/web
|
||||
|
||||
Web CSS themes and components for the Dangerous Things design system — bevels, glows, form styles, and elevation patterns powered by CSS custom properties.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install @dangerousthings/web
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Import the full bundle (base tokens + all components):
|
||||
|
||||
```css
|
||||
@import "@dangerousthings/web";
|
||||
```
|
||||
|
||||
Or import individual pieces:
|
||||
|
||||
```css
|
||||
/* Brand tokens */
|
||||
@import "@dangerousthings/web/tokens/dt.css";
|
||||
|
||||
/* Individual components */
|
||||
@import "@dangerousthings/web/components/bevels.css";
|
||||
@import "@dangerousthings/web/components/glows.css";
|
||||
@import "@dangerousthings/web/components/forms-dt.css";
|
||||
@import "@dangerousthings/web/components/elevation.css";
|
||||
```
|
||||
|
||||
### Switching Brands
|
||||
|
||||
Swap the token import to change the entire look:
|
||||
|
||||
```css
|
||||
/* Neon cyberpunk */
|
||||
@import "@dangerousthings/web/tokens/dt.css";
|
||||
|
||||
/* Dark navy + magenta */
|
||||
@import "@dangerousthings/web/tokens/classic.css";
|
||||
|
||||
/* Material Design 3 */
|
||||
@import "@dangerousthings/web/tokens/supra.css";
|
||||
```
|
||||
|
||||
### Theme Registry (JS)
|
||||
|
||||
For runtime theme switching:
|
||||
|
||||
```ts
|
||||
import { themes, brands } from "@dangerousthings/web/theme-registry";
|
||||
```
|
||||
|
||||
## CSS Modules
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `bevels.css` | Angular clip-path bevels for cards, buttons, labels, modals, drawers |
|
||||
| `glows.css` | Neon drop-shadow and text-shadow effects for clipped and standard elements |
|
||||
| `forms-dt.css` | Text inputs, checkboxes, switches, radio buttons, progress bars, accordions, quantity steppers |
|
||||
| `elevation.css` | Shadow elevation levels for the Supra / MD3 brand |
|
||||
|
||||
### Key Classes
|
||||
|
||||
**Bevels** — `.dt-bevel-card`, `.dt-bevel-btn`, `.dt-bevel-label`, `.dt-bevel-modal`, `.dt-bevel-drawer-left`, `.dt-bevel-drawer-right`, `.dt-bevel-sm`
|
||||
|
||||
**Glows** — `.dt-glow`, `.dt-glow-strong`, `.dt-glow-inset`, `.dt-text-glow`
|
||||
|
||||
**Elevation** — `.supra-elevation-1` through `.supra-elevation-5`
|
||||
|
||||
## Exports
|
||||
|
||||
| Path | Description |
|
||||
|------|-------------|
|
||||
| `@dangerousthings/web` | Full CSS bundle (base + all components) |
|
||||
| `@dangerousthings/web/tokens/*` | Per-brand CSS custom properties |
|
||||
| `@dangerousthings/web/components/*` | Individual CSS component modules |
|
||||
| `@dangerousthings/web/fonts/*` | Tektur font files |
|
||||
| `@dangerousthings/web/theme-registry` | JS theme definitions for runtime switching |
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
Reference in New Issue
Block a user