@zazz-ui/core 0.6.1 → 0.6.2

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.
@@ -1241,7 +1241,7 @@
1241
1241
  "file": "primitives/badge/badge.css"
1242
1242
  },
1243
1243
  "--ui-badge-h": {
1244
- "value": "calc(var(--spacing) * 5.5)",
1244
+ "value": "calc(var(--spacing) * 5)",
1245
1245
  "file": "primitives/badge/badge.css"
1246
1246
  },
1247
1247
  "--ui-badge-icon-size": {
@@ -1253,7 +1253,7 @@
1253
1253
  "file": "primitives/badge/badge.css"
1254
1254
  },
1255
1255
  "--ui-badge-px": {
1256
- "value": "calc(var(--spacing) * 1.5)",
1256
+ "value": "calc(var(--spacing) * 1.25)",
1257
1257
  "file": "primitives/badge/badge.css"
1258
1258
  },
1259
1259
  "--ui-badge-ring-color": {
@@ -1341,7 +1341,7 @@
1341
1341
  "file": "primitives/button/button.css"
1342
1342
  },
1343
1343
  "--ui-button-leading": {
1344
- "value": "var(--leading-sm)",
1344
+ "value": "1",
1345
1345
  "file": "primitives/button/button.css"
1346
1346
  },
1347
1347
  "--ui-button-min-h": {
@@ -3884,6 +3884,18 @@
3884
3884
  "light": "oklch(1 0 0)",
3885
3885
  "dark": "oklch(13% 0.028 261.692)"
3886
3886
  },
3887
+ "--color-selection": {
3888
+ "value": "var(--color-primary)",
3889
+ "file": "base/_variables.css",
3890
+ "light": "oklch(0.145 0 0)",
3891
+ "dark": "oklch(0.985 0 0)"
3892
+ },
3893
+ "--color-selection-foreground": {
3894
+ "value": "var(--color-primary-foreground)",
3895
+ "file": "base/_variables.css",
3896
+ "light": "oklch(1 0 0)",
3897
+ "dark": "oklch(0.145 0 0)"
3898
+ },
3887
3899
  "--color-shade-100": {
3888
3900
  "value": "oklch(from var(--color-neutral-950) l c h / 0.1)",
3889
3901
  "file": "base/_variables.css",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zazz-ui/core",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Zazz Design Framework — a zero-build, semantic-token CSS + vanilla JS UI kit built on modern web standards.",
5
5
  "keywords": [
6
6
  "cascade-layers",
@@ -10,11 +10,11 @@
10
10
  * @uses view-transition-name via the <main> tag - main-content and [data-transition-layer] —
11
11
  * global (animated in _view-transitions.css)
12
12
  * @uses text-box — vertical trim on headings
13
- * @uses color-mix(), oklch(from …), contrast-color() — mark/highlight tints
14
13
  * @tokens Native-element hooks declared in each element's rule (override them
15
14
  * on the element): --code-* (incl. --code-font-family), --search-cancel-*,
16
15
  * --placeholder-color, --strong-font-weight, --hr-bg,
17
- * --optgroup-font-weight, --optgroup-option-pl; --selection-bg on html
16
+ * --optgroup-font-weight, --optgroup-option-pl. Text selection reads
17
+ * --color-selection / --color-selection-foreground (_variables.css)
18
18
  *
19
19
  * Checkbox, range, switch, select picker, popover and dialog internals live in
20
20
  * their primitive stylesheets.
@@ -43,8 +43,6 @@
43
43
  -webkit-text-size-adjust: 100%;
44
44
  background-color: var(--color-background);
45
45
  -webkit-tap-highlight-color: transparent;
46
- /* text selection tint (::selection reads it from the selected element) */
47
- --selection-bg: oklch(from var(--color-primary) calc(l + 0.1) c h / 0.3);
48
46
 
49
47
  /* html (the viewport) is the page's scrolling element, as browsers expect */
50
48
  scroll-behavior: smooth;
@@ -256,12 +254,12 @@
256
254
  }
257
255
  }
258
256
 
