@leitware/composables 1.5.0 → 1.6.1
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 +36 -6
- package/dist/presets/kumo.css +696 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/_internal/button.tsx +27 -18
- package/src/styles/presets/kumo.css +696 -0
- package/src/styles/presets-data/index.ts +10 -0
- package/src/styles/presets-data/kumo.ts +338 -0
- package/src/styles/tokens/components.css +78 -0
package/README.md
CHANGED
|
@@ -235,6 +235,14 @@ Editorial Grid:
|
|
|
235
235
|
@import '@leitware/composables/presets/editorial-grid.css';
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
+
**Kumo**
|
|
239
|
+
|
|
240
|
+
```css
|
|
241
|
+
@import '@fontsource-variable/inter';
|
|
242
|
+
@import '@leitware/composables/styles.css';
|
|
243
|
+
@import '@leitware/composables/presets/kumo.css';
|
|
244
|
+
```
|
|
245
|
+
|
|
238
246
|
The variable entrypoints include their preset weight ranges. The explicit IBM Plex files load normal weights 400–700; add italic entrypoints only if your interface uses them. The same package paths can instead be loaded as side-effect imports from an application entry file, for example `import '@fontsource-variable/inter'` or `import '@fontsource/ibm-plex-sans/600.css'`.
|
|
239
247
|
|
|
240
248
|
---
|
|
@@ -370,12 +378,13 @@ export default function RootLayout({ children }) {
|
|
|
370
378
|
|
|
371
379
|
The default theme is included in `styles.css`. Alternative presets are available as standalone CSS files:
|
|
372
380
|
|
|
373
|
-
| Preset | Vibe
|
|
374
|
-
| ------------------ |
|
|
375
|
-
| **Default** | Clean neutral system, works everywhere
|
|
376
|
-
| **Brutalist** | Bold, high-contrast, raw aesthetic
|
|
377
|
-
| **Signal Pop** | Bright consumer-tech, modular and graphic
|
|
378
|
-
| **Editorial Grid** | Flat technical catalogue with vivid signals
|
|
381
|
+
| Preset | Vibe | Fonts |
|
|
382
|
+
| ------------------ | ---------------------------------------------------- | ---------------------------------------------- |
|
|
383
|
+
| **Default** | Clean neutral system, works everywhere | Inter + Bricolage Grotesque |
|
|
384
|
+
| **Brutalist** | Bold, high-contrast, raw aesthetic | Space Grotesk + JetBrains Mono |
|
|
385
|
+
| **Signal Pop** | Bright consumer-tech, modular and graphic | IBM Plex Sans + Space Grotesk + JetBrains Mono |
|
|
386
|
+
| **Editorial Grid** | Flat technical catalogue with vivid signals | Inter + Bricolage Grotesque |
|
|
387
|
+
| **Kumo** | Cloudflare-inspired surfaces and highlighted buttons | Inter |
|
|
379
388
|
|
|
380
389
|
```css
|
|
381
390
|
/* Optional: use exactly one alternative preset after styles.css */
|
|
@@ -383,6 +392,27 @@ The default theme is included in `styles.css`. Alternative presets are available
|
|
|
383
392
|
@import '@leitware/composables/presets/brutalist.css';
|
|
384
393
|
```
|
|
385
394
|
|
|
395
|
+
Kumo takes its cues from [Cloudflare's Kumo](https://kumo-ui.com/components/button/):
|
|
396
|
+
neutral light/dark surfaces, blue primary actions, an orange brand accent, and
|
|
397
|
+
solid red destructive buttons. Primary (`variant="default"`) and destructive
|
|
398
|
+
buttons have darker borders, vertical gradients, and inset top highlights.
|
|
399
|
+
All five brand button variants use vivid colour gradients and brighter upper
|
|
400
|
+
highlights, with semibold white labels and a subtle text shadow; alerts and
|
|
401
|
+
badges continue to use the coordinated tinted surfaces.
|
|
402
|
+
Its default and large buttons are 36px and 40px tall; small and extra-small
|
|
403
|
+
buttons are 26px and 20px tall. The preset also styles fields, cards, status
|
|
404
|
+
surfaces, and the sidebar through the existing token system.
|
|
405
|
+
|
|
406
|
+
Button finishes can be tuned with `--button-primary-border`,
|
|
407
|
+
`--button-primary-background-image`, `--button-primary-hover-background-image`,
|
|
408
|
+
and `--button-primary-shadow`, with equivalent `--button-destructive-*`, `--button-brand-*`, and
|
|
409
|
+
`--button-brand-2-*` through `--button-brand-5-*` tokens.
|
|
410
|
+
Brand labels use `--button-brand-font-weight` and `--button-brand-text-shadow`.
|
|
411
|
+
Destructive fill and text use `--button-destructive-bg` and
|
|
412
|
+
`--button-destructive-text`, independently of the tinted critical surfaces used
|
|
413
|
+
by alerts and badges. Button sizes use `--button-height`, `--button-height-xs`,
|
|
414
|
+
`--button-height-sm`, and `--button-height-lg`; icon buttons use the same heights.
|
|
415
|
+
|
|
386
416
|
### Creating a Preset
|
|
387
417
|
|
|
388
418
|
Add one preset data file, then register it once:
|