diff --git a/package.json b/package.json index edfc3f48..3467358e 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,77 @@ "registry": "https://registry.npmjs.org" }, "exports": { + "./ebay-dialog-base/components/animation": { + "types": "./ebay-dialog-base/components/animation.d.ts", + "default": "./ebay-dialog-base/components/animation.js" + }, + "./ebay-dialog-base/components/dialog-header": { + "types": "./ebay-dialog-base/components/dialog-header.d.ts", + "default": "./ebay-dialog-base/components/dialog-header.js" + }, + "./ebay-dialog-base/components/dialog-footer": { + "types": "./ebay-dialog-base/components/dialog-footer.d.ts", + "default": "./ebay-dialog-base/components/dialog-footer.js" + }, + "./ebay-notice-base/components/*": { + "types": "./ebay-notice-base/index.d.ts", + "default": "./ebay-notice-base.js" + }, + "./common/component-utils/forwardRef": { + "types": "./common/component-utils/forwardRef.d.ts", + "default": "./common/component-utils/forwardRef.js" + }, + "./common/component-utils/utils": { + "types": "./common/component-utils/utils.d.ts", + "default": "./common/component-utils/utils.js" + }, + "./common/component-utils": { + "types": "./common/component-utils/index.d.ts", + "default": "./common/component-utils.js" + }, + "./common/event-utils/types": { + "types": "./common/event-utils/event-utils/types.d.ts" + }, + "./common/event-utils": { + "types": "./common/event-utils/event-utils/index.d.ts", + "default": "./common/event-utils/event-utils.js" + }, + "./common/floating-label-utils": { + "types": "./common/floating-label-utils/hooks.d.ts", + "default": "./common/floating-label-utils/hooks.js" + }, + "./common/notice-utils/notice-cta": { + "types": "./common/notice-utils/notice-cta.d.ts", + "default": "./common/notice-utils/notice-cta.js" + }, + "./common/random-id": { + "types": "./common/random-id.d.ts", + "default": "./common/random-id.js" + }, + "./common/tooltip-utils/constants": { + "types": "./common/tooltip-utils/constants.d.ts", + "default": "./common/tooltip-utils/constants.js" + }, + "./common/tooltip-utils/types": { + "types": "./common/tooltip-utils/types.d.ts" + }, + "./common/tooltip-utils": { + "types": "./common/tooltip-utils/index.d.ts", + "default": "./common/tooltip-utils.js" + }, + "./ebay-radio/radio": { + "types": "./ebay-radio/radio.d.ts", + "default": "./ebay-radio/radio.js" + }, + "./ebay-fake-menu-button/menu-button": { + "types": "./ebay-fake-menu-button/menu-button.d.ts", + "default": "./ebay-fake-menu-button/menu-button.js" + }, + "./ebay-fake-menu/menu-item": { + "types": "./ebay-fake-menu/menu-item.d.ts", + "default": "./ebay-fake-menu/menu-item.js" + }, + "./package.json": "./package.json", "./*": { "types": "./*/index.d.ts", diff --git a/src/common/__mocks__/random-id.ts b/src/common/__mocks__/random-id.ts new file mode 100644 index 00000000..77cd6f01 --- /dev/null +++ b/src/common/__mocks__/random-id.ts @@ -0,0 +1,2 @@ +export const randomId = (): string => 'abc123' +export const useRandomId = (): string => 'abc123' diff --git a/src/common/component-utils/usePrevious.ts b/src/common/component-utils/usePrevious.ts deleted file mode 100644 index 7dafd040..00000000 --- a/src/common/component-utils/usePrevious.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { useEffect, useRef } from 'react' - -export function usePrevious(value: T): T { - const ref = useRef() - - useEffect(() => { - ref.current = value - }, [value]) - - return ref.current -} diff --git a/src/common/event-utils/index.ts b/src/common/event-utils/index.ts index 85c08c80..c30732d0 100644 --- a/src/common/event-utils/index.ts +++ b/src/common/event-utils/index.ts @@ -87,7 +87,7 @@ export function preventDefaultIfHijax(e: React.KeyboardEvent, hijax: boolean): v } } -type Handler = (e: KeyboardEvent) => void +type Handler = (e: KeyboardEvent | Event) => void const handlers: Handler[] = [] @@ -103,7 +103,7 @@ export function removeEventListener(_: unknown, handler: Handler): void { } handlers.splice(handlers.indexOf(handler), 1) } -export function handleResize(e: KeyboardEvent): void { +export function handleResize(e: KeyboardEvent | Event): void { window.removeEventListener('resize', handleResize) const callback = () => { if (handlers.length) { diff --git a/src/common/random-id.ts b/src/common/random-id.ts index 78f288bb..4a4f9db2 100644 --- a/src/common/random-id.ts +++ b/src/common/random-id.ts @@ -1 +1,14 @@ +import { useEffect, useState } from 'react' + export const randomId = (): string => Math.random().toString(16).slice(-4) + +export const useRandomId = (): string => { + const [id, setId] = useState('') + + useEffect(() => { + setId(randomId()) + }, []) + + return id +} + diff --git a/src/ebay-alert-dialog/__tests__/index.spec.tsx b/src/ebay-alert-dialog/__tests__/index.spec.tsx index 17b76e3b..138703b2 100644 --- a/src/ebay-alert-dialog/__tests__/index.spec.tsx +++ b/src/ebay-alert-dialog/__tests__/index.spec.tsx @@ -2,7 +2,7 @@ import React from 'react' import { screen, fireEvent, render } from '@testing-library/react' import { EbayAlertDialog } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const closeSpy = jest.fn() const openSpy = jest.fn() diff --git a/src/ebay-confirm-dialog/__tests__/index.spec.tsx b/src/ebay-confirm-dialog/__tests__/index.spec.tsx index d9d78057..577f6456 100644 --- a/src/ebay-confirm-dialog/__tests__/index.spec.tsx +++ b/src/ebay-confirm-dialog/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { screen, render, fireEvent } from '@testing-library/react' import { EbayDialogHeader } from '../../ebay-dialog-base' import { EbayConfirmDialog } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const openSpy = jest.fn() const confirmSpy = jest.fn() diff --git a/src/ebay-confirm-dialog/__tests__/render.spec.tsx b/src/ebay-confirm-dialog/__tests__/render.spec.tsx index 5d53a685..6049656d 100644 --- a/src/ebay-confirm-dialog/__tests__/render.spec.tsx +++ b/src/ebay-confirm-dialog/__tests__/render.spec.tsx @@ -6,7 +6,7 @@ import Meta, { Default, WithAnimation } from './index.stories' const DefaultStory = composeStory(Default, Meta) const AnimationStory = composeStory(WithAnimation, Meta) -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('ebay-confirm-dialog rendering', () => { it('renders default story correctly', () => { diff --git a/src/ebay-dialog-base/index.ts b/src/ebay-dialog-base/index.ts index 1be89f78..ac992017 100644 --- a/src/ebay-dialog-base/index.ts +++ b/src/ebay-dialog-base/index.ts @@ -5,3 +5,4 @@ export type { WindowType, DialogBaseProps } from './components/dialogBase' export { default as DialogBaseWithState } from './dialog-base-with-state' export { default as EbayDialogActions } from './components/dialog-actions' export { default as EbayDialogPreviousButton } from './components/dialog-previous-button' +export { type TransitionElement, useDialogAnimation } from './components/animation' diff --git a/src/ebay-drawer-dialog/__tests__/index.spec.tsx b/src/ebay-drawer-dialog/__tests__/index.spec.tsx index 4da7d8ca..49bcc135 100644 --- a/src/ebay-drawer-dialog/__tests__/index.spec.tsx +++ b/src/ebay-drawer-dialog/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { render, fireEvent } from '@testing-library/react' import { EbayDrawerDialog } from '../index' import { EbayDialogHeader } from '../../ebay-dialog-base' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const classPrefix = 'drawer-dialog' const closeDrawerHandler = jest.fn() diff --git a/src/ebay-fake-menu-button/index.ts b/src/ebay-fake-menu-button/index.ts index 85351ad2..a908d321 100644 --- a/src/ebay-fake-menu-button/index.ts +++ b/src/ebay-fake-menu-button/index.ts @@ -1,4 +1,8 @@ -export { default as EbayFakeMenuButton, type EbayFakeMenuButtonProps } from './menu-button' +export { + default as EbayFakeMenuButton, + type EbayFakeMenuButtonProps, + type EbayFakeMenuButtonVariant +} from './menu-button' export { default as EbayFakeMenuButtonItem } from './menu-button-item' export { default as EbayFakeMenuButtonSeparator } from './menu-button-separator' export { default as EbayFakeMenuButtonLabel } from './menu-button-label' diff --git a/src/ebay-fullscreen-dialog/__tests__/index.spec.tsx b/src/ebay-fullscreen-dialog/__tests__/index.spec.tsx index f5d3dfb1..18b39bfd 100644 --- a/src/ebay-fullscreen-dialog/__tests__/index.spec.tsx +++ b/src/ebay-fullscreen-dialog/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { render, fireEvent } from '@testing-library/react' import { EbayDialogHeader } from '../../ebay-dialog-base' import { EbayFullscreenDialog } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const closeSpy = jest.fn() const openSpy = jest.fn() diff --git a/src/ebay-fullscreen-dialog/__tests__/render.spec.tsx b/src/ebay-fullscreen-dialog/__tests__/render.spec.tsx index a6652e39..6006296e 100644 --- a/src/ebay-fullscreen-dialog/__tests__/render.spec.tsx +++ b/src/ebay-fullscreen-dialog/__tests__/render.spec.tsx @@ -6,7 +6,7 @@ import Meta, { Default, AlwaysOpened } from './index.stories' const DefaultStory = composeStory(Default, Meta) const AlwaysOpenedStory = composeStory(AlwaysOpened, Meta) -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('ebay-fullscreen-dialog rendering', () => { it('renders default story correctly', () => { diff --git a/src/ebay-icon/__tests__/index.spec.tsx b/src/ebay-icon/__tests__/index.spec.tsx index 4af6d9bf..994c4d52 100644 --- a/src/ebay-icon/__tests__/index.spec.tsx +++ b/src/ebay-icon/__tests__/index.spec.tsx @@ -5,7 +5,7 @@ import * as stories from './index.stories' const { AllIcons, CustomColor, NonDecorative } = composeStories(stories) -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('ebay-icon rendering', () => { describe('AllIcons story', () => { diff --git a/src/ebay-infotip/__tests__/index.spec.tsx b/src/ebay-infotip/__tests__/index.spec.tsx index 25fc9180..f52eb010 100644 --- a/src/ebay-infotip/__tests__/index.spec.tsx +++ b/src/ebay-infotip/__tests__/index.spec.tsx @@ -2,7 +2,7 @@ import React from 'react' import { render, fireEvent, RenderResult } from '@testing-library/react' import { EbayInfotip, EbayInfotipContent, EbayInfotipHeading } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const renderComponent = (props?: any) => render( diff --git a/src/ebay-infotip/__tests__/render.spec.tsx b/src/ebay-infotip/__tests__/render.spec.tsx index ec99e496..c1ed3727 100644 --- a/src/ebay-infotip/__tests__/render.spec.tsx +++ b/src/ebay-infotip/__tests__/render.spec.tsx @@ -13,7 +13,7 @@ const { Modal } = composeStories(stories) -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('ebay-infotip rendering', () => { it('renders default story correctly', () => { diff --git a/src/ebay-inline-notice/__tests__/index.spec.tsx b/src/ebay-inline-notice/__tests__/index.spec.tsx index b14c8975..746740c0 100644 --- a/src/ebay-inline-notice/__tests__/index.spec.tsx +++ b/src/ebay-inline-notice/__tests__/index.spec.tsx @@ -65,4 +65,4 @@ describe('', () => { }) }) -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') diff --git a/src/ebay-lightbox-dialog/__tests__/index.spec.tsx b/src/ebay-lightbox-dialog/__tests__/index.spec.tsx index fa22d044..082d750a 100644 --- a/src/ebay-lightbox-dialog/__tests__/index.spec.tsx +++ b/src/ebay-lightbox-dialog/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { render, fireEvent } from '@testing-library/react' import { EbayDialogFooter, EbayDialogHeader } from '../../ebay-dialog-base' import { EbayLightboxDialog } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const closeSpy = jest.fn() const openSpy = jest.fn() diff --git a/src/ebay-page-notice/__tests__/index.spec.tsx b/src/ebay-page-notice/__tests__/index.spec.tsx index 640a9e16..a3694427 100644 --- a/src/ebay-page-notice/__tests__/index.spec.tsx +++ b/src/ebay-page-notice/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { act, render } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { EbayNoticeContent, EbayPageNotice, EbayPageNoticeTitle } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const clickEvent = expect.objectContaining({ type: 'click' }) const keyDownEvent = expect.objectContaining({ type: 'keydown' }) diff --git a/src/ebay-pagination/__tests__/index.spec.tsx b/src/ebay-pagination/__tests__/index.spec.tsx index cff6902e..f05f48ae 100644 --- a/src/ebay-pagination/__tests__/index.spec.tsx +++ b/src/ebay-pagination/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { fireEvent, render } from '@testing-library/react' import { EbayPagination, EbayPaginationItem as Item } from '../index' import { eventOfType } from '../../common/event-utils/__tests__/helpers' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') jest.mock('react-dom', () => { const original = jest.requireActual('react-dom') diff --git a/src/ebay-panel-dialog/__tests__/index.spec.tsx b/src/ebay-panel-dialog/__tests__/index.spec.tsx index 4957896a..8963ddce 100644 --- a/src/ebay-panel-dialog/__tests__/index.spec.tsx +++ b/src/ebay-panel-dialog/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { render, fireEvent } from '@testing-library/react' import { EbayDialogCloseButton, EbayDialogHeader } from '../../ebay-dialog-base' import { EbayPanelDialog } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') const closeSpy = jest.fn() const openSpy = jest.fn() diff --git a/src/ebay-section-notice/index.ts b/src/ebay-section-notice/index.ts index 92b59c3c..4edd67d9 100644 --- a/src/ebay-section-notice/index.ts +++ b/src/ebay-section-notice/index.ts @@ -5,4 +5,5 @@ export { } from './section-notice' export { default as EbaySectionNoticeTitle } from './section-notice-title' export { default as EbaySectionNoticeFooter } from './section-notice-footer' +export { default as EbaySectionNoticeCTA } from './section-notice-cta' export { EbayNoticeContent } from '../ebay-notice-base/components/ebay-notice-content' diff --git a/src/ebay-section-notice/section-notice-cta.tsx b/src/ebay-section-notice/section-notice-cta.tsx new file mode 100644 index 00000000..1fdf2629 --- /dev/null +++ b/src/ebay-section-notice/section-notice-cta.tsx @@ -0,0 +1,15 @@ +import React, { FC, ReactNode } from 'react' +import NoticeCTA from '../common/notice-utils/notice-cta' + +type Props = { + className?: string; + children?: ReactNode; +} + +const EbaySectionNoticeCTA: FC = ({ className, children }) => ( + + {children} + +) + +export default EbaySectionNoticeCTA diff --git a/src/ebay-split-button/__tests__/index.spec.tsx b/src/ebay-split-button/__tests__/index.spec.tsx index 0d476131..faaa119f 100644 --- a/src/ebay-split-button/__tests__/index.spec.tsx +++ b/src/ebay-split-button/__tests__/index.spec.tsx @@ -5,7 +5,7 @@ import { EbaySplitButton, Props } from '../index' const values = ['first', 'second', 'third'] -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('', () => { describe('on button click', () => { diff --git a/src/ebay-split-button/__tests__/render.spec.tsx b/src/ebay-split-button/__tests__/render.spec.tsx index 0438d23a..c6e620fe 100644 --- a/src/ebay-split-button/__tests__/render.spec.tsx +++ b/src/ebay-split-button/__tests__/render.spec.tsx @@ -5,7 +5,7 @@ import * as stories from './index.stories' const { Default, Disabled, Controls, Loading, Size, Transparent, Truncated } = composeStories(stories) -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('ebay-split-button rendering', () => { it('renders split button correctly', () => { diff --git a/src/ebay-star-rating-select/star-rating-select.tsx b/src/ebay-star-rating-select/star-rating-select.tsx index fae93129..6a7f4703 100644 --- a/src/ebay-star-rating-select/star-rating-select.tsx +++ b/src/ebay-star-rating-select/star-rating-select.tsx @@ -2,8 +2,8 @@ import React, { ComponentProps, FC, useEffect, useState } from 'react' import classNames from 'classnames' import { EbayIcon } from '../ebay-icon' import { range } from '../common/range' -import { randomId } from '../common/random-id' import { EbayChangeEventHandler, EbayFocusEventHandler, EbayKeyboardEventHandler } from '../common/event-utils/types' +import { useRandomId } from '../common/random-id' export type EventProps = { value: number } type Props = ComponentProps<'div'> & { @@ -33,9 +33,11 @@ const EbayStarRatingSelect: FC = ({ onChange = () => {}, onFocus = () => {}, onKeyDown = () => {}, - name = `star-rating-${randomId()}`, + name, ...rest }) => { + const rId = useRandomId() + const inputName = name || `star-rating-${rId}` const [checkedValue, setChecked] = useState(getValue(value)) useEffect(() => { setChecked(getValue(value)) @@ -74,7 +76,7 @@ const EbayStarRatingSelect: FC = ({ { 'star-rating-select__control--filled': i <= checkedValue }) } type="radio" - name={name} + name={inputName} value={i} disabled={disabled} defaultChecked={checkedValue === i} diff --git a/src/ebay-textbox/index.ts b/src/ebay-textbox/index.ts index e248735c..0f6116d8 100644 --- a/src/ebay-textbox/index.ts +++ b/src/ebay-textbox/index.ts @@ -3,4 +3,5 @@ export { default as EbayTextboxPrefixIcon } from './prefix-icon' export { default as EbayTextboxPrefixText } from './prefix-text' export { default as EbayTextboxPostfixIcon } from './postfix-icon' export { default as EbayTextboxPostfixText } from './postfix-text' +export { useFloatingLabel } from '../common/floating-label-utils/hooks' export type { Size } from './types' diff --git a/src/ebay-toast-dialog/__tests__/index.spec.tsx b/src/ebay-toast-dialog/__tests__/index.spec.tsx index 9550d164..d55c9a50 100644 --- a/src/ebay-toast-dialog/__tests__/index.spec.tsx +++ b/src/ebay-toast-dialog/__tests__/index.spec.tsx @@ -3,7 +3,7 @@ import { render, fireEvent } from '@testing-library/react' import { EbayDialogHeader } from '../../ebay-dialog-base' import { EbayToast } from '../index' -jest.mock('../../common/random-id', () => ({ randomId: () => 'abc123' })) +jest.mock('../../common/random-id') describe('', () => { const closeToastHandler = jest.fn() diff --git a/src/ebay-tooltip/index.ts b/src/ebay-tooltip/index.ts index f47e6110..db8a2880 100644 --- a/src/ebay-tooltip/index.ts +++ b/src/ebay-tooltip/index.ts @@ -1,4 +1,8 @@ export { default as EbayTooltip } from './ebay-tooltip' export { default as EbayTooltipContent } from './ebay-tooltip-content' export { default as EbayTooltipHost } from './ebay-tooltip-host' -export { type PointerDirection, Tooltip } from '../common/tooltip-utils' +export { type PointerDirection, Tooltip, TooltipFooter } from '../common/tooltip-utils' +export { + DEFAULT_POINTER_DIRECTION, + POINTER_STYLES +} from '../common/tooltip-utils/constants' diff --git a/src/events/README.md b/src/events/README.md new file mode 100644 index 00000000..510cdd39 --- /dev/null +++ b/src/events/README.md @@ -0,0 +1,13 @@ +# events + +Utils functions to handle events in your application. + +## Usage + +```jsx +import { + handleEnterKeydown, + useKeyPress, + ... +} from '@ebay/ui-core-react/events' +``` diff --git a/src/events/index.ts b/src/events/index.ts new file mode 100644 index 00000000..db9e68ef --- /dev/null +++ b/src/events/index.ts @@ -0,0 +1,30 @@ +export { + addEventListener, + handleActionKeydown, + handleEnterKeydown, + handleEscapeKeydown, + handleLeftRightArrowsKeydown, + handleResize, + handleTextInput, + handleUpDownArrowsKeydown, + isActionKey, + preventDefaultIfHijax, + removeEventListener, + wrapEvent +} from '../common/event-utils' + +export type { + EbayChangeEventHandler, + EbayEventHandler, + EbayFocusEventHandler, + EbayKeyboardEventHandler, + EbayMouseEventHandler +} from '../common/event-utils/types' + +export { + default as useKeyPress +} from '../common/event-utils/use-key-press' + +export { + default as useRovingIndex +} from '../common/event-utils/use-roving-index' diff --git a/src/utils/README.md b/src/utils/README.md new file mode 100644 index 00000000..dcbf55e3 --- /dev/null +++ b/src/utils/README.md @@ -0,0 +1,15 @@ +# utils + +This is a collection of utility function to help you with your projects. + +## Usage + +```jsx +import { + useRandomId, + filterBy, + filterByType, + findComponent, + ... +} from '@ebay/ui-core-react/utils' +``` diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 00000000..e841bf33 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,9 @@ +export { useRandomId } from '../common/random-id' +export { debounce } from '../common/debounce' +export { withForwardRef } from '../common/component-utils/forwardRef' +export { + excludeComponent, + filterBy, + filterByType, + findComponent +} from '../common/component-utils/utils' diff --git a/vite.config.mjs b/vite.config.mjs index 012df289..130c4602 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -11,7 +11,27 @@ let componentEntries = fs .reduce((acc, componentName) => { acc[componentName] = resolve(__dirname, `src/${componentName}/index.ts`); return acc; - }, {}); + }, { + events: resolve(__dirname, 'src/events/index.ts'), + utils: resolve(__dirname, 'src/utils/index.ts'), + + // DEPRECATED (should be used internally only) + 'common/component-utils': resolve(__dirname, 'src/common/component-utils/index.ts'), + 'common/component-utils/forwardRef': resolve(__dirname, 'src/common/component-utils/forwardRef.tsx'), + 'common/component-utils/utils': resolve(__dirname, 'src/common/component-utils/utils.ts'), + 'common/event-utils': resolve(__dirname, 'src/common/event-utils/index.ts'), + 'common/floating-label-utils/hooks': resolve(__dirname, 'src/common/floating-label-utils/hooks.tsx'), + 'common/notice-utils/notice-cta': resolve(__dirname, 'src/common/notice-utils/notice-cta.tsx'), + 'common/random-id': resolve(__dirname, 'src/common/random-id.ts'), + 'common/tooltip-utils': resolve(__dirname, 'src/common/tooltip-utils/index.ts'), + 'common/tooltip-utils/constants': resolve(__dirname, 'src/common/tooltip-utils/constants.ts'), + 'ebay-radio/radio': resolve(__dirname, 'src/ebay-radio/radio.tsx'), + 'ebay-fake-menu-button/menu-button': resolve(__dirname, 'src/ebay-fake-menu-button/menu-button.tsx'), + 'ebay-fake-menu/menu-item': resolve(__dirname, 'src/ebay-fake-menu/menu-item.tsx'), + 'ebay-dialog-base/components/animation': resolve(__dirname, 'src/ebay-dialog-base/components/animation.ts'), + 'ebay-dialog-base/components/dialog-footer': resolve(__dirname, 'src/ebay-dialog-base/components/dialog-footer.tsx'), + 'ebay-dialog-base/components/dialog-header': resolve(__dirname, 'src/ebay-dialog-base/components/dialog-header.tsx'), + }); export default defineConfig({ build: {