@kungal/ui-tokens 0.17.1 → 0.18.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "0.17.1",
3
+ "version": "0.18.0",
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,51 @@
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
+
392
+ /* Motion tokens, mirrored into a plain :root so they ALWAYS reach the document.
393
+ *
394
+ * Exact same tree-shaking trap as the z-index fallbacks above: Tailwind v4 only
395
+ * emits an @theme variable to :root when its scanner sees it "used", and these
396
+ * are read ONLY via `var(--kun-dur-base)` / `var(--ease-kun-out)` inside
397
+ * component <style> blocks and inline styles — which Tailwind never scans. The
398
+ * duration tokens have no utility namespace at all, so @theme drops every one
399
+ * of them in a normal consumer build; the component transitions then resolve to
400
+ * `var(<undefined>)`, the whole `transition` shorthand is invalidated, and the
401
+ * Modal / Drawer / FadeCard / Tab-indicator / toast animations silently vanish.
402
+ * This plain :root (not @theme → never tree-shaken) guarantees a real value in
403
+ * every build. The easings are ALSO kept in @theme above — that is what
404
+ * generates the `ease-kun-*` utilities — so keep the two lists in sync. */
405
+ :root {
406
+ --ease-kun-standard: cubic-bezier(0.2, 0, 0, 1);
407
+ --ease-kun-out: cubic-bezier(0, 0, 0, 1);
408
+ --ease-kun-in: cubic-bezier(0.3, 0, 1, 1);
409
+ --ease-kun-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
410
+ --kun-dur-fast: 150ms;
411
+ --kun-dur-base: 250ms;
412
+ --kun-dur-slow: 350ms;
413
+ --kun-dur-exit: 180ms;
414
+ }
415
+
371
416
  @layer base {
372
417
  :root {
373
418
  /* Content color */