@repraze/kernelkit 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
Files changed (98) hide show
  1. package/dist/components/alert.d.ts.map +1 -1
  2. package/dist/components/alert.js +4 -6
  3. package/dist/components/alert.js.map +1 -1
  4. package/dist/components/avatar.js +1 -1
  5. package/dist/components/avatar.js.map +1 -1
  6. package/dist/components/badge.js +1 -1
  7. package/dist/components/badge.js.map +1 -1
  8. package/dist/components/breadcrumb.d.ts +1 -0
  9. package/dist/components/breadcrumb.d.ts.map +1 -1
  10. package/dist/components/breadcrumb.js +7 -6
  11. package/dist/components/breadcrumb.js.map +1 -1
  12. package/dist/components/callout.d.ts +8 -4
  13. package/dist/components/callout.d.ts.map +1 -1
  14. package/dist/components/callout.js +22 -12
  15. package/dist/components/callout.js.map +1 -1
  16. package/dist/components/chart.js +2 -2
  17. package/dist/components/chart.js.map +1 -1
  18. package/dist/components/code-block.js +1 -1
  19. package/dist/components/code-block.js.map +1 -1
  20. package/dist/components/command.js +1 -1
  21. package/dist/components/command.js.map +1 -1
  22. package/dist/components/data-table/elements/data-table-info-row.js +1 -1
  23. package/dist/components/data-table/elements/data-table-info-row.js.map +1 -1
  24. package/dist/components/dropdown-menu.d.ts +1 -1
  25. package/dist/components/dropdown-menu.d.ts.map +1 -1
  26. package/dist/components/dropdown-menu.js +1 -1
  27. package/dist/components/dropdown-menu.js.map +1 -1
  28. package/dist/components/kbd.d.ts.map +1 -1
  29. package/dist/components/kbd.js +2 -4
  30. package/dist/components/kbd.js.map +1 -1
  31. package/dist/components/message.js +2 -2
  32. package/dist/components/message.js.map +1 -1
  33. package/dist/components/meter.js +1 -1
  34. package/dist/components/meter.js.map +1 -1
  35. package/dist/components/progress.js +1 -1
  36. package/dist/components/progress.js.map +1 -1
  37. package/dist/components/questionnaire.js +1 -1
  38. package/dist/components/questionnaire.js.map +1 -1
  39. package/dist/components/search-trigger.d.ts +1 -1
  40. package/dist/components/search-trigger.d.ts.map +1 -1
  41. package/dist/components/search-trigger.js +2 -2
  42. package/dist/components/search-trigger.js.map +1 -1
  43. package/dist/components/section.js +1 -1
  44. package/dist/components/section.js.map +1 -1
  45. package/dist/components/sidebar.js +1 -1
  46. package/dist/components/sidebar.js.map +1 -1
  47. package/dist/components/site-footer.js +1 -1
  48. package/dist/components/site-footer.js.map +1 -1
  49. package/dist/components/site-header.js +2 -2
  50. package/dist/components/site-header.js.map +1 -1
  51. package/dist/components/stat.js +2 -2
  52. package/dist/components/stat.js.map +1 -1
  53. package/dist/components/tabs.d.ts +4 -2
  54. package/dist/components/tabs.d.ts.map +1 -1
  55. package/dist/components/tabs.js +13 -7
  56. package/dist/components/tabs.js.map +1 -1
  57. package/dist/components/theme-menu.js +1 -1
  58. package/dist/components/theme-menu.js.map +1 -1
  59. package/dist/components/toc.js +1 -1
  60. package/dist/components/toc.js.map +1 -1
  61. package/dist/components/tooltip.d.ts.map +1 -1
  62. package/dist/components/tooltip.js +5 -2
  63. package/dist/components/tooltip.js.map +1 -1
  64. package/dist/components/trace.js +1 -1
  65. package/dist/components/trace.js.map +1 -1
  66. package/dist/lib/recipes.d.ts +10 -0
  67. package/dist/lib/recipes.d.ts.map +1 -1
  68. package/dist/lib/recipes.js +12 -0
  69. package/dist/lib/recipes.js.map +1 -1
  70. package/package.json +1 -1
  71. package/src/components/alert.tsx +4 -6
  72. package/src/components/avatar.tsx +1 -1
  73. package/src/components/badge.tsx +1 -1
  74. package/src/components/breadcrumb.tsx +8 -7
  75. package/src/components/callout.tsx +27 -12
  76. package/src/components/chart.tsx +2 -2
  77. package/src/components/code-block.tsx +1 -1
  78. package/src/components/command.tsx +1 -1
  79. package/src/components/data-table/elements/data-table-info-row.tsx +1 -1
  80. package/src/components/dropdown-menu.tsx +1 -1
  81. package/src/components/kbd.tsx +2 -4
  82. package/src/components/message.tsx +2 -2
  83. package/src/components/meter.tsx +1 -1
  84. package/src/components/progress.tsx +1 -1
  85. package/src/components/questionnaire.tsx +1 -1
  86. package/src/components/search-trigger.tsx +2 -3
  87. package/src/components/section.tsx +1 -1
  88. package/src/components/sidebar.tsx +1 -1
  89. package/src/components/site-footer.tsx +1 -1
  90. package/src/components/site-header.tsx +2 -2
  91. package/src/components/stat.tsx +2 -2
  92. package/src/components/tabs.tsx +17 -9
  93. package/src/components/theme-menu.tsx +1 -1
  94. package/src/components/toc.tsx +1 -1
  95. package/src/components/tooltip.tsx +15 -3
  96. package/src/components/trace.tsx +1 -1
  97. package/src/lib/recipes.ts +14 -0
  98. package/src/styles/kernelkit.css +4 -0
