diff --git a/.changeset/dull-ladybugs-whisper.md b/.changeset/dull-ladybugs-whisper.md new file mode 100644 index 0000000000..5fde4a11c0 --- /dev/null +++ b/.changeset/dull-ladybugs-whisper.md @@ -0,0 +1,5 @@ +--- +"@heroui/theme": patch +--- + +Fix tabs slots "wrapper" rename to "tabWrapper" -- Breaking Change (#4552) diff --git a/apps/docs/content/docs/components/tabs.mdx b/apps/docs/content/docs/components/tabs.mdx index 69f62149ce..8b8f339e3e 100644 --- a/apps/docs/content/docs/components/tabs.mdx +++ b/apps/docs/content/docs/components/tabs.mdx @@ -199,6 +199,7 @@ function AppTabs() { - **tabContent**: The tab content slot, it wraps the tab content. - **cursor**: The cursor slot, it wraps the cursor. This is only visible when `disableAnimation=false` - **panel**: The panel slot, it wraps the tab panel (content). +- **tabWrapper**: The tab wrapper slot, it wraps the tab and the tab content. ### Custom Styles @@ -343,7 +344,7 @@ You can customize the `Tabs` component by passing custom Tailwind CSS classes to }, { attribute: "classNames", - type: "Partial>", + type: "Partial>", description: "Allows to set custom class names for the card slots.", default: "-" }, diff --git a/packages/components/tabs/src/use-tabs.ts b/packages/components/tabs/src/use-tabs.ts index 4935d335d8..45d3f4d9fa 100644 --- a/packages/components/tabs/src/use-tabs.ts +++ b/packages/components/tabs/src/use-tabs.ts @@ -171,7 +171,7 @@ export function useTabs(originalProps: UseTabsProps) { const getWrapperProps: PropGetter = useCallback( (props) => ({ "data-slot": "tabWrapper", - className: slots.wrapper({class: clsx(classNames?.wrapper, props?.className)}), + className: slots.tabWrapper({class: clsx(classNames?.tabWrapper, props?.className)}), "data-placement": placement, "data-vertical": isVertical || placement === "start" || placement === "end" ? "vertical" : "horizontal", diff --git a/packages/core/theme/src/components/tabs.ts b/packages/core/theme/src/components/tabs.ts index 70432a33c6..2cddfac8d5 100644 --- a/packages/core/theme/src/components/tabs.ts +++ b/packages/core/theme/src/components/tabs.ts @@ -72,7 +72,7 @@ const tabs = tv({ // focus ring ...dataFocusVisibleClasses, ], - wrapper: [], + tabWrapper: [], }, variants: { variant: { @@ -166,15 +166,15 @@ const tabs = tv({ start: { tabList: "flex-col", panel: "py-0 px-3", - wrapper: "flex", + tabWrapper: "flex", }, end: { tabList: "flex-col", panel: "py-0 px-3", - wrapper: "flex flex-row-reverse", + tabWrapper: "flex flex-row-reverse", }, bottom: { - wrapper: "flex flex-col-reverse", + tabWrapper: "flex flex-col-reverse", }, }, },