{"version":3,"file":"highlighted-colors.cjs","names":["useStylesPreviewColors","motion"],"sources":["../src/highlighted-colors.tsx"],"sourcesContent":["import { __unstableMotion as motion } from '@wordpress/components';\nimport { useStylesPreviewColors } from './preview-hooks';\n\ninterface HighlightedColorsProps {\n\tnormalizedColorSwatchSize: number;\n\tratio: number;\n}\n\nexport default function HighlightedColors( {\n\tnormalizedColorSwatchSize,\n\tratio,\n}: HighlightedColorsProps ) {\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst scaledSwatchSize = normalizedColorSwatchSize * ratio;\n\treturn highlightedColors.map( ( { slug, color }, index ) => (\n\t\t<motion.div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\theight: scaledSwatchSize,\n\t\t\t\twidth: scaledSwatchSize,\n\t\t\t\tbackground: color,\n\t\t\t\tborderRadius: scaledSwatchSize / 2,\n\t\t\t} }\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: index === 1 ? 0.2 : 0.1,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n"],"mappings":";;;;;;;;;AAQA,SAAwB,kBAAmB,EAC1C,2BACA,SAC2B;CAC3B,MAAM,EAAE,uBAAA,GAAsBA,oBAAAA,uBAAAA,CAAuB;CACrD,MAAM,mBAAmB,4BAA4B;CACrD,OAAO,kBAAkB,KAAO,EAAE,MAAM,SAAS,UAChD,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,iBAAO,KAAR;EAEC,OAAQ;GACP,QAAQ;GACR,OAAO;GACP,YAAY;GACZ,cAAc,mBAAmB;EAClC;EACA,SAAU;GACT,OAAO;GACP,SAAS;EACV;EACA,SAAU;GACT,OAAO;GACP,SAAS;EACV;EACA,YAAa,EACZ,OAAO,UAAU,IAAI,KAAM,GAC5B;CACA,GAlBM,GAAI,KAAM,GAAI,OAkBpB,CACA;AACH"}