@@ -33,4 +33,16 @@ export const heading = "font-heading font-medium tracking-tight";
33
33
  export const placeholderFill = "bg-foreground/10 hc:bg-border";
34
34
  /** Selected row (table, data table, code line, list): accent tint + 2px inset primary indicator (§6). */
35
35
  export const selectedRow = "bg-accent text-accent-foreground shadow-[inset_2px_0_0_var(--primary-text)]";
36
+ /**
37
+ * Status surface shared by Alert and Callout (§2): one `soft` / `outline` axis, same values in both.
38
+ * Expects a color variant (`--c`, `--c-tint`) on the same element. Neutral swaps the hue border for the
39
+ * plain border on a card surface (`statusSurfaceNeutral`).
40
+ */
41
+ export const statusSurface = {
42
+ // status tint behind foreground text; the hue lives in the border, icon and accents (TermiColor rule)
43
+ soft: "border-(--c)/30 bg-(--c-tint) hc:border-(--c)",
44
+ // no wash: card surface with a hue border, for dense layouts
45
+ outline: "border-(--c)/50 bg-card hc:border-(--c)",
46
+ };
47
+ export const statusSurfaceNeutral = "border-border bg-card hc:border-border";
36
48
  //# sourceMappingURL=recipes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/lib/recipes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wDAAwD;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,wFAAwF,CAAC;AAElH,2CAA2C;AAC3C,MAAM,CAAC,MAAM,WAAW,GACpB,6GAA6G,CAAC;AAElH,iGAAiG;AACjG,MAAM,CAAC,MAAM,YAAY,GACrB,kNAAkN,CAAC;AAEvN,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GACrB,4GAA4G,CAAC;AAEjH,oCAAoC;AACpC,MAAM,CAAC,MAAM,WAAW,GACpB,sWAAsW,CAAC;AAE3W;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GACrB,2JAA2J,CAAC;AAEhK,iFAAiF;AACjF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,YAAY,ieAAie,CAAC;AAEzgB,0CAA0C;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,uDAAuD,CAAC;AAEjF,wCAAwC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAEzD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,QAAQ,GACjB,uLAAuL,CAAC,CAAC,0CAA0C;AAEvO,4EAA4E;AAC5E,MAAM,CAAC,MAAM,OAAO,GAAG,yCAAyC,CAAC;AAEjE,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAE/D,yGAAyG;AACzG,MAAM,CAAC,MAAM,WAAW,GAAG,6EAA6E,CAAC"}
