@kungal/ui-tokens 0.17.2 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "0.17.2",
3
+ "version": "0.18.1",
4
4
  "description": "KunUI design tokens — framework-agnostic Tailwind v4 theme (semantic colors, radius, z-index, animations).",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/base.css CHANGED
@@ -17,7 +17,9 @@
17
17
  ::before,
18
18
  ::backdrop,
19
19
  ::file-selector-button {
20
- border-color: var(--color-default-200, currentColor);
20
+ /* Global default border color = the canonical neutral border token, so a
21
+ * bare `border` (no explicit color) matches `border-kun` everywhere. */
22
+ border-color: var(--color-kun-border, var(--color-default-200, currentColor));
21
23
  color: var(--color-foreground);
22
24
  }
23
25
 
package/src/tokens.css CHANGED
@@ -368,6 +368,27 @@
368
368
  z-index: var(--z-kun-message, 9999);
369
369
  }
370
370
 
371
+ /* Canonical neutral border — the SINGLE source of truth for every structural
372
+ * hairline (inputs, cards, dividers, popovers, tabs, tables…). Defaults to the
373
+ * `default-200` step, which already flips light↔dark (light ≈ L90% zinc-200,
374
+ * dark ≈ L26% zinc-700), so one utility stays consistent across modes AND
375
+ * components — no more per-component `border-default/20` + `dark:border-…`
376
+ * juggling that only coincidentally matched. Retheme every border at once by
377
+ * overriding `--color-kun-border` (set it in `.kun-dark-mode` too if you give
378
+ * it a fixed, non-flipping value). Plain :root + literal fallback on the
379
+ * utility → never tree-shaken (same reasoning as the z-index / motion blocks).
380
+ *
381
+ * `border-kun` sets border-COLOR only; pair it with a width class
382
+ * (`border` / `border-b` / `border-t` / `border-l`). Conditional `border-danger-*`
383
+ * / `focus:border-*` still win (apply `border-kun` only in the non-error branch
384
+ * so two plain border-color utilities never fight over source order). */
385
+ :root {
386
+ --color-kun-border: hsl(var(--default-200));
387
+ }
388
+ @utility border-kun {
389
+ border-color: var(--color-kun-border, hsl(var(--default-200)));
390
+ }
391
+
371
392
  /* Motion tokens, mirrored into a plain :root so they ALWAYS reach the document.
372
393
  *
373
394
  * Exact same tree-shaking trap as the z-index fallbacks above: Tailwind v4 only