UNPKG

@cbpds/web-components

Version:
91 lines (90 loc) 3.15 kB
/*! * CPB Design System web components - built with Stencil */ import { Host, h } from "@stencil/core"; import { setCSSProps } from "../../utils/utils"; export class CbpTabPanel { constructor() { this.name = undefined; this.selected = undefined; this.sx = {}; } componentWillLoad() { if (typeof this.sx == 'string') { this.sx = JSON.parse(this.sx) || {}; } setCSSProps(this.host, Object.assign({}, this.sx)); } render() { return (h(Host, { key: 'd30745c39739d225e699dc7328c363b323110f05', role: "tabpanel", id: this.name, "aria-labelledby": `${this.name}_tab` }, h("slot", { key: '28744de83a30547bed91e3130d40ad73bce2770a' }))); } static get is() { return "cbp-tab-panel"; } static get originalStyleUrls() { return { "$": ["cbp-tab-panel.scss"] }; } static get styleUrls() { return { "$": ["cbp-tab-panel.css"] }; } static get properties() { return { "name": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": true, "optional": false, "docs": { "tags": [], "text": "An `ID`-conformant unique name of the tab-panel, applied as an `id` on this tab panel; This value should match the corresponding cbp-tab name and links the two together." }, "attribute": "name", "reflect": false }, "selected": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Specifies if this is the tab panel corresponding to the selected tab and currently visible. This property is managed by the parent cbp-tabs component and does not need to be set manually." }, "attribute": "selected", "reflect": true }, "sx": { "type": "any", "mutable": false, "complexType": { "original": "any", "resolved": "any", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Supports adding inline styles as an object" }, "attribute": "sx", "reflect": false, "defaultValue": "{}" } }; } static get elementRef() { return "host"; } } //# sourceMappingURL=cbp-tab-panel.js.map