259
- /* Custom text selection styling — the tinted background is safe everywhere
260
- (relative oklch is Baseline). contrast-color() is Chromium-only, so it is
261
- gated: without it the selection keeps its inherited text color, which stays
262
- legible against a 30%-opacity tint in both light and dark modes.
257
+ /* Text selection: an opaque --color-selection fill with its own
258
+ --color-selection-foreground text, a role pair like primary, so contrast
259
+ comes from the pair rather than a tint over unknown content.
263
260
 
264
- On :root only, on purpose: highlight pseudo-elements inherit from the
261
+ On :root only, on purpose (so the tokens only take effect on :root; set on
262
+ a subtree they change nothing): highlight pseudo-elements inherit from the
265
263
  parent's highlight pseudo-element (css-pseudo-4 highlight inheritance:
266
264
  Chrome 134+, Firefox, WebKit), so one rule reaches every selection. A
267
265
  universal `::selection` rule that reads a var() makes Chromium recalculate
@@ -270,14 +268,8 @@
270
268
  children, 194 ms per frame; 0.4 ms with this form). Engines without
271
269
  highlight inheritance fall back to the UA selection color. */
272
270
  :root::selection {
273
- background-color: var(--selection-bg);
274
- }
275
-
276
- @supports (color: contrast-color(white)) {
277
- :root::selection {
278
- /* legible on the 30% primary tint over the background */
279
- color: contrast-color(color-mix(in oklch, var(--color-background) 50%, var(--selection-bg)));
280
- }
271
+ background-color: var(--color-selection);
272
+ color: var(--color-selection-foreground);
281
273
  }
282
274
 
283
275
  /* ===========================================================================
@@ -64,6 +64,10 @@
64
64
  --color-input: light-dark(var(--color-neutral-50), var(--color-tint-100));
65
65
  --color-input-foreground: light-dark(var(--color-neutral-900), var(--color-white));
66
66
 
67
+ /* selection */
68
+ --color-selection: var(--color-primary);
69
+ --color-selection-foreground: var(--color-primary-foreground);
70
+
67
71
  /* overlay */
68
72
  --color-muted: light-dark(var(--color-shade-50), var(--color-tint-100));
69
73
  --color-muted-foreground: light-dark(var(--color-shade-600), var(--color-tint-600));
@@ -39,8 +39,8 @@
39
39
 
40
40
  /* dual-mode: a scale number or a length */
41
41
  --ui-badge-gap: var(--spacing);
42
- --ui-badge-px: calc(var(--spacing) * 1.5);
43
- --ui-badge-h: calc(var(--spacing) * 5.5);
42
+ --ui-badge-px: calc(var(--spacing) * 1.25);
43
+ --ui-badge-h: calc(var(--spacing) * 5);
44
44
  --ui-badge-rounded: var(--radius-sm);
45
45
 
46
46
  --ui-badge-icon-size: calc(var(--spacing) * 3);
@@ -381,92 +381,79 @@
381
381
  --_badge-border-color--active: transparent;
382
382
  }
383
383
 
