@kungal/ui-tokens 0.8.0 → 0.10.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.8.0",
3
+ "version": "0.10.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
@@ -75,3 +75,20 @@
75
75
  display: block;
76
76
  }
77
77
  }
78
+
79
+ /*
80
+ * Respect the user's reduced-motion preference (WCAG 2.3.3). "Reduce" means
81
+ * reduce, not remove: we collapse durations to ~0 rather than 0 so JS that
82
+ * waits on transitionend / animationend still fires. This is part of the
83
+ * opinionated base layer — apps that import tokens-only opt out.
84
+ */
85
+ @media (prefers-reduced-motion: reduce) {
86
+ *,
87
+ ::before,
88
+ ::after {
89
+ animation-duration: 0.01ms !important;
90
+ animation-iteration-count: 1 !important;
91
+ transition-duration: 0.01ms !important;
92
+ scroll-behavior: auto !important;
93
+ }
94
+ }
package/src/tokens.css CHANGED
@@ -148,9 +148,9 @@
148
148
  * Tailwind v4 @theme auto-generates rounded-kun-none / -sm / -md / -lg / -full;
149
149
  * the framework-agnostic class map lives in @kungal/ui-core (kunRoundedClasses). */
150
150
  --radius-kun-none: 0;
151
- --radius-kun-sm: calc(0.25rem * var(--kun-radius-scale, 1));
152
- --radius-kun-md: calc(0.5rem * var(--kun-radius-scale, 1));
153
- --radius-kun-lg: calc(0.75rem * var(--kun-radius-scale, 1));
151
+ --radius-kun-sm: calc(0.375rem * var(--kun-radius-scale, 1)); /* 6px */
152
+ --radius-kun-md: calc(0.75rem * var(--kun-radius-scale, 1)); /* 12px — HeroUI-style default control radius */
153
+ --radius-kun-lg: calc(1rem * var(--kun-radius-scale, 1)); /* 16px — containers / floating panels */
154
154
  --radius-kun-full: 9999px;
155
155
 
156
156
  /* z-index layering — floating UI must stack predictably so a popover
@@ -165,6 +165,20 @@
165
165
  --z-kun-alert: 9700;
166
166
  --z-kun-message: 9999;
167
167
 
168
+ /* Motion — one easing set + duration scale so every component shares a
169
+ * rhythm. Asymmetric by design: decelerate on enter, accelerate on exit
170
+ * (ease in as it arrives, snap away as it leaves). Curves from Material 3;
171
+ * `emphasized` is the snappy "premium settle" (Radix/Vaul). The --ease-kun-*
172
+ * names also generate Tailwind `ease-kun-*` utilities. */
173
+ --ease-kun-standard: cubic-bezier(0.2, 0, 0, 1);
174
+ --ease-kun-out: cubic-bezier(0, 0, 0, 1); /* enter / decelerate */
175
+ --ease-kun-in: cubic-bezier(0.3, 0, 1, 1); /* exit / accelerate */
176
+ --ease-kun-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
177
+ --kun-dur-fast: 150ms; /* hover, selection, micro-interactions */
178
+ --kun-dur-base: 250ms; /* component enter / in-screen transitions */
179
+ --kun-dur-slow: 350ms; /* larger surfaces */
180
+ --kun-dur-exit: 180ms; /* exits run ~30% shorter than enters */
181
+
168
182
  /* Animations */
169
183
  --animate-shake: shake 1s ease-in-out;
170
184
  --animate-bounceInDown: bounceInDown 1s ease-in-out;