@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
38 lines (37 loc) • 1.52 kB
JavaScript
"use client";
import { jsx as h } from "react/jsx-runtime";
import { d as T } from "./chunks/index.CgTHIF3K.js";
import { c as g } from "./chunks/index.CEyLAtio.js";
import { useRef as y, useState as F, useEffect as N } from "react";
import { c as P, g as v, a as R } from "./chunks/TabPane.utils.DG16Y2uD.js";
import './assets/tabpane.D1LTb432.css';const S = "ds-tabs_tabpane_30tnb_1", j = {
tabpane: S
}, k = (x) => {
const e = T.c(19), {
id: t,
content: s,
index: o,
selectedTabIndex: E,
tabListId: a,
className: f
} = x, m = y(null), [I, _] = F(!1);
let c;
e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
m.current && _(P(m.current));
}, e[0] = c) : c = e[0];
let i;
e[1] !== s ? (i = [s], e[1] = s, e[2] = i) : i = e[2], N(c, i);
let r;
e[3] !== f ? (r = g(j.tabpane, f), e[3] = f, e[4] = r) : r = e[4];
const d = r;
let n;
e[5] !== t || e[6] !== o || e[7] !== a ? (n = v(a, t, o), e[5] = t, e[6] = o, e[7] = a, e[8] = n) : n = e[8];
let l;
e[9] !== t || e[10] !== a ? (l = R(a, t), e[9] = t, e[10] = a, e[11] = l) : l = e[11];
const p = E !== o, u = I ? void 0 : 0;
let b;
return e[12] !== s || e[13] !== n || e[14] !== l || e[15] !== p || e[16] !== u || e[17] !== d ? (b = /* @__PURE__ */ h("div", { id: n, role: "tabpanel", "aria-labelledby": l, hidden: p, tabIndex: u, ref: m, className: d, children: s }), e[12] = s, e[13] = n, e[14] = l, e[15] = p, e[16] = u, e[17] = d, e[18] = b) : b = e[18], b;
};
export {
k as TabPane
};