chunk.Y4DV7R6Q.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import {
  2. T,
  3. e,
  4. h,
  5. n,
  6. r
  7. } from "./chunk.5PIDMFOE.js";
  8. import {
  9. __decorateClass
  10. } from "./chunk.IHGPZX35.js";
  11. // _uyihdawu1:/Users/claviska/Projects/shoelace/src/components/tab-panel/tab-panel.scss
  12. var tab_panel_default = ":host {\n position: relative;\n box-sizing: border-box;\n}\n:host *, :host *:before, :host *:after {\n box-sizing: inherit;\n}\n\n[hidden] {\n display: none !important;\n}\n\n:host {\n display: block;\n}\n\n.tab-panel {\n border: solid 1px transparent;\n padding: 20px 20px;\n}";
  13. // src/components/tab-panel/tab-panel.ts
  14. var id = 0;
  15. var SlTabPanel = class extends h {
  16. constructor() {
  17. super(...arguments);
  18. this.componentId = `tab-panel-${++id}`;
  19. this.name = "";
  20. this.active = false;
  21. }
  22. connectedCallback() {
  23. super.connectedCallback();
  24. this.id = this.id || this.componentId;
  25. }
  26. render() {
  27. this.style.display = this.active ? "block" : "none";
  28. return T`
  29. <div
  30. part="base"
  31. class="tab-panel"
  32. role="tabpanel"
  33. aria-selected=${this.active ? "true" : "false"}
  34. aria-hidden=${this.active ? "false" : "true"}
  35. >
  36. <slot></slot>
  37. </div>
  38. `;
  39. }
  40. };
  41. SlTabPanel.styles = r(tab_panel_default);
  42. __decorateClass([
  43. e()
  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. var tab_panel_default2 = SlTabPanel;
  52. export {
  53. tab_panel_default2 as tab_panel_default
  54. };