@@ -14,6 +14,7 @@ import modifyColor from 'color';
1414import { spring , type Transition } from 'framer-motion' ;
1515
1616import { color } from 'sentry/utils/theme/scraps/color' ;
17+ import { breakpoints , radius , size , space } from 'sentry/utils/theme/scraps/size' ;
1718
1819type SimpleMotionName = 'smooth' | 'snap' | 'enter' | 'exit' ;
1920
@@ -424,19 +425,6 @@ type ButtonColors = Record<
424425 }
425426> ;
426427
427- type Breakpoint = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' ;
428- type Breakpoints = Record < Breakpoint , string > ;
429-
430- const breakpoints = {
431- '2xs' : '0px' ,
432- xs : '500px' ,
433- sm : '800px' ,
434- md : '992px' ,
435- lg : '1200px' ,
436- xl : '1440px' ,
437- '2xl' : '2560px' ,
438- } as const satisfies Breakpoints ;
439-
440428type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' ;
441429
442430// @TODO : this needs to directly reference the icon direction
@@ -494,49 +482,14 @@ const iconSizes: Record<Size, string> = {
494482 '2xl' : '72px' ,
495483} as const ;
496484
497- const space = {
498- '0' : '0px' ,
499- /**
500- * Equivalent to deprecated `space(0.25)`
501- */
502- '2xs' : '2px' ,
503- /**
504- * Equivalent to deprecated `space(0.5)`
505- */
506- xs : '4px' ,
507- /**
508- * Equivalent to deprecated `space(0.75)`
509- */
510- sm : '6px' ,
511- /**
512- * Equivalent to deprecated `space(1)`
513- */
514- md : '8px' ,
515- /**
516- * Equivalent to deprecated `space(1.5)`
517- */
518- lg : '12px' ,
519- /**
520- * Equivalent to deprecated `space(2)`
521- */
522- xl : '16px' ,
523- /**
524- * Equivalent to deprecated `space(3)` (was `20px`)
525- */
526- '2xl' : '24px' ,
527- /**
528- * Equivalent to deprecated `space(4)` (was `30px`)
529- */
530- '3xl' : '32px' ,
531- } as const ;
532-
533485/**
534486 * Values shared between light and dark theme
535487 */
536488const commonTheme = {
537489 breakpoints,
538490
539491 space,
492+ size,
540493 motion : generateMotion ( ) ,
541494
542495 // Icons
@@ -1170,18 +1123,6 @@ function generateChonkTokens(colorScheme: typeof lightColors) {
11701123 } ;
11711124}
11721125
1173- const radius = {
1174- '0' : '0px' ,
1175- '2xs' : '2px' ,
1176- xs : '3px' ,
1177- sm : '4px' ,
1178- md : '6px' ,
1179- lg : '8px' ,
1180- xl : '12px' ,
1181- '2xl' : '16px' ,
1182- full : 'calc(infinity*1px)' ,
1183- } as const ;
1184-
11851126const lightColors = {
11861127 black : color . black ,
11871128 white : color . white ,
0 commit comments