UNPKG

@cbpds/web-components

Version:
51 lines (50 loc) 4.2 kB
/*! * CPB Design System web components - built with Stencil */ import { Host, h } from "@stencil/core"; export class CbpUsaBanner { constructor() { this.open = false; } handleClick() { this.open = !this.open; } render() { return (h(Host, { key: 'a8dc4b3dd8e7d6b1a87e2b7c5c0d53882351fa8b' }, h("section", { key: 'b130e928d4e35a5b3a786ced4ad9917dc3ea8a0e', "aria-label": "Official website of the United States government" }, h("div", { key: 'f311363f87c1fa7be1d213a91822c3ab1e805436', class: "cbp-banner__title" }, h("img", { key: 'dfb9595a28c0dc7a3b4c71f8b59ed0d450016720', src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII=", height: "11", width: "16", "aria-hidden": "true", alt: "" }), h("span", { key: 'f1adfc2ee614fb8dcc47dfdd61b4a63dad4345d5' }, h("span", { key: 'bcb91c9e2411e065750e5105c4cd6417a42dfc26' }, "Official website of the United States government."), h("cbp-button", { key: 'a27866510e4038160efccea9ab70b19f7a78d22b', class: "cbp-usa-banner-expand", fill: "ghost", "target-prop": "open", controls: "gov-banner", expanded: `${this.open}`, onClick: () => this.handleClick() }, "Here is how you know ", h("cbp-icon", { key: '973333ab56832dae0f58d86800b17d480521232f', name: "chevron-right", size: "var(--cbp-space-3x)" })))), h("div", { key: '5072197e54b6e747f92dcc564d19fb51d762f6ad', class: "cbp-usa-banner-content", id: "gov-banner" }, h("div", { key: '17e42d7b3fb0c9d452fc5d4c27f7ba5f3c7449f2' }, h("cbp-icon", { key: 'a8180eff0916792194f9765e9fc37e47c7396263', class: "cbp-banner-content-icon", color: "var(--cbp-color-info-light)", name: "landmark", size: "1.25rem" }), h("div", { key: '7c26d210dda7384bb664a2dd73e50a222fa70a9e' }, h("strong", { key: '4db79ed9db9ebc6ab06e463b3df0806316bbdbb6' }, "Official websites use .gov"), h("p", { key: '1e01dde04ea3288c8cb6151f54161ed004dc254e' }, "A ", h("strong", { key: '201c331e0ec7c3d383c15b89501963328f899ea8' }, ".gov"), " website belongs to an official government organization in the United States."))), h("div", { key: '7d252905019ee90caa8dad37692b970c6647846b' }, h("cbp-icon", { key: '1d474146a5e6ae947298d877f87fcb5c3427070a', class: "cbp-banner-content-icon", color: "var(--cbp-color-info-light)", name: "lock", size: "1.25rem" }), h("div", { key: 'bd33eb7e65c2a7d2cf031d0b07d53778112efa75' }, h("strong", { key: 'c870b2994c424c2388c50ece214ce48406c616c8' }, "Secure .gov websites use HTTPS"), h("p", { key: '3077cdc3d7e7425a7cb9f5787eb8a9d4206e96e2' }, "A ", h("strong", { key: 'b0c9c78d1abc0df37bf25c08b146126f8a2c719b' }, "lock"), " (", h("cbp-icon", { key: 'cd0b22cd9dc2c878556ccd04741a89c01ecf2c55', name: "lock", size: "var(--cbp-space-3x)", accessibilityText: "lock icon" }), ") or ", h("strong", { key: '8632713279dc168589e8ae58c77a017cd856768e' }, "https://"), " means you've safely connected to the .gov website. Share sensitive information only on official, secure websites."))))))); } static get is() { return "cbp-usa-banner"; } static get originalStyleUrls() { return { "$": ["cbp-usa-banner.scss"] }; } static get styleUrls() { return { "$": ["cbp-usa-banner.css"] }; } static get properties() { return { "open": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Specifies that the banner is open. Primarily used for internal component logic." }, "attribute": "open", "reflect": true, "defaultValue": "false" } }; } static get elementRef() { return "host"; } } //# sourceMappingURL=cbp-usa-banner.js.map