@kungal/ui-tokens 0.2.5 → 0.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tokens.css +17 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "0.2.5",
3
+ "version": "0.3.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/tokens.css CHANGED
@@ -316,22 +316,32 @@
316
316
  * NOT cover the --z-* namespace (only --color / --radius / --spacing /
317
317
  * --font etc.), so `class="z-kun-popover"` silently no-ops without these
318
318
  * @utility blocks. They are the load-bearing piece of the z-index system,
319
- * not the @theme declarations above. The value derefs the @theme variable
320
- * so a consumer's `:root { --z-kun-modal: ... }` override propagates. */
319
+ * not the @theme declarations above.
320
+ *
321
+ * Each value derefs the @theme variable (so a consumer's
322
+ * `:root { --z-kun-modal: ... }` override still propagates) WITH a literal
323
+ * fallback. The fallback is load-bearing, NOT cosmetic: Tailwind v4 only emits
324
+ * a @theme variable to :root when its tree-shaker considers it "used", and a
325
+ * custom @utility referencing the var does not reliably count as usage across
326
+ * consumer builds/versions. When it's dropped, `z-index: var(--z-kun-popover)`
327
+ * resolves to var(<undefined>) → no z-index → the layer stacks at `auto` and
328
+ * gets covered by any positioned element (carousels, sticky headers, …). The
329
+ * fallback guarantees a real z-index even when the variable never reaches
330
+ * :root. Keep the fallbacks in sync with the @theme declarations above. */
321
331
  @utility z-kun-sticky {
322
- z-index: var(--z-kun-sticky);
332
+ z-index: var(--z-kun-sticky, 30);
323
333
  }
324
334
  @utility z-kun-modal {
325
- z-index: var(--z-kun-modal);
335
+ z-index: var(--z-kun-modal, 9000);
326
336
  }
327
337
  @utility z-kun-popover {
328
- z-index: var(--z-kun-popover);
338
+ z-index: var(--z-kun-popover, 9300);
329
339
  }
330
340
  @utility z-kun-alert {
331
- z-index: var(--z-kun-alert);
341
+ z-index: var(--z-kun-alert, 9700);
332
342
  }
333
343
  @utility z-kun-message {
334
- z-index: var(--z-kun-message);
344
+ z-index: var(--z-kun-message, 9999);
335
345
  }
336
346
 
337
347
  @layer base {