Files
NapCatQQ/.pnpm-store/v3/files/cb/80bce5bd111061f3c409db43ea4619b94298b336439993295db5ae266cb9715563a06e15e87b254e3141355158763070532b6fe4aaf36e979237b0b47e140f
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

70 lines
2.0 KiB
Plaintext

"use client";
import {
tab_panel_default
} from "./chunk-7ARJTFQR.mjs";
import {
tab_default
} from "./chunk-TTZQXKQZ.mjs";
import {
useTabs
} from "./chunk-IUT6HU4S.mjs";
// src/tabs.tsx
import { useId } from "react";
import { LayoutGroup } from "framer-motion";
import { forwardRef } from "@heroui/system";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
var Tabs = forwardRef(function Tabs2(props, ref) {
const {
Component,
values,
state,
destroyInactiveTabPanel,
getBaseProps,
getTabListProps,
getWrapperProps
} = useTabs({
...props,
ref
});
const layoutId = useId();
const layoutGroupEnabled = !props.disableAnimation && !props.disableCursorAnimation;
const tabsProps = {
state,
listRef: values.listRef,
slots: values.slots,
classNames: values.classNames,
isDisabled: values.isDisabled,
motionProps: values.motionProps,
disableAnimation: values.disableAnimation,
shouldSelectOnPressUp: values.shouldSelectOnPressUp,
disableCursorAnimation: values.disableCursorAnimation
};
const tabs = [...state.collection].map((item) => /* @__PURE__ */ jsx(tab_default, { item, ...tabsProps, ...item.props }, item.key));
const renderTabs = /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx("div", { ...getBaseProps(), children: /* @__PURE__ */ jsx(Component, { ...getTabListProps(), children: layoutGroupEnabled ? /* @__PURE__ */ jsx(LayoutGroup, { id: layoutId, children: tabs }) : tabs }) }),
[...state.collection].map((item) => {
return /* @__PURE__ */ jsx(
tab_panel_default,
{
classNames: values.classNames,
destroyInactiveTabPanel,
slots: values.slots,
state: values.state,
tabKey: item.key
},
item.key
);
})
] });
if ("placement" in props || "isVertical" in props) {
return /* @__PURE__ */ jsx("div", { ...getWrapperProps(), children: renderTabs });
}
return renderTabs;
});
var tabs_default = Tabs;
export {
tabs_default
};