@kungal/ui-tokens 1.9.1 → 1.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @kungal/ui-tokens
2
2
 
3
+ ## 1.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0b42fd3: perf: stop shipping backdrop-filter on every surface (mobile scroll jank)
8
+
9
+ KunCard shipped `backdrop-filter: blur(var(--kun-background-blur))` on EVERY card —
10
+ and the default blur was `0px` over an opaque surface, so it did nothing visually
11
+ while still promoting each card to a compositing layer and running the backdrop
12
+ pipeline. `backdrop-filter: blur()` is the #1 cause of janky scrolling on mobile
13
+ (a 120Hz phone can drop to ~30–60Hz). With many cards per page the layers piled up.
14
+
15
+ - KunCard / KunModal now emit `backdrop-filter` only via the new opt-in
16
+ `kun-backdrop` utility, which is `none` by default (free — no layer, no blur pass).
17
+ - New token `--kun-backdrop-filter` (default `none`) **replaces `--kun-background-blur`**.
18
+ A glass site opts in for every raised surface at once:
19
+ `:root { --kun-surface-opacity: 0.7; --kun-backdrop-filter: blur(12px); }`
20
+
21
+ BREAKING (glass only): if you set `--kun-background-blur: 12px`, switch to
22
+ `--kun-backdrop-filter: blur(12px)`. Sites that never enabled glass are unaffected
23
+ (and get smoother scrolling for free).
24
+
25
+ ## 1.9.2
26
+
27
+ ### Patch Changes
28
+
29
+ - b673935: fix(tokens,vue): softer neutral hairline + bordered cards by default
30
+
31
+ - KunCard shows a faint hairline border by default again (it was borderless during
32
+ the filled-surface work) — with the lighter page and softer shadows, a hairline
33
+ delineates the card better than shadow alone.
34
+ - The shared neutral border token (`--color-kun-border` / the `border-kun` utility)
35
+ drops from `default-200` to `default-100` — a lighter hairline that delineates a
36
+ surface without framing it. Every consumer softens at once: inputs, textarea,
37
+ select & other controls, accordion, tabs, dividers, drawer rules, etc. Error
38
+ borders (danger) and focus rings are unaffected.
39
+
3
40
  ## 1.9.1
4
41
 
5
42
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
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
@@ -19,7 +19,7 @@
19
19
  ::file-selector-button {
20
20
  /* Global default border color = the canonical neutral border token, so a
21
21
  * bare `border` (no explicit color) matches `border-kun` everywhere. */
22
- border-color: var(--color-kun-border, var(--color-default-200, currentColor));
22
+ border-color: var(--color-kun-border, var(--color-default-100, currentColor));
23
23
  color: var(--color-foreground);
24
24
  }
25
25
 
package/src/tokens.css CHANGED
@@ -35,16 +35,26 @@
35
35
  * inputs, modal, drawer. Default 1 = fully opaque (the clean elevation look).
36
36
  * A site with a background image (e.g. a galgame page) can make every surface
37
37
  * frosted at once by lowering this and adding a blur, with NO component changes:
38
- * :root { --kun-surface-opacity: 0.7; --kun-background-blur: 12px; }
39
- * (Components don't ship a backdrop-blur on every surface, so set the blur too
40
- * if you want true frosted glass rather than plain see-through.) */
38
+ * :root { --kun-surface-opacity: 0.7; --kun-backdrop-filter: blur(12px); }
39
+ * (Surfaces ship `backdrop-filter: none` by default set --kun-backdrop-filter
40
+ * to opt into true frosted glass rather than plain see-through.) */
41
41
  --kun-surface-opacity: 1;
42
42
 
43
- /* Backdrop blur strength for glass surfaces (Card / Modal / sticky
44
- * topbar). 0 = no blur. Referenced as
45
- * `backdrop-blur-[var(--kun-background-blur)]` by those components.
46
- * Apps may override (e.g. a user-adjustable glass-blur setting). */
47
- --kun-background-blur: 0px;
43
+ /* Backdrop-filter for raised glass surfaces (Card / Modal), consumed via the
44
+ * `kun-backdrop` utility. Default `none` so NO backdrop-filter is emitted:
45
+ * backdrop-filter: blur() is the #1 cause of mobile scroll jank, and at the
46
+ * default opaque / zero-blur it produced no visual effect anyway. A glass site
47
+ * opts in for every surface at once, e.g. `--kun-backdrop-filter: blur(12px)`
48
+ * (pair with a lowered --kun-surface-opacity). */
49
+ --kun-backdrop-filter: none;
50
+ }
51
+
52
+ /* Opt-in frosted-glass backdrop for raised surfaces. At the default `none` it
53
+ * emits `backdrop-filter: none` (free — no compositing layer, no blur pass);
54
+ * set --kun-backdrop-filter to enable glass on every surface that uses it. */
55
+ @utility kun-backdrop {
56
+ -webkit-backdrop-filter: var(--kun-backdrop-filter, none);
57
+ backdrop-filter: var(--kun-backdrop-filter, none);
48
58
  }
49
59
 
50
60
  @theme {
@@ -303,8 +313,9 @@
303
313
 
304
314
  /* Canonical neutral border — the SINGLE source of truth for every structural
305
315
  * hairline (inputs, cards, dividers, popovers, tabs, tables…). Defaults to the
306
- * `default-200` step, which already flips light↔dark (light L90% zinc-200,
307
- * dark L26% zinc-700), so one utility stays consistent across modes AND
316
+ * `default-100` step a very light hairline that just delineates a surface
317
+ * without framing it — which already flips light↔dark, so one utility stays
318
+ * consistent across modes AND
308
319
  * components — no more per-component `border-default/20` + `dark:border-…`
309
320
  * juggling that only coincidentally matched. Retheme every border at once by
310
321
  * overriding `--color-kun-border` (set it in `.kun-dark-mode` too if you give
@@ -316,10 +327,10 @@
316
327
  * / `focus:border-*` still win (apply `border-kun` only in the non-error branch
317
328
  * so two plain border-color utilities never fight over source order). */
318
329
  :root {
319
- --color-kun-border: oklch(var(--default-200));
330
+ --color-kun-border: oklch(var(--default-100));
320
331
  }
321
332
  @utility border-kun {
322
- border-color: var(--color-kun-border, oklch(var(--default-200)));
333
+ border-color: var(--color-kun-border, oklch(var(--default-100)));
323
334
  }
324
335
 
325
336
  /* Duration utilities bound to the motion scale, so component transitions route