@leitware/composables 1.6.0 → 1.7.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 +86 -23
- package/dist/presets/kumo.css +174 -100
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/rules/composables.md +37 -32
- package/skills/use-composables/references/public-api.md +2 -2
- package/src/_internal/button.tsx +5 -5
- package/src/_internal/clipboard-text.tsx +102 -0
- package/src/_internal/flow.tsx +390 -0
- package/src/_internal/layer-card.tsx +61 -0
- package/src/_internal/table-of-contents.tsx +124 -0
- package/src/hooks/use-table-of-contents-active-id.ts +63 -0
- package/src/index.ts +50 -0
- package/src/lib/clipboard.ts +57 -0
- package/src/lib/flow.ts +53 -0
- package/src/opinionated/clipboard-text.tsx +135 -0
- package/src/opinionated/flow.tsx +74 -0
- package/src/opinionated/layer-card.tsx +49 -0
- package/src/opinionated/table-of-contents.tsx +121 -0
- package/src/styles/presets/kumo.css +174 -100
- package/src/styles/presets-data/kumo.ts +32 -50
- package/src/styles/tokens/components.css +20 -0
|
@@ -180,6 +180,12 @@
|
|
|
180
180
|
--button-font-size-xs: var(--text-xs);
|
|
181
181
|
--button-font-size-sm: var(--text-xs);
|
|
182
182
|
--button-gap: calc(var(--spacing) * 1.5);
|
|
183
|
+
--button-brand-font-weight: 600;
|
|
184
|
+
--button-brand-text-shadow: 0 1px 1px #00000059, 0 0 1px #00000040;
|
|
185
|
+
--layer-card-radius: var(--radius-lg);
|
|
186
|
+
--layer-card-shadow: 0 1px 2px #0000000d;
|
|
187
|
+
--flow-node-shadow: 0 1px 2px #0000000d;
|
|
188
|
+
--flow-canvas-background-image: radial-gradient(var(--border-disabled) 1px, transparent 1px);
|
|
183
189
|
--button-secondary-border: var(--border-secondary);
|
|
184
190
|
--button-secondary-hover-bg: var(--bg-surface-hover);
|
|
185
191
|
--button-secondary-shadow: 0 1px 2px #0000000d;
|
|
@@ -225,95 +231,126 @@
|
|
|
225
231
|
inset 0 1px 0 color-mix(in oklch, var(--bg-fill-critical), white 30%), 0 1px 2px #0000000d;
|
|
226
232
|
--button-destructive-hover-shadow:
|
|
227
233
|
inset 0 1px 0 color-mix(in oklch, var(--bg-fill-critical), white 30%), 0 1px 2px #0000000d;
|
|
228
|
-
--button-brand-
|
|
229
|
-
--button-brand-
|
|
234
|
+
--button-brand-bg: #f45b00;
|
|
235
|
+
--button-brand-text: #ffffff;
|
|
236
|
+
--button-brand-border: color-mix(in oklch, #f45b00, black 8%);
|
|
237
|
+
--button-brand-hover-border: #f45b00;
|
|
230
238
|
--button-brand-background-image: linear-gradient(
|
|
231
239
|
to bottom,
|
|
232
|
-
|
|
233
|
-
#
|
|
240
|
+
#ff8a00 0%,
|
|
241
|
+
#f45b00 20%,
|
|
242
|
+
#e04400 100%
|
|
234
243
|
);
|
|
235
244
|
--button-brand-hover-background-image: linear-gradient(
|
|
236
245
|
to bottom,
|
|
237
|
-
|
|
238
|
-
#
|
|
246
|
+
#ff8a00 0%,
|
|
247
|
+
#f45b00 20%,
|
|
248
|
+
color-mix(in oklch, #e04400, #f45b00 25%) 100%
|
|
239
249
|
);
|
|
240
|
-
--button-brand-shadow:
|
|
250
|
+
--button-brand-shadow:
|
|
251
|
+
inset 0 1px 0 color-mix(in oklch, #ff8a00, white 15%),
|
|
252
|
+
inset 0 -1px 0 color-mix(in oklch, #f45b00, black 8%),
|
|
253
|
+
0 2px 3px color-mix(in srgb, #f45b00, transparent 82%);
|
|
241
254
|
--button-brand-hover-shadow:
|
|
242
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
--button-brand-2-
|
|
246
|
-
--button-brand-2-
|
|
255
|
+
inset 0 1px 0 color-mix(in oklch, #ff8a00, white 15%),
|
|
256
|
+
inset 0 -1px 0 color-mix(in oklch, #f45b00, black 8%),
|
|
257
|
+
0 2px 6px color-mix(in srgb, #f45b00, transparent 75%);
|
|
258
|
+
--button-brand-2-bg: #009db8;
|
|
259
|
+
--button-brand-2-text: #ffffff;
|
|
260
|
+
--button-brand-2-border: color-mix(in oklch, #009db8, black 8%);
|
|
261
|
+
--button-brand-2-hover-border: #009db8;
|
|
247
262
|
--button-brand-2-background-image: linear-gradient(
|
|
248
263
|
to bottom,
|
|
249
|
-
|
|
250
|
-
#
|
|
264
|
+
#00d8ea 0%,
|
|
265
|
+
#009db8 20%,
|
|
266
|
+
#007dab 100%
|
|
251
267
|
);
|
|
252
268
|
--button-brand-2-hover-background-image: linear-gradient(
|
|
253
269
|
to bottom,
|
|
254
|
-
|
|
255
|
-
#
|
|
270
|
+
#00d8ea 0%,
|
|
271
|
+
#009db8 20%,
|
|
272
|
+
color-mix(in oklch, #007dab, #009db8 25%) 100%
|
|
256
273
|
);
|
|
257
274
|
--button-brand-2-shadow:
|
|
258
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
275
|
+
inset 0 1px 0 color-mix(in oklch, #00d8ea, white 15%),
|
|
276
|
+
inset 0 -1px 0 color-mix(in oklch, #009db8, black 8%),
|
|
277
|
+
0 2px 3px color-mix(in srgb, #009db8, transparent 82%);
|
|
259
278
|
--button-brand-2-hover-shadow:
|
|
260
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
--button-brand-3-
|
|
264
|
-
--button-brand-3-
|
|
279
|
+
inset 0 1px 0 color-mix(in oklch, #00d8ea, white 15%),
|
|
280
|
+
inset 0 -1px 0 color-mix(in oklch, #009db8, black 8%),
|
|
281
|
+
0 2px 6px color-mix(in srgb, #009db8, transparent 75%);
|
|
282
|
+
--button-brand-3-bg: #aa0aff;
|
|
283
|
+
--button-brand-3-text: #ffffff;
|
|
284
|
+
--button-brand-3-border: color-mix(in oklch, #aa0aff, black 8%);
|
|
285
|
+
--button-brand-3-hover-border: #aa0aff;
|
|
265
286
|
--button-brand-3-background-image: linear-gradient(
|
|
266
287
|
to bottom,
|
|
267
|
-
|
|
268
|
-
#
|
|
288
|
+
#e04bff 0%,
|
|
289
|
+
#aa0aff 20%,
|
|
290
|
+
#7c00e5 100%
|
|
269
291
|
);
|
|
270
292
|
--button-brand-3-hover-background-image: linear-gradient(
|
|
271
293
|
to bottom,
|
|
272
|
-
|
|
273
|
-
#
|
|
294
|
+
#e04bff 0%,
|
|
295
|
+
#aa0aff 20%,
|
|
296
|
+
color-mix(in oklch, #7c00e5, #aa0aff 25%) 100%
|
|
274
297
|
);
|
|
275
298
|
--button-brand-3-shadow:
|
|
276
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
299
|
+
inset 0 1px 0 color-mix(in oklch, #e04bff, white 15%),
|
|
300
|
+
inset 0 -1px 0 color-mix(in oklch, #aa0aff, black 8%),
|
|
301
|
+
0 2px 3px color-mix(in srgb, #aa0aff, transparent 82%);
|
|
277
302
|
--button-brand-3-hover-shadow:
|
|
278
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
--button-brand-4-
|
|
282
|
-
--button-brand-4-
|
|
303
|
+
inset 0 1px 0 color-mix(in oklch, #e04bff, white 15%),
|
|
304
|
+
inset 0 -1px 0 color-mix(in oklch, #aa0aff, black 8%),
|
|
305
|
+
0 2px 6px color-mix(in srgb, #aa0aff, transparent 75%);
|
|
306
|
+
--button-brand-4-bg: #1464ff;
|
|
307
|
+
--button-brand-4-text: #ffffff;
|
|
308
|
+
--button-brand-4-border: color-mix(in oklch, #1464ff, black 8%);
|
|
309
|
+
--button-brand-4-hover-border: #1464ff;
|
|
283
310
|
--button-brand-4-background-image: linear-gradient(
|
|
284
311
|
to bottom,
|
|
285
|
-
|
|
286
|
-
#
|
|
312
|
+
#388bff 0%,
|
|
313
|
+
#1464ff 20%,
|
|
314
|
+
#0045ef 100%
|
|
287
315
|
);
|
|
288
316
|
--button-brand-4-hover-background-image: linear-gradient(
|
|
289
317
|
to bottom,
|
|
290
|
-
|
|
291
|
-
#
|
|
318
|
+
#388bff 0%,
|
|
319
|
+
#1464ff 20%,
|
|
320
|
+
color-mix(in oklch, #0045ef, #1464ff 25%) 100%
|
|
292
321
|
);
|
|
293
322
|
--button-brand-4-shadow:
|
|
294
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
323
|
+
inset 0 1px 0 color-mix(in oklch, #388bff, white 15%),
|
|
324
|
+
inset 0 -1px 0 color-mix(in oklch, #1464ff, black 8%),
|
|
325
|
+
0 2px 3px color-mix(in srgb, #1464ff, transparent 82%);
|
|
295
326
|
--button-brand-4-hover-shadow:
|
|
296
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
--button-brand-5-
|
|
300
|
-
--button-brand-5-
|
|
327
|
+
inset 0 1px 0 color-mix(in oklch, #388bff, white 15%),
|
|
328
|
+
inset 0 -1px 0 color-mix(in oklch, #1464ff, black 8%),
|
|
329
|
+
0 2px 6px color-mix(in srgb, #1464ff, transparent 75%);
|
|
330
|
+
--button-brand-5-bg: #00ab38;
|
|
331
|
+
--button-brand-5-text: #ffffff;
|
|
332
|
+
--button-brand-5-border: color-mix(in oklch, #00ab38, black 8%);
|
|
333
|
+
--button-brand-5-hover-border: #00ab38;
|
|
301
334
|
--button-brand-5-background-image: linear-gradient(
|
|
302
335
|
to bottom,
|
|
303
|
-
|
|
304
|
-
#
|
|
336
|
+
#63e600 0%,
|
|
337
|
+
#00ab38 20%,
|
|
338
|
+
#008d21 100%
|
|
305
339
|
);
|
|
306
340
|
--button-brand-5-hover-background-image: linear-gradient(
|
|
307
341
|
to bottom,
|
|
308
|
-
|
|
309
|
-
#
|
|
342
|
+
#63e600 0%,
|
|
343
|
+
#00ab38 20%,
|
|
344
|
+
color-mix(in oklch, #008d21, #00ab38 25%) 100%
|
|
310
345
|
);
|
|
311
346
|
--button-brand-5-shadow:
|
|
312
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
347
|
+
inset 0 1px 0 color-mix(in oklch, #63e600, white 15%),
|
|
348
|
+
inset 0 -1px 0 color-mix(in oklch, #00ab38, black 8%),
|
|
349
|
+
0 2px 3px color-mix(in srgb, #00ab38, transparent 82%);
|
|
313
350
|
--button-brand-5-hover-shadow:
|
|
314
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
315
|
-
|
|
316
|
-
|
|
351
|
+
inset 0 1px 0 color-mix(in oklch, #63e600, white 15%),
|
|
352
|
+
inset 0 -1px 0 color-mix(in oklch, #00ab38, black 8%),
|
|
353
|
+
0 2px 6px color-mix(in srgb, #00ab38, transparent 75%);
|
|
317
354
|
--background: var(--bg-default);
|
|
318
355
|
--foreground: var(--text-default);
|
|
319
356
|
--card: var(--bg-surface-default);
|
|
@@ -459,7 +496,13 @@
|
|
|
459
496
|
--button-font-size-xs: var(--text-xs);
|
|
460
497
|
--button-font-size-sm: var(--text-xs);
|
|
461
498
|
--button-gap: calc(var(--spacing) * 1.5);
|
|
499
|
+
--button-brand-font-weight: 600;
|
|
500
|
+
--button-brand-text-shadow: 0 1px 1px #00000059, 0 0 1px #00000040;
|
|
462
501
|
--card-radius: var(--radius-xl);
|
|
502
|
+
--layer-card-radius: var(--radius-lg);
|
|
503
|
+
--layer-card-shadow: 0 1px 2px #0000000d;
|
|
504
|
+
--flow-node-shadow: 0 1px 2px #0000000d;
|
|
505
|
+
--flow-canvas-background-image: radial-gradient(var(--border-disabled) 1px, transparent 1px);
|
|
463
506
|
--input-radius: var(--radius-lg);
|
|
464
507
|
--input-height: calc(var(--spacing) * 9);
|
|
465
508
|
--badge-radius: var(--radius-md);
|
|
@@ -520,95 +563,126 @@
|
|
|
520
563
|
inset 0 1px 0 color-mix(in oklch, var(--bg-fill-critical), white 30%), 0 1px 2px #0000000d;
|
|
521
564
|
--button-destructive-hover-shadow:
|
|
522
565
|
inset 0 1px 0 color-mix(in oklch, var(--bg-fill-critical), white 30%), 0 1px 2px #0000000d;
|
|
523
|
-
--button-brand-
|
|
524
|
-
--button-brand-
|
|
566
|
+
--button-brand-bg: #f45b00;
|
|
567
|
+
--button-brand-text: #ffffff;
|
|
568
|
+
--button-brand-border: color-mix(in oklch, #f45b00, black 8%);
|
|
569
|
+
--button-brand-hover-border: #f45b00;
|
|
525
570
|
--button-brand-background-image: linear-gradient(
|
|
526
571
|
to bottom,
|
|
527
|
-
|
|
528
|
-
#
|
|
572
|
+
#ff8a00 0%,
|
|
573
|
+
#f45b00 20%,
|
|
574
|
+
#e04400 100%
|
|
529
575
|
);
|
|
530
576
|
--button-brand-hover-background-image: linear-gradient(
|
|
531
577
|
to bottom,
|
|
532
|
-
|
|
533
|
-
#
|
|
578
|
+
#ff8a00 0%,
|
|
579
|
+
#f45b00 20%,
|
|
580
|
+
color-mix(in oklch, #e04400, #f45b00 25%) 100%
|
|
534
581
|
);
|
|
535
|
-
--button-brand-shadow:
|
|
582
|
+
--button-brand-shadow:
|
|
583
|
+
inset 0 1px 0 color-mix(in oklch, #ff8a00, white 15%),
|
|
584
|
+
inset 0 -1px 0 color-mix(in oklch, #f45b00, black 8%),
|
|
585
|
+
0 2px 3px color-mix(in srgb, #f45b00, transparent 82%);
|
|
536
586
|
--button-brand-hover-shadow:
|
|
537
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
--button-brand-2-
|
|
541
|
-
--button-brand-2-
|
|
587
|
+
inset 0 1px 0 color-mix(in oklch, #ff8a00, white 15%),
|
|
588
|
+
inset 0 -1px 0 color-mix(in oklch, #f45b00, black 8%),
|
|
589
|
+
0 2px 6px color-mix(in srgb, #f45b00, transparent 75%);
|
|
590
|
+
--button-brand-2-bg: #009db8;
|
|
591
|
+
--button-brand-2-text: #ffffff;
|
|
592
|
+
--button-brand-2-border: color-mix(in oklch, #009db8, black 8%);
|
|
593
|
+
--button-brand-2-hover-border: #009db8;
|
|
542
594
|
--button-brand-2-background-image: linear-gradient(
|
|
543
595
|
to bottom,
|
|
544
|
-
|
|
545
|
-
#
|
|
596
|
+
#00d8ea 0%,
|
|
597
|
+
#009db8 20%,
|
|
598
|
+
#007dab 100%
|
|
546
599
|
);
|
|
547
600
|
--button-brand-2-hover-background-image: linear-gradient(
|
|
548
601
|
to bottom,
|
|
549
|
-
|
|
550
|
-
#
|
|
602
|
+
#00d8ea 0%,
|
|
603
|
+
#009db8 20%,
|
|
604
|
+
color-mix(in oklch, #007dab, #009db8 25%) 100%
|
|
551
605
|
);
|
|
552
606
|
--button-brand-2-shadow:
|
|
553
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
607
|
+
inset 0 1px 0 color-mix(in oklch, #00d8ea, white 15%),
|
|
608
|
+
inset 0 -1px 0 color-mix(in oklch, #009db8, black 8%),
|
|
609
|
+
0 2px 3px color-mix(in srgb, #009db8, transparent 82%);
|
|
554
610
|
--button-brand-2-hover-shadow:
|
|
555
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
--button-brand-3-
|
|
559
|
-
--button-brand-3-
|
|
611
|
+
inset 0 1px 0 color-mix(in oklch, #00d8ea, white 15%),
|
|
612
|
+
inset 0 -1px 0 color-mix(in oklch, #009db8, black 8%),
|
|
613
|
+
0 2px 6px color-mix(in srgb, #009db8, transparent 75%);
|
|
614
|
+
--button-brand-3-bg: #aa0aff;
|
|
615
|
+
--button-brand-3-text: #ffffff;
|
|
616
|
+
--button-brand-3-border: color-mix(in oklch, #aa0aff, black 8%);
|
|
617
|
+
--button-brand-3-hover-border: #aa0aff;
|
|
560
618
|
--button-brand-3-background-image: linear-gradient(
|
|
561
619
|
to bottom,
|
|
562
|
-
|
|
563
|
-
#
|
|
620
|
+
#e04bff 0%,
|
|
621
|
+
#aa0aff 20%,
|
|
622
|
+
#7c00e5 100%
|
|
564
623
|
);
|
|
565
624
|
--button-brand-3-hover-background-image: linear-gradient(
|
|
566
625
|
to bottom,
|
|
567
|
-
|
|
568
|
-
#
|
|
626
|
+
#e04bff 0%,
|
|
627
|
+
#aa0aff 20%,
|
|
628
|
+
color-mix(in oklch, #7c00e5, #aa0aff 25%) 100%
|
|
569
629
|
);
|
|
570
630
|
--button-brand-3-shadow:
|
|
571
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
631
|
+
inset 0 1px 0 color-mix(in oklch, #e04bff, white 15%),
|
|
632
|
+
inset 0 -1px 0 color-mix(in oklch, #aa0aff, black 8%),
|
|
633
|
+
0 2px 3px color-mix(in srgb, #aa0aff, transparent 82%);
|
|
572
634
|
--button-brand-3-hover-shadow:
|
|
573
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
--button-brand-4-
|
|
577
|
-
--button-brand-4-
|
|
635
|
+
inset 0 1px 0 color-mix(in oklch, #e04bff, white 15%),
|
|
636
|
+
inset 0 -1px 0 color-mix(in oklch, #aa0aff, black 8%),
|
|
637
|
+
0 2px 6px color-mix(in srgb, #aa0aff, transparent 75%);
|
|
638
|
+
--button-brand-4-bg: #1464ff;
|
|
639
|
+
--button-brand-4-text: #ffffff;
|
|
640
|
+
--button-brand-4-border: color-mix(in oklch, #1464ff, black 8%);
|
|
641
|
+
--button-brand-4-hover-border: #1464ff;
|
|
578
642
|
--button-brand-4-background-image: linear-gradient(
|
|
579
643
|
to bottom,
|
|
580
|
-
|
|
581
|
-
#
|
|
644
|
+
#388bff 0%,
|
|
645
|
+
#1464ff 20%,
|
|
646
|
+
#0045ef 100%
|
|
582
647
|
);
|
|
583
648
|
--button-brand-4-hover-background-image: linear-gradient(
|
|
584
649
|
to bottom,
|
|
585
|
-
|
|
586
|
-
#
|
|
650
|
+
#388bff 0%,
|
|
651
|
+
#1464ff 20%,
|
|
652
|
+
color-mix(in oklch, #0045ef, #1464ff 25%) 100%
|
|
587
653
|
);
|
|
588
654
|
--button-brand-4-shadow:
|
|
589
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
655
|
+
inset 0 1px 0 color-mix(in oklch, #388bff, white 15%),
|
|
656
|
+
inset 0 -1px 0 color-mix(in oklch, #1464ff, black 8%),
|
|
657
|
+
0 2px 3px color-mix(in srgb, #1464ff, transparent 82%);
|
|
590
658
|
--button-brand-4-hover-shadow:
|
|
591
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
--button-brand-5-
|
|
595
|
-
--button-brand-5-
|
|
659
|
+
inset 0 1px 0 color-mix(in oklch, #388bff, white 15%),
|
|
660
|
+
inset 0 -1px 0 color-mix(in oklch, #1464ff, black 8%),
|
|
661
|
+
0 2px 6px color-mix(in srgb, #1464ff, transparent 75%);
|
|
662
|
+
--button-brand-5-bg: #00ab38;
|
|
663
|
+
--button-brand-5-text: #ffffff;
|
|
664
|
+
--button-brand-5-border: color-mix(in oklch, #00ab38, black 8%);
|
|
665
|
+
--button-brand-5-hover-border: #00ab38;
|
|
596
666
|
--button-brand-5-background-image: linear-gradient(
|
|
597
667
|
to bottom,
|
|
598
|
-
|
|
599
|
-
#
|
|
668
|
+
#63e600 0%,
|
|
669
|
+
#00ab38 20%,
|
|
670
|
+
#008d21 100%
|
|
600
671
|
);
|
|
601
672
|
--button-brand-5-hover-background-image: linear-gradient(
|
|
602
673
|
to bottom,
|
|
603
|
-
|
|
604
|
-
#
|
|
674
|
+
#63e600 0%,
|
|
675
|
+
#00ab38 20%,
|
|
676
|
+
color-mix(in oklch, #008d21, #00ab38 25%) 100%
|
|
605
677
|
);
|
|
606
678
|
--button-brand-5-shadow:
|
|
607
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
679
|
+
inset 0 1px 0 color-mix(in oklch, #63e600, white 15%),
|
|
680
|
+
inset 0 -1px 0 color-mix(in oklch, #00ab38, black 8%),
|
|
681
|
+
0 2px 3px color-mix(in srgb, #00ab38, transparent 82%);
|
|
608
682
|
--button-brand-5-hover-shadow:
|
|
609
|
-
inset 0 1px 0 color-mix(in oklch, #
|
|
610
|
-
|
|
611
|
-
|
|
683
|
+
inset 0 1px 0 color-mix(in oklch, #63e600, white 15%),
|
|
684
|
+
inset 0 -1px 0 color-mix(in oklch, #00ab38, black 8%),
|
|
685
|
+
0 2px 6px color-mix(in srgb, #00ab38, transparent 75%);
|
|
612
686
|
--background: var(--bg-default);
|
|
613
687
|
--foreground: var(--text-default);
|
|
614
688
|
--card: var(--bg-surface-default);
|
|
@@ -28,44 +28,38 @@ function emphasisFinish(
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
// Vivid body colours and a bright upper edge make the brand actions pop.
|
|
32
|
+
// White labels use a heavier weight and a subtle shadow over these gradients.
|
|
33
|
+
const brandButtonColors: Record<BrandButton, { top: string; bottom: string; highlight: string }> = {
|
|
34
|
+
brand: { top: '#F45B00', bottom: '#E04400', highlight: '#FF8A00' },
|
|
35
|
+
'brand-2': { top: '#009DB8', bottom: '#007DAB', highlight: '#00D8EA' },
|
|
36
|
+
'brand-3': { top: '#AA0AFF', bottom: '#7C00E5', highlight: '#E04BFF' },
|
|
37
|
+
'brand-4': { top: '#1464FF', bottom: '#0045EF', highlight: '#388BFF' },
|
|
38
|
+
'brand-5': { top: '#00AB38', bottom: '#008D21', highlight: '#63E600' },
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function brandFinishes(): Record<string, string> {
|
|
36
42
|
return Object.assign(
|
|
37
43
|
{},
|
|
38
|
-
...
|
|
39
|
-
const
|
|
44
|
+
...Object.entries(brandButtonColors).map(([variant, { top, bottom, highlight }]) => {
|
|
45
|
+
const edge = `color-mix(in oklch, ${top}, black 8%)`
|
|
46
|
+
const rim = `color-mix(in oklch, ${highlight}, white 15%)`
|
|
47
|
+
const shadow = `color-mix(in srgb, ${top}, transparent 82%)`
|
|
48
|
+
const hoverShadow = `color-mix(in srgb, ${top}, transparent 75%)`
|
|
40
49
|
return {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
? { start: 3, hover: 5 }
|
|
50
|
-
: { start: 5, hover: 10 },
|
|
51
|
-
),
|
|
52
|
-
[`--button-${variant}-bg`]: fill,
|
|
53
|
-
[`--button-${variant}-text`]: text[variant],
|
|
50
|
+
[`--button-${variant}-bg`]: top,
|
|
51
|
+
[`--button-${variant}-text`]: '#FFFFFF',
|
|
52
|
+
[`--button-${variant}-border`]: edge,
|
|
53
|
+
[`--button-${variant}-hover-border`]: top,
|
|
54
|
+
[`--button-${variant}-background-image`]: `linear-gradient(to bottom, ${highlight} 0%, ${top} 20%, ${bottom} 100%)`,
|
|
55
|
+
[`--button-${variant}-hover-background-image`]: `linear-gradient(to bottom, ${highlight} 0%, ${top} 20%, color-mix(in oklch, ${bottom}, ${top} 25%) 100%)`,
|
|
56
|
+
[`--button-${variant}-shadow`]: `inset 0 1px 0 ${rim}, inset 0 -1px 0 ${edge}, 0 2px 3px ${shadow}`,
|
|
57
|
+
[`--button-${variant}-hover-shadow`]: `inset 0 1px 0 ${rim}, inset 0 -1px 0 ${edge}, 0 2px 6px ${hoverShadow}`,
|
|
54
58
|
}
|
|
55
59
|
}),
|
|
56
60
|
)
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
// Saturated action fills keep their energy in both themes. Orange, turquoise,
|
|
60
|
-
// and green use deeper shades than the shared accents for readable white labels.
|
|
61
|
-
const brandButtonFills: Record<BrandButton, string> = {
|
|
62
|
-
brand: '#D43C00',
|
|
63
|
-
'brand-2': '#008090',
|
|
64
|
-
'brand-3': '#8A00F5',
|
|
65
|
-
'brand-4': '#0057FF',
|
|
66
|
-
'brand-5': '#008700',
|
|
67
|
-
}
|
|
68
|
-
|
|
69
63
|
const shape: Record<string, string> = {
|
|
70
64
|
'--spacing': '0.25rem',
|
|
71
65
|
'--border-width-base': '0.0625rem',
|
|
@@ -91,7 +85,13 @@ const shape: Record<string, string> = {
|
|
|
91
85
|
'--button-font-size-xs': 'var(--text-xs)',
|
|
92
86
|
'--button-font-size-sm': 'var(--text-xs)',
|
|
93
87
|
'--button-gap': 'calc(var(--spacing) * 1.5)',
|
|
88
|
+
'--button-brand-font-weight': '600',
|
|
89
|
+
'--button-brand-text-shadow': '0 1px 1px #00000059, 0 0 1px #00000040',
|
|
94
90
|
'--card-radius': 'var(--radius-xl)',
|
|
91
|
+
'--layer-card-radius': 'var(--radius-lg)',
|
|
92
|
+
'--layer-card-shadow': '0 1px 2px #0000000D',
|
|
93
|
+
'--flow-node-shadow': '0 1px 2px #0000000D',
|
|
94
|
+
'--flow-canvas-background-image': 'radial-gradient(var(--border-disabled) 1px, transparent 1px)',
|
|
95
95
|
'--input-radius': 'var(--radius-lg)',
|
|
96
96
|
'--input-height': 'calc(var(--spacing) * 9)',
|
|
97
97
|
'--badge-radius': 'var(--radius-md)',
|
|
@@ -127,16 +127,7 @@ export const kumo: Record<string, string> = {
|
|
|
127
127
|
...shape,
|
|
128
128
|
...emphasisFinish('primary', 'var(--bg-fill-primary)'),
|
|
129
129
|
...emphasisFinish('destructive', 'var(--bg-fill-critical)'),
|
|
130
|
-
...brandFinishes(
|
|
131
|
-
{
|
|
132
|
-
brand: '#FFFFFF',
|
|
133
|
-
'brand-2': '#FFFFFF',
|
|
134
|
-
'brand-3': '#FFFFFF',
|
|
135
|
-
'brand-4': '#FFFFFF',
|
|
136
|
-
'brand-5': '#FFFFFF',
|
|
137
|
-
},
|
|
138
|
-
brandButtonFills,
|
|
139
|
-
),
|
|
130
|
+
...brandFinishes(),
|
|
140
131
|
|
|
141
132
|
'--bg-default': '#FBFBFB',
|
|
142
133
|
'--bg-inverse': '#080808',
|
|
@@ -245,16 +236,7 @@ export const kumoDark: Record<string, string> = {
|
|
|
245
236
|
...shape,
|
|
246
237
|
...emphasisFinish('primary', 'var(--bg-fill-primary)'),
|
|
247
238
|
...emphasisFinish('destructive', 'var(--bg-fill-critical)'),
|
|
248
|
-
...brandFinishes(
|
|
249
|
-
{
|
|
250
|
-
brand: '#FFFFFF',
|
|
251
|
-
'brand-2': '#FFFFFF',
|
|
252
|
-
'brand-3': '#FFFFFF',
|
|
253
|
-
'brand-4': '#FFFFFF',
|
|
254
|
-
'brand-5': '#FFFFFF',
|
|
255
|
-
},
|
|
256
|
-
brandButtonFills,
|
|
257
|
-
),
|
|
239
|
+
...brandFinishes(),
|
|
258
240
|
|
|
259
241
|
'--shadow-base-color': '#0000004D',
|
|
260
242
|
'--bg-default': '#030303',
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
--button-quiet-hover-bg: initial;
|
|
62
62
|
|
|
63
63
|
/* Brand buttons can opt into the same filled finishes per colour. */
|
|
64
|
+
--button-brand-font-weight: 500;
|
|
65
|
+
--button-brand-text-shadow: none;
|
|
64
66
|
--button-brand-bg: initial;
|
|
65
67
|
--button-brand-text: initial;
|
|
66
68
|
--button-brand-border: initial;
|
|
@@ -101,6 +103,24 @@
|
|
|
101
103
|
--button-brand-5-hover-background-image: none;
|
|
102
104
|
--button-brand-5-shadow: none;
|
|
103
105
|
--button-brand-5-hover-shadow: initial;
|
|
106
|
+
/* Layered content surfaces, flow diagrams, and copy fields. */
|
|
107
|
+
--layer-card-radius: var(--card-radius);
|
|
108
|
+
--layer-card-padding: var(--card-padding);
|
|
109
|
+
--layer-card-shadow: var(--shadow-sm);
|
|
110
|
+
--clipboard-text-radius: var(--input-radius);
|
|
111
|
+
--clipboard-text-height: var(--input-height);
|
|
112
|
+
--clipboard-text-height-sm: calc(var(--spacing) * 6.5);
|
|
113
|
+
--clipboard-text-height-lg: calc(var(--spacing) * 10);
|
|
114
|
+
--flow-gap: calc(var(--spacing) * 10);
|
|
115
|
+
--flow-branch-gap: calc(var(--spacing) * 4);
|
|
116
|
+
--flow-node-radius: var(--radius-md);
|
|
117
|
+
--flow-node-shadow: var(--shadow-sm);
|
|
118
|
+
--flow-connector-color: initial;
|
|
119
|
+
--flow-canvas-radius: var(--radius-lg);
|
|
120
|
+
--flow-canvas-padding-x: calc(var(--spacing) * 4);
|
|
121
|
+
--flow-canvas-padding-y: calc(var(--spacing) * 12);
|
|
122
|
+
--flow-canvas-background-image: none;
|
|
123
|
+
--flow-canvas-background-size: calc(var(--spacing) * 4);
|
|
104
124
|
--card-radius: var(--radius-lg);
|
|
105
125
|
--card-padding: calc(var(--spacing) * 4);
|
|
106
126
|
--input-radius: var(--radius-md);
|