@primer/primitives 11.7.1 → 11.8.0-rc.1daa71c4

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.
@@ -0,0 +1,427 @@
1
+ {
2
+ "motion-duration-long": {
3
+ "key": "{motion.duration.long}",
4
+ "$value": {
5
+ "value": 500,
6
+ "unit": "ms"
7
+ },
8
+ "$type": "duration",
9
+ "$description": "Longer duration for complex multi-step animations or large-scale layout shifts. Use sparingly.",
10
+ "$extensions": {
11
+ "org.primer.llm": {
12
+ "usage": ["complex-animation", "multi-step", "layout-shift", "page-transition"],
13
+ "rules": "Use sparingly for complex animations. NEVER use for simple UI interactions."
14
+ }
15
+ },
16
+ "filePath": "src/tokens/functional/motion/motion.json5",
17
+ "isSource": true,
18
+ "original": {
19
+ "$value": "{base.duration.500}",
20
+ "$type": "duration",
21
+ "$description": "Longer duration for complex multi-step animations or large-scale layout shifts. Use sparingly.",
22
+ "$extensions": {
23
+ "org.primer.llm": {
24
+ "usage": ["complex-animation", "multi-step", "layout-shift", "page-transition"],
25
+ "rules": "Use sparingly for complex animations. NEVER use for simple UI interactions."
26
+ }
27
+ },
28
+ "key": "{motion.duration.long}"
29
+ },
30
+ "name": "motion-duration-long",
31
+ "attributes": {},
32
+ "path": ["motion", "duration", "long"]
33
+ },
34
+ "motion-duration-medium": {
35
+ "key": "{motion.duration.medium}",
36
+ "$value": {
37
+ "value": 300,
38
+ "unit": "ms"
39
+ },
40
+ "$type": "duration",
41
+ "$description": "Standard duration for elements entering or exiting the viewport, such as modals and dropdowns.",
42
+ "$extensions": {
43
+ "org.primer.llm": {
44
+ "usage": ["modal-open", "dropdown-appear", "tooltip-show", "enter-exit-viewport"],
45
+ "rules": "Use for elements entering or leaving the viewport. Maximum recommended duration for UI interactions."
46
+ }
47
+ },
48
+ "filePath": "src/tokens/functional/motion/motion.json5",
49
+ "isSource": true,
50
+ "original": {
51
+ "$value": "{base.duration.300}",
52
+ "$type": "duration",
53
+ "$description": "Standard duration for elements entering or exiting the viewport, such as modals and dropdowns.",
54
+ "$extensions": {
55
+ "org.primer.llm": {
56
+ "usage": ["modal-open", "dropdown-appear", "tooltip-show", "enter-exit-viewport"],
57
+ "rules": "Use for elements entering or leaving the viewport. Maximum recommended duration for UI interactions."
58
+ }
59
+ },
60
+ "key": "{motion.duration.medium}"
61
+ },
62
+ "name": "motion-duration-medium",
63
+ "attributes": {},
64
+ "path": ["motion", "duration", "medium"]
65
+ },
66
+ "motion-duration-micro": {
67
+ "key": "{motion.duration.micro}",
68
+ "$value": {
69
+ "value": 100,
70
+ "unit": "ms"
71
+ },
72
+ "$type": "duration",
73
+ "$description": "Fast micro-interactions like hover, focus ring, and color shifts.",
74
+ "$extensions": {
75
+ "org.primer.llm": {
76
+ "usage": ["hover-transition", "focus-ring", "color-shift", "opacity-change"],
77
+ "rules": "Use for instantaneous feedback on hover and focus states."
78
+ }
79
+ },
80
+ "filePath": "src/tokens/functional/motion/motion.json5",
81
+ "isSource": true,
82
+ "original": {
83
+ "$value": "{base.duration.100}",
84
+ "$type": "duration",
85
+ "$description": "Fast micro-interactions like hover, focus ring, and color shifts.",
86
+ "$extensions": {
87
+ "org.primer.llm": {
88
+ "usage": ["hover-transition", "focus-ring", "color-shift", "opacity-change"],
89
+ "rules": "Use for instantaneous feedback on hover and focus states."
90
+ }
91
+ },
92
+ "key": "{motion.duration.micro}"
93
+ },
94
+ "name": "motion-duration-micro",
95
+ "attributes": {},
96
+ "path": ["motion", "duration", "micro"]
97
+ },
98
+ "motion-duration-short": {
99
+ "key": "{motion.duration.short}",
100
+ "$value": {
101
+ "value": 200,
102
+ "unit": "ms"
103
+ },
104
+ "$type": "duration",
105
+ "$description": "Quick transitions for state changes like expand/collapse, toggles, and visibility changes.",
106
+ "$extensions": {
107
+ "org.primer.llm": {
108
+ "usage": ["expand-collapse", "toggle", "visibility-change", "state-transition"],
109
+ "rules": "Use for interactive state changes that need to feel responsive."
110
+ }
111
+ },
112
+ "filePath": "src/tokens/functional/motion/motion.json5",
113
+ "isSource": true,
114
+ "original": {
115
+ "$value": "{base.duration.200}",
116
+ "$type": "duration",
117
+ "$description": "Quick transitions for state changes like expand/collapse, toggles, and visibility changes.",
118
+ "$extensions": {
119
+ "org.primer.llm": {
120
+ "usage": ["expand-collapse", "toggle", "visibility-change", "state-transition"],
121
+ "rules": "Use for interactive state changes that need to feel responsive."
122
+ }
123
+ },
124
+ "key": "{motion.duration.short}"
125
+ },
126
+ "name": "motion-duration-short",
127
+ "attributes": {},
128
+ "path": ["motion", "duration", "short"]
129
+ },
130
+ "motion-easing-enter": {
131
+ "key": "{motion.easing.enter}",
132
+ "$value": [0.3, 0.8, 0.6, 1],
133
+ "$type": "cubicBezier",
134
+ "$description": "Decelerating easing for elements entering the viewport or appearing on screen.",
135
+ "$extensions": {
136
+ "org.primer.llm": {
137
+ "usage": ["enter-animation", "element-appearing", "modal-open", "dropdown-open", "tooltip-appear"],
138
+ "rules": "RECOMMENDED default for enter animations. Element decelerates into its final position."
139
+ }
140
+ },
141
+ "filePath": "src/tokens/functional/motion/motion.json5",
142
+ "isSource": true,
143
+ "original": {
144
+ "$value": "{base.easing.easeOut}",
145
+ "$type": "cubicBezier",
146
+ "$description": "Decelerating easing for elements entering the viewport or appearing on screen.",
147
+ "$extensions": {
148
+ "org.primer.llm": {
149
+ "usage": ["enter-animation", "element-appearing", "modal-open", "dropdown-open", "tooltip-appear"],
150
+ "rules": "RECOMMENDED default for enter animations. Element decelerates into its final position."
151
+ }
152
+ },
153
+ "key": "{motion.easing.enter}"
154
+ },
155
+ "name": "motion-easing-enter",
156
+ "attributes": {},
157
+ "path": ["motion", "easing", "enter"]
158
+ },
159
+ "motion-easing-exit": {
160
+ "key": "{motion.easing.exit}",
161
+ "$value": [0.7, 0.1, 0.75, 0.9],
162
+ "$type": "cubicBezier",
163
+ "$description": "Accelerating easing for elements exiting the viewport or leaving the screen.",
164
+ "$extensions": {
165
+ "org.primer.llm": {
166
+ "usage": ["exit-animation", "element-leaving", "modal-close", "dismiss"],
167
+ "rules": "Use for elements leaving the viewport. Element accelerates away."
168
+ }
169
+ },
170
+ "filePath": "src/tokens/functional/motion/motion.json5",
171
+ "isSource": true,
172
+ "original": {
173
+ "$value": "{base.easing.easeIn}",
174
+ "$type": "cubicBezier",
175
+ "$description": "Accelerating easing for elements exiting the viewport or leaving the screen.",
176
+ "$extensions": {
177
+ "org.primer.llm": {
178
+ "usage": ["exit-animation", "element-leaving", "modal-close", "dismiss"],
179
+ "rules": "Use for elements leaving the viewport. Element accelerates away."
180
+ }
181
+ },
182
+ "key": "{motion.easing.exit}"
183
+ },
184
+ "name": "motion-easing-exit",
185
+ "attributes": {},
186
+ "path": ["motion", "easing", "exit"]
187
+ },
188
+ "motion-easing-hover": {
189
+ "key": "{motion.easing.hover}",
190
+ "$value": [0.25, 0.1, 0.25, 1],
191
+ "$type": "cubicBezier",
192
+ "$description": "Easing for hover state changes and micro-interactions.",
193
+ "$extensions": {
194
+ "org.primer.llm": {
195
+ "usage": ["hover-state", "micro-interaction", "button-hover", "link-hover"],
196
+ "rules": "Use for hover state changes."
197
+ }
198
+ },
199
+ "filePath": "src/tokens/functional/motion/motion.json5",
200
+ "isSource": true,
201
+ "original": {
202
+ "$value": "{base.easing.ease}",
203
+ "$type": "cubicBezier",
204
+ "$description": "Easing for hover state changes and micro-interactions.",
205
+ "$extensions": {
206
+ "org.primer.llm": {
207
+ "usage": ["hover-state", "micro-interaction", "button-hover", "link-hover"],
208
+ "rules": "Use for hover state changes."
209
+ }
210
+ },
211
+ "key": "{motion.easing.hover}"
212
+ },
213
+ "name": "motion-easing-hover",
214
+ "attributes": {},
215
+ "path": ["motion", "easing", "hover"]
216
+ },
217
+ "motion-easing-linear": {
218
+ "key": "{motion.easing.linear}",
219
+ "$value": [0, 0, 1, 1],
220
+ "$type": "cubicBezier",
221
+ "$description": "Constant motion with no acceleration. Use for continuous animations like progress bars or loaders.",
222
+ "$extensions": {
223
+ "org.primer.llm": {
224
+ "usage": ["progress-bar", "loader", "continuous-animation", "scrolling"],
225
+ "rules": "Use only for constant, uninterrupted motion."
226
+ }
227
+ },
228
+ "filePath": "src/tokens/functional/motion/motion.json5",
229
+ "isSource": true,
230
+ "original": {
231
+ "$value": "{base.easing.linear}",
232
+ "$type": "cubicBezier",
233
+ "$description": "Constant motion with no acceleration. Use for continuous animations like progress bars or loaders.",
234
+ "$extensions": {
235
+ "org.primer.llm": {
236
+ "usage": ["progress-bar", "loader", "continuous-animation", "scrolling"],
237
+ "rules": "Use only for constant, uninterrupted motion."
238
+ }
239
+ },
240
+ "key": "{motion.easing.linear}"
241
+ },
242
+ "name": "motion-easing-linear",
243
+ "attributes": {},
244
+ "path": ["motion", "easing", "linear"]
245
+ },
246
+ "motion-easing-move": {
247
+ "key": "{motion.easing.move}",
248
+ "$value": [0.6, 0, 0.2, 1],
249
+ "$type": "cubicBezier",
250
+ "$description": "Smooth easing for elements moving or morphing within the viewport.",
251
+ "$extensions": {
252
+ "org.primer.llm": {
253
+ "usage": ["position-change", "size-change", "morph-animation", "expand-collapse", "slide-transition"],
254
+ "rules": "Use for elements that move or change shape on screen."
255
+ }
256
+ },
257
+ "filePath": "src/tokens/functional/motion/motion.json5",
258
+ "isSource": true,
259
+ "original": {
260
+ "$value": "{base.easing.easeInOut}",
261
+ "$type": "cubicBezier",
262
+ "$description": "Smooth easing for elements moving or morphing within the viewport.",
263
+ "$extensions": {
264
+ "org.primer.llm": {
265
+ "usage": ["position-change", "size-change", "morph-animation", "expand-collapse", "slide-transition"],
266
+ "rules": "Use for elements that move or change shape on screen."
267
+ }
268
+ },
269
+ "key": "{motion.easing.move}"
270
+ },
271
+ "name": "motion-easing-move",
272
+ "attributes": {},
273
+ "path": ["motion", "easing", "move"]
274
+ },
275
+ "motion-transition-enter": {
276
+ "key": "{motion.transition.enter}",
277
+ "$value": {
278
+ "duration": {
279
+ "value": 300,
280
+ "unit": "ms"
281
+ },
282
+ "timingFunction": [0.3, 0.8, 0.6, 1]
283
+ },
284
+ "$type": "transition",
285
+ "$description": "Transition for elements entering the viewport, such as modals, dropdowns, and tooltips.",
286
+ "$extensions": {
287
+ "org.primer.llm": {
288
+ "usage": ["modal-open", "dropdown-appear", "tooltip-show", "popover-enter", "overlay-appear"],
289
+ "rules": "Use for elements appearing on screen. Element decelerates into final position."
290
+ }
291
+ },
292
+ "filePath": "src/tokens/functional/motion/motion.json5",
293
+ "isSource": true,
294
+ "original": {
295
+ "$value": {
296
+ "duration": "{motion.duration.medium}",
297
+ "timingFunction": "{motion.easing.enter}"
298
+ },
299
+ "$type": "transition",
300
+ "$description": "Transition for elements entering the viewport, such as modals, dropdowns, and tooltips.",
301
+ "$extensions": {
302
+ "org.primer.llm": {
303
+ "usage": ["modal-open", "dropdown-appear", "tooltip-show", "popover-enter", "overlay-appear"],
304
+ "rules": "Use for elements appearing on screen. Element decelerates into final position."
305
+ }
306
+ },
307
+ "key": "{motion.transition.enter}"
308
+ },
309
+ "name": "motion-transition-enter",
310
+ "attributes": {},
311
+ "path": ["motion", "transition", "enter"]
312
+ },
313
+ "motion-transition-exit": {
314
+ "key": "{motion.transition.exit}",
315
+ "$value": {
316
+ "duration": {
317
+ "value": 200,
318
+ "unit": "ms"
319
+ },
320
+ "timingFunction": [0.7, 0.1, 0.75, 0.9]
321
+ },
322
+ "$type": "transition",
323
+ "$description": "Transition for elements exiting the viewport, such as closing modals and dismissing dropdowns.",
324
+ "$extensions": {
325
+ "org.primer.llm": {
326
+ "usage": ["modal-close", "dropdown-dismiss", "tooltip-hide", "popover-exit", "overlay-dismiss"],
327
+ "rules": "Use for elements leaving the screen. Shorter than enter to feel snappy."
328
+ }
329
+ },
330
+ "filePath": "src/tokens/functional/motion/motion.json5",
331
+ "isSource": true,
332
+ "original": {
333
+ "$value": {
334
+ "duration": "{motion.duration.short}",
335
+ "timingFunction": "{motion.easing.exit}"
336
+ },
337
+ "$type": "transition",
338
+ "$description": "Transition for elements exiting the viewport, such as closing modals and dismissing dropdowns.",
339
+ "$extensions": {
340
+ "org.primer.llm": {
341
+ "usage": ["modal-close", "dropdown-dismiss", "tooltip-hide", "popover-exit", "overlay-dismiss"],
342
+ "rules": "Use for elements leaving the screen. Shorter than enter to feel snappy."
343
+ }
344
+ },
345
+ "key": "{motion.transition.exit}"
346
+ },
347
+ "name": "motion-transition-exit",
348
+ "attributes": {},
349
+ "path": ["motion", "transition", "exit"]
350
+ },
351
+ "motion-transition-hover": {
352
+ "key": "{motion.transition.hover}",
353
+ "$value": {
354
+ "duration": {
355
+ "value": 100,
356
+ "unit": "ms"
357
+ },
358
+ "timingFunction": [0.25, 0.1, 0.25, 1]
359
+ },
360
+ "$type": "transition",
361
+ "$description": "Transition for hover state changes on interactive elements like buttons and links.",
362
+ "$extensions": {
363
+ "org.primer.llm": {
364
+ "usage": ["button-hover", "link-hover", "interactive-hover", "color-transition"],
365
+ "rules": "Use for all hover state transitions. Keeps interactions feeling instantaneous."
366
+ }
367
+ },
368
+ "filePath": "src/tokens/functional/motion/motion.json5",
369
+ "isSource": true,
370
+ "original": {
371
+ "$value": {
372
+ "duration": "{motion.duration.micro}",
373
+ "timingFunction": "{motion.easing.hover}"
374
+ },
375
+ "$type": "transition",
376
+ "$description": "Transition for hover state changes on interactive elements like buttons and links.",
377
+ "$extensions": {
378
+ "org.primer.llm": {
379
+ "usage": ["button-hover", "link-hover", "interactive-hover", "color-transition"],
380
+ "rules": "Use for all hover state transitions. Keeps interactions feeling instantaneous."
381
+ }
382
+ },
383
+ "key": "{motion.transition.hover}"
384
+ },
385
+ "name": "motion-transition-hover",
386
+ "attributes": {},
387
+ "path": ["motion", "transition", "hover"]
388
+ },
389
+ "motion-transition-stateChange": {
390
+ "key": "{motion.transition.stateChange}",
391
+ "$value": {
392
+ "duration": {
393
+ "value": 200,
394
+ "unit": "ms"
395
+ },
396
+ "timingFunction": [0.6, 0, 0.2, 1]
397
+ },
398
+ "$type": "transition",
399
+ "$description": "Transition for state changes like toggles, expand/collapse, and visibility changes.",
400
+ "$extensions": {
401
+ "org.primer.llm": {
402
+ "usage": ["toggle", "expand-collapse", "accordion", "tab-switch", "visibility-change"],
403
+ "rules": "Use for interactive elements that change between states."
404
+ }
405
+ },
406
+ "filePath": "src/tokens/functional/motion/motion.json5",
407
+ "isSource": true,
408
+ "original": {
409
+ "$value": {
410
+ "duration": "{motion.duration.short}",
411
+ "timingFunction": "{motion.easing.move}"
412
+ },
413
+ "$type": "transition",
414
+ "$description": "Transition for state changes like toggles, expand/collapse, and visibility changes.",
415
+ "$extensions": {
416
+ "org.primer.llm": {
417
+ "usage": ["toggle", "expand-collapse", "accordion", "tab-switch", "visibility-change"],
418
+ "rules": "Use for interactive elements that change between states."
419
+ }
420
+ },
421
+ "key": "{motion.transition.stateChange}"
422
+ },
423
+ "name": "motion-transition-stateChange",
424
+ "attributes": {},
425
+ "path": ["motion", "transition", "stateChange"]
426
+ }
427
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/primitives",
3
- "version": "11.7.1",
3
+ "version": "11.8.0-rc.1daa71c4",
4
4
  "description": "Typography, spacing, and color primitives for Primer design system",
5
5
  "type": "module",
6
6
  "files": [
@@ -39,6 +39,7 @@
39
39
  "lint": "eslint '**/*.{js,ts,tsx,md,mdx}' --max-warnings=0 --config eslint.config.mjs && npm run lint:tokens",
40
40
  "lint:fix": "eslint '**/*.{js,ts,tsx,md,mdx}' --fix --max-warnings=0 --config eslint.config.mjs",
41
41
  "lint:tokens": "tsx scripts/validateTokenJson.ts",
42
+ "check:removed-tokens": "tsx scripts/checkRemovedTokens.ts",
42
43
  "test": "npm run test:unit && npm run test:integration",
43
44
  "test:unit": "vitest run --coverage",
44
45
  "test:integration": "vitest run -r integration",
@@ -82,4 +83,4 @@
82
83
  "zod-validation-error": "^4.0.1",
83
84
  "colorjs.io": "^0.6.1"
84
85
  }
85
- }
86
+ }
@@ -0,0 +1,190 @@
1
+ {
2
+ motion: {
3
+ duration: {
4
+ $description: 'Semantic duration tokens for UI motion. Maps interaction types to appropriate timing values.',
5
+ $extensions: {
6
+ 'org.primer.llm': {
7
+ usage: ['transition-duration', 'animation-duration', 'motion-timing'],
8
+ rules:
9
+ 'MUST keep UI interactions ≤300ms. Use micro for hover/focus, short for state changes, medium for enter/exit. NEVER exceed 500ms for UI interactions.',
10
+ },
11
+ },
12
+ micro: {
13
+ $value: '{base.duration.100}',
14
+ $type: 'duration',
15
+ $description: 'Fast micro-interactions like hover, focus ring, and color shifts.',
16
+ $extensions: {
17
+ 'org.primer.llm': {
18
+ usage: ['hover-transition', 'focus-ring', 'color-shift', 'opacity-change'],
19
+ rules: 'Use for instantaneous feedback on hover and focus states.',
20
+ },
21
+ },
22
+ },
23
+ short: {
24
+ $value: '{base.duration.200}',
25
+ $type: 'duration',
26
+ $description: 'Quick transitions for state changes like expand/collapse, toggles, and visibility changes.',
27
+ $extensions: {
28
+ 'org.primer.llm': {
29
+ usage: ['expand-collapse', 'toggle', 'visibility-change', 'state-transition'],
30
+ rules: 'Use for interactive state changes that need to feel responsive.',
31
+ },
32
+ },
33
+ },
34
+ medium: {
35
+ $value: '{base.duration.300}',
36
+ $type: 'duration',
37
+ $description: 'Standard duration for elements entering or exiting the viewport, such as modals and dropdowns.',
38
+ $extensions: {
39
+ 'org.primer.llm': {
40
+ usage: ['modal-open', 'dropdown-appear', 'tooltip-show', 'enter-exit-viewport'],
41
+ rules: 'Use for elements entering or leaving the viewport. Maximum recommended duration for UI interactions.',
42
+ },
43
+ },
44
+ },
45
+ long: {
46
+ $value: '{base.duration.500}',
47
+ $type: 'duration',
48
+ $description: 'Longer duration for complex multi-step animations or large-scale layout shifts. Use sparingly.',
49
+ $extensions: {
50
+ 'org.primer.llm': {
51
+ usage: ['complex-animation', 'multi-step', 'layout-shift', 'page-transition'],
52
+ rules: 'Use sparingly for complex animations. NEVER use for simple UI interactions.',
53
+ },
54
+ },
55
+ },
56
+ },
57
+ easing: {
58
+ $description: 'Semantic easing tokens for UI motion. Maps interaction types to appropriate cubic-bezier curves.',
59
+ $extensions: {
60
+ 'org.primer.llm': {
61
+ usage: ['transition-timing-function', 'animation-timing-function', 'easing-curve'],
62
+ rules:
63
+ 'Follow the easing decision tree: entering/exiting → enter, moving/morphing → move, hover → hover, constant → linear.',
64
+ },
65
+ },
66
+ hover: {
67
+ $value: '{base.easing.ease}',
68
+ $type: 'cubicBezier',
69
+ $description: 'Easing for hover state changes and micro-interactions.',
70
+ $extensions: {
71
+ 'org.primer.llm': {
72
+ usage: ['hover-state', 'micro-interaction', 'button-hover', 'link-hover'],
73
+ rules: 'Use for hover state changes.',
74
+ },
75
+ },
76
+ },
77
+ enter: {
78
+ $value: '{base.easing.easeOut}',
79
+ $type: 'cubicBezier',
80
+ $description: 'Decelerating easing for elements entering the viewport or appearing on screen.',
81
+ $extensions: {
82
+ 'org.primer.llm': {
83
+ usage: ['enter-animation', 'element-appearing', 'modal-open', 'dropdown-open', 'tooltip-appear'],
84
+ rules: 'RECOMMENDED default for enter animations. Element decelerates into its final position.',
85
+ },
86
+ },
87
+ },
88
+ exit: {
89
+ $value: '{base.easing.easeIn}',
90
+ $type: 'cubicBezier',
91
+ $description: 'Accelerating easing for elements exiting the viewport or leaving the screen.',
92
+ $extensions: {
93
+ 'org.primer.llm': {
94
+ usage: ['exit-animation', 'element-leaving', 'modal-close', 'dismiss'],
95
+ rules: 'Use for elements leaving the viewport. Element accelerates away.',
96
+ },
97
+ },
98
+ },
99
+ move: {
100
+ $value: '{base.easing.easeInOut}',
101
+ $type: 'cubicBezier',
102
+ $description: 'Smooth easing for elements moving or morphing within the viewport.',
103
+ $extensions: {
104
+ 'org.primer.llm': {
105
+ usage: ['position-change', 'size-change', 'morph-animation', 'expand-collapse', 'slide-transition'],
106
+ rules: 'Use for elements that move or change shape on screen.',
107
+ },
108
+ },
109
+ },
110
+ linear: {
111
+ $value: '{base.easing.linear}',
112
+ $type: 'cubicBezier',
113
+ $description: 'Constant motion with no acceleration. Use for continuous animations like progress bars or loaders.',
114
+ $extensions: {
115
+ 'org.primer.llm': {
116
+ usage: ['progress-bar', 'loader', 'continuous-animation', 'scrolling'],
117
+ rules: 'Use only for constant, uninterrupted motion.',
118
+ },
119
+ },
120
+ },
121
+ },
122
+ transition: {
123
+ $description:
124
+ 'Composite transition tokens bundling duration and easing for common UI interaction patterns. Use these for the CSS transition property.',
125
+ $extensions: {
126
+ 'org.primer.llm': {
127
+ usage: ['css-transition', 'transition-shorthand'],
128
+ rules:
129
+ 'Use transition tokens instead of raw duration + easing values. Pair with CSS transition-property to specify which properties to animate. MUST respect prefers-reduced-motion.',
130
+ },
131
+ },
132
+ hover: {
133
+ $value: {
134
+ duration: '{motion.duration.micro}',
135
+ timingFunction: '{motion.easing.hover}',
136
+ },
137
+ $type: 'transition',
138
+ $description: 'Transition for hover state changes on interactive elements like buttons and links.',
139
+ $extensions: {
140
+ 'org.primer.llm': {
141
+ usage: ['button-hover', 'link-hover', 'interactive-hover', 'color-transition'],
142
+ rules: 'Use for all hover state transitions. Keeps interactions feeling instantaneous.',
143
+ },
144
+ },
145
+ },
146
+ stateChange: {
147
+ $value: {
148
+ duration: '{motion.duration.short}',
149
+ timingFunction: '{motion.easing.move}',
150
+ },
151
+ $type: 'transition',
152
+ $description: 'Transition for state changes like toggles, expand/collapse, and visibility changes.',
153
+ $extensions: {
154
+ 'org.primer.llm': {
155
+ usage: ['toggle', 'expand-collapse', 'accordion', 'tab-switch', 'visibility-change'],
156
+ rules: 'Use for interactive elements that change between states.',
157
+ },
158
+ },
159
+ },
160
+ enter: {
161
+ $value: {
162
+ duration: '{motion.duration.medium}',
163
+ timingFunction: '{motion.easing.enter}',
164
+ },
165
+ $type: 'transition',
166
+ $description: 'Transition for elements entering the viewport, such as modals, dropdowns, and tooltips.',
167
+ $extensions: {
168
+ 'org.primer.llm': {
169
+ usage: ['modal-open', 'dropdown-appear', 'tooltip-show', 'popover-enter', 'overlay-appear'],
170
+ rules: 'Use for elements appearing on screen. Element decelerates into final position.',
171
+ },
172
+ },
173
+ },
174
+ exit: {
175
+ $value: {
176
+ duration: '{motion.duration.short}',
177
+ timingFunction: '{motion.easing.exit}',
178
+ },
179
+ $type: 'transition',
180
+ $description: 'Transition for elements exiting the viewport, such as closing modals and dismissing dropdowns.',
181
+ $extensions: {
182
+ 'org.primer.llm': {
183
+ usage: ['modal-close', 'dropdown-dismiss', 'tooltip-hide', 'popover-exit', 'overlay-dismiss'],
184
+ rules: 'Use for elements leaving the screen. Shorter than enter to feel snappy.',
185
+ },
186
+ },
187
+ },
188
+ },
189
+ },
190
+ }