384
+ /* Status variants (info, success, warning, destructive) share one soft
385
+ design: the status color at 10% alpha (20% in dark) as the surface, and
386
+ the status hue as the text with its lightness clamped (at most 0.45 in
387
+ light, at least 0.82 in dark) so it holds 4.5:1 on the tint and on the
388
+ hover and active steps; status-contrast.browser.test.ts checks it. No border. One rule derives the states from the
389
+ surface; each variant names only its colors. */
390
+ :where(
391
+ [data-ui~="badge"]:is(
392
+ [data-badge-variant="info"],
393
+ [data-badge-variant="success"],
394
+ [data-badge-variant="warning"],
395
+ [data-badge-variant="destructive"]
396
+ )
397
+ ) {
398
+ --_badge-bg--hover: oklch(from var(--_badge-bg) l c h / calc(alpha + 0.1));
399
+ --_badge-bg--active: oklch(from var(--_badge-bg) l c h / calc(alpha + 0.15));
400
+
401
+ --_badge-text--hover: var(--_badge-text);
402
+ --_badge-text--active: var(--_badge-text);
403
+
404
+ --_badge-border-color: transparent;
405
+ --_badge-border-color--hover: transparent;
406
+ --_badge-border-color--active: transparent;
407
+
408
+ --_badge-shadow: 0 0 transparent;
409
+ }
410
+
384
411
  :where([data-ui~="badge"][data-badge-variant="info"]) {
385
- --_badge-bg: oklch(from var(--color-info) l c h / 0.15);
386
- --_badge-bg--hover: oklch(from var(--color-info) l c h / 0.1);
387
- --_badge-bg--active: oklch(from var(--color-info) l c h / 0.05);
388
-
389
- --_badge-text: color-mix(in xyz, var(--color-info) 100%, contrast-color(var(--_badge-bg)) 100%);
390
- --_badge-text--hover: color-mix(
391
- in xyz,
392
- var(--color-info) 100%,
393
- contrast-color(var(--_badge-bg--hover)) 100%
412
+ --_badge-ring-color: var(--color-info);
413
+ --_badge-bg: light-dark(
414
+ oklch(from var(--color-info) l c h / 0.1),
415
+ oklch(from var(--color-info) l c h / 0.2)
394
416
  );
395
- --_badge-text--active: color-mix(
396
- in xyz,
397
- var(--color-info) 100%,
398
- contrast-color(var(--_badge-bg--active)) 100%
417
+ --_badge-text: light-dark(
418
+ oklch(from var(--color-info) min(l, 0.45) c h),
419
+ oklch(from var(--color-info) max(l, 0.82) c h)
399
420
  );
400
-
401
- --_badge-border-color: oklch(from var(--color-info) l c h / 0.2);
402
- --_badge-border-color--hover: oklch(from var(--color-info) l c h / 0.15);
403
- --_badge-border-color--active: oklch(from var(--color-info) l c h / 0.1);
404
421
  }
405
422
 
406
423
  :where([data-ui~="badge"][data-badge-variant="success"]) {
407
- --_badge-bg: oklch(from var(--color-success) l c h / 0.15);
408
- --_badge-bg--hover: oklch(from var(--color-success) l c h / 0.1);
409
- --_badge-bg--active: oklch(from var(--color-success) l c h / 0.05);
410
-
411
- --_badge-text: color-mix(
412
- in xyz,
413
- var(--color-success) 100%,
414
- contrast-color(var(--_badge-bg)) 100%
415
- );
416
- --_badge-text--hover: color-mix(
417
- in xyz,
418
- var(--color-success) 100%,
419
- contrast-color(var(--_badge-bg--hover)) 100%
424
+ --_badge-ring-color: var(--color-success);
425
+ --_badge-bg: light-dark(
426
+ oklch(from var(--color-success) l c h / 0.1),
427
+ oklch(from var(--color-success) l c h / 0.2)
420
428
  );
421
- --_badge-text--active: color-mix(
422
- in xyz,
423
- var(--color-success) 100%,
424
- contrast-color(var(--_badge-bg--active)) 100%
429
+ --_badge-text: light-dark(
430
+ oklch(from var(--color-success) min(l, 0.45) c h),
431
+ oklch(from var(--color-success) max(l, 0.82) c h)
425
432
  );
426
-
427
- --_badge-border-color: oklch(from var(--color-success) l c h / 0.2);
428
- --_badge-border-color--hover: oklch(from var(--color-success) l c h / 0.15);
429
- --_badge-border-color--active: oklch(from var(--color-success) l c h / 0.1);
430
433
  }
431
434
 
432
435
  :where([data-ui~="badge"][data-badge-variant="warning"]) {
433
- --_badge-bg: oklch(from var(--color-warning) l c h / 0.15);
434
- --_badge-bg--hover: oklch(from var(--color-warning) l c h / 0.1);
435
- --_badge-bg--active: oklch(from var(--color-warning) l c h / 0.05);
436
-
437
- --_badge-text: color-mix(
438
- in xyz,
439
- var(--color-warning) 100%,
440
- contrast-color(var(--_badge-bg)) 100%
441
- );
442
- --_badge-text--hover: color-mix(
443
- in xyz,
444
- var(--color-warning) 100%,
445
- contrast-color(var(--_badge-bg--hover)) 100%
436
+ --_badge-ring-color: var(--color-warning);
437
+ --_badge-bg: light-dark(
438
+ oklch(from var(--color-warning) l c h / 0.1),
439
+ oklch(from var(--color-warning) l c h / 0.2)
446
440
  );
447
- --_badge-text--active: color-mix(
448
- in xyz,
449
- var(--color-warning) 100%,
450
- contrast-color(var(--_badge-bg--active)) 100%
441
+ --_badge-text: light-dark(
442
+ oklch(from var(--color-warning) min(l, 0.45) c h),
443
+ oklch(from var(--color-warning) max(l, 0.82) c h)
451
444
  );
452
-
453
- --_badge-border-color: oklch(from var(--color-warning) l c h / 0.2);
454
- --_badge-border-color--hover: oklch(from var(--color-warning) l c h / 0.15);
455
- --_badge-border-color--active: oklch(from var(--color-warning) l c h / 0.1);
456
445
  }
457
446
 
458
447
  :where([data-ui~="badge"][data-badge-variant="destructive"]) {
459
- --_badge-bg: var(--color-destructive);
460
- --_badge-bg--hover: oklch(from var(--color-destructive) l c h / 0.9);
461
- --_badge-bg--active: oklch(from var(--color-destructive) l c h / 0.8);
462
-
463
- --_badge-text: var(--color-destructive-foreground);
464
- --_badge-text--hover: var(--color-destructive-foreground);
465
- --_badge-text--active: var(--color-destructive-foreground);
466
-
467
- --_badge-border-color: var(--_badge-bg);
468
- --_badge-border-color--hover: var(--_badge-bg--hover);
469
- --_badge-border-color--active: var(--_badge-bg--active);
448
+ --_badge-ring-color: var(--color-destructive);
449
+ --_badge-bg: light-dark(
450
+ oklch(from var(--color-destructive) l c h / 0.1),
451
+ oklch(from var(--color-destructive) l c h / 0.2)
452
+ );
453
+ --_badge-text: light-dark(
454
+ oklch(from var(--color-destructive) min(l, 0.45) c h),
455
+ oklch(from var(--color-destructive) max(l, 0.82) c h)
456
+ );
470
457
  }
471
458
 
472
459
  :where([data-ui~="badge"][data-badge-variant="link"]) {
@@ -475,8 +462,8 @@
475
462
  --_badge-bg--active: transparent;
476
463
 
477
464
  --_badge-text: var(--color-foreground);
478
- --_badge-text--hover: var(--color-primary);
479
- --_badge-text--active: oklch(from var(--color-primary) l c h / 0.8);
465
+ --_badge-text--hover: oklch(from var(--color-primary) l c h / 0.6);
466
+ --_badge-text--active: oklch(from var(--color-primary) l c h / 0.5);
480
467
 
481
468
  --_badge-border-style: none;
482
469
 
@@ -484,43 +471,6 @@
484
471
  --_badge-rounded: 0;
485
472
 
486
473
  --_badge-shadow: 0 0 transparent;
487
-
488
- /* the link sizes to its text (dual mode cannot carry fit-content) */
489
- block-size: auto;
490
-
491
- text-decoration-line: var(--decoration-line);
492
- text-decoration-style: var(--decoration-style);
493
- text-decoration-color: var(--decoration-color);
494
- text-underline-offset: var(--decoration-offset);
495
- text-decoration-thickness: var(--decoration-thickness);
496
- }
497
-
498
- @media (hover: hover) {
499
- :where([data-ui~="badge"][data-badge-variant="link"]):is(button, a[href]):hover:not(
500
- :disabled,
501
- [aria-disabled="true"]
502
- ) {
503
- --decoration-offset: calc(var(--decoration-thickness) * 2);
504
- }
505
- }
506
-
507
- :where([data-ui~="badge"][data-badge-variant="link"]):is(button, a[href]):active:not(
508
- :disabled,
509
- [aria-disabled="true"]
510
- ) {
511
- --decoration-offset: inherit;
512
- /* back to the base offset while pressed */
513
- }
514
-
515
- /* after the variants at zero specificity: a disabled badge is muted whatever its variant */
516
- :where([data-ui~="badge"]:is(button, a[href]):is(:disabled, [aria-disabled="true"])) {
517
- --_badge-text: var(--color-muted-foreground);
518
- --_badge-bg: var(--color-muted);
519
- --_badge-shadow: 0 0 transparent;
520
-
521
- cursor: default;
522
- opacity: 0.5;
523
- outline: none;
524
474
  }
525
475
 
526
476
  /* ===========================================================================
@@ -1,6 +1,7 @@
1
1
  <div
2
2
  style="
3
3
  --display: flex;
4
+ --flex-wrap: wrap;
4
5
  --items: center;
5
6
  --gap: 4;
6
7
  "
@@ -9,5 +10,9 @@
9
10
  <button type="button" data-ui="badge" data-badge-variant="primary">New</button>
10
11
  <button type="button" data-ui="badge" data-badge-variant="muted">Draft</button>
11
12
  <button type="button" data-ui="badge" data-badge-variant="ghost">Inline</button>
13
+ <button type="button" data-ui="badge" data-badge-variant="info">Update</button>
14
+ <button type="button" data-ui="badge" data-badge-variant="success">Paid</button>
15
+ <button type="button" data-ui="badge" data-badge-variant="warning">Pending</button>
16
+ <button type="button" data-ui="badge" data-badge-variant="destructive">Overdue</button>
12
17
  <button type="button" data-ui="badge" data-badge-variant="link">Posts</button>
13
18
  </div>
@@ -26,7 +26,7 @@
26
26
  --ui-button-font-family: var(--font-family-body);
27
27
  --ui-button-font-size: var(--font-size-sm);
28
28
  --ui-button-font-weight: var(--font-weight-strong);
29
- --ui-button-leading: var(--leading-sm);
29
+ --ui-button-leading: 1;
30
30
 
31
31
  --ui-button-bg: var(--color-background);
32
32
  --ui-button-bg--hover: oklch(from var(--color-background) calc(l - 0.025) c h);
@@ -411,16 +411,25 @@
411
411
  --_button-shadow: 0 0 transparent;
412
412
  }
413
413
 
414
- :where([data-ui~="button"][data-button-variant="info"]) {
415
- --_button-ring-color: var(--color-info);
416
-
417
- --_button-bg: var(--color-info);
418
- --_button-bg--hover: oklch(from var(--color-info) l c h / 0.9);
419
- --_button-bg--active: oklch(from var(--color-info) l c h / 0.8);
414
+ /* Status variants (info, success, warning, destructive) share one soft
415
+ design: the status color at 10% alpha (20% in dark) as the surface, and
416
+ the status hue as the text with its lightness clamped (at most 0.45 in
417
+ light, at least 0.82 in dark) so it holds 4.5:1 on the tint and on the
418
+ hover and active steps; status-contrast.browser.test.ts checks it. No border. One rule derives the states from the
419
+ surface; each variant names only its colors. */
420
+ :where(
421
+ [data-ui~="button"]:is(
422
+ [data-button-variant="info"],
423
+ [data-button-variant="success"],
424
+ [data-button-variant="warning"],
425
+ [data-button-variant="destructive"]
426
+ )
427
+ ) {
428
+ --_button-bg--hover: oklch(from var(--_button-bg) l c h / calc(alpha + 0.1));
429
+ --_button-bg--active: oklch(from var(--_button-bg) l c h / calc(alpha + 0.15));
420
430
 
421
- --_button-text: var(--color-info-foreground);
422
- --_button-text--hover: var(--color-info-foreground);
423
- --_button-text--active: var(--color-info-foreground);
431
+ --_button-text--hover: var(--_button-text);
432
+ --_button-text--active: var(--_button-text);
424
433
 
425
434
  --_button-border-color: transparent;
426
435
  --_button-border-color--hover: transparent;
@@ -429,58 +438,52 @@
429
438
  --_button-shadow: 0 0 transparent;
430
439
  }
431
440
 
441
+ :where([data-ui~="button"][data-button-variant="info"]) {
442
+ --_button-ring-color: var(--color-info);
443
+ --_button-bg: light-dark(
444
+ oklch(from var(--color-info) l c h / 0.1),
445
+ oklch(from var(--color-info) l c h / 0.2)
446
+ );
447
+ --_button-text: light-dark(
448
+ oklch(from var(--color-info) min(l, 0.45) c h),
449
+ oklch(from var(--color-info) max(l, 0.82) c h)
450
+ );
451
+ }
452
+
432
453
  :where([data-ui~="button"][data-button-variant="success"]) {
433
454
  --_button-ring-color: var(--color-success);
434
-
435
- --_button-bg: var(--color-success);
436
- --_button-bg--hover: oklch(from var(--color-success) l c h / 0.9);
437
- --_button-bg--active: oklch(from var(--color-success) l c h / 0.8);
438
-
439
- --_button-text: var(--color-success-foreground);
440
- --_button-text--hover: var(--color-success-foreground);
441
- --_button-text--active: var(--color-success-foreground);
442
-
443
- --_button-border-color: transparent;
444
- --_button-border-color--hover: transparent;
445
- --_button-border-color--active: transparent;
446
-
447
- --_button-shadow: 0 0 transparent;
455
+ --_button-bg: light-dark(
456
+ oklch(from var(--color-success) l c h / 0.1),
457
+ oklch(from var(--color-success) l c h / 0.2)
458
+ );
459
+ --_button-text: light-dark(
460
+ oklch(from var(--color-success) min(l, 0.45) c h),
461
+ oklch(from var(--color-success) max(l, 0.82) c h)
462
+ );
448
463
  }
449
464
 
450
465
  :where([data-ui~="button"][data-button-variant="warning"]) {
451
466
  --_button-ring-color: var(--color-warning);
452
-
453
- --_button-bg: var(--color-warning);
454
- --_button-bg--hover: oklch(from var(--color-warning) l c h / 0.9);
455
- --_button-bg--active: oklch(from var(--color-warning) l c h / 0.8);
456
-
457
- --_button-text: var(--color-warning-foreground);
458
- --_button-text--hover: var(--color-warning-foreground);
459
- --_button-text--active: var(--color-warning-foreground);
460
-
461
- --_button-border-color: transparent;
462
- --_button-border-color--hover: transparent;
463
- --_button-border-color--active: transparent;
464
-
465
- --_button-shadow: 0 0 transparent;
467
+ --_button-bg: light-dark(
468
+ oklch(from var(--color-warning) l c h / 0.1),
469
+ oklch(from var(--color-warning) l c h / 0.2)
470
+ );
471
+ --_button-text: light-dark(
472
+ oklch(from var(--color-warning) min(l, 0.45) c h),
473
+ oklch(from var(--color-warning) max(l, 0.82) c h)
474
+ );
466
475
  }
467
476
 
468
477
  :where([data-ui~="button"][data-button-variant="destructive"]) {
469
478
  --_button-ring-color: var(--color-destructive);
470
-
471
- --_button-bg: var(--color-destructive);
472
- --_button-bg--hover: oklch(from var(--color-destructive) l c h / 0.9);
473
- --_button-bg--active: oklch(from var(--color-destructive) l c h / 0.8);
474
-
475
- --_button-text: var(--color-destructive-foreground);
476
- --_button-text--hover: var(--color-destructive-foreground);
477
- --_button-text--active: var(--color-destructive-foreground);
478
-
479
- --_button-border-color: transparent;
480
- --_button-border-color--hover: transparent;
481
- --_button-border-color--active: transparent;
482
-
483
- --_button-shadow: 0 0 transparent;
479
+ --_button-bg: light-dark(
480
+ oklch(from var(--color-destructive) l c h / 0.1),
481
+ oklch(from var(--color-destructive) l c h / 0.2)
482
+ );
483
+ --_button-text: light-dark(
484
+ oklch(from var(--color-destructive) min(l, 0.45) c h),
485
+ oklch(from var(--color-destructive) max(l, 0.82) c h)
486
+ );
484
487
  }
485
488
 
486
489
  :where([data-ui~="button"][data-button-variant="link"]) {
@@ -494,7 +497,6 @@
494
497
 
495
498
  --_button-border-style: none;
496
499
 
497
- /* no minimum: the link sizes to its text (dual mode cannot carry fit-content) */
498
500
  --_button-min-h: 0;
499
501
  --_button-px: 0;
500
502
  --_button-rounded: 0;
@@ -1,6 +1,7 @@
1
1
  <div
2
2
  style="
3
3
  --display: flex;
4
+ --flex-wrap: wrap;
4
5
  --items: center;
5
6
  --gap: 4;
6
7
  "
@@ -10,6 +11,9 @@
10
11
  <button data-ui="button" data-button-variant="muted" type="button">Muted</button>
11
12
  <button data-ui="button" data-button-variant="ghost" type="button">Ghost</button>
12
13
  <button data-ui="button" data-button-variant="outline" type="button">Outline</button>
14
+ <button data-ui="button" data-button-variant="info" type="button">Info</button>
15
+ <button data-ui="button" data-button-variant="success" type="button">Success</button>
16
+ <button data-ui="button" data-button-variant="warning" type="button">Warning</button>
13
17
  <button data-ui="button" data-button-variant="destructive" type="button">Destructive</button>
14
18
  <button data-ui="button" data-button-variant="link" type="button">Link</button>
15
19
  </div>
@@ -86,29 +86,54 @@
86
86
  --_callout-border-color: transparent;
87
87
  }
88
88
 
89
- /* status variants: the badge's tint and border for the same role */
89
+ /* status variants: the soft status colors buttons and badges use (see
90
+ button.css), plus a faint status border that outlines the block */
90
91
 
91
92
  :where([data-ui~="callout"][data-callout-variant="info"]) {
92
- --_callout-bg: oklch(from var(--color-info) l c h / 0.15);
93
- --_callout-text: color-mix(in xyz, var(--color-info), var(--color-foreground));
93
+ --_callout-bg: light-dark(
94
+ oklch(from var(--color-info) l c h / 0.1),
95
+ oklch(from var(--color-info) l c h / 0.2)
96
+ );
97
+ --_callout-text: light-dark(
98
+ oklch(from var(--color-info) min(l, 0.45) c h),
99
+ oklch(from var(--color-info) max(l, 0.82) c h)
100
+ );
94
101
  --_callout-border-color: oklch(from var(--color-info) l c h / 0.2);
95
102
  }
96
103
 
97
104
  :where([data-ui~="callout"][data-callout-variant="success"]) {
98
- --_callout-bg: oklch(from var(--color-success) l c h / 0.15);
99
- --_callout-text: color-mix(in xyz, var(--color-success), var(--color-foreground));
105
+ --_callout-bg: light-dark(
106
+ oklch(from var(--color-success) l c h / 0.1),
107
+ oklch(from var(--color-success) l c h / 0.2)
108
+ );
109
+ --_callout-text: light-dark(
110
+ oklch(from var(--color-success) min(l, 0.45) c h),
111
+ oklch(from var(--color-success) max(l, 0.82) c h)
112
+ );
100
113
  --_callout-border-color: oklch(from var(--color-success) l c h / 0.2);
101
114
  }
102
115
 
103
116
  :where([data-ui~="callout"][data-callout-variant="warning"]) {
104
- --_callout-bg: oklch(from var(--color-warning) l c h / 0.15);
105
- --_callout-text: color-mix(in xyz, var(--color-warning), var(--color-foreground));
117
+ --_callout-bg: light-dark(
118
+ oklch(from var(--color-warning) l c h / 0.1),
119
+ oklch(from var(--color-warning) l c h / 0.2)
120
+ );
121
+ --_callout-text: light-dark(
122
+ oklch(from var(--color-warning) min(l, 0.45) c h),
123
+ oklch(from var(--color-warning) max(l, 0.82) c h)
124
+ );
106
125
  --_callout-border-color: oklch(from var(--color-warning) l c h / 0.2);
107
126
  }
108
127
 
109
128
  :where([data-ui~="callout"][data-callout-variant="destructive"]) {
110
- --_callout-bg: var(--color-destructive);
111
- --_callout-text: var(--color-destructive-foreground);
112
- --_callout-border-color: var(--_callout-bg);
129
+ --_callout-bg: light-dark(
130
+ oklch(from var(--color-destructive) l c h / 0.1),
131
+ oklch(from var(--color-destructive) l c h / 0.2)
132
+ );
133
+ --_callout-text: light-dark(
134
+ oklch(from var(--color-destructive) min(l, 0.45) c h),
135
+ oklch(from var(--color-destructive) max(l, 0.82) c h)
136
+ );
137
+ --_callout-border-color: oklch(from var(--color-destructive) l c h / 0.2);
113
138
  }
114
139
  }