1
+ {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/lib/recipes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wDAAwD;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,wFAAwF,CAAC;AAElH,2CAA2C;AAC3C,MAAM,CAAC,MAAM,WAAW,GACpB,6GAA6G,CAAC;AAElH,iGAAiG;AACjG,MAAM,CAAC,MAAM,YAAY,GACrB,kNAAkN,CAAC;AAEvN,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GACrB,4GAA4G,CAAC;AAEjH,oCAAoC;AACpC,MAAM,CAAC,MAAM,WAAW,GACpB,sWAAsW,CAAC;AAE3W;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GACrB,2JAA2J,CAAC;AAEhK,iFAAiF;AACjF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,YAAY,ieAAie,CAAC;AAEzgB,0CAA0C;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,uDAAuD,CAAC;AAEjF,wCAAwC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAEzD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,QAAQ,GACjB,uLAAuL,CAAC,CAAC,0CAA0C;AAEvO,4EAA4E;AAC5E,MAAM,CAAC,MAAM,OAAO,GAAG,yCAAyC,CAAC;AAEjE,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAE/D,yGAAyG;AACzG,MAAM,CAAC,MAAM,WAAW,GAAG,6EAA6E,CAAC;AAEzG;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,sGAAsG;IACtG,IAAI,EAAE,+CAA+C;IACrD,6DAA6D;IAC7D,OAAO,EAAE,yCAAyC;CAC5C,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG,wCAAwC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repraze/kernelkit",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Modern, techy React components: every shadcn component on Base UI, Tailwind v4 and cva, themed by TermiColor.",
5
5
  "keywords": [
6
6
  "react",
@@ -3,7 +3,7 @@
3
3
  import {mergeProps} from "@base-ui/react/merge-props";
4
4
  import {useRender} from "@base-ui/react/use-render";
5
5
  import {type Color, colorVariants} from "@repraze/kernelkit/lib/color";
6
- import {heading} from "@repraze/kernelkit/lib/recipes";
6
+ import {heading, statusSurface, statusSurfaceNeutral} from "@repraze/kernelkit/lib/recipes";
7
7
  import {cva} from "class-variance-authority";
8
8
  import {cn} from "cn";
9
9
 
@@ -17,16 +17,14 @@ const alertCva = cva(
17
17
  variants: {
18
18
  color: colorVariants,
19
19
  variant: {
20
- // status tint behind foreground text; the hue lives in the border and the icon (§2 TermiColor rule)
21
- soft: "border-(--c)/30 bg-(--c-tint) text-foreground *:[svg]:text-(--c) hc:border-(--c)",
22
- // no wash: card surface with a hue border, for dense layouts
23
- outline: "border-(--c)/50 bg-card text-card-foreground *:[svg]:text-(--c) hc:border-(--c)",
20
+ soft: [statusSurface.soft, "text-foreground *:[svg]:text-(--c)"],
21
+ outline: [statusSurface.outline, "text-card-foreground *:[svg]:text-(--c)"],
24
22
  },
25
23
  },
26
24
  compoundVariants: [
27
25
  {
28
26
  color: "neutral",
29
- class: "border-border bg-card text-card-foreground *:[svg]:text-foreground hc:border-border",
27
+ class: [statusSurfaceNeutral, "text-card-foreground *:[svg]:text-foreground"],
30
28
  },
31
29
  ],
32
30
  defaultVariants: {variant: "soft", color: "neutral"},
@@ -100,7 +100,7 @@ function AvatarGroupCount({className, ...props}: React.ComponentProps<"div">) {
100
100
  <div
101
101
  data-slot="avatar-group-count"
102
102
  className={cn(
103
- "relative flex size-8 shrink-0 items-center justify-center rounded-pill bg-muted font-mono text-xs font-medium text-muted-foreground ring-2 ring-background [&>svg]:size-4",
103
+ "relative flex size-8 shrink-0 items-center justify-center rounded-pill bg-muted font-alt text-xs font-medium text-muted-foreground ring-2 ring-background [&>svg]:size-4",
104
104
  "group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=lg]/avatar-group:text-sm group-has-data-[size=lg]/avatar-group:[&>svg]:size-5",
105
105
  "group-has-data-[size=sm]/avatar-group:size-6 group-has-data-[size=sm]/avatar-group:text-[0.625rem] group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
106
106
  "group-has-data-[size=xs]/avatar-group:size-4 group-has-data-[size=xs]/avatar-group:text-[0.5rem] group-has-data-[size=xs]/avatar-group:[&>svg]:size-2",
@@ -16,7 +16,7 @@ import {cn} from "cn";
16
16
 
17
17
  const badgeCva = cva(
18
18
  [
19
- "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-pill border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow]",
19
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-pill border border-transparent px-2 py-0.5 font-alt text-xs font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow]",
20
20
  "has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:pointer-events-none [&>svg]:size-3!",
21
21
  focusRing,
22
22
  ],
@@ -4,7 +4,7 @@ import {mergeProps} from "@base-ui/react/merge-props";
4
4
  import {useRender} from "@base-ui/react/use-render";
5
5
  import {focusRing} from "@repraze/kernelkit/lib/recipes";
6
6
  import {cn} from "cn";
7
- import {ChevronRightIcon, MoreHorizontalIcon} from "lucide-react";
7
+ import {MoreHorizontalIcon} from "lucide-react";
8
8
  import * as React from "react";
9
9
 
10
10
  function Breadcrumb({className, ...props}: React.ComponentProps<"nav">) {
@@ -16,7 +16,7 @@ function BreadcrumbList({className, ...props}: React.ComponentProps<"ol">) {
16
16
  <ol
17
17
  data-slot="breadcrumb-list"
18
18
  className={cn(
19
- "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",
19
+ "flex flex-wrap items-center gap-1.5 font-alt text-xs wrap-break-word text-muted-foreground",
20
20
  className,
21
21
  )}
22
22
  {...props}
@@ -34,7 +34,7 @@ function BreadcrumbLink({className, render, ...props}: useRender.ComponentProps<
34
34
  props: mergeProps<"a">(
35
35
  {
36
36
  className: cn(
37
- "inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground [&_svg:not([class*='size-'])]:size-3.5",
37
+ "inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground [&_svg:not([class*='size-'])]:size-3",
38
38
  focusRing,
39
39
  className,
40
40
  ),
@@ -56,7 +56,7 @@ function BreadcrumbPage({className, ...props}: React.ComponentProps<"span">) {
56
56
  aria-disabled="true"
57
57
  aria-current="page"
58
58
  className={cn(
59
- "inline-flex items-center gap-1 font-medium text-foreground [&_svg:not([class*='size-'])]:size-3.5",
59
+ "inline-flex items-center gap-1 font-medium text-foreground [&_svg:not([class*='size-'])]:size-3",
60
60
  className,
61
61
  )}
62
62
  {...props}
@@ -64,16 +64,17 @@ function BreadcrumbPage({className, ...props}: React.ComponentProps<"span">) {
64
64
  );
65
65
  }
66
66
 
67
+ /** A muted `/` between levels (a path, in mono). Pass children to use another mark. */
67
68
  function BreadcrumbSeparator({children, className, ...props}: React.ComponentProps<"li">) {
68
69
  return (
69
70
  <li
70
71
  data-slot="breadcrumb-separator"
71
72
  role="presentation"
72
73
  aria-hidden="true"
73
- className={cn("text-muted-foreground [&>svg]:size-3.5", className)}
74
+ className={cn("text-muted-foreground select-none [&>svg]:size-3", className)}
74
75
  {...props}
75
76
  >
76
- {children ?? <ChevronRightIcon />}
77
+ {children ?? "/"}
77
78
  </li>
78
79
  );
79
80
  }
@@ -84,7 +85,7 @@ function BreadcrumbEllipsis({className, ...props}: React.ComponentProps<"span">)
84
85
  data-slot="breadcrumb-ellipsis"
85
86
  role="presentation"
86
87
  aria-hidden="true"
87
- className={cn("flex size-5 items-center justify-center rounded-sm [&>svg]:size-4", className)}
88
+ className={cn("flex size-5 items-center justify-center rounded-sm [&>svg]:size-3.5", className)}
88
89
  {...props}
89
90
  >
90
91
  <MoreHorizontalIcon />
@@ -2,44 +2,55 @@
2
2
 
3
3
  import {Collapsible, CollapsibleContent, CollapsibleTrigger} from "@repraze/kernelkit/components/collapsible";
4
4
  import {type Color, colorVariants} from "@repraze/kernelkit/lib/color";
5
- import {heading} from "@repraze/kernelkit/lib/recipes";
5
+ import {heading, statusSurface, statusSurfaceNeutral} from "@repraze/kernelkit/lib/recipes";
6
6
  import {cva} from "class-variance-authority";
7
7
  import {cn} from "cn";
8
8
  import {ChevronDownIcon} from "lucide-react";
9
9
  import type * as React from "react";
10
10
 
11
11
  /**
12
- * Long-form aside for docs and articles (note, tip, warning). A left accent bar carries the color;
13
- * the surface is a faint wash so body text stays foreground. For app status use Alert.
12
+ * Long-form aside for docs and articles (note, tip, warning). The color rides on the suite's row
13
+ * indicator (the sidebar and menu pill: 2px, rounded, flush left, inset from the top and bottom).
14
+ * Surfaces share Alert's `soft` / `outline` variants. For app status use Alert.
14
15
  */
15
16
  const calloutVariants = cva(
16
17
  [
17
- "group/callout relative overflow-hidden rounded-lg border border-(--c)/25 bg-(--c)/5 pl-1 text-sm text-foreground hc:border-(--c)",
18
- "before:absolute before:inset-y-0 before:left-0 before:w-1 before:bg-(--c)",
18
+ "group/callout relative overflow-hidden rounded-lg border text-sm text-foreground",
19
+ // header/body divider: half-strength hue, so it reads on the soft tint too (the hue itself in hc)
20
+ "[--callout-line:color-mix(in_oklab,var(--c)_50%,transparent)] hc:[--callout-line:var(--c)]",
21
+ // the row indicator (recipes rowIndicator), always on, in the callout's color, above the header's hover.
22
+ // The box has no padding of its own: header and body span the full width (pl-4 clears the pill).
23
+ "before:pointer-events-none before:absolute before:z-10 before:top-1.5 before:bottom-1.5 before:left-0 before:w-0.5 before:rounded-pill before:bg-(--c)",
19
24
  ],
20
25
  {
21
26
  variants: {
22
27
  color: colorVariants,
28
+ variant: statusSurface,
23
29
  },
24
30
  compoundVariants: [
25
31
  {
26
32
  color: "neutral",
27
- class: "border-border bg-card before:bg-muted-foreground hc:border-border",
33
+ class: [
34
+ statusSurfaceNeutral,
35
+ "before:bg-muted-foreground [--callout-line:var(--border)] hc:[--callout-line:var(--border)]",
36
+ ],
28
37
  },
29
38
  ],
30
- defaultVariants: {color: "neutral"},
39
+ defaultVariants: {color: "neutral", variant: "soft"},
31
40
  },
32
41
  );
33
42
 
34
43
  const calloutHeader =
35
- "flex min-h-8 w-full items-center gap-1.5 px-3 py-1.5 text-left text-xs text-(--c) group-data-[color=neutral]/callout:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5";
44
+ "flex min-h-8 w-full items-center gap-1.5 py-1.5 pr-3 pl-4 text-left text-xs text-(--c) group-data-[color=neutral]/callout:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5";
36
45
 
37
46
  const calloutBody =
38
- "px-3 py-2 text-sm leading-relaxed [&_a]:text-(--c) [&_a]:underline [&_a]:underline-offset-3 group-data-[color=neutral]/callout:[&_a]:text-foreground [&_p:not(:last-child)]:mb-2 border-(--c)/25 group-data-[color=neutral]/callout:border-border hc:border-(--c)";
47
+ "py-2 pr-3 pl-4 text-sm leading-relaxed [&_a]:text-(--c) [&_a]:underline [&_a]:underline-offset-3 group-data-[color=neutral]/callout:[&_a]:text-foreground [&_p:not(:last-child)]:mb-2 border-(--callout-line)";
39
48
 
40
49
  interface CalloutProps extends Omit<React.ComponentProps<"div">, "color" | "title"> {
41
- /** Status or hue of the bar, header and border. */
50
+ /** Status or hue of the indicator, header and border. */
42
51
  color?: Color | null;
52
+ /** `soft` (tinted, default) or `outline` (card surface, stronger border): the same axis as Alert. */
53
+ variant?: "soft" | "outline" | null;
43
54
  /** Leading icon element, e.g. `<InfoIcon />`. */
44
55
  icon?: React.ReactNode;
45
56
  /** Header label. The header renders when `title` or `icon` is set. */
@@ -53,6 +64,7 @@ interface CalloutProps extends Omit<React.ComponentProps<"div">, "color" | "titl
53
64
  function Callout({
54
65
  className,
55
66
  color,
67
+ variant,
56
68
  icon,
57
69
  title,
58
70
  collapsible = false,
@@ -61,6 +73,7 @@ function Callout({
61
73
  ...props
62
74
  }: CalloutProps) {
63
75
  const resolved = color ?? "neutral";
76
+ const surface = variant ?? "soft";
64
77
  const hasHeader = Boolean(title || icon);
65
78
  const headerContent = (
66
79
  <>
@@ -78,8 +91,9 @@ function Callout({
78
91
  <Collapsible
79
92
  data-slot="callout"
80
93
  data-color={resolved}
94
+ data-variant={surface}
81
95
  defaultOpen={!defaultCollapsed}
82
- className={cn(calloutVariants({color: resolved}), className)}
96
+ className={cn(calloutVariants({color: resolved, variant: surface}), className)}
83
97
  {...props}
84
98
  >
85
99
  <CollapsibleTrigger
@@ -110,7 +124,8 @@ function Callout({
110
124
  <div
111
125
  data-slot="callout"
112
126
  data-color={resolved}
113
- className={cn(calloutVariants({color: resolved}), className)}
127
+ data-variant={surface}
128
+ className={cn(calloutVariants({color: resolved, variant: surface}), className)}
114
129
  {...props}
115
130
  >
116
131
  {hasHeader ? (
@@ -21,7 +21,7 @@ const rechartsDefaults = [
21
21
 
22
22
  const chartContainerClass = [
23
23
  "flex aspect-video justify-center text-xs",
24
- "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick_text]:font-mono",
24
+ "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick_text]:font-alt",
25
25
  "[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-hover",
26
26
  "[&_.recharts-radial-bar-background-sector]:fill-muted",
27
27
  "[&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-surface]:outline-hidden",
@@ -230,7 +230,7 @@ function ChartTooltipContent({
230
230
  </span>
231
231
  </div>
232
232
  {item.value != null && (
233
- <span className="font-mono font-medium text-foreground tabular-nums">
233
+ <span className="font-alt font-medium text-foreground tabular-nums">
234
234
  {typeof item.value === "number"
235
235
  ? item.value.toLocaleString()
236
236
  : String(item.value)}
@@ -65,7 +65,7 @@ function CodeBlockTitle({className, ...props}: React.ComponentProps<"div">) {
65
65
  <div
66
66
  data-slot="code-block-title"
67
67
  className={cn(
68
- "min-w-0 truncate font-mono text-xs font-medium text-foreground group-data-[variant=danger]/code-block:text-danger [&_svg]:pointer-events-none [&_svg]:inline-block [&_svg]:align-middle [&_svg:not([class*='size-'])]:size-3.5 *:[svg]:me-1.5",
68
+ "min-w-0 truncate font-alt text-xs font-medium text-foreground group-data-[variant=danger]/code-block:text-danger [&_svg]:pointer-events-none [&_svg]:inline-block [&_svg]:align-middle [&_svg:not([class*='size-'])]:size-3.5 *:[svg]:me-1.5",
69
69
  className,
70
70
  )}
71
71
  {...props}
@@ -151,7 +151,7 @@ function CommandShortcut({className, ...props}: React.ComponentProps<"span">) {
151
151
  <span
152
152
  data-slot="command-shortcut"
153
153
  className={cn(
154
- "ml-auto pl-4 font-mono text-xs text-muted-foreground group-data-[selected=true]/command-item:text-accent-foreground",
154
+ "ml-auto pl-4 font-alt text-xs text-muted-foreground group-data-[selected=true]/command-item:text-accent-foreground",
155
155
  className,
156
156
  )}
157
157
  {...props}
@@ -19,7 +19,7 @@ export function DataTableInfoRow<T>({className, view, ...props}: DataTableInfoRo
19
19
  const infoColumn: DataTableViewColumn<undefined> = convertColumn({
20
20
  id: "info",
21
21
  cell: () => (
22
- <span className="font-mono tabular-nums">
22
+ <span className="font-alt tabular-nums">
23
23
  {rowCount.toLocaleString()} rows · {columnCount} columns
24
24
  </span>
25
25
  ),
@@ -35,7 +35,7 @@ function resolveItemVariant(variant: MenuItemVariant | undefined) {
35
35
 
36
36
  /** Keyboard shortcut hint at the end of a menu row. */
37
37
  const menuShortcutClass =
38
- "ml-auto pl-4 font-mono text-xs text-muted-foreground group-data-highlighted/menu-item:text-accent-foreground";
38
+ "ml-auto pl-4 font-alt text-xs text-muted-foreground group-data-highlighted/menu-item:text-accent-foreground";
39
39
 
40
40
  /** Right-side indicator of checkbox and radio rows. */
41
41
  const menuIndicatorClass = "pointer-events-none absolute right-2 flex size-4 items-center justify-center";
@@ -7,9 +7,7 @@ import type * as React from "react";
7
7
  /** A keycap: mono, `rounded-sm`, a thicker bottom border for the key look (readable in hc). */
8
8
  const kbdVariants = cva(
9
9
  [
10
- "pointer-events-none inline-flex w-fit items-center justify-center gap-1 rounded-sm border border-b-2 border-border bg-muted font-mono font-medium text-muted-foreground select-none [&_svg]:shrink-0",
11
- // inside a tooltip (inverted surface) the key becomes a translucent chip
12
- "in-data-[slot=tooltip-content]:border-transparent in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10",
10
+ "pointer-events-none inline-flex w-fit items-center justify-center gap-1 rounded-sm border border-b-2 border-border bg-muted font-alt font-medium text-muted-foreground select-none [&_svg]:shrink-0",
13
11
  ],
14
12
  {
15
13
  variants: {
@@ -30,7 +28,7 @@ function KbdGroup({className, ...props}: React.ComponentProps<"kbd">) {
30
28
  return (
31
29
  <kbd
32
30
  data-slot="kbd-group"
33
- className={cn("inline-flex items-center gap-1 font-mono text-xs text-muted-foreground", className)}
31
+ className={cn("inline-flex items-center gap-1 font-alt text-xs text-muted-foreground", className)}
34
32
  {...props}
35
33
  />
36
34
  );
@@ -65,7 +65,7 @@ function MessageHeader({className, ...props}: React.ComponentProps<"div">) {
65
65
  <div
66
66
  data-slot="message-header"
67
67
  className={cn(
68
- "flex max-w-full min-w-0 items-center gap-1.5 px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_time]:font-mono [&_time]:font-normal [&_time]:tabular-nums",
68
+ "flex max-w-full min-w-0 items-center gap-1.5 px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_time]:font-alt [&_time]:font-normal [&_time]:tabular-nums",
69
69
  className,
70
70
  )}
71
71
  {...props}
@@ -78,7 +78,7 @@ function MessageFooter({className, ...props}: React.ComponentProps<"div">) {
78
78
  <div
79
79
  data-slot="message-footer"
80
80
  className={cn(
81
- "flex max-w-full min-w-0 items-center gap-1 px-3 text-xs text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_time]:font-mono [&_time]:tabular-nums",
81
+ "flex max-w-full min-w-0 items-center gap-1 px-3 text-xs text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_time]:font-alt [&_time]:tabular-nums",
82
82
  className,
83
83
  )}
84
84
  {...props}
@@ -59,7 +59,7 @@ function MeterValue({className, ...props}: MeterPrimitive.Value.Props) {
59
59
  return (
60
60
  <MeterPrimitive.Value
61
61
  data-slot="meter-value"
62
- className={cn("ms-auto font-mono text-xs text-muted-foreground tabular-nums", className)}
62
+ className={cn("ms-auto font-alt text-xs text-muted-foreground tabular-nums", className)}
63
63
  {...props}
64
64
  />
65
65
  );
@@ -86,7 +86,7 @@ function ProgressValue({className, ...props}: ProgressPrimitive.Value.Props) {
86
86
  return (
87
87
  <ProgressPrimitive.Value
88
88
  data-slot="progress-value"
89
- className={cn("ms-auto font-mono text-xs text-muted-foreground tabular-nums", className)}
89
+ className={cn("ms-auto font-alt text-xs text-muted-foreground tabular-nums", className)}
90
90
  {...props}
91
91
  />
92
92
  );
@@ -122,7 +122,7 @@ function QuestionnaireChoice({
122
122
  </QuestionnairePrimitive.ChoiceLabel>
123
123
  <QuestionnairePrimitive.ChoiceShortcut
124
124
  data-slot="questionnaire-choice-shortcut"
125
- className="pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-sm border border-border bg-muted font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
125
+ className="pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-sm border border-border bg-muted font-alt text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
126
126
  />
127
127
  </QuestionnairePrimitive.Choice>
128
128
  );
@@ -51,16 +51,15 @@ interface SearchTriggerProps extends React.ComponentProps<typeof Button> {
51
51
  children?: React.ReactNode;
52
52
  }
53
53
 
54
- /** Header search button: icon, placeholder, OS-aware shortcut. Open your dialog in `onClick`. */
54
+ /** Header search button: icon, placeholder, OS-aware shortcut. Same 32px height as the header's icon buttons. Open your dialog in `onClick`. */
55
55
  function SearchTrigger({children = "Search…", className, ...props}: SearchTriggerProps) {
56
56
  const mod = useModKey();
57
57
  return (
58
58
  <Button
59
59
  variant="outline"
60
- size="sm"
61
60
  aria-label="Search"
62
61
  data-slot="search-trigger"
63
- className={cn("w-9 justify-start px-0 text-muted-foreground sm:w-48 sm:px-2.5 md:w-56", className)}
62
+ className={cn("w-8 justify-start px-0 text-muted-foreground sm:w-48 sm:px-2.5 md:w-56", className)}
64
63
  {...props}
65
64
  >
66
65
  <SearchIcon data-icon="inline-start" className="mx-auto sm:mx-0" />
@@ -50,7 +50,7 @@ function SectionEyebrow({className, render, ...props}: useRender.ComponentProps<
50
50
  return useRender({
51
51
  defaultTagName: "div",
52
52
  props: mergeProps<"div">(
53
- {className: cn("font-mono text-xs font-medium text-primary-text uppercase sm:col-start-1", className)},
53
+ {className: cn("font-alt text-xs font-medium text-primary-text uppercase sm:col-start-1", className)},
54
54
  props,
55
55
  ),
56
56
  render,
@@ -592,7 +592,7 @@ function SidebarMenuBadge({className, ...props}: React.ComponentProps<"div">) {
592
592
  data-slot="sidebar-menu-badge"
593
593
  data-sidebar="menu-badge"
594
594
  className={cn(
595
- "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-sm px-1 font-mono text-xs font-medium text-muted-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
595
+ "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-sm px-1 font-alt text-xs font-medium text-muted-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
596
596
  className,
597
597
  )}
598
598
  {...props}
@@ -22,7 +22,7 @@ import type * as React from "react";
22
22
  function SiteFooter({className, children, ...props}: React.ComponentProps<"footer">) {
23
23
  return (
24
24
  <footer data-slot="site-footer" className={cn("border-t border-border", className)} {...props}>
25
- <div className="mx-auto flex w-full max-w-(--kk-site-width) flex-col gap-3 px-4 py-6 font-mono text-xs text-muted-foreground sm:flex-row sm:items-center sm:justify-between md:px-6">
25
+ <div className="mx-auto flex w-full max-w-(--kk-site-width) flex-col gap-3 px-4 py-6 font-alt text-xs text-muted-foreground sm:flex-row sm:items-center sm:justify-between md:px-6">
26
26
  {children}
27
27
  </div>
28
28
  </footer>
@@ -66,7 +66,7 @@ function SiteHeaderBrand({className, render, ...props}: useRender.ComponentProps
66
66
  props: mergeProps<"a">(
67
67
  {
68
68
  className: cn(
69
- "flex shrink-0 items-center gap-2 rounded-md font-mono text-sm font-semibold tracking-tight",
69
+ "flex shrink-0 items-center gap-2 rounded-md font-alt text-sm font-semibold tracking-tight",
70
70
  focusRing,
71
71
  "[&_svg]:shrink-0",
72
72
  className,
@@ -105,7 +105,7 @@ function SiteNavLink({className, render, ...props}: useRender.ComponentProps<"a"
105
105
  props: mergeProps<"a">(
106
106
  {
107
107
  className: cn(
108
- "relative flex h-8 items-center rounded-md px-2.5 font-mono text-sm text-muted-foreground transition-colors hover:bg-hover hover:text-foreground motion-reduce:transition-none",
108
+ "relative flex h-8 items-center rounded-md px-2.5 font-alt text-sm text-muted-foreground transition-colors hover:bg-hover hover:text-foreground motion-reduce:transition-none",
109
109
  focusRing,
110
110
  // indicator: left edge by default, bottom edge inside SiteNav
111
111
  "after:pointer-events-none after:absolute after:top-1.5 after:bottom-1.5 after:left-0 after:w-0.5 after:rounded-pill after:bg-primary-text after:opacity-0",
@@ -51,7 +51,7 @@ function StatValue({className, ...props}: React.ComponentProps<"div">) {
51
51
  <div
52
52
  data-slot="stat-value"
53
53
  className={cn(
54
- "col-start-1 flex items-baseline gap-1 font-mono text-2xl leading-tight font-medium tracking-tight text-foreground tabular-nums",
54
+ "col-start-1 flex items-baseline gap-1 font-alt text-2xl leading-tight font-medium tracking-tight text-foreground tabular-nums",
55
55
  "group-data-[size=sm]/stat:text-xl group-data-[size=lg]/stat:text-3xl",
56
56
  className,
57
57
  )}
@@ -74,7 +74,7 @@ function StatUnit({className, ...props}: React.ComponentProps<"span">) {
74
74
  type StatTrend = "up" | "down" | "flat";
75
75
 
76
76
  const statDeltaVariants = cva(
77
- "col-start-1 inline-flex w-fit items-center gap-1 font-mono text-xs font-medium tabular-nums [&_svg]:size-3.5 [&_svg]:shrink-0",
77
+ "col-start-1 inline-flex w-fit items-center gap-1 font-alt text-xs font-medium tabular-nums [&_svg]:size-3.5 [&_svg]:shrink-0",
78
78
  {
79
79
  variants: {
80
80
  intent: {
@@ -18,8 +18,10 @@ function Tabs({className, orientation = "horizontal", ...props}: TabsPrimitive.R
18
18
  }
19
19
 
20
20
  /**
21
- * `default`: a tray with the active tab raised on a bordered surface (the border keeps it readable in
22
- * high contrast). `line`: a baseline with a 2px primary indicator under the active tab.
21
+ * `default`: a track with the active tab tinted with the accent and marked by a 2px pill along its bottom
22
+ * edge, like a current nav link. Track border + padding = `--radius-xs` (lg − md), so the `rounded-md` chips
23
+ * stay concentric with the `rounded-lg` track at every radius. `line`: a baseline with the same 2px pill
24
+ * on it under the active tab.
23
25
  * Sizes follow the control table (GUIDELINES §4) so a tabs list lines up with buttons and inputs.
24
26
  */
25
27
  const tabsListVariants = cva(
@@ -27,7 +29,8 @@ const tabsListVariants = cva(
27
29
  {
28
30
  variants: {
29
31
  variant: {
30
- default: "rounded-lg border border-transparent bg-muted p-[3px] data-vertical:gap-0.5 hc:border-border",
32
+ default:
33
+ "rounded-lg border border-transparent bg-muted p-[max(0px,calc(var(--radius-xs)-1px))] data-vertical:gap-0.5 hc:border-border",
31
34
  line: "gap-1 rounded-none border-border bg-transparent data-horizontal:border-b data-horizontal:py-[3px] data-vertical:border-r data-vertical:px-[3px]",
32
35
  },
33
36
  size: {
@@ -73,13 +76,18 @@ const tabsTriggerClass = cn(
73
76
  "group-data-[size=lg]/tabs-list:gap-2 group-data-[size=lg]/tabs-list:px-2.5",
74
77
  // vertical: full-width rows
75
78
  "data-vertical:w-full data-vertical:flex-none data-vertical:justify-start data-vertical:py-1",
76
- // default: raised, bordered surface + foreground text (readable without the shade in hc)
79
+ // active: foreground text and a 2px primary-text pill; default adds the accent tint (nav link look)
77
80
  "data-active:text-foreground",
78
- "group-data-[variant=default]/tabs-list:data-active:border-input group-data-[variant=default]/tabs-list:data-active:bg-background group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=default]/tabs-list:data-active:shadow-(color:--shadow-color) dark:group-data-[variant=default]/tabs-list:data-active:bg-input/30",
79
- // line: 2px primary indicator over the list's baseline
80
- "after:pointer-events-none after:absolute after:rounded-pill after:bg-primary-text after:opacity-0 after:transition-opacity group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
81
- "data-horizontal:after:inset-x-1 data-horizontal:after:-bottom-1 data-horizontal:after:h-0.5",
82
- "data-vertical:after:inset-y-1 data-vertical:after:-right-1 data-vertical:after:w-0.5",
81
+ "group-data-[variant=default]/tabs-list:data-active:bg-accent group-data-[variant=default]/tabs-list:data-active:text-accent-foreground",
82
+ "after:pointer-events-none after:absolute after:rounded-pill after:bg-primary-text after:opacity-0 after:transition-opacity data-active:after:opacity-100",
83
+ // default: the pill sits inside the chip on its bottom edge (vertical: its start edge, like sidebar rows)
84
+ "group-data-[variant=default]/tabs-list:data-horizontal:after:inset-x-2 group-data-[variant=default]/tabs-list:data-horizontal:after:-bottom-px group-data-[variant=default]/tabs-list:data-horizontal:after:h-0.5",
85
+ // the pill spans the label: inset = the trigger's padding per size
86
+ "group-data-[size=sm]/tabs-list:group-data-[variant=default]/tabs-list:data-horizontal:after:inset-x-1.5 group-data-[size=lg]/tabs-list:group-data-[variant=default]/tabs-list:data-horizontal:after:inset-x-2.5",
87
+ "group-data-[variant=default]/tabs-list:data-vertical:after:inset-y-1.5 group-data-[variant=default]/tabs-list:data-vertical:after:-left-px group-data-[variant=default]/tabs-list:data-vertical:after:w-0.5",
88
+ // line: the pill sits on the list's baseline
89
+ "group-data-[variant=line]/tabs-list:data-horizontal:after:inset-x-1 group-data-[variant=line]/tabs-list:data-horizontal:after:-bottom-1 group-data-[variant=line]/tabs-list:data-horizontal:after:h-0.5",
90
+ "group-data-[variant=line]/tabs-list:data-vertical:after:inset-y-1 group-data-[variant=line]/tabs-list:data-vertical:after:-right-1 group-data-[variant=line]/tabs-list:data-vertical:after:w-0.5",
83
91
  );
84
92
 
85
93
  function TabsTrigger({className, ...props}: TabsPrimitive.Tab.Props) {
@@ -116,7 +116,7 @@ function ThemeRadiusPicker({className}: {className?: string}) {
116
116
  className={cn("w-full", className)}
117
117
  >
118
118
  {RADII.map((radius) => (
119
- <ToggleGroupItem key={radius} value={radius} className="flex-1 font-mono">
119
+ <ToggleGroupItem key={radius} value={radius} className="flex-1 font-alt">
120
120
  {radius}
121
121
  </ToggleGroupItem>
122
122
  ))}
@@ -35,7 +35,7 @@ function TocTitle({className, render, ...props}: useRender.ComponentProps<"p">)
35
35
  return useRender({
36
36
  defaultTagName: "p",
37
37
  props: mergeProps<"p">(
38
- {className: cn("font-mono text-xs font-medium text-muted-foreground uppercase", className)},
38
+ {className: cn("font-alt text-xs font-medium text-muted-foreground uppercase", className)},
39
39
  props,
40
40
  ),
41
41
  render,
@@ -39,15 +39,27 @@ function TooltipContent({
39
39
  <TooltipPrimitive.Popup
40
40
  data-slot="tooltip-content"
41
41
  className={cn(
42
- // Inverted chip: max contrast against any surface, so it reads in high contrast too.
42
+ // Popover-coloured chip: the popup surface and border, small mono text.
43
43
  popupMotion,
44
- "z-50 inline-flex min-h-6 w-fit max-w-xs items-center gap-1.5 rounded-md bg-foreground px-2 py-1 text-xs text-background shadow-md shadow-(color:--shadow-color) has-data-[slot=kbd]:pr-1 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:h-4 **:data-[slot=kbd]:min-w-4 **:data-[slot=kbd]:rounded-xs",
44
+ "z-50 inline-flex min-h-6 w-fit max-w-xs items-center gap-1.5 rounded-md border border-border bg-popover px-2 py-1 font-alt text-xs text-popover-foreground shadow-md shadow-(color:--shadow-color) has-data-[slot=kbd]:pr-1 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:h-4 **:data-[slot=kbd]:min-w-4 **:data-[slot=kbd]:rounded-xs",
45
45
  className,
46
46
  )}
47
47
  {...props}
48
48
  >
49
49
  {children}
50
- <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
50
+ <TooltipPrimitive.Arrow
51
+ className={cn(
52
+ // A rotated square in the popup colours; the border sits on the two edges that face out,
53
+ // centred on the popup's border line so the outline runs on without a seam.
54
+ "z-50 size-2.5 rotate-45 rounded-xs border-border bg-popover",
55
+ "data-[side=top]:-bottom-1.25 data-[side=top]:border-r data-[side=top]:border-b",
56
+ "data-[side=bottom]:-top-1.25 data-[side=bottom]:border-t data-[side=bottom]:border-l",
57
+ "data-[side=left]:top-1/2! data-[side=left]:-right-1.25 data-[side=left]:-translate-y-1/2 data-[side=left]:border-t data-[side=left]:border-r",
58
+ "data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1.25 data-[side=inline-start]:-translate-y-1/2 data-[side=inline-start]:border-t data-[side=inline-start]:border-r",
59
+ "data-[side=right]:top-1/2! data-[side=right]:-left-1.25 data-[side=right]:-translate-y-1/2 data-[side=right]:border-b data-[side=right]:border-l",
60
+ "data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1.25 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-end]:border-b data-[side=inline-end]:border-l",
61
+ )}
62
+ />
51
63
  </TooltipPrimitive.Popup>
52
64
  </TooltipPrimitive.Positioner>
53
65
  </TooltipPrimitive.Portal>
@@ -67,7 +67,7 @@ function TraceDescription({className, ...props}: React.ComponentProps<"span">) {
67
67
  return (
68
68
  <span
69
69
  data-slot="trace-description"
70
- className={cn("shrink-0 font-mono text-xs text-muted-foreground tabular-nums", className)}
70
+ className={cn("shrink-0 font-alt text-xs text-muted-foreground tabular-nums", className)}
71
71
  {...props}
72
72
  />
73
73
  );
@@ -52,3 +52,17 @@ export const placeholderFill = "bg-foreground/10 hc:bg-border";
52
52
 
53
53
  /** Selected row (table, data table, code line, list): accent tint + 2px inset primary indicator (§6). */
54
54
  export const selectedRow = "bg-accent text-accent-foreground shadow-[inset_2px_0_0_var(--primary-text)]";
55
+
56
+ /**
57
+ * Status surface shared by Alert and Callout (§2): one `soft` / `outline` axis, same values in both.
58
+ * Expects a color variant (`--c`, `--c-tint`) on the same element. Neutral swaps the hue border for the
59
+ * plain border on a card surface (`statusSurfaceNeutral`).
60
+ */
61
+ export const statusSurface = {
62
+ // status tint behind foreground text; the hue lives in the border, icon and accents (TermiColor rule)
63
+ soft: "border-(--c)/30 bg-(--c-tint) hc:border-(--c)",
64
+ // no wash: card surface with a hue border, for dense layouts
65
+ outline: "border-(--c)/50 bg-card hc:border-(--c)",
66
+ } as const;
67
+
68
+ export const statusSurfaceNeutral = "border-border bg-card hc:border-border";