@jirawatpyk/aura-tokens 4.6.0 → 4.6.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/aura.css CHANGED
@@ -1,4 +1,4 @@
1
- /* AURA v4.6.0 — GENERATED by scripts/build-tokens.js from tokens.json. Do not edit by hand. */
1
+ /* AURA v4.6.1 — GENERATED by scripts/build-tokens.js from tokens.json. Do not edit by hand. */
2
2
  /* Fonts: load aura-fonts.css (or the <link> tags in README) separately, so a blocked Google Fonts never breaks this file. */
3
3
 
4
4
  :root, [data-theme="light"] {
@@ -21,7 +21,9 @@
21
21
  justify-content: center;
22
22
  gap: var(--aura-space-2);
23
23
  cursor: pointer;
24
- transition: all var(--aura-duration-fast) cubic-bezier(0.4, 0, 0.2, 1);
24
+ transition-property: background-color, color, border-color, box-shadow, transform, opacity;
25
+ transition-duration: var(--aura-duration-fast);
26
+ transition-timing-function: var(--aura-ease);
25
27
  }
26
28
  .aura-btn:active { transform: scale(0.98); }
27
29
  .aura-btn:disabled { opacity: var(--aura-disabled-opacity); pointer-events: none; }
@@ -871,9 +873,9 @@ button.aura-stat { font: inherit; width: 100%; cursor: pointer; }
871
873
  .aura-progress--warning .aura-progress__bar { background: var(--aura-alert-warning-fg); }
872
874
  .aura-progress--danger .aura-progress__bar { background: var(--aura-fg-danger); }
873
875
  .aura-progress--neutral .aura-progress__bar { background: var(--aura-fg-secondary); }
874
- .aura-progress__track.is-indeterminate .aura-progress__bar { width: 35%; animation: aura-progress-slide 1.4s var(--aura-ease) infinite; }
876
+ .aura-progress__track.is-indeterminate .aura-progress__bar { width: 35%; animation: aura-progress-slide var(--aura-duration-pulse) var(--aura-ease) infinite; }
875
877
  @keyframes aura-progress-slide { from { left: -35%; } to { left: 100%; } }
876
- @media (prefers-reduced-motion: reduce) { .aura-progress__track.is-indeterminate .aura-progress__bar { animation-duration: 4.2s; } }
878
+ @media (prefers-reduced-motion: reduce) { .aura-progress__track.is-indeterminate .aura-progress__bar { animation-duration: calc(var(--aura-duration-pulse) * 3); } }
877
879
  .aura-progress__hint { margin: 0; font-size: 12px; color: var(--aura-fg-secondary); }
878
880
 
879
881
  /* ---------- Skeleton ---------- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-tokens",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
4
4
  "description": "AURA Design System — tokens (CSS variables, Tailwind preset, Figma variables), theme contrast checks and token lint.",
5
5
  "main": "tailwind.tokens.cjs",
6
6
  "types": "components/index.d.ts",
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env node
2
- /* Token lint — fails when source files hard-code colours instead of AURA tokens.
2
+ /* Token lint — fails when source files hard-code colours instead of AURA tokens, or (CSS) motion:
3
+ * a transition/animation must take its duration and easing from --aura-duration-* / --aura-ease / --aura-spring
4
+ * (`linear` is allowed: it's for spinners and progress, not a feel).
3
5
  * Usage: node scripts/lint-tokens.js [dir] (default: ./src) */
4
6
  const fs = require('fs');
5
7
  const path = require('path');
@@ -7,6 +9,8 @@ const dir = path.resolve(process.argv[2] || path.join(process.cwd(), 'src'));
7
9
  const ALLOW = /(aura\.css|aura\.components\.css|aura\.bundle\.js|tokens\.json|tailwind\.tokens\.cjs|figma-variables\.csv)$/;
8
10
  const EXT = /\.(tsx?|jsx?|css|scss|mdx)$/;
9
11
  const COLOUR = /#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3,4})\b|\b(?:rgba?|hsla?)\(\s*\d|\b(?:bg|text|border|ring|fill|stroke)-\[(?:#|rgb|hsl)/gi;
12
+ const MOTION_PROP = /\b(?:transition|animation)(?:-duration|-timing-function|-delay)?\s*:/i;
13
+ const MOTION_RAW = /(?:^|[\s,:(])(?:\d*\.?\d+m?s)\b|cubic-bezier\(|\bease(?:-in-out|-in|-out)?\b/gi;
10
14
  const violations = [];
11
15
  function scan(d) {
12
16
  if (!fs.existsSync(d)) return;
@@ -21,12 +25,16 @@ function scan(d) {
21
25
  text.split('\n').forEach((line, i) => {
22
26
  const m = line.match(COLOUR);
23
27
  if (m) violations.push(`${path.relative(process.cwd(), full)}:${i + 1} ${m.join(', ')}`);
28
+ if (/\.s?css$/.test(f) && MOTION_PROP.test(line)) {
29
+ const raw = line.replace(/var\([^)]*\)/g, '').match(MOTION_RAW);
30
+ if (raw) violations.push(`${path.relative(process.cwd(), full)}:${i + 1} motion ${raw.map((s) => s.trim()).join(', ')} — use --aura-duration-* / --aura-ease`);
31
+ }
24
32
  });
25
33
  }
26
34
  }
27
35
  scan(dir);
28
36
  if (violations.length) {
29
- console.error(`Token lint FAIL: ${violations.length} hard-coded colour(s) — use semantic tokens\n ` + violations.join('\n '));
37
+ console.error(`Token lint FAIL: ${violations.length} hard-coded colour(s) or motion value(s) — use tokens\n ` + violations.join('\n '));
30
38
  process.exit(1);
31
39
  }
32
- console.log(`Token lint OK — no hard-coded colours in ${path.relative(process.cwd(), dir) || '.'}`);
40
+ console.log(`Token lint OK — no hard-coded colours or motion in ${path.relative(process.cwd(), dir) || '.'}`);
package/tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.6.0",
2
+ "version": "4.6.1",
3
3
  "meta": {
4
4
  "name": "AURA Design System",
5
5
  "tier": "3-tier",