@leitware/composables 1.4.0 → 1.6.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 CHANGED
@@ -226,6 +226,23 @@ Signal Pop:
226
226
  @import '@leitware/composables/presets/signal-pop.css';
227
227
  ```
228
228
 
229
+ Editorial Grid:
230
+
231
+ ```css
232
+ @import '@fontsource-variable/inter';
233
+ @import '@fontsource-variable/bricolage-grotesque';
234
+ @import '@leitware/composables/styles.css';
235
+ @import '@leitware/composables/presets/editorial-grid.css';
236
+ ```
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
+
229
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'`.
230
247
 
231
248
  ---
@@ -251,7 +268,8 @@ styles/
251
268
  ├── presets/ ← Generated standalone preset CSS files
252
269
  │ ├── default.css
253
270
  │ ├── brutalist.css
254
- │ └── signal-pop.css
271
+ │ ├── signal-pop.css
272
+ │ └── editorial-grid.css
255
273
  └── presets-data/ ← Source of truth for preset token values (TS)
256
274
  ```
257
275
 
@@ -360,11 +378,13 @@ export default function RootLayout({ children }) {
360
378
 
361
379
  The default theme is included in `styles.css`. Alternative presets are available as standalone CSS files:
362
380
 
363
- | Preset | Vibe | Fonts |
364
- | -------------- | ----------------------------------------- | ---------------------------------------------- |
365
- | **Default** | Clean neutral system, works everywhere | Inter + Bricolage Grotesque |
366
- | **Brutalist** | Bold, high-contrast, raw aesthetic | Space Grotesk + JetBrains Mono |
367
- | **Signal Pop** | Bright consumer-tech, modular and graphic | IBM Plex Sans + Space Grotesk + JetBrains Mono |
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 |
368
388
 
369
389
  ```css
370
390
  /* Optional: use exactly one alternative preset after styles.css */
@@ -372,6 +392,25 @@ The default theme is included in `styles.css`. Alternative presets are available
372
392
  @import '@leitware/composables/presets/brutalist.css';
