diff --git a/packages/components/src/accordion/src/useAccordionItems.ts b/packages/components/src/accordion/src/useAccordionItems.ts index 5d83c5025..36ded84eb 100644 --- a/packages/components/src/accordion/src/useAccordionItems.ts +++ b/packages/components/src/accordion/src/useAccordionItems.ts @@ -1,7 +1,7 @@ import { Children, ReactElement, ReactNode, Ref, useMemo } from "react"; import { Content, Header } from "../../placeholders/index.ts"; import { isNil, mergeProps } from "../../shared/index.ts"; -import { getElementRef } from "@components/collection/index.ts"; +import { getElementRef } from "../../shared/src/getElementRef.tsx"; export interface AccordionBuilderItem { header: AccordionBuilderHeader; diff --git a/packages/components/src/collection/src/index.ts b/packages/components/src/collection/src/index.ts index 126d131ff..525caf9fe 100644 --- a/packages/components/src/collection/src/index.ts +++ b/packages/components/src/collection/src/index.ts @@ -7,4 +7,3 @@ export * from "./getItemText.tsx"; export * from "./reduceCollection.ts"; export * from "./Item.tsx"; export * from "./Section.tsx"; -export * from "./getElementRef.tsx"; diff --git a/packages/components/src/collection/src/useCollection.ts b/packages/components/src/collection/src/useCollection.ts index 24fa26b41..8bbda3934 100644 --- a/packages/components/src/collection/src/useCollection.ts +++ b/packages/components/src/collection/src/useCollection.ts @@ -1,6 +1,7 @@ import { Children, ElementType, ReactElement, ReactNode, Ref, useMemo } from "react"; import { Divider } from "../../divider/index.ts"; -import { getElementRef, Item, Section } from "../../collection/index.ts"; +import { Item, Section } from "../../collection/index.ts"; +import { getElementRef } from "../../shared/src/getElementRef.tsx"; import { TooltipTrigger, parseTooltipTrigger } from "../../tooltip/index.ts"; import { isNil, resolveChildren } from "../../shared/index.ts"; diff --git a/packages/components/src/shared/src/augmentElement.tsx b/packages/components/src/shared/src/augmentElement.tsx index 0d1a41a49..6389635cf 100644 --- a/packages/components/src/shared/src/augmentElement.tsx +++ b/packages/components/src/shared/src/augmentElement.tsx @@ -1,7 +1,7 @@ import { ReactElement, RefAttributes, cloneElement } from "react"; import { Size, SizeAdapter, normalizeSize } from "./size.ts"; import { mergeProps } from "./mergeProps.ts"; -import { getElementRef } from "@components/collection/index.ts"; +import { getElementRef } from "./getElementRef.tsx"; export function augmentElement(element: ReactElement & RefAttributes, newProps: Record) { const augmentedProps = mergeProps({ ...element.props, ref: getElementRef(element) }, newProps); diff --git a/packages/components/src/collection/src/getElementRef.tsx b/packages/components/src/shared/src/getElementRef.tsx similarity index 100% rename from packages/components/src/collection/src/getElementRef.tsx rename to packages/components/src/shared/src/getElementRef.tsx diff --git a/packages/components/src/tabs/src/useTabsItems.ts b/packages/components/src/tabs/src/useTabsItems.ts index 9d508a0a8..5e0d7d201 100644 --- a/packages/components/src/tabs/src/useTabsItems.ts +++ b/packages/components/src/tabs/src/useTabsItems.ts @@ -1,7 +1,7 @@ import { Children, ReactElement, ReactNode, Ref, RefAttributes, useMemo } from "react"; import { Content, Header } from "../../placeholders/index.ts"; import { isNil, mergeProps, resolveChildren } from "../../shared/index.ts"; -import { getElementRef } from "@components/collection/index.ts"; +import { getElementRef } from "../../shared/src/getElementRef.tsx"; export interface PanelType { disabled?: boolean;