* Profile Content
* Your profile information goes here.
*
*/
export class CTTabPanel extends BaseElement {
static override styles = [
BaseElement.baseStyles,
css`
:host {
display: block;
margin-top: var(--ct-spacing-6);
animation: fadeIn var(--ct-transition-duration-fast) ease-in;
}
:host([hidden]) {
display: none !important;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.tab-panel {
outline: none;
}
.tab-panel:focus-visible {
outline: 2px solid var(--ring, hsl(222.2, 84%, 4.9%));
outline-offset: 2px;
border-radius: var(--radius, 0.375rem);
}
/* Vertical orientation - adjust spacing */
:host-context(ct-tabs[orientation="vertical"]) {
margin-top: 0;
margin-left: var(--ct-spacing-6);
}
`,
];
static override properties = {
value: { type: String, reflect: true },
hidden: { type: Boolean, reflect: true },
};
declare value: string;
declare hidden: boolean;
constructor() {
super();
this.value = "";
this.hidden = true;
}
override connectedCallback() {
super.connectedCallback();
// Set ARIA attributes
this.setAttribute("role", "tabpanel");
this.setAttribute("tabindex", "0");
this.updateAriaAttributes();
// Set up aria-labelledby when associated tab is found
this.updateAriaLabelledBy();
}
override updated(changedProperties: Map