{"version":3,"file":"pfe-card.min.js","sources":["../_temp/pfe-card.js"],"sourcesContent":["/*!\n * PatternFly Elements: PfeCard 1.12.3\n * @license\n * Copyright 2021 Red Hat, Inc.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n * \n*/\n\nimport PFElement from \"../../pfelement/dist/pfelement.js\";\n\nclass PfeCard extends PFElement {\n\n // Injected at build-time\n static get version() {\n return \"1.12.3\";\n }\n\n // Injected at build-time\n get html() {\n return `\n\n\n
\n \n
\n
\n \n
\n
\n \n
`;\n }\n\n static get tag() {\n return \"pfe-card\";\n }\n\n static get meta() {\n return {\n title: \"Card\",\n description:\n \"This element creates a header, body, and footer region in which to place content or other components.\",\n };\n }\n\n get templateUrl() {\n return \"pfe-card.html\";\n }\n\n get styleUrl() {\n return \"pfe-card.scss\";\n }\n\n // @TODO: How do we handle attributes for slotted content?\n static get properties() {\n return {\n color: {\n title: \"Background color\",\n type: String,\n values: [\"lightest\", \"base\", \"darker\", \"darkest\", \"complement\", \"accent\"],\n default: \"base\",\n observer: \"_colorChanged\",\n },\n // @TODO: Deprecate property in 1.0\n oldColor: {\n type: String,\n prefix: false,\n alias: \"color\",\n attr: \"pfe-color\",\n },\n imgSrc: {\n title: \"Background image\",\n type: String,\n observer: \"_imageSrcChanged\",\n },\n // @TODO: Deprecate property in 1.0\n pfeImgSrc: {\n type: String,\n prefix: false,\n alias: \"imgSrc\",\n },\n size: {\n title: \"Padding size\",\n type: String,\n values: [\"small\"],\n },\n // @TODO: Deprecate property in 1.0\n pfeSize: {\n type: String,\n values: [\"small\"],\n prefix: false,\n alias: \"size\",\n },\n border: {\n title: \"Border\",\n type: Boolean,\n },\n // @TODO: Deprecate property in 1.0\n oldBorder: {\n alias: \"border\",\n attr: \"pfe-border\",\n },\n };\n }\n\n static get slots() {\n return {\n header: {\n title: \"Header\",\n type: \"array\",\n namedSlot: true,\n maxItems: 3,\n items: {\n $ref: \"raw\",\n },\n },\n body: {\n title: \"Body\",\n type: \"array\",\n namedSlot: false,\n items: {\n $ref: \"raw\",\n },\n },\n footer: {\n title: \"Footer\",\n type: \"array\",\n namedSlot: true,\n maxItems: 3,\n items: {\n oneOf: [\n {\n $ref: \"pfe-cta\",\n },\n {\n $ref: \"raw\",\n },\n ],\n },\n },\n };\n }\n\n // Declare the type of this component\n static get PfeType() {\n return PFElement.PfeTypes.Container;\n }\n\n constructor() {\n super(PfeCard, { type: PfeCard.PfeType });\n }\n\n // If the color changes, update the context\n _colorChanged() {\n // Update the context\n this.resetContext();\n }\n\n // Update the background image\n _imageSrcChanged(oldValue, newValue) {\n // Set the image as the background image\n this.style.backgroundImage = newValue ? `url('${newValue}')` : ``;\n }\n}\n\nPFElement.create(PfeCard);\n\nexport { PfeCard as default };\n"],"names":["PfeCard","PFElement","version","html","tag","meta","title","description","templateUrl","styleUrl","properties","color","type","String","values","default","observer","oldColor","prefix","alias","attr","imgSrc","pfeImgSrc","size","pfeSize","border","Boolean","oldBorder","slots","header","namedSlot","maxItems","items","$ref","body","footer","oneOf","PfeType","PfeTypes","Container","[object Object]","super","this","resetContext","oldValue","newValue","style","backgroundImage","create"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAMA,UAAgBC,EAGpBC,qBACE,MAAO,SAITC,WACE,MAAO,qtjBAcTC,iBACE,MAAO,WAGTC,kBACE,MAAO,CACLC,MAAO,OACPC,YACE,yGAINC,kBACE,MAAO,gBAGTC,eACE,MAAO,gBAITC,wBACE,MAAO,CACLC,MAAO,CACLL,MAAO,mBACPM,KAAMC,OACNC,OAAQ,CAAC,WAAY,OAAQ,SAAU,UAAW,aAAc,UAChEC,QAAS,OACTC,SAAU,iBAGZC,SAAU,CACRL,KAAMC,OACNK,QAAQ,EACRC,MAAO,QACPC,KAAM,aAERC,OAAQ,CACNf,MAAO,mBACPM,KAAMC,OACNG,SAAU,oBAGZM,UAAW,CACTV,KAAMC,OACNK,QAAQ,EACRC,MAAO,UAETI,KAAM,CACJjB,MAAO,eACPM,KAAMC,OACNC,OAAQ,CAAC,UAGXU,QAAS,CACPZ,KAAMC,OACNC,OAAQ,CAAC,SACTI,QAAQ,EACRC,MAAO,QAETM,OAAQ,CACNnB,MAAO,SACPM,KAAMc,SAGRC,UAAW,CACTR,MAAO,SACPC,KAAM,eAKZQ,mBACE,MAAO,CACLC,OAAQ,CACNvB,MAAO,SACPM,KAAM,QACNkB,WAAW,EACXC,SAAU,EACVC,MAAO,CACLC,KAAM,QAGVC,KAAM,CACJ5B,MAAO,OACPM,KAAM,QACNkB,WAAW,EACXE,MAAO,CACLC,KAAM,QAGVE,OAAQ,CACN7B,MAAO,SACPM,KAAM,QACNkB,WAAW,EACXC,SAAU,EACVC,MAAO,CACLI,MAAO,CACL,CACEH,KAAM,WAER,CACEA,KAAM,WASlBI,qBACE,OAAOpC,EAAUqC,SAASC,UAG5BC,cACEC,MAAMzC,EAAS,CAAEY,KAAMZ,EAAQqC,UAIjCG,gBAEEE,KAAKC,eAIPH,iBAAiBI,EAAUC,GAEzBH,KAAKI,MAAMC,gBAAkBF,EAAW,QAAQA,MAAe,IAInE5C,EAAU+C,OAAOhD"}