{"version":3,"names":["createSchemes","newSchemes","AllColors.TILES_TEASER_SCHEMES","forEach","element","schemeName","backgroundColor","AllColors","toConstantCase","hoverBackgroundColor","hoverColor","scheme","TILES_TEASER_SCHEME_CONFIG","TILES_TEASER_SCHEME_MAP","Map","Object","entries","createTilesTeaserMapDefinition","map","background","config","tilesTeaserCss","EonUiTilesTeaserStyle0","TilesTeaser","this","schemeConfig","schemeMap","containerBreakpoints","copyCharacterLimit","TILES_TEASER_COLORS","TILES_TEASER_DEFAULT_HORIZONTAL_CONTENT_ALIGNMENT","TILES_TEASER_DEFAULT_VERTICAL_CONTENT_ALIGNMENT","ASPECTRATIO_1X1","TILES_TEASER_DEFAULT_VIOLATOR_HORIZONTAL_POSITION","hasImage","imageElement","initContainerBreakpoints","initContainerBreakpointsDelegate","hostElement","componentWillLoad","getFirstNestedChild","hasViolator","setAttribute","removeAttribute","linkElement","infoElement","textElement","getTruncatedBody","headlineElement","HEADLINE_SIZE_H4","useTheRightHtmlTagForHeadline","headlineHtmlTag","HEADLINE_TAG_H4","alignHeadline","checkHorizontalContentAlignment","checkVerticalContentAlignment","applyScheme","setAspectRatio","_a","addEventListener","e","preventDefault","handleSchemeForGradients","componentDidLoad","setCssVariables","applyTextColor","tilesTeaserLoad","emit","applySchemeDelegate","setCssVariablesDelegate","setCssVariable","camelToDashCase","textColor","contentAlignment","allowHorizontalContentAlignment","TILES_TEASER_HORIZONTAL_CONTENT_ALIGNMENTS","includes","horizontalContentAlignment","allowVerticalContentAlignment","TILES_TEASER_VERTICAL_CONTENT_ALIGNMENTS","verticalContentAlignment","handeWatch","bodyLength","innerHTML","stripHtml","length","shortenString","aspectRatio","onMouseEnter","String","onMouseLeave","gradientForText","gradientForImages","render","h","Host","key","class","ConditionalWrapper","condition","wrapper","children","pfx","teaser","removeBorderRadius","href","target","_b","title","_c","defaultWrapper","aspectRatioTablet","aspectRatioMobile","name","overlay","content","violatorHorizontalPosition","pictogram"],"sources":["src/components/tiles-teaser/constants/tiles-teaser-constants.ts","src/components/tiles-teaser/tiles-teaser.scss?tag=eon-ui-tiles-teaser&encapsulation=shadow","src/components/tiles-teaser/tiles-teaser.tsx"],"sourcesContent":["import { toConstantCase } from \"../../../utils/string-format\";\nimport { TilesTeaserSchemeDefinition } from \"./tiles-teaser-types\";\nimport * as AllColors from \"../../../constants/colors\";\nimport { BackgroundColor } from \"../../background/constants/background-types\";\nimport { createTilesTeaserMapDefinition } from \"../../../utils/scheme-helper\";\n\nfunction createSchemes() {\n let newSchemes: AllColors.TilesTeaserSchemeConfiguration = {};\n AllColors.TILES_TEASER_SCHEMES.forEach((element) => {\n newSchemes[element.schemeName] = {\n backgroundColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}`],\n hoverBackgroundColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}_SHADE_1`],\n hoverColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}_FONT`]\n };\n if (element.scheme) {\n newSchemes[element.schemeName] = { ...newSchemes[element.schemeName], ...element.scheme };\n }\n });\n return newSchemes;\n}\n\nexport const TILES_TEASER_SCHEME_CONFIG: AllColors.TilesTeaserSchemeConfiguration = createSchemes();\n\nexport const TILES_TEASER_SCHEME_MAP: Map = new Map(\n Object.entries(createTilesTeaserMapDefinition()).map(([background, config]) => [\n background as BackgroundColor,\n TILES_TEASER_SCHEME_CONFIG[config as string]\n ])\n);\n","/**\n * THEME JSON CONFIG CSS VARS\n * The following default component scss variables can be overwritten via theme configuration per brand.\n * If you need to add new one, please make sure to set a default value.\n * JSON Definition for Component with name \"Example\": testCssVar: \"20px\"\n * Resulting CSS var: $example-test-css-var: 20px;\n */\n\n$tiles-teaser-small-content-margin: 24px !default;\n$tiles-teaser-tablet-content-margin: 32px !default;\n$tiles-teaser-large-content-margin: 40px !default;\n$tiles-teaser-x-large-content-margin: 48px !default;\n$tiles-teaser-default-shadow: none !default;\n$tiles-teaser-default-radius: 0 !default;\n$tiles-teaser-drop-shadow: none !default;\n$tiles-teaser-drop-shadow-on-hover: none !default;\n$tiles-teaser-mobile-radius: 0 !default;\n$tiles-teaser-tablet-radius: 0 !default;\n$tiles-teaser-desktop-radius: 0 !default;\n$tiles-teaser-desktop-large-radius: 0 !default;\n\n/* END THEME JSON CONFIG CSS VARS ******************************************************* */\n\n:host {\n display: block;\n box-shadow: $tiles-teaser-default-shadow;\n border-radius: $tiles-teaser-default-radius;\n overflow: hidden;\n}\n\n:host(:not(.no-link)) {\n filter: drop-shadow($tiles-teaser-drop-shadow);\n transition: filter $transition-duration ease-in-out;\n}\n\n:host(:not(.no-link):hover) {\n filter: drop-shadow($tiles-teaser-drop-shadow-on-hover);\n}\n\n:host([background-color]) {\n ::slotted(eon-ui-image) {\n display: block;\n }\n}\n\n::slotted(*:not(eon-ui-image)) {\n transition: color $transition-duration ease-in-out !important;\n}\n\n::slotted(eon-ui-headline) {\n --color: var(--textColor) !important; // v(...) helper doesn't work with nested vars\n}\n\n::slotted(eon-ui-link) {\n --contentColor: var(--textColor) !important;\n --contentHoverColor: var(--textColor) !important;\n --contentFocusColor: var(--textColor) !important;\n}\n\n::slotted(eon-ui-text) {\n --color: var(--textColor) !important;\n}\n\ndiv.#{$prefix}pictogram-wrapper > eon-ui-pictogram {\n transition: color $transition-duration ease-in-out !important;\n --color: var(--textColor) !important;\n}\n\n:host(:not(.no-link)[background-color]:hover),\n:host([background-color].no-image),\n:host(.no-image) {\n &:host(.has-text-gradient){\n --hoverColor: var(--eon-neutral100);\n }\n ::slotted(eon-ui-image) {\n opacity: 0 !important;\n }\n\n // Overriding the CSS variables of child components only works if they are defined in the