1 | import {
|
2 | tab_panel_styles_default
|
3 | } from "./chunk.PRBD3VT7.js";
|
4 | import {
|
5 | autoIncrement
|
6 | } from "./chunk.KFR7NC2M.js";
|
7 | import {
|
8 | e,
|
9 | n
|
10 | } from "./chunk.VKNZYXSO.js";
|
11 | import {
|
12 | $,
|
13 | s
|
14 | } from "./chunk.WWAD5WF4.js";
|
15 | import {
|
16 | __decorateClass
|
17 | } from "./chunk.K2NRSETB.js";
|
18 |
|
19 |
|
20 | var SlTabPanel = class extends s {
|
21 | constructor() {
|
22 | super(...arguments);
|
23 | this.attrId = autoIncrement();
|
24 | this.componentId = `sl-tab-panel-${this.attrId}`;
|
25 | this.name = "";
|
26 | this.active = false;
|
27 | }
|
28 | connectedCallback() {
|
29 | super.connectedCallback();
|
30 | this.id = this.id.length > 0 ? this.id : this.componentId;
|
31 | }
|
32 | render() {
|
33 | this.style.display = this.active ? "block" : "none";
|
34 | return $`
|
35 | <div part="base" class="tab-panel" role="tabpanel" aria-hidden=${this.active ? "false" : "true"}>
|
36 | <slot></slot>
|
37 | </div>
|
38 | `;
|
39 | }
|
40 | };
|
41 | SlTabPanel.styles = tab_panel_styles_default;
|
42 | __decorateClass([
|
43 | e({ reflect: true })
|
44 | ], SlTabPanel.prototype, "name", 2);
|
45 | __decorateClass([
|
46 | e({ type: Boolean, reflect: true })
|
47 | ], SlTabPanel.prototype, "active", 2);
|
48 | SlTabPanel = __decorateClass([
|
49 | n("sl-tab-panel")
|
50 | ], SlTabPanel);
|
51 |
|
52 | export {
|
53 | SlTabPanel
|
54 | };
|