{"version":3,"file":"pfe-band.min.js","sources":["../_temp/pfe-band.js"],"sourcesContent":["/*!\n * PatternFly Elements: PfeBand 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 PfeBand 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 ${this.hasSlot(\"pfe-band--aside\") && this.asidePosition.mobile === \"top\" ? `` : \"\"}\n ${this.asideHeight === \"full\" ? `
` : \"\"}\n ${this.hasSlot(\"pfe-band--header\") ? `
\n \n
` : \"\"}\n
\n \n
\n ${this.asideHeight !== \"full\" && this.hasSlot(\"pfe-band--aside\") && this.asidePosition.mobile !== \"top\" ? `\n \n ` : \"\"}\n ${this.hasSlot(\"pfe-band--footer\") ? `
\n \n
` : \"\"}\n ${this.asideHeight === \"full\" ? `
` : \"\"}\n ${this.asideHeight === \"full\" && this.hasSlot(\"pfe-band--aside\") && this.asidePosition.mobile !== \"top\" ? `\n \n ` : \"\"}\n
`;\n }\n\n static get tag() {\n return \"pfe-band\";\n }\n\n static get meta() {\n return {\n title: \"Band\",\n description:\n \"This element creates a header, body, footer, and aside region in which to place content or other components.\",\n };\n }\n\n get templateUrl() {\n return \"pfe-band.html\";\n }\n\n get styleUrl() {\n return \"pfe-band.scss\";\n }\n\n get asidePosition() {\n return {\n desktop: this.asideDesktop,\n mobile: this.asideMobile,\n height: this.asideHeight,\n };\n }\n\n static get properties() {\n return {\n imgSrc: {\n title: \"Background image\",\n type: String,\n observer: \"_imgSrcChanged\",\n },\n // @TODO: Deprecated property in 1.0\n oldImgSrc: {\n alias: \"imgSrc\",\n attr: \"pfe-img-src\",\n },\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: Deprecated property in 1.0\n oldColor: {\n alias: \"color\",\n attr: \"pfe-color\",\n },\n asideDesktop: {\n title: \"side positioning (desktop)\",\n type: String,\n values: [\"right\", \"left\"],\n default: \"right\",\n },\n // @TODO: Deprecated property in 1.0\n oldAsideDesktop: {\n alias: \"asideDesktop\",\n attr: \"pfe-aside-desktop\",\n },\n asideMobile: {\n title: \"Aside positioning (mobile)\",\n type: String,\n values: [\"top\", \"bottom\"],\n default: \"bottom\",\n },\n // @TODO: Deprecated property in 1.0\n oldAsideMobile: {\n alias: \"asideMobile\",\n attr: \"pfe-aside-mobile\",\n },\n asideHeight: {\n title: \"Aside height\",\n type: String,\n values: [\"full\", \"body\"],\n default: \"body\",\n },\n // @TODO: Deprecated property in 1.0\n oldAsideHeight: {\n alias: \"asideHeight\",\n attr: \"pfe-aside-height\",\n },\n size: {\n title: \"Padding size\",\n type: String,\n values: [\"small\"],\n },\n // @TODO: Deprecated property in 1.0\n oldSize: {\n alias: \"size\",\n attr: \"pfe-size\",\n },\n useGrid: {\n title: \"Default grid on for the light DOM regions (header, body, footer, aside)\",\n type: Boolean,\n default: false,\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 oneOf: [\n {\n $ref: \"pfe-card\",\n },\n {\n $ref: \"raw\",\n },\n ],\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 aside: {\n title: \"Aside\",\n type: \"array\",\n namedSlot: true,\n maxItems: 5,\n items: {\n oneOf: [\n {\n $ref: \"pfe-card\",\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(PfeBand, { type: PfeBand.PfeType });\n }\n\n _colorChanged() {\n // Update the context\n this.resetContext();\n }\n\n // Update the background image\n _imgSrcChanged(oldVal, newVal) {\n // Set the image as the background image\n this.style.backgroundImage = newVal ? `url('${newVal}')` : ``;\n }\n}\n\nPFElement.create(PfeBand);\n\nexport { PfeBand as default };\n"],"names":["PfeBand","PFElement","version","html","this","hasSlot","asidePosition","mobile","asideHeight","tag","meta","title","description","templateUrl","styleUrl","desktop","asideDesktop","asideMobile","height","properties","imgSrc","type","String","observer","oldImgSrc","alias","attr","color","values","default","oldColor","oldAsideDesktop","oldAsideMobile","oldAsideHeight","size","oldSize","useGrid","Boolean","slots","header","namedSlot","maxItems","items","$ref","body","oneOf","footer","aside","PfeType","PfeTypes","Container","[object Object]","super","resetContext","oldVal","newVal","style","backgroundImage","create"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAMA,UAAgBC,EAGpBC,qBACE,MAAO,SAITC,WACE,MAAO,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