{"version":3,"file":"createInteraction.cjs","sources":["../../src/themes/createInteraction.ts"],"sourcesContent":["import { merge } from '../libs/lodash'\n\nconst hoverAnimationDuration = '.3s'\nconst hoverAnimationTiming = 'ease-out'\n\nexport type InteractionProperty = {\n  hover?: {\n    feedbackOpacity?: string\n    animationDuration?: string\n    animationTiming?: string\n    animation?: string\n  }\n}\n\nexport type CreatedInteractionTheme = {\n  hover: {\n    feedbackOpacity: string\n    animationDuration: string\n    animationTiming: string\n    animation: string\n  }\n}\n\nexport const defaultInteraction: CreatedInteractionTheme = {\n  hover: {\n    feedbackOpacity: '.7',\n    animationDuration: hoverAnimationDuration,\n    animationTiming: hoverAnimationTiming,\n    animation: `${hoverAnimationDuration} ${hoverAnimationTiming}`,\n  },\n}\n\nexport const createInteraction = (\n  userInteraction?: InteractionProperty,\n): CreatedInteractionTheme => {\n  if (!userInteraction) {\n    return defaultInteraction\n  }\n\n  return merge(\n    {\n      ...defaultInteraction,\n    },\n    userInteraction,\n  )\n}\n"],"names":["merge"],"mappings":";;;;AAEA,MAAM,sBAAsB,GAAG,KAAK;AACpC,MAAM,oBAAoB,GAAG,UAAU;AAoBhC,MAAM,kBAAkB,GAA4B;AACzD,IAAA,KAAK,EAAE;AACL,QAAA,eAAe,EAAE,IAAI;AACrB,QAAA,iBAAiB,EAAE,sBAAsB;AACzC,QAAA,eAAe,EAAE,oBAAoB;AACrC,QAAA,SAAS,EAAE,CAAA,EAAG,sBAAsB,CAAA,CAAA,EAAI,oBAAoB,CAAA,CAAE;AAC/D,KAAA;;AAGI,MAAM,iBAAiB,GAAG,CAC/B,eAAqC,KACV;IAC3B,IAAI,CAAC,eAAe,EAAE;AACpB,QAAA,OAAO,kBAAkB;IAC3B;AAEA,IAAA,OAAOA,iBAAK,CACV;AACE,QAAA,GAAG,kBAAkB;KACtB,EACD,eAAe,CAChB;AACH;;;;;"}