Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8e0cf57
Add motion design tokens (duration and easing) to @wordpress/theme
jameskoster Mar 3, 2026
b17ec00
Adopt motion design tokens in Dialog, Modal, and Menu
jameskoster Mar 17, 2026
19f255d
Build tokens
jameskoster Mar 17, 2026
22936b7
Apply suggestion from @mirka
jameskoster Mar 18, 2026
ac08416
Move motion tokens story to root storybook folder
jameskoster Mar 18, 2026
ce10fc0
Update packages/components/src/utils/dropdown-motion.ts
jameskoster Mar 19, 2026
2bcddc6
Remove hardcoded ms values from duration token names
jameskoster Mar 19, 2026
6811911
Add components package changelog entry for motion token adoption
jameskoster Mar 19, 2026
c42b7f8
Add UI package changelog entry for motion token adoption
jameskoster Mar 19, 2026
ec5b305
Fix style lint: use inset-inline-start instead of left
jameskoster Mar 19, 2026
8d745f4
Rename easing tokens to use direction-first naming convention
jameskoster Mar 30, 2026
47baac9
Remove accelerate easing tokens, add gentle, use decelerate for all e…
jameskoster Mar 31, 2026
98a3dda
Use gentle easing for modal overlay and dialog backdrop
jameskoster Mar 31, 2026
39b4e87
Add motion tokens to theme package README documentation
jameskoster Apr 2, 2026
121f131
Rename easing tokens to use intent-based names
jameskoster Apr 14, 2026
2d54793
Fix Storybook TypeScript build for CSS module imports
jameskoster Apr 14, 2026
b06c288
Simplify motion easing tokens from four to three
jameskoster Apr 14, 2026
b039f89
Replace CSS module with inline styles in motion story
jameskoster Apr 14, 2026
8b5eef9
Update changelogs for motion token adoption
jameskoster Apr 14, 2026
fd9ec8a
Use style tag children instead of dangerouslySetInnerHTML
jameskoster May 6, 2026
e6198f2
Fix duration token $value format
jameskoster May 6, 2026
81c6d7e
Move motion token changelog entries to Unreleased
jameskoster May 11, 2026
09e8461
Add PR link to theme changelog motion tokens entry
jameskoster May 11, 2026
d6e208c
Document modal exit timing coupling to motion duration token
jameskoster May 11, 2026
5a15ee7
Modal: stagger backdrop fade-out before frame disappear animation
jameskoster May 11, 2026
36f6ed8
Storybook: fix motion durations caption (balanced easing token)
jameskoster May 11, 2026
fa149b6
Dialog: drop duplicate transition under [data-open]
jameskoster May 11, 2026
66945cb
Storybook: use UI primitives in Motion tokens story
jameskoster May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix duration token $value format
Terrazzo's CSS duration transform expects $value as the object form
{ value, unit } per the DTCG spec. The string form ("400ms") caused
the generator to emit 'undefinedundefined' for both the CSS variables
and the JS fallback map, which left consumers (such as the motion
Storybook story) with effectively zero-duration animations.

Switching motion.json to the object form and regenerating the prebuilt
files restores correct values throughout.

Co-authored-by: Cursor <cursoragent@cursor.com>
  • Loading branch information
jameskoster and cursoragent committed May 11, 2026
commit e6198f263a68920b3b75aa56b9d9176c89f4618f
10 changes: 5 additions & 5 deletions packages/theme/src/prebuilt/css/design-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@
--wpds-elevation-lg: 0 5px 15px 0 #00000014, 0 15px 27px 0 #00000012,
0 30px 36px 0 #0000000a, 0 50px 43px 0 #00000005;
/* Micro-delays and transition offsets */
--wpds-motion-duration-xs: undefinedundefined;
--wpds-motion-duration-xs: 50ms;
/* Micro-interactions like focus rings and state changes */
--wpds-motion-duration-sm: undefinedundefined;
--wpds-motion-duration-sm: 100ms;
/* Standard transitions like menus and popovers */
--wpds-motion-duration-md: undefinedundefined;
--wpds-motion-duration-md: 200ms;
/* Deliberate animations like slides and reveals */
--wpds-motion-duration-lg: undefinedundefined;
--wpds-motion-duration-lg: 300ms;
/* Extended animations like complex or multi-step transitions */
--wpds-motion-duration-xl: undefinedundefined;
--wpds-motion-duration-xl: 400ms;
/* Nearly imperceptible easing for hover, color, and background transitions */
--wpds-motion-easing-subtle: cubic-bezier( 0.15, 0, 0.15, 1 );
/* General-purpose easing for on-screen movement like resizing, morphing, and layout shifts */
Expand Down
10 changes: 5 additions & 5 deletions packages/theme/src/prebuilt/js/design-token-fallbacks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ export default {
'0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005',
'--wpds-elevation-xs':
'0 1px 1px 0 #00000008, 0 1px 2px 0 #00000005, 0 3px 3px 0 #00000005, 0 4px 4px 0 #00000003',
'--wpds-motion-duration-lg': 'undefinedundefined',
'--wpds-motion-duration-md': 'undefinedundefined',
'--wpds-motion-duration-sm': 'undefinedundefined',
'--wpds-motion-duration-xl': 'undefinedundefined',
'--wpds-motion-duration-xs': 'undefinedundefined',
'--wpds-motion-duration-lg': '300ms',
'--wpds-motion-duration-md': '200ms',
'--wpds-motion-duration-sm': '100ms',
'--wpds-motion-duration-xl': '400ms',
'--wpds-motion-duration-xs': '50ms',
'--wpds-motion-easing-balanced': 'cubic-bezier(0.4, 0, 0.2, 1)',
'--wpds-motion-easing-expressive': 'cubic-bezier(0.25, 0, 0, 1)',
'--wpds-motion-easing-subtle': 'cubic-bezier(0.15, 0, 0.15, 1)',
Expand Down
10 changes: 5 additions & 5 deletions packages/theme/tokens/motion.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"duration": {
"$type": "duration",
"xs": {
"$value": "50ms",
"$value": { "value": 50, "unit": "ms" },
"$description": "Micro-delays and transition offsets"
},
"sm": {
"$value": "100ms",
"$value": { "value": 100, "unit": "ms" },
"$description": "Micro-interactions like focus rings and state changes"
},
"md": {
"$value": "200ms",
"$value": { "value": 200, "unit": "ms" },
"$description": "Standard transitions like menus and popovers"
},
"lg": {
"$value": "300ms",
"$value": { "value": 300, "unit": "ms" },
"$description": "Deliberate animations like slides and reveals"
},
"xl": {
"$value": "400ms",
"$value": { "value": 400, "unit": "ms" },
"$description": "Extended animations like complex or multi-step transitions"
}
},
Expand Down