373
393
  ```
374
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 the same finish in their own colours; alerts
400
+ and badges continue to use the coordinated tinted surfaces.
401
+ Its default and large buttons are 36px and 40px tall; small and extra-small
402
+ buttons are 26px and 20px tall. The preset also styles fields, cards, status
403
+ surfaces, and the sidebar through the existing token system.
404
+
405
+ Button finishes can be tuned with `--button-primary-border`,
406
+ `--button-primary-background-image`, `--button-primary-hover-background-image`,
407
+ and `--button-primary-shadow`, with equivalent `--button-destructive-*`, `--button-brand-*`, and
408
+ `--button-brand-2-*` through `--button-brand-5-*` tokens.
409
+ Destructive fill and text use `--button-destructive-bg` and
410
+ `--button-destructive-text`, independently of the tinted critical surfaces used
411
+ by alerts and badges. Button sizes use `--button-height`, `--button-height-xs`,
412
+ `--button-height-sm`, and `--button-height-lg`; icon buttons use the same heights.
413
+
375
414
  ### Creating a Preset
376
415
 
377
416
  Add one preset data file, then register it once:
@@ -0,0 +1,329 @@
1
+ /* ============================================================================
2
+ @leitware/composables - Editorial Grid Preset
3
+ ============================================================================
4
+ Flat editorial grid, visible rules, and vivid signals.
5
+
6
+ HOW TO USE:
7
+ 1. Copy this file into your project's global CSS (e.g. index.css)
8
+ 2. Or import the preset: @import "@leitware/composables/presets/editorial-grid.css";
9
+ 3. Add class="dark" to <html> for dark mode.
10
+ ============================================================================ */
11
+
12
+ :root {
13
+ --bg-default: #f7f7f3;
14
+ --bg-inverse: #111111;
15
+ --bg-muted: #efefeb;
16
+ --bg-surface-default: #f7f7f3;
17
+ --bg-surface-popover: #ffffff;
18
+ --bg-surface-accent: #efefeb;
19
+ --bg-surface-field: #e7e7e1;
20
+ --bg-surface-info: #eef6ff;
21
+ --bg-surface-success: #eefaf1;
22
+ --bg-surface-warning: #fff9e8;
23
+ --bg-surface-critical: #fff0ef;
24
+ --bg-surface-emphasis: #eef6ff;
25
+ --bg-surface-inverse: #1a1a1a;
26
+ --bg-surface-transparent: #00000008;
27
+ --bg-overlay: #00000099;
28
+ --bg-surface-brand: #ecfff2;
29
+ --bg-surface-brand-2: #fffbea;
30
+ --bg-surface-brand-3: #eef6ff;
31
+ --bg-surface-brand-4: #f5f0ff;
32
+ --bg-surface-brand-5: #fff1ef;
33
+ --bg-surface-hover: #ecece7;
34
+ --bg-fill-default: #f7f7f3;
35
+ --bg-fill-primary: #111111;
36
+ --bg-fill-brand: #21e36b;
37
+ --bg-fill-brand-2: #ffe14a;
38
+ --bg-fill-brand-3: #58a7f8;
39
+ --bg-fill-brand-4: #a77af3;
40
+ --bg-fill-brand-5: #ff7d73;
41
+ --bg-fill-info: #58a7f8;
42
+ --bg-fill-success: #21e36b;
43
+ --bg-fill-warning: #ffe14a;
44
+ --bg-fill-critical: #ff6b63;
45
+ --bg-fill-emphasis: #3c8ee6;
46
+ --bg-fill-transparent: #00000008;
47
+ --bg-fill-secondary: #efefeb;
48
+ --bg-fill-secondary-inverse: #ffffff;
49
+ --text-default: #111111;
50
+ --text-secondary: #555550;
51
+ --text-muted: #777770;
52
+ --text-disabled: #b7b7b0;
53
+ --text-inverse: #ffffff;
54
+ --text-on-fill-primary: #ffffff;
55
+ --text-on-fill-brand: #111111;
56
+ --text-on-fill-secondary: #111111;
57
+ --text-on-surface-accent: #111111;
58
+ --text-info: #163a5c;
59
+ --text-success: #124a29;
60
+ --text-warning: #594500;
61
+ --text-critical: #6a1b18;
62
+ --text-emphasis: #123b66;
63
+ --text-brand: #0f5d2d;
64
+ --text-brand-2: #5a4900;
65
+ --text-brand-3: #164b7a;
66
+ --text-brand-4: #4d287e;
67
+ --text-brand-5: #7a2e28;
68
+ --text-link: #111111;
69
+ --icon-default: #111111;
70
+ --icon-secondary: #555550;
71
+ --icon-disabled: #cfcfc8;
72
+ --icon-inverse: #ffffff;
73
+ --icon-info: #2c7fd3;
74
+ --icon-success: #159447;
75
+ --icon-warning: #b98d00;
76
+ --icon-critical: #d44e46;
77
+ --icon-emphasis: #2c7fd3;
78
+ --icon-brand: #159447;
79
+ --icon-brand-2: #c4a300;
80
+ --icon-brand-3: #3c8ee6;
81
+ --icon-brand-4: #8155cc;
82
+ --icon-brand-5: #df5e55;
83
+ --border-default: #c9c9c2;
84
+ --border-secondary: #ddddd7;
85
+ --border-input: #bdbdb6;
86
+ --border-tertiary: #9d9d96;
87
+ --border-disabled: #ddddd7;
88
+ --border-inverse: #4a4a46;
89
+ --border-focus: #111111;
90
+ --border-brand: #21e36b;
91
+ --border-brand-2: #ffe14a;
92
+ --border-brand-3: #58a7f8;
93
+ --border-brand-4: #a77af3;
94
+ --border-brand-5: #ff7d73;
95
+ --border-info: #80baf4;
96
+ --border-success: #62d98a;
97
+ --border-warning: #f1d35f;
98
+ --border-critical: #f3a09a;
99
+ --border-emphasis: #6eadec;
100
+ --chart-1: #21e36b;
101
+ --chart-2: #58a7f8;
102
+ --chart-3: #ffe14a;
103
+ --chart-4: #a77af3;
104
+ --chart-5: #ff7d73;
105
+ --sidebar-background: #f7f7f3;
106
+ --sidebar-foreground: #111111;
107
+ --sidebar-primary: #111111;
108
+ --sidebar-primary-foreground: #ffffff;
109
+ --sidebar-accent: #efefeb;
110
+ --sidebar-accent-foreground: #111111;
111
+ --sidebar-border: #c9c9c2;
112
+ --sidebar-ring: #111111;
113
+ --spacing: 0.25rem;
114
+ --border-width-base: 0.0625rem;
115
+ --radius: 0.125rem;
116
+ --font-size-base: 1rem;
117
+ --leading-base: 1.3;
118
+ --letter-spacing-base: 0em;
119
+ --opacity-disabled: 0.45;
120
+ --shadow-offset-y: 0px;
121
+ --shadow-blur: 0px;
122
+ --shadow-spread: 0px;
123
+ --shadow-base-color: #00000000;
124
+ --container-sm: 576px;
125
+ --container-md: 768px;
126
+ --container-lg: 1056px;
127
+ --container-xl: 1248px;
128
+ --container-2xl: 1440px;
129
+ --dropdown-offset: 4;
130
+ --overlay-offset: 4;
131
+ --font-sans: 'Inter Variable', sans-serif;
132
+ --font-heading: 'Inter Variable', sans-serif;
133
+ --font-brand: 'Bricolage Grotesque Variable', sans-serif;
134
+ --button-radius: var(--radius);
135
+ --card-radius: var(--radius);
136
+ --card-padding: calc(var(--spacing) * 6);
137
+ --input-radius: var(--radius);
138
+ --input-height: calc(var(--spacing) * 10);
139
+ --badge-radius: var(--radius);
140
+ --motion-duration-fast: 100ms;
141
+ --motion-duration-normal: 150ms;
142
+ --motion-duration-slow: 200ms;
143
+ --motion-duration-color: 100ms;
144
+ --motion-duration-interaction: 100ms;
145
+ --motion-duration-disclosure: 150ms;
146
+ --motion-duration-overlay: 150ms;
147
+ --motion-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
148
+ --motion-ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
149
+ --motion-ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
150
+ --motion-ease-linear: linear;
151
+ --transition-default: var(--motion-duration-normal) var(--motion-ease-standard);
152
+ --transition-fast: var(--motion-duration-fast) var(--motion-ease-standard);
153
+ --transition-slow: var(--motion-duration-slow) var(--motion-ease-decelerate);
154
+ --hover-transform: none;
155
+ --hover-shadow: none;
156
+ --active-scale: 1;
157
+ --heading-font-weight: 700;
158
+ --heading-letter-spacing: var(--tracking-tight);
159
+ --body-letter-spacing: var(--tracking-normal);
160
+ --hero-font-size: var(--text-6xl);
161
+ --hero-font-weight: 700;
162
+ --hero-letter-spacing: var(--tracking-tight);
163
+ --section-title-size: var(--text-3xl);
164
+ --section-title-font-weight: 700;
165
+ --section-title-letter-spacing: var(--tracking-tight);
166
+ --card-title-size: var(--text-lg);
167
+ --card-title-font-weight: 600;
168
+ --card-title-letter-spacing: var(--tracking-normal);
169
+ --background: var(--bg-default);
170
+ --foreground: var(--text-default);
171
+ --card: var(--bg-surface-default);
172
+ --card-foreground: var(--text-default);
173
+ --popover: var(--bg-surface-popover);
174
+ --popover-foreground: var(--text-default);
175
+ --primary: var(--bg-fill-primary);
176
+ --primary-foreground: var(--text-on-fill-primary);
177
+ --secondary: var(--bg-fill-secondary);
178
+ --secondary-foreground: var(--text-on-fill-secondary);
179
+ --muted: var(--bg-muted);
180
+ --muted-foreground: var(--text-muted);
181
+ --accent: var(--bg-surface-accent);
182
+ --accent-foreground: var(--text-on-surface-accent);
183
+ --destructive: var(--bg-fill-critical);
184
+ --border: var(--border-default);
185
+ --input: var(--border-input);
186
+ --ring: var(--border-focus);
187
+ }
188
+
189
+ .dark {
190
+ --bg-default: #111111;
191
+ --bg-inverse: #f7f7f3;
192
+ --bg-muted: #191918;
193
+ --bg-surface-default: #111111;
194
+ --bg-surface-popover: #191918;
195
+ --bg-surface-accent: #1e1e1c;
196
+ --bg-surface-field: #262624;
197
+ --bg-surface-info: #132332;
198
+ --bg-surface-success: #14251a;
199
+ --bg-surface-warning: #2a2412;
200
+ --bg-surface-critical: #2b1716;
201
+ --bg-surface-emphasis: #15243a;
202
+ --bg-surface-inverse: #f7f7f3;
203
+ --bg-surface-transparent: #ffffff0d;
204
+ --bg-overlay: #000000b2;
205
+ --bg-surface-brand: #12301d;
206
+ --bg-surface-brand-2: #332e10;
207
+ --bg-surface-brand-3: #16293a;
208
+ --bg-surface-brand-4: #281e3b;
209
+ --bg-surface-brand-5: #35201e;
210
+ --bg-surface-hover: #20201e;
211
+ --bg-fill-default: #111111;
212
+ --bg-fill-primary: #f7f7f3;
213
+ --bg-fill-brand: #21e36b;
214
+ --bg-fill-brand-2: #ffe14a;
215
+ --bg-fill-brand-3: #58a7f8;
216
+ --bg-fill-brand-4: #a77af3;
217
+ --bg-fill-brand-5: #ff7d73;
218
+ --bg-fill-info: #58a7f8;
219
+ --bg-fill-success: #21e36b;
220
+ --bg-fill-warning: #ffe14a;
221
+ --bg-fill-critical: #ff7d73;
222
+ --bg-fill-emphasis: #58a7f8;
223
+ --bg-fill-transparent: #ffffff0d;
224
+ --bg-fill-secondary: #1e1e1c;
225
+ --bg-fill-secondary-inverse: #111111;
226
+ --text-default: #f7f7f3;
227
+ --text-secondary: #b8b8b1;
228
+ --text-muted: #8f8f89;
229
+ --text-disabled: #5e5e59;
230
+ --text-inverse: #111111;
231
+ --text-on-fill-primary: #111111;
232
+ --text-on-fill-brand: #111111;
233
+ --text-on-fill-secondary: #f7f7f3;
234
+ --text-on-surface-accent: #f7f7f3;
235
+ --text-info: #a7d0f7;
236
+ --text-success: #8be5a9;
237
+ --text-warning: #f3d866;
238
+ --text-critical: #f3a19b;
239
+ --text-emphasis: #a8cff6;
240
+ --text-brand: #7ae89e;
241
+ --text-brand-2: #e8d35b;
242
+ --text-brand-3: #7db7f5;
243
+ --text-brand-4: #b79af0;
244
+ --text-brand-5: #f39b94;
245
+ --text-link: #f7f7f3;
246
+ --icon-default: #f7f7f3;
247
+ --icon-secondary: #b8b8b1;
248
+ --icon-disabled: #5e5e59;
249
+ --icon-inverse: #111111;
250
+ --icon-info: #58a7f8;
251
+ --icon-success: #21e36b;
252
+ --icon-warning: #ffe14a;
253
+ --icon-critical: #ff7d73;
254
+ --icon-emphasis: #58a7f8;
255
+ --icon-brand: #21e36b;
256
+ --icon-brand-2: #ffe14a;
257
+ --icon-brand-3: #58a7f8;
258
+ --icon-brand-4: #a77af3;
259
+ --icon-brand-5: #ff7d73;
260
+ --border-default: #3b3b37;
261
+ --border-secondary: #2c2c29;
262
+ --border-input: #4a4a45;
263
+ --border-tertiary: #5a5a54;
264
+ --border-disabled: #2c2c29;
265
+ --border-inverse: #b8b8b1;
266
+ --border-focus: #f7f7f3;
267
+ --border-brand: #21e36b;
268
+ --border-brand-2: #ffe14a;
269
+ --border-brand-3: #58a7f8;
270
+ --border-brand-4: #a77af3;
271
+ --border-brand-5: #ff7d73;
272
+ --border-info: #3d7cb8;
273
+ --border-success: #2e9b53;
274
+ --border-warning: #a98f2c;
275
+ --border-critical: #a6554f;
276
+ --border-emphasis: #4c89c7;
277
+ --chart-1: #21e36b;
278
+ --chart-2: #58a7f8;
279
+ --chart-3: #ffe14a;
280
+ --chart-4: #a77af3;
281
+ --chart-5: #ff7d73;
282
+ --sidebar-background: #111111;
283
+ --sidebar-foreground: #f7f7f3;
284
+ --sidebar-primary: #f7f7f3;
285
+ --sidebar-primary-foreground: #111111;
286
+ --sidebar-accent: #1e1e1c;
287
+ --sidebar-accent-foreground: #f7f7f3;
288
+ --sidebar-border: #3b3b37;
289
+ --sidebar-ring: #f7f7f3;
290
+ --font-sans: 'Inter Variable', sans-serif;
291
+ --font-heading: 'Inter Variable', sans-serif;
292
+ --font-brand: 'Bricolage Grotesque Variable', sans-serif;
293
+ --spacing: 0.25rem;
294
+ --border-width-base: 0.0625rem;
295
+ --radius: 0.125rem;
296
+ --font-size-base: 1rem;
297
+ --leading-base: 1.3;
298
+ --letter-spacing-base: 0em;
299
+ --opacity-disabled: 0.45;
300
+ --shadow-offset-y: 0px;
301
+ --shadow-blur: 0px;
302
+ --shadow-spread: 0px;
303
+ --shadow-base-color: #00000000;
304
+ --container-sm: 576px;
305
+ --container-md: 768px;
306
+ --container-lg: 1056px;
307
+ --container-xl: 1248px;
308
+ --container-2xl: 1440px;
309
+ --dropdown-offset: 4;
310
+ --overlay-offset: 4;
311
+ --background: var(--bg-default);
312
+ --foreground: var(--text-default);
313
+ --card: var(--bg-surface-default);
314
+ --card-foreground: var(--text-default);
315
+ --popover: var(--bg-surface-popover);
316
+ --popover-foreground: var(--text-default);
317
+ --primary: var(--bg-fill-primary);
318
+ --primary-foreground: var(--text-on-fill-primary);
319
+ --secondary: var(--bg-fill-secondary);
320
+ --secondary-foreground: var(--text-on-fill-secondary);
321
+ --muted: var(--bg-muted);
322
+ --muted-foreground: var(--text-muted);
323
+ --accent: var(--bg-surface-accent);
324
+ --accent-foreground: var(--text-on-surface-accent);
325
+ --destructive: var(--bg-fill-critical);
326
+ --border: var(--border-default);
327
+ --input: var(--border-input);
328
+ --ring: var(--border-focus);
329
+ }