From e96557f5d6358ba3c73cc158110432078e968ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 8 Nov 2024 14:33:46 +0100 Subject: [PATCH 1/5] Add file extensions to imports and exports --- .eslintrc.js | 6 +++ .../Accordion/Header/AccordionHeader.test.tsx | 8 ++-- .../src/Accordion/Header/AccordionHeader.tsx | 10 ++--- .../src/Accordion/Item/AccordionItem.test.tsx | 4 +- .../src/Accordion/Item/AccordionItem.tsx | 28 ++++++------ .../Accordion/Item/AccordionItemContext.ts | 2 +- .../mui-base/src/Accordion/Item/styleHooks.ts | 6 +-- .../Accordion/Panel/AccordionPanel.test.tsx | 8 ++-- .../src/Accordion/Panel/AccordionPanel.tsx | 16 +++---- .../src/Accordion/Root/AccordionRoot.tsx | 10 ++--- .../Accordion/Root/AccordionRootContext.ts | 4 +- .../src/Accordion/Root/useAccordionRoot.ts | 8 ++-- .../Trigger/AccordionTrigger.test.tsx | 8 ++-- .../Accordion/Trigger/AccordionTrigger.tsx | 16 +++---- .../mui-base/src/Accordion/index.parts.ts | 10 ++--- packages/mui-base/src/Accordion/index.ts | 2 +- .../Backdrop/AlertDialogBackdrop.tsx | 14 +++--- .../AlertDialog/Close/AlertDialogClose.tsx | 8 ++-- .../Description/AlertDialogDescription.tsx | 10 ++--- .../AlertDialog/Popup/AlertDialogPopup.tsx | 20 ++++----- .../src/AlertDialog/Root/AlertDialogRoot.tsx | 6 +-- .../Root/AlertDialogRootContext.ts | 2 +- .../AlertDialog/Title/AlertDialogTitle.tsx | 10 ++--- .../Trigger/AlertDialogTrigger.tsx | 10 ++--- .../mui-base/src/AlertDialog/index.parts.ts | 14 +++--- packages/mui-base/src/AlertDialog/index.ts | 2 +- .../Indicator/CheckboxIndicator.test.tsx | 2 +- .../Checkbox/Indicator/CheckboxIndicator.tsx | 10 ++--- .../src/Checkbox/Root/CheckboxRoot.tsx | 16 +++---- .../src/Checkbox/Root/CheckboxRootContext.ts | 2 +- .../src/Checkbox/Root/useCheckboxRoot.ts | 22 +++++----- packages/mui-base/src/Checkbox/index.parts.ts | 4 +- packages/mui-base/src/Checkbox/index.ts | 2 +- .../utils/useCustomStyleHookMapping.ts | 4 +- .../Parent/useCheckboxGroupParent.ts | 4 +- .../Root/CheckboxGroupRoot.test.tsx | 2 +- .../CheckboxGroup/Root/CheckboxGroupRoot.tsx | 12 ++--- .../Root/CheckboxGroupRootContext.ts | 2 +- .../Root/useCheckboxGroupRoot.tsx | 14 +++--- .../mui-base/src/CheckboxGroup/index.parts.ts | 2 +- packages/mui-base/src/CheckboxGroup/index.ts | 2 +- .../Panel/CollapsiblePanel.test.tsx | 4 +- .../Collapsible/Panel/CollapsiblePanel.tsx | 12 ++--- .../Collapsible/Panel/useCollapsiblePanel.ts | 14 +++--- .../src/Collapsible/Root/CollapsibleRoot.tsx | 10 ++--- .../Root/CollapsibleRootContext.ts | 4 +- .../src/Collapsible/Root/styleHooks.ts | 6 +-- .../Collapsible/Root/useCollapsibleRoot.ts | 8 ++-- .../Trigger/CollapsibleTrigger.test.tsx | 4 +- .../Trigger/CollapsibleTrigger.tsx | 12 ++--- .../Trigger/useCollapsibleTrigger.ts | 8 ++-- .../mui-base/src/Collapsible/index.parts.ts | 6 +-- packages/mui-base/src/Collapsible/index.ts | 2 +- .../src/Composite/Item/CompositeItem.tsx | 10 ++--- .../src/Composite/Item/useCompositeItem.ts | 6 +-- .../src/Composite/List/CompositeList.tsx | 4 +- .../Composite/List/useCompositeListItem.ts | 4 +- .../src/Composite/Root/CompositeRoot.tsx | 12 ++--- .../src/Composite/Root/useCompositeRoot.ts | 6 +-- .../src/Dialog/Backdrop/DialogBackdrop.tsx | 14 +++--- .../src/Dialog/Backdrop/useDialogBackdrop.ts | 8 ++-- .../mui-base/src/Dialog/Close/DialogClose.tsx | 8 ++-- .../src/Dialog/Close/useDialogClose.ts | 2 +- .../Dialog/Description/DialogDescription.tsx | 10 ++--- .../mui-base/src/Dialog/Popup/DialogPopup.tsx | 20 ++++----- .../src/Dialog/Popup/useDialogPopup.tsx | 14 +++--- .../mui-base/src/Dialog/Root/DialogRoot.tsx | 4 +- .../src/Dialog/Root/DialogRootContext.ts | 2 +- .../mui-base/src/Dialog/Root/useDialogRoot.ts | 16 +++---- .../mui-base/src/Dialog/Title/DialogTitle.tsx | 10 ++--- .../src/Dialog/Trigger/DialogTrigger.tsx | 10 ++--- packages/mui-base/src/Dialog/index.parts.ts | 14 +++--- packages/mui-base/src/Dialog/index.ts | 2 +- .../src/Field/Control/FieldControl.test.tsx | 2 +- .../src/Field/Control/FieldControl.tsx | 12 ++--- .../src/Field/Control/useFieldControl.ts | 18 ++++---- .../Control/useFieldControlValidation.ts | 12 ++--- .../Description/FieldDescription.test.tsx | 2 +- .../Field/Description/FieldDescription.tsx | 12 ++--- .../Field/Description/useFieldDescription.ts | 8 ++-- .../src/Field/Error/FieldError.test.tsx | 2 +- .../mui-base/src/Field/Error/FieldError.tsx | 14 +++--- .../mui-base/src/Field/Error/useFieldError.ts | 8 ++-- .../src/Field/Label/FieldLabel.test.tsx | 2 +- .../mui-base/src/Field/Label/FieldLabel.tsx | 16 +++---- .../mui-base/src/Field/Label/useFieldLabel.ts | 4 +- .../src/Field/Root/FieldRoot.test.tsx | 2 +- .../mui-base/src/Field/Root/FieldRoot.tsx | 14 +++--- .../src/Field/Root/FieldRootContext.ts | 4 +- .../src/Field/Validity/FieldValidity.tsx | 6 +-- packages/mui-base/src/Field/index.parts.ts | 14 +++--- packages/mui-base/src/Field/index.ts | 2 +- packages/mui-base/src/Field/useField.ts | 10 ++--- .../utils/getCombinedFieldValidityData.ts | 2 +- .../Fieldset/Legend/FieldsetLegend.test.tsx | 2 +- .../src/Fieldset/Legend/FieldsetLegend.tsx | 8 ++-- .../src/Fieldset/Legend/useFieldsetLegend.ts | 8 ++-- .../src/Fieldset/Root/FieldsetRoot.test.tsx | 2 +- .../src/Fieldset/Root/FieldsetRoot.tsx | 8 ++-- .../src/Fieldset/Root/useFieldsetRoot.ts | 2 +- packages/mui-base/src/Fieldset/index.parts.ts | 4 +- packages/mui-base/src/Fieldset/index.ts | 2 +- .../mui-base/src/Form/Root/FormRoot.test.tsx | 2 +- packages/mui-base/src/Form/Root/FormRoot.tsx | 10 ++--- .../mui-base/src/Form/Root/FormRootContext.ts | 2 +- packages/mui-base/src/Form/index.parts.ts | 2 +- packages/mui-base/src/Form/index.ts | 2 +- .../mui-base/src/Menu/Arrow/MenuArrow.tsx | 16 +++---- .../mui-base/src/Menu/Arrow/useMenuArrow.ts | 4 +- .../CheckboxItem/MenuCheckboxItem.test.tsx | 4 +- .../Menu/CheckboxItem/MenuCheckboxItem.tsx | 16 +++---- .../Menu/CheckboxItem/useMenuCheckboxItem.ts | 8 ++-- .../MenuCheckboxItemIndicator.tsx | 8 ++-- .../mui-base/src/Menu/Group/MenuGroup.tsx | 6 +-- .../Menu/GroupLabel/MenuGroupLabel.test.tsx | 2 +- .../src/Menu/GroupLabel/MenuGroupLabel.tsx | 10 ++--- .../mui-base/src/Menu/Item/MenuItem.test.tsx | 2 +- packages/mui-base/src/Menu/Item/MenuItem.tsx | 12 ++--- .../mui-base/src/Menu/Item/useMenuItem.ts | 8 ++-- .../src/Menu/Popup/MenuPopup.test.tsx | 4 +- .../mui-base/src/Menu/Popup/MenuPopup.tsx | 18 ++++---- .../Menu/Positioner/MenuPositioner.test.tsx | 2 +- .../src/Menu/Positioner/MenuPositioner.tsx | 16 +++---- .../src/Menu/Positioner/useMenuPositioner.ts | 8 ++-- .../src/Menu/RadioGroup/MenuRadioGroup.tsx | 10 ++--- .../src/Menu/RadioItem/MenuRadioItem.test.tsx | 4 +- .../src/Menu/RadioItem/MenuRadioItem.tsx | 18 ++++---- .../src/Menu/RadioItem/useMenuRadioItem.ts | 6 +-- .../MenuRadioItemIndicator.tsx | 8 ++-- packages/mui-base/src/Menu/Root/MenuRoot.tsx | 4 +- .../mui-base/src/Menu/Root/MenuRootContext.ts | 2 +- .../mui-base/src/Menu/Root/useMenuRoot.ts | 12 ++--- .../Menu/SubmenuTrigger/SubmenuTrigger.tsx | 14 +++--- .../Menu/SubmenuTrigger/useSubmenuTrigger.ts | 6 +-- .../src/Menu/Trigger/MenuTrigger.test.tsx | 2 +- .../mui-base/src/Menu/Trigger/MenuTrigger.tsx | 10 ++--- .../src/Menu/Trigger/useMenuTrigger.ts | 8 ++-- packages/mui-base/src/Menu/index.parts.ts | 30 ++++++------- packages/mui-base/src/Menu/index.ts | 2 +- .../src/Menu/utils/styleHookMapping.ts | 2 +- packages/mui-base/src/NoSsr/NoSsr.tsx | 2 +- packages/mui-base/src/NoSsr/index.ts | 4 +- .../Decrement/NumberFieldDecrement.test.tsx | 4 +- .../Decrement/NumberFieldDecrement.tsx | 8 ++-- .../Group/NumberFieldGroup.test.tsx | 2 +- .../NumberField/Group/NumberFieldGroup.tsx | 8 ++-- .../Increment/NumberFieldIncrement.test.tsx | 4 +- .../Increment/NumberFieldIncrement.tsx | 8 ++-- .../Input/NumberFieldInput.test.tsx | 2 +- .../NumberField/Input/NumberFieldInput.tsx | 10 ++--- .../src/NumberField/Root/NumberFieldRoot.tsx | 12 ++--- .../Root/NumberFieldRootContext.ts | 4 +- .../NumberField/Root/useNumberFieldRoot.ts | 38 ++++++++-------- .../mui-base/src/NumberField/Root/useScrub.ts | 18 ++++---- .../ScrubArea/NumberFieldScrubArea.test.tsx | 4 +- .../ScrubArea/NumberFieldScrubArea.tsx | 10 ++--- .../NumberFieldScrubAreaCursor.test.tsx | 4 +- .../NumberFieldScrubAreaCursor.tsx | 14 +++--- .../mui-base/src/NumberField/index.parts.ts | 14 +++--- packages/mui-base/src/NumberField/index.ts | 2 +- .../src/NumberField/utils/format.test.ts | 2 +- .../src/NumberField/utils/getViewportRect.ts | 2 +- .../src/NumberField/utils/parse.test.ts | 2 +- .../mui-base/src/NumberField/utils/parse.ts | 2 +- .../utils/subscribeToVisualViewportResize.ts | 2 +- .../src/NumberField/utils/validate.test.ts | 2 +- .../src/NumberField/utils/validate.ts | 4 +- .../src/Popover/Arrow/PopoverArrow.tsx | 16 +++---- .../src/Popover/Arrow/usePopoverArrow.ts | 4 +- .../src/Popover/Backdrop/PopoverBackdrop.tsx | 16 +++---- .../Popover/Backdrop/usePopoverBackdrop.ts | 4 +- .../src/Popover/Close/PopoverClose.tsx | 8 ++-- .../src/Popover/Close/usePopoverClose.ts | 4 +- .../Description/PopoverDescription.tsx | 8 ++-- .../Description/usePopoverDescription.ts | 6 +-- .../src/Popover/Popup/PopoverPopup.tsx | 20 ++++----- .../src/Popover/Popup/usePopoverPopup.ts | 4 +- .../Popover/Positioner/PopoverPositioner.tsx | 18 ++++---- .../Positioner/PopoverPositionerContext.ts | 2 +- .../Positioner/usePopoverPositioner.tsx | 10 ++--- .../src/Popover/Root/PopoverRoot.test.tsx | 2 +- .../mui-base/src/Popover/Root/PopoverRoot.tsx | 6 +-- .../src/Popover/Root/PopoverRootContext.ts | 6 +-- .../src/Popover/Root/usePopoverRoot.ts | 20 ++++----- .../src/Popover/Title/PopoverTitle.tsx | 8 ++-- .../src/Popover/Title/usePopoverTitle.ts | 8 ++-- .../src/Popover/Trigger/PopoverTrigger.tsx | 10 ++--- packages/mui-base/src/Popover/index.parts.ts | 18 ++++---- packages/mui-base/src/Popover/index.ts | 2 +- .../PreviewCard/Arrow/PreviewCardArrow.tsx | 16 +++---- .../PreviewCard/Arrow/usePreviewCardArrow.ts | 2 +- .../Backdrop/PreviewCardBackdrop.tsx | 16 +++---- .../Backdrop/usePreviewCardBackdrop.ts | 4 +- .../PreviewCard/Popup/PreviewCardPopup.tsx | 20 ++++----- .../PreviewCard/Popup/usePreviewCardPopup.ts | 4 +- .../Positioner/PreviewCardPositioner.tsx | 18 ++++---- .../PreviewCardPositionerContext.ts | 2 +- .../Positioner/usePreviewCardPositioner.ts | 6 +-- .../PreviewCard/Root/PreviewCardContext.ts | 4 +- .../PreviewCard/Root/PreviewCardRoot.test.tsx | 2 +- .../src/PreviewCard/Root/PreviewCardRoot.tsx | 6 +-- .../PreviewCard/Root/usePreviewCardRoot.ts | 16 +++---- .../Trigger/PreviewCardTrigger.tsx | 10 ++--- .../mui-base/src/PreviewCard/index.parts.ts | 12 ++--- packages/mui-base/src/PreviewCard/index.ts | 2 +- .../src/PreviewCard/utils/useFocusExtended.ts | 2 +- .../Indicator/ProgressIndicator.test.tsx | 2 +- .../Progress/Indicator/ProgressIndicator.tsx | 12 ++--- .../Indicator/useProgressIndicator.ts | 4 +- .../src/Progress/Root/ProgressRoot.tsx | 10 ++--- .../src/Progress/Root/ProgressRootContext.tsx | 4 +- .../mui-base/src/Progress/Root/styleHooks.ts | 4 +- .../src/Progress/Root/useProgressRoot.ts | 2 +- .../src/Progress/Track/ProgressTrack.test.tsx | 2 +- .../src/Progress/Track/ProgressTrack.tsx | 10 ++--- packages/mui-base/src/Progress/index.parts.ts | 8 ++-- packages/mui-base/src/Progress/index.ts | 2 +- .../Radio/Indicator/RadioIndicator.test.tsx | 2 +- .../src/Radio/Indicator/RadioIndicator.tsx | 8 ++-- .../src/Radio/Root/RadioRoot.test.tsx | 2 +- .../mui-base/src/Radio/Root/RadioRoot.tsx | 18 ++++---- .../mui-base/src/Radio/Root/useRadioRoot.tsx | 8 ++-- packages/mui-base/src/Radio/index.parts.ts | 4 +- packages/mui-base/src/Radio/index.ts | 2 +- .../RadioGroup/Root/RadioGroupRoot.test.tsx | 2 +- .../src/RadioGroup/Root/RadioGroupRoot.tsx | 14 +++--- .../RadioGroup/Root/RadioGroupRootContext.ts | 2 +- .../src/RadioGroup/Root/useRadioGroupRoot.ts | 14 +++--- .../mui-base/src/RadioGroup/index.parts.ts | 2 +- packages/mui-base/src/RadioGroup/index.ts | 2 +- .../Corner/ScrollAreaCorner.test.tsx | 3 +- .../ScrollArea/Corner/ScrollAreaCorner.tsx | 10 ++--- .../ScrollArea/Root/ScrollAreaRoot.test.tsx | 3 +- .../src/ScrollArea/Root/ScrollAreaRoot.tsx | 8 ++-- .../src/ScrollArea/Root/useScrollAreaRoot.ts | 10 ++--- .../Scrollbar/ScrollAreaScrollbar.test.tsx | 5 +-- .../Scrollbar/ScrollAreaScrollbar.tsx | 12 ++--- .../Scrollbar/useScrollAreaScrollbar.ts | 4 +- .../ScrollArea/Thumb/ScrollAreaThumb.test.tsx | 3 +- .../src/ScrollArea/Thumb/ScrollAreaThumb.tsx | 12 ++--- .../Viewport/ScrollAreaViewport.test.tsx | 3 +- .../Viewport/ScrollAreaViewport.tsx | 10 ++--- .../Viewport/useScrollAreaViewport.tsx | 10 ++--- .../mui-base/src/ScrollArea/index.parts.ts | 10 ++--- packages/mui-base/src/ScrollArea/index.ts | 2 +- .../src/Separator/Root/SeparatorRoot.tsx | 4 +- .../mui-base/src/Separator/index.parts.ts | 2 +- packages/mui-base/src/Separator/index.ts | 2 +- .../src/Slider/Control/SliderControl.test.tsx | 4 +- .../src/Slider/Control/SliderControl.tsx | 12 ++--- .../src/Slider/Control/useSliderControl.ts | 14 +++--- .../Slider/Indicator/SliderIndicator.test.tsx | 4 +- .../src/Slider/Indicator/SliderIndicator.tsx | 12 ++--- .../Slider/Indicator/useSliderIndicator.ts | 6 +-- .../src/Slider/Output/SliderOutput.test.tsx | 4 +- .../src/Slider/Output/SliderOutput.tsx | 12 ++--- .../src/Slider/Output/useSliderOutput.ts | 4 +- .../mui-base/src/Slider/Root/SliderRoot.tsx | 16 +++---- .../src/Slider/Root/SliderRootContext.ts | 4 +- .../mui-base/src/Slider/Root/styleHooks.ts | 4 +- .../mui-base/src/Slider/Root/useSliderRoot.ts | 30 ++++++------- .../src/Slider/Thumb/SliderThumb.test.tsx | 4 +- .../mui-base/src/Slider/Thumb/SliderThumb.tsx | 18 ++++---- .../src/Slider/Thumb/useSliderThumb.ts | 22 +++++----- .../src/Slider/Track/SliderTrack.test.tsx | 4 +- .../mui-base/src/Slider/Track/SliderTrack.tsx | 10 ++--- packages/mui-base/src/Slider/index.parts.ts | 12 ++--- packages/mui-base/src/Slider/index.ts | 2 +- .../src/Slider/utils/getSliderValue.ts | 4 +- .../src/Slider/utils/setValueIndex.ts | 2 +- .../mui-base/src/Switch/Root/SwitchRoot.tsx | 14 +++--- .../src/Switch/Root/SwitchRootContext.ts | 2 +- .../mui-base/src/Switch/Root/useSwitchRoot.ts | 20 ++++----- .../src/Switch/Thumb/SwitchThumb.test.tsx | 2 +- .../mui-base/src/Switch/Thumb/SwitchThumb.tsx | 12 ++--- packages/mui-base/src/Switch/index.parts.ts | 4 +- packages/mui-base/src/Switch/index.ts | 2 +- packages/mui-base/src/Switch/styleHooks.ts | 4 +- .../mui-base/src/Tabs/Root/TabsProvider.tsx | 4 +- packages/mui-base/src/Tabs/Root/TabsRoot.tsx | 10 ++--- .../mui-base/src/Tabs/Root/TabsRootContext.ts | 2 +- packages/mui-base/src/Tabs/Root/styleHooks.ts | 4 +- .../mui-base/src/Tabs/Root/useTabsRoot.ts | 10 ++--- packages/mui-base/src/Tabs/Tab/Tab.test.tsx | 4 +- packages/mui-base/src/Tabs/Tab/Tab.tsx | 8 ++-- .../mui-base/src/Tabs/Tab/useTab.test.tsx | 2 +- packages/mui-base/src/Tabs/Tab/useTab.ts | 18 ++++---- .../src/Tabs/TabIndicator/TabIndicator.tsx | 14 +++--- .../src/Tabs/TabIndicator/useTabIndicator.ts | 10 ++--- .../src/Tabs/TabPanel/TabPanel.test.tsx | 2 +- .../mui-base/src/Tabs/TabPanel/TabPanel.tsx | 10 ++--- .../src/Tabs/TabPanel/useTabPanel.test.tsx | 2 +- .../mui-base/src/Tabs/TabPanel/useTabPanel.ts | 12 ++--- .../src/Tabs/TabsList/TabsList.test.tsx | 2 +- .../mui-base/src/Tabs/TabsList/TabsList.tsx | 12 ++--- .../src/Tabs/TabsList/TabsListProvider.tsx | 10 ++--- .../src/Tabs/TabsList/tabsListReducer.ts | 4 +- .../src/Tabs/TabsList/useTabsList.test.tsx | 2 +- .../mui-base/src/Tabs/TabsList/useTabsList.ts | 22 +++++----- packages/mui-base/src/Tabs/index.parts.ts | 10 ++--- packages/mui-base/src/Tabs/index.ts | 2 +- .../mui-base/src/TextInput/TextInput.test.tsx | 2 +- packages/mui-base/src/TextInput/TextInput.tsx | 4 +- packages/mui-base/src/TextInput/index.ts | 2 +- .../src/Tooltip/Arrow/TooltipArrow.tsx | 14 +++--- .../src/Tooltip/Arrow/useTooltipArrow.ts | 4 +- .../src/Tooltip/Popup/TooltipPopup.tsx | 18 ++++---- .../Tooltip/Positioner/TooltipPositioner.tsx | 18 ++++---- .../Positioner/TooltipPositionerContext.ts | 2 +- .../Positioner/useTooltipPositioner.ts | 6 +-- .../Tooltip/Provider/TooltipProvider.test.tsx | 2 +- .../src/Tooltip/Root/TooltipRoot.test.tsx | 2 +- .../mui-base/src/Tooltip/Root/TooltipRoot.tsx | 6 +-- .../src/Tooltip/Root/TooltipRootContext.ts | 4 +- .../src/Tooltip/Root/useTooltipRoot.ts | 14 +++--- .../src/Tooltip/Trigger/TooltipTrigger.tsx | 10 ++--- packages/mui-base/src/Tooltip/index.parts.ts | 12 ++--- packages/mui-base/src/Tooltip/index.ts | 2 +- packages/mui-base/src/index.test.js | 3 +- packages/mui-base/src/index.ts | 44 +++++++++---------- packages/mui-base/src/useButton/index.ts | 2 +- packages/mui-base/src/useButton/useButton.ts | 10 ++--- packages/mui-base/src/useCompound/index.ts | 4 +- .../src/useCompound/useCompound.test.tsx | 4 +- .../src/useCompound/useCompoundItem.ts | 2 +- packages/mui-base/src/useList/ListContext.ts | 4 +- packages/mui-base/src/useList/index.ts | 14 +++--- .../mui-base/src/useList/listReducer.test.ts | 6 +-- packages/mui-base/src/useList/listReducer.ts | 4 +- .../mui-base/src/useList/useList.test.tsx | 2 +- packages/mui-base/src/useList/useList.ts | 22 +++++----- .../mui-base/src/useList/useList.types.ts | 8 ++-- packages/mui-base/src/useList/useListItem.ts | 10 ++--- .../src/utils/collapsibleOpenStateMapping.ts | 2 +- .../src/utils/evaluateRenderProp.test.tsx | 2 +- .../mui-base/src/utils/evaluateRenderProp.ts | 4 +- .../src/utils/extractEventHandlers.test.ts | 2 +- .../src/utils/extractEventHandlers.ts | 2 +- packages/mui-base/src/utils/getInertValue.ts | 2 +- .../src/utils/getStyleHookProps.test.ts | 2 +- packages/mui-base/src/utils/index.ts | 10 ++--- .../src/utils/mergeReactProps.test.ts | 2 +- .../mui-base/src/utils/mergeReactProps.ts | 2 +- .../src/utils/popupOpenStateMapping.ts | 2 +- .../src/utils/prepareForSlot.spec.tsx | 2 +- .../src/utils/useAnchorPositioning.ts | 2 +- .../mui-base/src/utils/useAnimatedElement.ts | 4 +- .../src/utils/useAnimationsFinished.ts | 2 +- .../src/utils/useComponentRenderer.ts | 12 ++--- .../src/utils/useControllableReducer.test.tsx | 4 +- .../src/utils/useControllableReducer.ts | 2 +- packages/mui-base/src/utils/useLatestRef.ts | 2 +- .../src/utils/useOpenInteractionType.ts | 2 +- .../src/utils/useRenderPropForkRef.ts | 6 +-- packages/mui-base/src/utils/useScrollLock.ts | 6 +-- .../mui-base/src/utils/useTransitionStatus.ts | 2 +- .../test/conformanceTests/className.tsx | 4 +- .../test/conformanceTests/propForwarding.tsx | 4 +- .../test/conformanceTests/refForwarding.tsx | 4 +- .../test/conformanceTests/renderProp.tsx | 4 +- .../mui-base/test/describeConformance.tsx | 8 ++-- packages/mui-base/test/index.ts | 4 +- packages/mui-base/vitest.config.ts | 2 +- 363 files changed, 1352 insertions(+), 1350 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index affd0f6ed3..35ae54e186 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -94,5 +94,11 @@ module.exports = { 'filenames/match-exported': ['error'], }, }, + { + files: ['packages/**/*'], + rules: { + 'import/extensions': ['error', 'ignorePackages'], + }, + }, ], }; diff --git a/packages/mui-base/src/Accordion/Header/AccordionHeader.test.tsx b/packages/mui-base/src/Accordion/Header/AccordionHeader.test.tsx index 9d0be264c5..7e7b7a1d18 100644 --- a/packages/mui-base/src/Accordion/Header/AccordionHeader.test.tsx +++ b/packages/mui-base/src/Accordion/Header/AccordionHeader.test.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { Accordion } from '@base_ui/react/Accordion'; import { describeConformance, createRenderer } from '#test-utils'; -import { NOOP } from '../../utils/noop'; -import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext'; -import { AccordionRootContext } from '../Root/AccordionRootContext'; -import { AccordionItemContext } from '../Item/AccordionItemContext'; +import { NOOP } from '../../utils/noop.js'; +import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext.js'; +import { AccordionRootContext } from '../Root/AccordionRootContext.js'; +import { AccordionItemContext } from '../Item/AccordionItemContext.js'; const accordionRootContextValue: AccordionRootContext = { accordionItemRefs: { current: [] }, diff --git a/packages/mui-base/src/Accordion/Header/AccordionHeader.tsx b/packages/mui-base/src/Accordion/Header/AccordionHeader.tsx index 1dff33d0ea..07f94e5df4 100644 --- a/packages/mui-base/src/Accordion/Header/AccordionHeader.tsx +++ b/packages/mui-base/src/Accordion/Header/AccordionHeader.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { AccordionItem } from '../Item/AccordionItem'; -import { useAccordionItemContext } from '../Item/AccordionItemContext'; -import { accordionStyleHookMapping } from '../Item/styleHooks'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { AccordionItem } from '../Item/AccordionItem.js'; +import { useAccordionItemContext } from '../Item/AccordionItemContext.js'; +import { accordionStyleHookMapping } from '../Item/styleHooks.js'; /** * diff --git a/packages/mui-base/src/Accordion/Item/AccordionItem.test.tsx b/packages/mui-base/src/Accordion/Item/AccordionItem.test.tsx index 725f1b5f3e..e4ad21f59e 100644 --- a/packages/mui-base/src/Accordion/Item/AccordionItem.test.tsx +++ b/packages/mui-base/src/Accordion/Item/AccordionItem.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Accordion } from '@base_ui/react/Accordion'; import { describeConformance, createRenderer } from '#test-utils'; -import { NOOP } from '../../utils/noop'; -import { AccordionRootContext } from '../Root/AccordionRootContext'; +import { NOOP } from '../../utils/noop.js'; +import { AccordionRootContext } from '../Root/AccordionRootContext.js'; const accordionRootContextValue: AccordionRootContext = { accordionItemRefs: { current: [] }, diff --git a/packages/mui-base/src/Accordion/Item/AccordionItem.tsx b/packages/mui-base/src/Accordion/Item/AccordionItem.tsx index 52004720a3..9ddfdf6bcf 100644 --- a/packages/mui-base/src/Accordion/Item/AccordionItem.tsx +++ b/packages/mui-base/src/Accordion/Item/AccordionItem.tsx @@ -1,20 +1,20 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useForkRef } from '../../utils/useForkRef'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useId } from '../../utils/useId'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import { useCollapsibleRoot } from '../../Collapsible/Root/useCollapsibleRoot'; -import type { CollapsibleRoot } from '../../Collapsible/Root/CollapsibleRoot'; -import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext'; -import { useCompositeListItem } from '../../Composite/List/useCompositeListItem'; -import type { AccordionRoot } from '../Root/AccordionRoot'; -import { useAccordionRootContext } from '../Root/AccordionRootContext'; -import { AccordionItemContext } from './AccordionItemContext'; -import { accordionStyleHookMapping } from './styleHooks'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useId } from '../../utils/useId.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useCollapsibleRoot } from '../../Collapsible/Root/useCollapsibleRoot.js'; +import type { CollapsibleRoot } from '../../Collapsible/Root/CollapsibleRoot.js'; +import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext.js'; +import { useCompositeListItem } from '../../Composite/List/useCompositeListItem.js'; +import type { AccordionRoot } from '../Root/AccordionRoot.js'; +import { useAccordionRootContext } from '../Root/AccordionRootContext.js'; +import { AccordionItemContext } from './AccordionItemContext.js'; +import { accordionStyleHookMapping } from './styleHooks.js'; /** * diff --git a/packages/mui-base/src/Accordion/Item/AccordionItemContext.ts b/packages/mui-base/src/Accordion/Item/AccordionItemContext.ts index fce915e3ae..5656c91bae 100644 --- a/packages/mui-base/src/Accordion/Item/AccordionItemContext.ts +++ b/packages/mui-base/src/Accordion/Item/AccordionItemContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { AccordionItem } from './AccordionItem'; +import type { AccordionItem } from './AccordionItem.js'; export interface AccordionItemContext { open: boolean; diff --git a/packages/mui-base/src/Accordion/Item/styleHooks.ts b/packages/mui-base/src/Accordion/Item/styleHooks.ts index fa218385fa..1a42534bbb 100644 --- a/packages/mui-base/src/Accordion/Item/styleHooks.ts +++ b/packages/mui-base/src/Accordion/Item/styleHooks.ts @@ -1,6 +1,6 @@ -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { collapsibleOpenStateMapping as baseMapping } from '../../utils/collapsibleOpenStateMapping'; -import type { AccordionItem } from './AccordionItem'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { collapsibleOpenStateMapping as baseMapping } from '../../utils/collapsibleOpenStateMapping.js'; +import type { AccordionItem } from './AccordionItem.js'; export const accordionStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Accordion/Panel/AccordionPanel.test.tsx b/packages/mui-base/src/Accordion/Panel/AccordionPanel.test.tsx index bf07b284a6..444a8e7a6f 100644 --- a/packages/mui-base/src/Accordion/Panel/AccordionPanel.test.tsx +++ b/packages/mui-base/src/Accordion/Panel/AccordionPanel.test.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { Accordion } from '@base_ui/react/Accordion'; import { describeConformance, createRenderer } from '#test-utils'; -import { NOOP } from '../../utils/noop'; -import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext'; -import { AccordionRootContext } from '../Root/AccordionRootContext'; -import { AccordionItemContext } from '../Item/AccordionItemContext'; +import { NOOP } from '../../utils/noop.js'; +import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext.js'; +import { AccordionRootContext } from '../Root/AccordionRootContext.js'; +import { AccordionItemContext } from '../Item/AccordionItemContext.js'; const accordionRootContextValue: AccordionRootContext = { accordionItemRefs: { current: [] }, diff --git a/packages/mui-base/src/Accordion/Panel/AccordionPanel.tsx b/packages/mui-base/src/Accordion/Panel/AccordionPanel.tsx index a9ef3ffa8b..c3d515df24 100644 --- a/packages/mui-base/src/Accordion/Panel/AccordionPanel.tsx +++ b/packages/mui-base/src/Accordion/Panel/AccordionPanel.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useCollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext'; -import { useCollapsiblePanel } from '../../Collapsible/Panel/useCollapsiblePanel'; -import { useAccordionRootContext } from '../Root/AccordionRootContext'; -import type { AccordionItem } from '../Item/AccordionItem'; -import { useAccordionItemContext } from '../Item/AccordionItemContext'; -import { accordionStyleHookMapping } from '../Item/styleHooks'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useCollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext.js'; +import { useCollapsiblePanel } from '../../Collapsible/Panel/useCollapsiblePanel.js'; +import { useAccordionRootContext } from '../Root/AccordionRootContext.js'; +import type { AccordionItem } from '../Item/AccordionItem.js'; +import { useAccordionItemContext } from '../Item/AccordionItemContext.js'; +import { accordionStyleHookMapping } from '../Item/styleHooks.js'; /** * diff --git a/packages/mui-base/src/Accordion/Root/AccordionRoot.tsx b/packages/mui-base/src/Accordion/Root/AccordionRoot.tsx index 4415072bb9..57f030facd 100644 --- a/packages/mui-base/src/Accordion/Root/AccordionRoot.tsx +++ b/packages/mui-base/src/Accordion/Root/AccordionRoot.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { CompositeList } from '../../Composite/List/CompositeList'; -import { useAccordionRoot } from './useAccordionRoot'; -import { AccordionRootContext } from './AccordionRootContext'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { CompositeList } from '../../Composite/List/CompositeList.js'; +import { useAccordionRoot } from './useAccordionRoot.js'; +import { AccordionRootContext } from './AccordionRootContext.js'; const rootStyleHookMapping = { value: () => null, diff --git a/packages/mui-base/src/Accordion/Root/AccordionRootContext.ts b/packages/mui-base/src/Accordion/Root/AccordionRootContext.ts index dda094d48b..072850d9ae 100644 --- a/packages/mui-base/src/Accordion/Root/AccordionRootContext.ts +++ b/packages/mui-base/src/Accordion/Root/AccordionRootContext.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import type { AccordionRoot } from './AccordionRoot'; -import type { useAccordionRoot } from './useAccordionRoot'; +import type { AccordionRoot } from './AccordionRoot.js'; +import type { useAccordionRoot } from './useAccordionRoot.js'; export interface AccordionRootContext extends Omit { ownerState: AccordionRoot.OwnerState; diff --git a/packages/mui-base/src/Accordion/Root/useAccordionRoot.ts b/packages/mui-base/src/Accordion/Root/useAccordionRoot.ts index b4c875824b..0b7714cdc5 100644 --- a/packages/mui-base/src/Accordion/Root/useAccordionRoot.ts +++ b/packages/mui-base/src/Accordion/Root/useAccordionRoot.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { NOOP } from '../../utils/noop'; -import { useControlled } from '../../utils/useControlled'; -import { ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT } from '../../Composite/composite'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { NOOP } from '../../utils/noop.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT } from '../../Composite/composite.js'; const SUPPORTED_KEYS = [ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, 'Home', 'End']; diff --git a/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.test.tsx b/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.test.tsx index c29db1b65a..ef72191252 100644 --- a/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.test.tsx +++ b/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.test.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { Accordion } from '@base_ui/react/Accordion'; import { describeConformance, createRenderer } from '#test-utils'; -import { NOOP } from '../../utils/noop'; -import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext'; -import { AccordionRootContext } from '../Root/AccordionRootContext'; -import { AccordionItemContext } from '../Item/AccordionItemContext'; +import { NOOP } from '../../utils/noop.js'; +import { CollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext.js'; +import { AccordionRootContext } from '../Root/AccordionRootContext.js'; +import { AccordionItemContext } from '../Item/AccordionItemContext.js'; const accordionRootContextValue: AccordionRootContext = { accordionItemRefs: { current: [] }, diff --git a/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.tsx b/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.tsx index 41c5428f2a..eb2aa02790 100644 --- a/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.tsx +++ b/packages/mui-base/src/Accordion/Trigger/AccordionTrigger.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { triggerOpenStateMapping } from '../../utils/collapsibleOpenStateMapping'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useCollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext'; -import { useCollapsibleTrigger } from '../../Collapsible/Trigger/useCollapsibleTrigger'; -import type { AccordionItem } from '../Item/AccordionItem'; -import { useAccordionItemContext } from '../Item/AccordionItemContext'; +import { triggerOpenStateMapping } from '../../utils/collapsibleOpenStateMapping.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useCollapsibleRootContext } from '../../Collapsible/Root/CollapsibleRootContext.js'; +import { useCollapsibleTrigger } from '../../Collapsible/Trigger/useCollapsibleTrigger.js'; +import type { AccordionItem } from '../Item/AccordionItem.js'; +import { useAccordionItemContext } from '../Item/AccordionItemContext.js'; /** * diff --git a/packages/mui-base/src/Accordion/index.parts.ts b/packages/mui-base/src/Accordion/index.parts.ts index cfd89a887a..b51cf96011 100644 --- a/packages/mui-base/src/Accordion/index.parts.ts +++ b/packages/mui-base/src/Accordion/index.parts.ts @@ -1,5 +1,5 @@ -export { AccordionRoot as Root } from './Root/AccordionRoot'; -export { AccordionItem as Item } from './Item/AccordionItem'; -export { AccordionHeader as Header } from './Header/AccordionHeader'; -export { AccordionTrigger as Trigger } from './Trigger/AccordionTrigger'; -export { AccordionPanel as Panel } from './Panel/AccordionPanel'; +export { AccordionRoot as Root } from './Root/AccordionRoot.js'; +export { AccordionItem as Item } from './Item/AccordionItem.js'; +export { AccordionHeader as Header } from './Header/AccordionHeader.js'; +export { AccordionTrigger as Trigger } from './Trigger/AccordionTrigger.js'; +export { AccordionPanel as Panel } from './Panel/AccordionPanel.js'; diff --git a/packages/mui-base/src/Accordion/index.ts b/packages/mui-base/src/Accordion/index.ts index bc75beb631..5dad92f884 100644 --- a/packages/mui-base/src/Accordion/index.ts +++ b/packages/mui-base/src/Accordion/index.ts @@ -1 +1 @@ -export * as Accordion from './index.parts'; +export * as Accordion from './index.parts.js'; diff --git a/packages/mui-base/src/AlertDialog/Backdrop/AlertDialogBackdrop.tsx b/packages/mui-base/src/AlertDialog/Backdrop/AlertDialogBackdrop.tsx index 863ae02e9c..3dabdc3e32 100644 --- a/packages/mui-base/src/AlertDialog/Backdrop/AlertDialogBackdrop.tsx +++ b/packages/mui-base/src/AlertDialog/Backdrop/AlertDialogBackdrop.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingPortal } from '@floating-ui/react'; -import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext'; -import { useDialogBackdrop } from '../../Dialog/Backdrop/useDialogBackdrop'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; +import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext.js'; +import { useDialogBackdrop } from '../../Dialog/Backdrop/useDialogBackdrop.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/AlertDialog/Close/AlertDialogClose.tsx b/packages/mui-base/src/AlertDialog/Close/AlertDialogClose.tsx index 082b1bd121..96cba010b1 100644 --- a/packages/mui-base/src/AlertDialog/Close/AlertDialogClose.tsx +++ b/packages/mui-base/src/AlertDialog/Close/AlertDialogClose.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext'; -import { useDialogClose } from '../../Dialog/Close/useDialogClose'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext.js'; +import { useDialogClose } from '../../Dialog/Close/useDialogClose.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/AlertDialog/Description/AlertDialogDescription.tsx b/packages/mui-base/src/AlertDialog/Description/AlertDialogDescription.tsx index 287a3b1a05..5bac9adc43 100644 --- a/packages/mui-base/src/AlertDialog/Description/AlertDialogDescription.tsx +++ b/packages/mui-base/src/AlertDialog/Description/AlertDialogDescription.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/AlertDialog/Popup/AlertDialogPopup.tsx b/packages/mui-base/src/AlertDialog/Popup/AlertDialogPopup.tsx index f311895fe8..dbb0728083 100644 --- a/packages/mui-base/src/AlertDialog/Popup/AlertDialogPopup.tsx +++ b/packages/mui-base/src/AlertDialog/Popup/AlertDialogPopup.tsx @@ -2,16 +2,16 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'; -import { useDialogPopup } from '../../Dialog/Popup/useDialogPopup'; -import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { refType, HTMLElementType } from '../../utils/proptypes'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; -import { useForkRef } from '../../utils/useForkRef'; -import { InteractionType } from '../../utils/useEnhancedClickHandler'; +import { useDialogPopup } from '../../Dialog/Popup/useDialogPopup.js'; +import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { refType, HTMLElementType } from '../../utils/proptypes.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { InteractionType } from '../../utils/useEnhancedClickHandler.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/AlertDialog/Root/AlertDialogRoot.tsx b/packages/mui-base/src/AlertDialog/Root/AlertDialogRoot.tsx index 25477b7890..70266d8a5d 100644 --- a/packages/mui-base/src/AlertDialog/Root/AlertDialogRoot.tsx +++ b/packages/mui-base/src/AlertDialog/Root/AlertDialogRoot.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { DialogRoot } from '../../Dialog/Root/DialogRoot'; -import { AlertDialogRootContext } from './AlertDialogRootContext'; -import { useDialogRoot } from '../../Dialog/Root/useDialogRoot'; +import type { DialogRoot } from '../../Dialog/Root/DialogRoot.js'; +import { AlertDialogRootContext } from './AlertDialogRootContext.js'; +import { useDialogRoot } from '../../Dialog/Root/useDialogRoot.js'; /** * diff --git a/packages/mui-base/src/AlertDialog/Root/AlertDialogRootContext.ts b/packages/mui-base/src/AlertDialog/Root/AlertDialogRootContext.ts index f58c9a47ce..4ae4dd803d 100644 --- a/packages/mui-base/src/AlertDialog/Root/AlertDialogRootContext.ts +++ b/packages/mui-base/src/AlertDialog/Root/AlertDialogRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { type useDialogRoot } from '../../Dialog/Root/useDialogRoot'; +import { type useDialogRoot } from '../../Dialog/Root/useDialogRoot.js'; export interface AlertDialogRootContext extends useDialogRoot.ReturnValue { /** diff --git a/packages/mui-base/src/AlertDialog/Title/AlertDialogTitle.tsx b/packages/mui-base/src/AlertDialog/Title/AlertDialogTitle.tsx index 1ac1d03a04..f6f9812c66 100644 --- a/packages/mui-base/src/AlertDialog/Title/AlertDialogTitle.tsx +++ b/packages/mui-base/src/AlertDialog/Title/AlertDialogTitle.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/AlertDialog/Trigger/AlertDialogTrigger.tsx b/packages/mui-base/src/AlertDialog/Trigger/AlertDialogTrigger.tsx index f8aecf6340..90c8c9c0ff 100644 --- a/packages/mui-base/src/AlertDialog/Trigger/AlertDialogTrigger.tsx +++ b/packages/mui-base/src/AlertDialog/Trigger/AlertDialogTrigger.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useAlertDialogRootContext } from '../Root/AlertDialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * diff --git a/packages/mui-base/src/AlertDialog/index.parts.ts b/packages/mui-base/src/AlertDialog/index.parts.ts index ad0f1a228c..fa2f542d0b 100644 --- a/packages/mui-base/src/AlertDialog/index.parts.ts +++ b/packages/mui-base/src/AlertDialog/index.parts.ts @@ -1,7 +1,7 @@ -export { AlertDialogBackdrop as Backdrop } from './Backdrop/AlertDialogBackdrop'; -export { AlertDialogClose as Close } from './Close/AlertDialogClose'; -export { AlertDialogDescription as Description } from './Description/AlertDialogDescription'; -export { AlertDialogPopup as Popup } from './Popup/AlertDialogPopup'; -export { AlertDialogRoot as Root } from './Root/AlertDialogRoot'; -export { AlertDialogTitle as Title } from './Title/AlertDialogTitle'; -export { AlertDialogTrigger as Trigger } from './Trigger/AlertDialogTrigger'; +export { AlertDialogBackdrop as Backdrop } from './Backdrop/AlertDialogBackdrop.js'; +export { AlertDialogClose as Close } from './Close/AlertDialogClose.js'; +export { AlertDialogDescription as Description } from './Description/AlertDialogDescription.js'; +export { AlertDialogPopup as Popup } from './Popup/AlertDialogPopup.js'; +export { AlertDialogRoot as Root } from './Root/AlertDialogRoot.js'; +export { AlertDialogTitle as Title } from './Title/AlertDialogTitle.js'; +export { AlertDialogTrigger as Trigger } from './Trigger/AlertDialogTrigger.js'; diff --git a/packages/mui-base/src/AlertDialog/index.ts b/packages/mui-base/src/AlertDialog/index.ts index 766a0ca54b..9b9daa6210 100644 --- a/packages/mui-base/src/AlertDialog/index.ts +++ b/packages/mui-base/src/AlertDialog/index.ts @@ -1 +1 @@ -export * as AlertDialog from './index.parts'; +export * as AlertDialog from './index.parts.js'; diff --git a/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.test.tsx b/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.test.tsx index 1bcc780c2e..7614405da1 100644 --- a/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.test.tsx +++ b/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { Checkbox } from '@base_ui/react/Checkbox'; import { createRenderer, describeConformance } from '#test-utils'; -import { CheckboxRootContext } from '../Root/CheckboxRootContext'; +import { CheckboxRootContext } from '../Root/CheckboxRootContext.js'; const testContext = { checked: true, diff --git a/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.tsx b/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.tsx index 6a837d50c8..048d95b8c4 100644 --- a/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.tsx +++ b/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useCheckboxRootContext } from '../Root/CheckboxRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useCustomStyleHookMapping } from '../utils/useCustomStyleHookMapping'; -import type { CheckboxRoot } from '../Root/CheckboxRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useCheckboxRootContext } from '../Root/CheckboxRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useCustomStyleHookMapping } from '../utils/useCustomStyleHookMapping.js'; +import type { CheckboxRoot } from '../Root/CheckboxRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * The indicator part of the Checkbox. diff --git a/packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx b/packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx index 4e3dcf87b6..07c7241bdb 100644 --- a/packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx +++ b/packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useCheckboxGroupRootContext } from '../../CheckboxGroup/Root/CheckboxGroupRootContext'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useCustomStyleHookMapping } from '../utils/useCustomStyleHookMapping'; -import type { FieldRoot } from '../../Field/Root/FieldRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { type UseCheckboxRoot, useCheckboxRoot } from './useCheckboxRoot'; -import { CheckboxRootContext } from './CheckboxRootContext'; +import { useCheckboxGroupRootContext } from '../../CheckboxGroup/Root/CheckboxGroupRootContext.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useCustomStyleHookMapping } from '../utils/useCustomStyleHookMapping.js'; +import type { FieldRoot } from '../../Field/Root/FieldRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { type UseCheckboxRoot, useCheckboxRoot } from './useCheckboxRoot.js'; +import { CheckboxRootContext } from './CheckboxRootContext.js'; /** * The foundation for building custom-styled checkboxes. diff --git a/packages/mui-base/src/Checkbox/Root/CheckboxRootContext.ts b/packages/mui-base/src/Checkbox/Root/CheckboxRootContext.ts index 88bb016f57..b71566b65a 100644 --- a/packages/mui-base/src/Checkbox/Root/CheckboxRootContext.ts +++ b/packages/mui-base/src/Checkbox/Root/CheckboxRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { CheckboxRoot } from './CheckboxRoot'; +import type { CheckboxRoot } from './CheckboxRoot.js'; export type CheckboxRootContext = CheckboxRoot.OwnerState; diff --git a/packages/mui-base/src/Checkbox/Root/useCheckboxRoot.ts b/packages/mui-base/src/Checkbox/Root/useCheckboxRoot.ts index 5740991033..b858999d65 100644 --- a/packages/mui-base/src/Checkbox/Root/useCheckboxRoot.ts +++ b/packages/mui-base/src/Checkbox/Root/useCheckboxRoot.ts @@ -1,16 +1,16 @@ 'use client'; import * as React from 'react'; -import { useControlled } from '../../utils/useControlled'; -import { visuallyHidden } from '../../utils/visuallyHidden'; -import { useForkRef } from '../../utils/useForkRef'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useId } from '../../utils/useId'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; -import { useField } from '../../Field/useField'; -import { getInertValue } from '../../utils/getInertValue'; +import { useControlled } from '../../utils/useControlled.js'; +import { visuallyHidden } from '../../utils/visuallyHidden.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useId } from '../../utils/useId.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; +import { useField } from '../../Field/useField.js'; +import { getInertValue } from '../../utils/getInertValue.js'; export function useCheckboxRoot(params: UseCheckboxRoot.Parameters): UseCheckboxRoot.ReturnValue { const { diff --git a/packages/mui-base/src/Checkbox/index.parts.ts b/packages/mui-base/src/Checkbox/index.parts.ts index c046f6b441..944a999719 100644 --- a/packages/mui-base/src/Checkbox/index.parts.ts +++ b/packages/mui-base/src/Checkbox/index.parts.ts @@ -1,2 +1,2 @@ -export { CheckboxRoot as Root } from './Root/CheckboxRoot'; -export { CheckboxIndicator as Indicator } from './Indicator/CheckboxIndicator'; +export { CheckboxRoot as Root } from './Root/CheckboxRoot.js'; +export { CheckboxIndicator as Indicator } from './Indicator/CheckboxIndicator.js'; diff --git a/packages/mui-base/src/Checkbox/index.ts b/packages/mui-base/src/Checkbox/index.ts index 4e96104ea3..d74810b1a1 100644 --- a/packages/mui-base/src/Checkbox/index.ts +++ b/packages/mui-base/src/Checkbox/index.ts @@ -1 +1 @@ -export * as Checkbox from './index.parts'; +export * as Checkbox from './index.parts.js'; diff --git a/packages/mui-base/src/Checkbox/utils/useCustomStyleHookMapping.ts b/packages/mui-base/src/Checkbox/utils/useCustomStyleHookMapping.ts index 7b2d06cfc0..d2a06aa55c 100644 --- a/packages/mui-base/src/Checkbox/utils/useCustomStyleHookMapping.ts +++ b/packages/mui-base/src/Checkbox/utils/useCustomStyleHookMapping.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import type { CheckboxRoot } from '../Root/CheckboxRoot'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import type { CheckboxRoot } from '../Root/CheckboxRoot.js'; export function useCustomStyleHookMapping(ownerState: CheckboxRoot.OwnerState) { return React.useMemo>( diff --git a/packages/mui-base/src/CheckboxGroup/Parent/useCheckboxGroupParent.ts b/packages/mui-base/src/CheckboxGroup/Parent/useCheckboxGroupParent.ts index c9fc7be4f2..9e6662124c 100644 --- a/packages/mui-base/src/CheckboxGroup/Parent/useCheckboxGroupParent.ts +++ b/packages/mui-base/src/CheckboxGroup/Parent/useCheckboxGroupParent.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { useId } from '../../utils/useId'; -import { useEventCallback } from '../../utils/useEventCallback'; +import { useId } from '../../utils/useId.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; /** * diff --git a/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.test.tsx b/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.test.tsx index e7011b524c..33e40dbfbc 100644 --- a/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.test.tsx +++ b/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { createRenderer, screen, fireEvent } from '@mui/internal-test-utils'; import { CheckboxGroup } from '@base_ui/react/CheckboxGroup'; import { Checkbox } from '@base_ui/react/Checkbox'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.tsx b/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.tsx index 37a8e0c550..0103a54fdb 100644 --- a/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.tsx +++ b/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useCheckboxGroupRoot } from './useCheckboxGroupRoot'; -import { CheckboxGroupRootContext } from './CheckboxGroupRootContext'; -import type { FieldRoot } from '../../Field/Root/FieldRoot'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useCheckboxGroupRoot } from './useCheckboxGroupRoot.js'; +import { CheckboxGroupRootContext } from './CheckboxGroupRootContext.js'; +import type { FieldRoot } from '../../Field/Root/FieldRoot.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * The foundation for building custom-styled checkbox groups. diff --git a/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRootContext.ts b/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRootContext.ts index 7e9295acec..b228972e30 100644 --- a/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRootContext.ts +++ b/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { UseCheckboxGroupParent } from '../Parent/useCheckboxGroupParent'; +import { UseCheckboxGroupParent } from '../Parent/useCheckboxGroupParent.js'; export interface CheckboxGroupRootContext { value: string[]; diff --git a/packages/mui-base/src/CheckboxGroup/Root/useCheckboxGroupRoot.tsx b/packages/mui-base/src/CheckboxGroup/Root/useCheckboxGroupRoot.tsx index b5ebb05335..e75cf02f0d 100644 --- a/packages/mui-base/src/CheckboxGroup/Root/useCheckboxGroupRoot.tsx +++ b/packages/mui-base/src/CheckboxGroup/Root/useCheckboxGroupRoot.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useControlled } from '../../utils/useControlled'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useCheckboxGroupParent } from '../Parent/useCheckboxGroupParent'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import type { UseCheckboxGroupParent } from '../Parent/useCheckboxGroupParent'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useCheckboxGroupParent } from '../Parent/useCheckboxGroupParent.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import type { UseCheckboxGroupParent } from '../Parent/useCheckboxGroupParent.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/CheckboxGroup/index.parts.ts b/packages/mui-base/src/CheckboxGroup/index.parts.ts index dd08fe5b48..5eb2434b27 100644 --- a/packages/mui-base/src/CheckboxGroup/index.parts.ts +++ b/packages/mui-base/src/CheckboxGroup/index.parts.ts @@ -1 +1 @@ -export { CheckboxGroupRoot as Root } from './Root/CheckboxGroupRoot'; +export { CheckboxGroupRoot as Root } from './Root/CheckboxGroupRoot.js'; diff --git a/packages/mui-base/src/CheckboxGroup/index.ts b/packages/mui-base/src/CheckboxGroup/index.ts index da7ae148df..504d52da44 100644 --- a/packages/mui-base/src/CheckboxGroup/index.ts +++ b/packages/mui-base/src/CheckboxGroup/index.ts @@ -1 +1 @@ -export * as CheckboxGroup from './index.parts'; +export * as CheckboxGroup from './index.parts.js'; diff --git a/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.test.tsx b/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.test.tsx index 0bea82d66a..3ad4144845 100644 --- a/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.test.tsx +++ b/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { createRenderer } from '@mui/internal-test-utils'; import { Collapsible } from '@base_ui/react/Collapsible'; -import { describeConformance } from '../../../test/describeConformance'; -import { CollapsibleRootContext } from '../Root/CollapsibleRootContext'; +import { describeConformance } from '#test-utils'; +import { CollapsibleRootContext } from '../Root/CollapsibleRootContext.js'; const contextValue: CollapsibleRootContext = { animated: false, diff --git a/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.tsx b/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.tsx index 4d7a0f7be8..9b1b6a31c7 100644 --- a/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.tsx +++ b/packages/mui-base/src/Collapsible/Panel/CollapsiblePanel.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useCollapsibleRootContext } from '../Root/CollapsibleRootContext'; -import type { CollapsibleRoot } from '../Root/CollapsibleRoot'; -import { collapsibleStyleHookMapping } from '../Root/styleHooks'; -import { useCollapsiblePanel } from './useCollapsiblePanel'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useCollapsibleRootContext } from '../Root/CollapsibleRootContext.js'; +import type { CollapsibleRoot } from '../Root/CollapsibleRoot.js'; +import { collapsibleStyleHookMapping } from '../Root/styleHooks.js'; +import { useCollapsiblePanel } from './useCollapsiblePanel.js'; /** * diff --git a/packages/mui-base/src/Collapsible/Panel/useCollapsiblePanel.ts b/packages/mui-base/src/Collapsible/Panel/useCollapsiblePanel.ts index 7b7f1946bd..11f285c382 100644 --- a/packages/mui-base/src/Collapsible/Panel/useCollapsiblePanel.ts +++ b/packages/mui-base/src/Collapsible/Panel/useCollapsiblePanel.ts @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { ownerWindow } from '../../utils/owner'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useAnimationsFinished } from '../../utils/useAnimationsFinished'; -import { useForkRef } from '../../utils/useForkRef'; -import { useId } from '../../utils/useId'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { ownerWindow } from '../../utils/owner.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useAnimationsFinished } from '../../utils/useAnimationsFinished.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useId } from '../../utils/useId.js'; let cachedSupportsComputedStyleMap: boolean | undefined; diff --git a/packages/mui-base/src/Collapsible/Root/CollapsibleRoot.tsx b/packages/mui-base/src/Collapsible/Root/CollapsibleRoot.tsx index 1cd3f9cca5..f7254ee682 100644 --- a/packages/mui-base/src/Collapsible/Root/CollapsibleRoot.tsx +++ b/packages/mui-base/src/Collapsible/Root/CollapsibleRoot.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useCollapsibleRoot } from './useCollapsibleRoot'; -import { CollapsibleRootContext } from './CollapsibleRootContext'; -import { collapsibleStyleHookMapping } from './styleHooks'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useCollapsibleRoot } from './useCollapsibleRoot.js'; +import { CollapsibleRootContext } from './CollapsibleRootContext.js'; +import { collapsibleStyleHookMapping } from './styleHooks.js'; /** * diff --git a/packages/mui-base/src/Collapsible/Root/CollapsibleRootContext.ts b/packages/mui-base/src/Collapsible/Root/CollapsibleRootContext.ts index d19cffcb76..b70889ed73 100644 --- a/packages/mui-base/src/Collapsible/Root/CollapsibleRootContext.ts +++ b/packages/mui-base/src/Collapsible/Root/CollapsibleRootContext.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import type { useCollapsibleRoot } from './useCollapsibleRoot'; -import type { CollapsibleRoot } from './CollapsibleRoot'; +import type { useCollapsibleRoot } from './useCollapsibleRoot.js'; +import type { CollapsibleRoot } from './CollapsibleRoot.js'; export interface CollapsibleRootContext extends useCollapsibleRoot.ReturnValue { ownerState: CollapsibleRoot.OwnerState; diff --git a/packages/mui-base/src/Collapsible/Root/styleHooks.ts b/packages/mui-base/src/Collapsible/Root/styleHooks.ts index 483cc786ef..8d3c6b4194 100644 --- a/packages/mui-base/src/Collapsible/Root/styleHooks.ts +++ b/packages/mui-base/src/Collapsible/Root/styleHooks.ts @@ -1,6 +1,6 @@ -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { collapsibleOpenStateMapping as baseMapping } from '../../utils/collapsibleOpenStateMapping'; -import type { CollapsibleRoot } from './CollapsibleRoot'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { collapsibleOpenStateMapping as baseMapping } from '../../utils/collapsibleOpenStateMapping.js'; +import type { CollapsibleRoot } from './CollapsibleRoot.js'; export const collapsibleStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Collapsible/Root/useCollapsibleRoot.ts b/packages/mui-base/src/Collapsible/Root/useCollapsibleRoot.ts index d40e21d105..ad115a2963 100644 --- a/packages/mui-base/src/Collapsible/Root/useCollapsibleRoot.ts +++ b/packages/mui-base/src/Collapsible/Root/useCollapsibleRoot.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { useControlled } from '../../utils/useControlled'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useTransitionStatus, TransitionStatus } from '../../utils/useTransitionStatus'; -import { useId } from '../../utils/useId'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useTransitionStatus, TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useId } from '../../utils/useId.js'; export function useCollapsibleRoot( parameters: useCollapsibleRoot.Parameters, diff --git a/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.test.tsx b/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.test.tsx index 289fc2969d..a06d9f6b98 100644 --- a/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.test.tsx +++ b/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { createRenderer } from '@mui/internal-test-utils'; import { Collapsible } from '@base_ui/react/Collapsible'; -import { describeConformance } from '../../../test/describeConformance'; -import { CollapsibleRootContext } from '../Root/CollapsibleRootContext'; +import { describeConformance } from '#test-utils'; +import { CollapsibleRootContext } from '../Root/CollapsibleRootContext.js'; const contextValue: CollapsibleRootContext = { animated: false, diff --git a/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.tsx b/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.tsx index ef59b7b659..b8c956c2b8 100644 --- a/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.tsx +++ b/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { triggerOpenStateMapping } from '../../utils/collapsibleOpenStateMapping'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useCollapsibleRootContext } from '../Root/CollapsibleRootContext'; -import { CollapsibleRoot } from '../Root/CollapsibleRoot'; -import { useCollapsibleTrigger } from './useCollapsibleTrigger'; +import { triggerOpenStateMapping } from '../../utils/collapsibleOpenStateMapping.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useCollapsibleRootContext } from '../Root/CollapsibleRootContext.js'; +import { CollapsibleRoot } from '../Root/CollapsibleRoot.js'; +import { useCollapsibleTrigger } from './useCollapsibleTrigger.js'; /** * diff --git a/packages/mui-base/src/Collapsible/Trigger/useCollapsibleTrigger.ts b/packages/mui-base/src/Collapsible/Trigger/useCollapsibleTrigger.ts index c8a75f9058..a75a5329e6 100644 --- a/packages/mui-base/src/Collapsible/Trigger/useCollapsibleTrigger.ts +++ b/packages/mui-base/src/Collapsible/Trigger/useCollapsibleTrigger.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useForkRef } from '../../utils/useForkRef'; -import { GenericHTMLProps } from '../../utils/types'; -import { useButton } from '../../useButton'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { useButton } from '../../useButton/index.js'; export function useCollapsibleTrigger( parameters: useCollapsibleTrigger.Parameters, diff --git a/packages/mui-base/src/Collapsible/index.parts.ts b/packages/mui-base/src/Collapsible/index.parts.ts index 91b27a729e..536209b5af 100644 --- a/packages/mui-base/src/Collapsible/index.parts.ts +++ b/packages/mui-base/src/Collapsible/index.parts.ts @@ -1,3 +1,3 @@ -export { CollapsibleRoot as Root } from './Root/CollapsibleRoot'; -export { CollapsibleTrigger as Trigger } from './Trigger/CollapsibleTrigger'; -export { CollapsiblePanel as Panel } from './Panel/CollapsiblePanel'; +export { CollapsibleRoot as Root } from './Root/CollapsibleRoot.js'; +export { CollapsibleTrigger as Trigger } from './Trigger/CollapsibleTrigger.js'; +export { CollapsiblePanel as Panel } from './Panel/CollapsiblePanel.js'; diff --git a/packages/mui-base/src/Collapsible/index.ts b/packages/mui-base/src/Collapsible/index.ts index 6d2cba0c78..5a021ef4c9 100644 --- a/packages/mui-base/src/Collapsible/index.ts +++ b/packages/mui-base/src/Collapsible/index.ts @@ -1 +1 @@ -export * as Collapsible from './index.parts'; +export * as Collapsible from './index.parts.js'; diff --git a/packages/mui-base/src/Composite/Item/CompositeItem.tsx b/packages/mui-base/src/Composite/Item/CompositeItem.tsx index 8b87646048..2273498985 100644 --- a/packages/mui-base/src/Composite/Item/CompositeItem.tsx +++ b/packages/mui-base/src/Composite/Item/CompositeItem.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import { useCompositeRootContext } from '../Root/CompositeRootContext'; -import { useCompositeItem } from './useCompositeItem'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useCompositeRootContext } from '../Root/CompositeRootContext.js'; +import { useCompositeItem } from './useCompositeItem.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * @ignore - internal component. diff --git a/packages/mui-base/src/Composite/Item/useCompositeItem.ts b/packages/mui-base/src/Composite/Item/useCompositeItem.ts index 70ab405323..8dd1369ce7 100644 --- a/packages/mui-base/src/Composite/Item/useCompositeItem.ts +++ b/packages/mui-base/src/Composite/Item/useCompositeItem.ts @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; -import { useCompositeRootContext } from '../Root/CompositeRootContext'; -import { useCompositeListItem } from '../List/useCompositeListItem'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { useCompositeRootContext } from '../Root/CompositeRootContext.js'; +import { useCompositeListItem } from '../List/useCompositeListItem.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; /** * diff --git a/packages/mui-base/src/Composite/List/CompositeList.tsx b/packages/mui-base/src/Composite/List/CompositeList.tsx index 09815eb7e6..1651642e80 100644 --- a/packages/mui-base/src/Composite/List/CompositeList.tsx +++ b/packages/mui-base/src/Composite/List/CompositeList.tsx @@ -2,8 +2,8 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { CompositeListContext } from './CompositeListContext'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { CompositeListContext } from './CompositeListContext.js'; function sortByDocumentPosition(a: Node, b: Node) { const position = a.compareDocumentPosition(b); diff --git a/packages/mui-base/src/Composite/List/useCompositeListItem.ts b/packages/mui-base/src/Composite/List/useCompositeListItem.ts index 7a93d56217..ca614a92da 100644 --- a/packages/mui-base/src/Composite/List/useCompositeListItem.ts +++ b/packages/mui-base/src/Composite/List/useCompositeListItem.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useCompositeListContext } from './CompositeListContext'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useCompositeListContext } from './CompositeListContext.js'; export interface UseCompositeListItemParameters { label?: string | null; diff --git a/packages/mui-base/src/Composite/Root/CompositeRoot.tsx b/packages/mui-base/src/Composite/Root/CompositeRoot.tsx index 089addb887..8579b411ff 100644 --- a/packages/mui-base/src/Composite/Root/CompositeRoot.tsx +++ b/packages/mui-base/src/Composite/Root/CompositeRoot.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { CompositeList } from '../List/CompositeList'; -import { useCompositeRoot } from './useCompositeRoot'; -import { CompositeRootContext } from './CompositeRootContext'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { Dimensions } from '../composite'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { CompositeList } from '../List/CompositeList.js'; +import { useCompositeRoot } from './useCompositeRoot.js'; +import { CompositeRootContext } from './CompositeRootContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { Dimensions } from '../composite.js'; /** * @ignore - internal component. diff --git a/packages/mui-base/src/Composite/Root/useCompositeRoot.ts b/packages/mui-base/src/Composite/Root/useCompositeRoot.ts index 3a42f6f8dd..e280fb7116 100644 --- a/packages/mui-base/src/Composite/Root/useCompositeRoot.ts +++ b/packages/mui-base/src/Composite/Root/useCompositeRoot.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; import { ALL_KEYS, ARROW_DOWN, @@ -20,7 +20,7 @@ import { isIndexOutOfBounds, VERTICAL_KEYS, type Dimensions, -} from '../composite'; +} from '../composite.js'; export interface UseCompositeRootParameters { orientation?: 'horizontal' | 'vertical' | 'both'; diff --git a/packages/mui-base/src/Dialog/Backdrop/DialogBackdrop.tsx b/packages/mui-base/src/Dialog/Backdrop/DialogBackdrop.tsx index 3b13dc57a0..94f70e9b93 100644 --- a/packages/mui-base/src/Dialog/Backdrop/DialogBackdrop.tsx +++ b/packages/mui-base/src/Dialog/Backdrop/DialogBackdrop.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingPortal } from '@floating-ui/react'; -import { useDialogBackdrop } from './useDialogBackdrop'; -import { useDialogRootContext } from '../Root/DialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { type TransitionStatus } from '../../utils/useTransitionStatus'; -import { type BaseUIComponentProps } from '../../utils/types'; -import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; +import { useDialogBackdrop } from './useDialogBackdrop.js'; +import { useDialogRootContext } from '../Root/DialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { type TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { type BaseUIComponentProps } from '../../utils/types.js'; +import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Dialog/Backdrop/useDialogBackdrop.ts b/packages/mui-base/src/Dialog/Backdrop/useDialogBackdrop.ts index b3b6bb2bdf..eeda2143e0 100644 --- a/packages/mui-base/src/Dialog/Backdrop/useDialogBackdrop.ts +++ b/packages/mui-base/src/Dialog/Backdrop/useDialogBackdrop.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useAnimatedElement } from '../../utils/useAnimatedElement'; -import { useForkRef } from '../../utils/useForkRef'; -import { type TransitionStatus } from '../../utils/useTransitionStatus'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useAnimatedElement } from '../../utils/useAnimatedElement.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { type TransitionStatus } from '../../utils/useTransitionStatus.js'; export function useDialogBackdrop( params: useDialogBackdrop.Parameters, diff --git a/packages/mui-base/src/Dialog/Close/DialogClose.tsx b/packages/mui-base/src/Dialog/Close/DialogClose.tsx index f1a2b67a30..44c005152a 100644 --- a/packages/mui-base/src/Dialog/Close/DialogClose.tsx +++ b/packages/mui-base/src/Dialog/Close/DialogClose.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useDialogClose } from './useDialogClose'; -import { useDialogRootContext } from '../Root/DialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useDialogClose } from './useDialogClose.js'; +import { useDialogRootContext } from '../Root/DialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Dialog/Close/useDialogClose.ts b/packages/mui-base/src/Dialog/Close/useDialogClose.ts index 45af0d84f6..4f4d392759 100644 --- a/packages/mui-base/src/Dialog/Close/useDialogClose.ts +++ b/packages/mui-base/src/Dialog/Close/useDialogClose.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; export function useDialogClose(params: useDialogClose.Parameters): useDialogClose.ReturnValue { const { open, onOpenChange } = params; diff --git a/packages/mui-base/src/Dialog/Description/DialogDescription.tsx b/packages/mui-base/src/Dialog/Description/DialogDescription.tsx index 40183668ab..de57ff43bf 100644 --- a/packages/mui-base/src/Dialog/Description/DialogDescription.tsx +++ b/packages/mui-base/src/Dialog/Description/DialogDescription.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useDialogRootContext } from '../Root/DialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useDialogRootContext } from '../Root/DialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Dialog/Popup/DialogPopup.tsx b/packages/mui-base/src/Dialog/Popup/DialogPopup.tsx index 02b6cdd945..02d2b6229e 100644 --- a/packages/mui-base/src/Dialog/Popup/DialogPopup.tsx +++ b/packages/mui-base/src/Dialog/Popup/DialogPopup.tsx @@ -2,16 +2,16 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'; -import { useDialogPopup } from './useDialogPopup'; -import { useDialogRootContext } from '../Root/DialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { refType, HTMLElementType } from '../../utils/proptypes'; -import { type BaseUIComponentProps } from '../../utils/types'; -import { type TransitionStatus } from '../../utils/useTransitionStatus'; -import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; -import { useForkRef } from '../../utils/useForkRef'; -import { InteractionType } from '../../utils/useEnhancedClickHandler'; +import { useDialogPopup } from './useDialogPopup.js'; +import { useDialogRootContext } from '../Root/DialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { refType, HTMLElementType } from '../../utils/proptypes.js'; +import { type BaseUIComponentProps } from '../../utils/types.js'; +import { type TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { InteractionType } from '../../utils/useEnhancedClickHandler.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Dialog/Popup/useDialogPopup.tsx b/packages/mui-base/src/Dialog/Popup/useDialogPopup.tsx index cd55edc56e..1696828d5b 100644 --- a/packages/mui-base/src/Dialog/Popup/useDialogPopup.tsx +++ b/packages/mui-base/src/Dialog/Popup/useDialogPopup.tsx @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import { type FloatingRootContext, useFloating, type FloatingContext } from '@floating-ui/react'; -import { useId } from '../../utils/useId'; -import { useForkRef } from '../../utils/useForkRef'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useScrollLock } from '../../utils/useScrollLock'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { type InteractionType } from '../../utils/useEnhancedClickHandler'; -import { GenericHTMLProps } from '../../utils/types'; +import { useId } from '../../utils/useId.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useScrollLock } from '../../utils/useScrollLock.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { type InteractionType } from '../../utils/useEnhancedClickHandler.js'; +import { GenericHTMLProps } from '../../utils/types.js'; export function useDialogPopup(parameters: useDialogPopup.Parameters): useDialogPopup.ReturnValue { const { diff --git a/packages/mui-base/src/Dialog/Root/DialogRoot.tsx b/packages/mui-base/src/Dialog/Root/DialogRoot.tsx index 89ee9d70e0..58fe334b99 100644 --- a/packages/mui-base/src/Dialog/Root/DialogRoot.tsx +++ b/packages/mui-base/src/Dialog/Root/DialogRoot.tsx @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { DialogRootContext } from './DialogRootContext'; -import { type CommonParameters, useDialogRoot } from './useDialogRoot'; +import { DialogRootContext } from './DialogRootContext.js'; +import { type CommonParameters, useDialogRoot } from './useDialogRoot.js'; /** * diff --git a/packages/mui-base/src/Dialog/Root/DialogRootContext.ts b/packages/mui-base/src/Dialog/Root/DialogRootContext.ts index 4514bc4929..e9f81b9c58 100644 --- a/packages/mui-base/src/Dialog/Root/DialogRootContext.ts +++ b/packages/mui-base/src/Dialog/Root/DialogRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { useDialogRoot } from './useDialogRoot'; +import type { useDialogRoot } from './useDialogRoot.js'; export interface DialogRootContext extends useDialogRoot.ReturnValue { /** diff --git a/packages/mui-base/src/Dialog/Root/useDialogRoot.ts b/packages/mui-base/src/Dialog/Root/useDialogRoot.ts index b23d2c2d8e..9fc9b50d2e 100644 --- a/packages/mui-base/src/Dialog/Root/useDialogRoot.ts +++ b/packages/mui-base/src/Dialog/Root/useDialogRoot.ts @@ -7,14 +7,14 @@ import { useFloatingRootContext, useInteractions, } from '@floating-ui/react'; -import { useControlled } from '../../utils/useControlled'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useTransitionStatus, type TransitionStatus } from '../../utils/useTransitionStatus'; -import { useAnimationsFinished } from '../../utils/useAnimationsFinished'; -import { type InteractionType } from '../../utils/useEnhancedClickHandler'; -import { type GenericHTMLProps } from '../../utils/types'; -import { useOpenInteractionType } from '../../utils/useOpenInteractionType'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useTransitionStatus, type TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useAnimationsFinished } from '../../utils/useAnimationsFinished.js'; +import { type InteractionType } from '../../utils/useEnhancedClickHandler.js'; +import { type GenericHTMLProps } from '../../utils/types.js'; +import { useOpenInteractionType } from '../../utils/useOpenInteractionType.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; export function useDialogRoot(parameters: useDialogRoot.Parameters): useDialogRoot.ReturnValue { const { diff --git a/packages/mui-base/src/Dialog/Title/DialogTitle.tsx b/packages/mui-base/src/Dialog/Title/DialogTitle.tsx index 2c4b05495c..3bdaae25ea 100644 --- a/packages/mui-base/src/Dialog/Title/DialogTitle.tsx +++ b/packages/mui-base/src/Dialog/Title/DialogTitle.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useDialogRootContext } from '../Root/DialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import { type BaseUIComponentProps } from '../../utils/types'; +import { useDialogRootContext } from '../Root/DialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import { type BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Dialog/Trigger/DialogTrigger.tsx b/packages/mui-base/src/Dialog/Trigger/DialogTrigger.tsx index 1a384df837..f5c5c17eaf 100644 --- a/packages/mui-base/src/Dialog/Trigger/DialogTrigger.tsx +++ b/packages/mui-base/src/Dialog/Trigger/DialogTrigger.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useDialogRootContext } from '../Root/DialogRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useDialogRootContext } from '../Root/DialogRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders a trigger element that opens the Dialog. diff --git a/packages/mui-base/src/Dialog/index.parts.ts b/packages/mui-base/src/Dialog/index.parts.ts index f242e5602e..dd6de382f3 100644 --- a/packages/mui-base/src/Dialog/index.parts.ts +++ b/packages/mui-base/src/Dialog/index.parts.ts @@ -1,7 +1,7 @@ -export { DialogBackdrop as Backdrop } from './Backdrop/DialogBackdrop'; -export { DialogClose as Close } from './Close/DialogClose'; -export { DialogDescription as Description } from './Description/DialogDescription'; -export { DialogPopup as Popup } from './Popup/DialogPopup'; -export { DialogRoot as Root } from './Root/DialogRoot'; -export { DialogTitle as Title } from './Title/DialogTitle'; -export { DialogTrigger as Trigger } from './Trigger/DialogTrigger'; +export { DialogBackdrop as Backdrop } from './Backdrop/DialogBackdrop.js'; +export { DialogClose as Close } from './Close/DialogClose.js'; +export { DialogDescription as Description } from './Description/DialogDescription.js'; +export { DialogPopup as Popup } from './Popup/DialogPopup.js'; +export { DialogRoot as Root } from './Root/DialogRoot.js'; +export { DialogTitle as Title } from './Title/DialogTitle.js'; +export { DialogTrigger as Trigger } from './Trigger/DialogTrigger.js'; diff --git a/packages/mui-base/src/Dialog/index.ts b/packages/mui-base/src/Dialog/index.ts index 823c17d24f..1d187ba61c 100644 --- a/packages/mui-base/src/Dialog/index.ts +++ b/packages/mui-base/src/Dialog/index.ts @@ -1 +1 @@ -export * as Dialog from './index.parts'; +export * as Dialog from './index.parts.js'; diff --git a/packages/mui-base/src/Field/Control/FieldControl.test.tsx b/packages/mui-base/src/Field/Control/FieldControl.test.tsx index cf6187722a..a6af58da1f 100644 --- a/packages/mui-base/src/Field/Control/FieldControl.test.tsx +++ b/packages/mui-base/src/Field/Control/FieldControl.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { createRenderer } from '@mui/internal-test-utils'; import { Field } from '@base_ui/react/Field'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Field/Control/FieldControl.tsx b/packages/mui-base/src/Field/Control/FieldControl.tsx index 6f7a78c2ad..865f14cdb2 100644 --- a/packages/mui-base/src/Field/Control/FieldControl.tsx +++ b/packages/mui-base/src/Field/Control/FieldControl.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useFieldControl } from './useFieldControl'; -import { FieldRoot } from '../Root/FieldRoot'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { STYLE_HOOK_MAPPING } from '../utils/constants'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useFieldControl } from './useFieldControl.js'; +import { FieldRoot } from '../Root/FieldRoot.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { STYLE_HOOK_MAPPING } from '../utils/constants.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; export type FieldControlElement = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement; diff --git a/packages/mui-base/src/Field/Control/useFieldControl.ts b/packages/mui-base/src/Field/Control/useFieldControl.ts index 9208ac5737..a384b0ddf1 100644 --- a/packages/mui-base/src/Field/Control/useFieldControl.ts +++ b/packages/mui-base/src/Field/Control/useFieldControl.ts @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { useFieldControlValidation } from './useFieldControlValidation'; -import { useFormRootContext } from '../../Form/Root/FormRootContext'; -import { useField } from '../useField'; -import { useControlled } from '../../utils/useControlled'; -import { useEventCallback } from '../../utils/useEventCallback'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { useFieldControlValidation } from './useFieldControlValidation.js'; +import { useFormRootContext } from '../../Form/Root/FormRootContext.js'; +import { useField } from '../useField.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; export function useFieldControl(params: useFieldControl.Parameters) { const { id: idProp, name, value: valueProp, defaultValue, onValueChange, disabled } = params; diff --git a/packages/mui-base/src/Field/Control/useFieldControlValidation.ts b/packages/mui-base/src/Field/Control/useFieldControlValidation.ts index 477c6cb058..b04cd165bd 100644 --- a/packages/mui-base/src/Field/Control/useFieldControlValidation.ts +++ b/packages/mui-base/src/Field/Control/useFieldControlValidation.ts @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { DEFAULT_VALIDITY_STATE } from '../utils/constants'; -import { useFormRootContext } from '../../Form/Root/FormRootContext'; -import { getCombinedFieldValidityData } from '../utils/getCombinedFieldValidityData'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { DEFAULT_VALIDITY_STATE } from '../utils/constants.js'; +import { useFormRootContext } from '../../Form/Root/FormRootContext.js'; +import { getCombinedFieldValidityData } from '../utils/getCombinedFieldValidityData.js'; const validityKeys = Object.keys(DEFAULT_VALIDITY_STATE) as Array; diff --git a/packages/mui-base/src/Field/Description/FieldDescription.test.tsx b/packages/mui-base/src/Field/Description/FieldDescription.test.tsx index c0aa55deca..fca895f050 100644 --- a/packages/mui-base/src/Field/Description/FieldDescription.test.tsx +++ b/packages/mui-base/src/Field/Description/FieldDescription.test.tsx @@ -8,7 +8,7 @@ import { RadioGroup } from '@base_ui/react/RadioGroup'; import { Radio } from '@base_ui/react/Radio'; import { createRenderer, screen } from '@mui/internal-test-utils'; import { expect } from 'chai'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Field/Description/FieldDescription.tsx b/packages/mui-base/src/Field/Description/FieldDescription.tsx index 20eb153a24..8c32f87c80 100644 --- a/packages/mui-base/src/Field/Description/FieldDescription.tsx +++ b/packages/mui-base/src/Field/Description/FieldDescription.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { FieldRoot } from '../Root/FieldRoot'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { useFieldDescription } from './useFieldDescription'; -import { STYLE_HOOK_MAPPING } from '../utils/constants'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { FieldRoot } from '../Root/FieldRoot.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { useFieldDescription } from './useFieldDescription.js'; +import { STYLE_HOOK_MAPPING } from '../utils/constants.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * A description message for the field's control. diff --git a/packages/mui-base/src/Field/Description/useFieldDescription.ts b/packages/mui-base/src/Field/Description/useFieldDescription.ts index 49898908f9..d7ccc7bb03 100644 --- a/packages/mui-base/src/Field/Description/useFieldDescription.ts +++ b/packages/mui-base/src/Field/Description/useFieldDescription.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useId } from '../../utils/useId'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useFieldRootContext } from '../Root/FieldRootContext'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useId } from '../../utils/useId.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; export function useFieldDescription(params: useFieldDescription.Parameters) { const { id: idProp } = params; diff --git a/packages/mui-base/src/Field/Error/FieldError.test.tsx b/packages/mui-base/src/Field/Error/FieldError.test.tsx index 1255e35983..f1a09cb158 100644 --- a/packages/mui-base/src/Field/Error/FieldError.test.tsx +++ b/packages/mui-base/src/Field/Error/FieldError.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { createRenderer, fireEvent, screen } from '@mui/internal-test-utils'; import { expect } from 'chai'; import { Field } from '@base_ui/react/Field'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Field/Error/FieldError.tsx b/packages/mui-base/src/Field/Error/FieldError.tsx index 6d8b6e90d5..b5dd91f13f 100644 --- a/packages/mui-base/src/Field/Error/FieldError.tsx +++ b/packages/mui-base/src/Field/Error/FieldError.tsx @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { FieldRoot } from '../Root/FieldRoot'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { useFieldError } from './useFieldError'; -import { STYLE_HOOK_MAPPING } from '../utils/constants'; -import { useFormRootContext } from '../../Form/Root/FormRootContext'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { FieldRoot } from '../Root/FieldRoot.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { useFieldError } from './useFieldError.js'; +import { STYLE_HOOK_MAPPING } from '../utils/constants.js'; +import { useFormRootContext } from '../../Form/Root/FormRootContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * Displays error messages for the field's control. diff --git a/packages/mui-base/src/Field/Error/useFieldError.ts b/packages/mui-base/src/Field/Error/useFieldError.ts index ad3afe60f5..1314109ce0 100644 --- a/packages/mui-base/src/Field/Error/useFieldError.ts +++ b/packages/mui-base/src/Field/Error/useFieldError.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useId } from '../../utils/useId'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useFieldRootContext } from '../Root/FieldRootContext'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useId } from '../../utils/useId.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; export function useFieldError(params: useFieldError.Parameters) { const { id: idProp, rendered, formError } = params; diff --git a/packages/mui-base/src/Field/Label/FieldLabel.test.tsx b/packages/mui-base/src/Field/Label/FieldLabel.test.tsx index 39424f57cb..c7f3ee9a54 100644 --- a/packages/mui-base/src/Field/Label/FieldLabel.test.tsx +++ b/packages/mui-base/src/Field/Label/FieldLabel.test.tsx @@ -8,7 +8,7 @@ import { RadioGroup } from '@base_ui/react/RadioGroup'; import { Radio } from '@base_ui/react/Radio'; import { createRenderer, screen } from '@mui/internal-test-utils'; import { expect } from 'chai'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Field/Label/FieldLabel.tsx b/packages/mui-base/src/Field/Label/FieldLabel.tsx index 5b7c88606a..13cb79f402 100644 --- a/packages/mui-base/src/Field/Label/FieldLabel.tsx +++ b/packages/mui-base/src/Field/Label/FieldLabel.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { FieldRoot } from '../Root/FieldRoot'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { useFieldLabel } from './useFieldLabel'; -import { STYLE_HOOK_MAPPING } from '../utils/constants'; -import { useId } from '../../utils/useId'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { FieldRoot } from '../Root/FieldRoot.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { useFieldLabel } from './useFieldLabel.js'; +import { STYLE_HOOK_MAPPING } from '../utils/constants.js'; +import { useId } from '../../utils/useId.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * A label for the field's control. diff --git a/packages/mui-base/src/Field/Label/useFieldLabel.ts b/packages/mui-base/src/Field/Label/useFieldLabel.ts index 12cc28cdeb..7af3b73ff3 100644 --- a/packages/mui-base/src/Field/Label/useFieldLabel.ts +++ b/packages/mui-base/src/Field/Label/useFieldLabel.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useFieldRootContext } from '../Root/FieldRootContext'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; export function useFieldLabel(params: useFieldLabel.Parameters) { const { customTag } = params; diff --git a/packages/mui-base/src/Field/Root/FieldRoot.test.tsx b/packages/mui-base/src/Field/Root/FieldRoot.test.tsx index 43b71b0859..e622e39a1f 100644 --- a/packages/mui-base/src/Field/Root/FieldRoot.test.tsx +++ b/packages/mui-base/src/Field/Root/FieldRoot.test.tsx @@ -16,7 +16,7 @@ import { waitFor, } from '@mui/internal-test-utils'; import { expect } from 'chai'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Field/Root/FieldRoot.tsx b/packages/mui-base/src/Field/Root/FieldRoot.tsx index 6555603565..bd028ef2ee 100644 --- a/packages/mui-base/src/Field/Root/FieldRoot.tsx +++ b/packages/mui-base/src/Field/Root/FieldRoot.tsx @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { FieldRootContext } from './FieldRootContext'; -import { DEFAULT_VALIDITY_STATE, STYLE_HOOK_MAPPING } from '../utils/constants'; -import { useFieldsetRootContext } from '../../Fieldset/Root/FieldsetRootContext'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useFormRootContext } from '../../Form/Root/FormRootContext'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { FieldRootContext } from './FieldRootContext.js'; +import { DEFAULT_VALIDITY_STATE, STYLE_HOOK_MAPPING } from '../utils/constants.js'; +import { useFieldsetRootContext } from '../../Fieldset/Root/FieldsetRootContext.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useFormRootContext } from '../../Form/Root/FormRootContext.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * The foundation for building custom-styled fields. diff --git a/packages/mui-base/src/Field/Root/FieldRootContext.ts b/packages/mui-base/src/Field/Root/FieldRootContext.ts index 9ea94220ba..8ac05b7694 100644 --- a/packages/mui-base/src/Field/Root/FieldRootContext.ts +++ b/packages/mui-base/src/Field/Root/FieldRootContext.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { DEFAULT_VALIDITY_STATE } from '../utils/constants'; -import type { FieldRoot, FieldValidityData } from './FieldRoot'; +import { DEFAULT_VALIDITY_STATE } from '../utils/constants.js'; +import type { FieldRoot, FieldValidityData } from './FieldRoot.js'; const NOOP = () => {}; diff --git a/packages/mui-base/src/Field/Validity/FieldValidity.tsx b/packages/mui-base/src/Field/Validity/FieldValidity.tsx index c3ae33ee08..404455d351 100644 --- a/packages/mui-base/src/Field/Validity/FieldValidity.tsx +++ b/packages/mui-base/src/Field/Validity/FieldValidity.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useFieldRootContext } from '../Root/FieldRootContext'; -import { getCombinedFieldValidityData } from '../utils/getCombinedFieldValidityData'; -import { FieldValidityData } from '../Root/FieldRoot'; +import { useFieldRootContext } from '../Root/FieldRootContext.js'; +import { getCombinedFieldValidityData } from '../utils/getCombinedFieldValidityData.js'; +import { FieldValidityData } from '../Root/FieldRoot.js'; /** * Render prop component that provides the field's validity state and value to its children. diff --git a/packages/mui-base/src/Field/index.parts.ts b/packages/mui-base/src/Field/index.parts.ts index caded13966..1caa8c33dd 100644 --- a/packages/mui-base/src/Field/index.parts.ts +++ b/packages/mui-base/src/Field/index.parts.ts @@ -1,8 +1,8 @@ -export { FieldRoot as Root } from './Root/FieldRoot'; -export { FieldLabel as Label } from './Label/FieldLabel'; -export { FieldError as Error } from './Error/FieldError'; -export { FieldDescription as Description } from './Description/FieldDescription'; -export { FieldControl as Control } from './Control/FieldControl'; -export { FieldValidity as Validity } from './Validity/FieldValidity'; +export { FieldRoot as Root } from './Root/FieldRoot.js'; +export { FieldLabel as Label } from './Label/FieldLabel.js'; +export { FieldError as Error } from './Error/FieldError.js'; +export { FieldDescription as Description } from './Description/FieldDescription.js'; +export { FieldControl as Control } from './Control/FieldControl.js'; +export { FieldValidity as Validity } from './Validity/FieldValidity.js'; -export type { FieldValidityData as ValidityData } from './Root/FieldRoot'; +export type { FieldValidityData as ValidityData } from './Root/FieldRoot.js'; diff --git a/packages/mui-base/src/Field/index.ts b/packages/mui-base/src/Field/index.ts index 45425dec2e..267a7ed1bd 100644 --- a/packages/mui-base/src/Field/index.ts +++ b/packages/mui-base/src/Field/index.ts @@ -1 +1 @@ -export * as Field from './index.parts'; +export * as Field from './index.parts.js'; diff --git a/packages/mui-base/src/Field/useField.ts b/packages/mui-base/src/Field/useField.ts index 3c062312ca..e8cfa4b061 100644 --- a/packages/mui-base/src/Field/useField.ts +++ b/packages/mui-base/src/Field/useField.ts @@ -1,9 +1,9 @@ import * as ReactDOM from 'react-dom'; -import { useEnhancedEffect } from '../utils/useEnhancedEffect'; -import { getCombinedFieldValidityData } from './utils/getCombinedFieldValidityData'; -import { useFormRootContext } from '../Form/Root/FormRootContext'; -import { useFieldRootContext } from './Root/FieldRootContext'; -import { useLatestRef } from '../utils/useLatestRef'; +import { useEnhancedEffect } from '../utils/useEnhancedEffect.js'; +import { getCombinedFieldValidityData } from './utils/getCombinedFieldValidityData.js'; +import { useFormRootContext } from '../Form/Root/FormRootContext.js'; +import { useFieldRootContext } from './Root/FieldRootContext.js'; +import { useLatestRef } from '../utils/useLatestRef.js'; export function useField(params: useField.Parameters) { const { formRef } = useFormRootContext(); diff --git a/packages/mui-base/src/Field/utils/getCombinedFieldValidityData.ts b/packages/mui-base/src/Field/utils/getCombinedFieldValidityData.ts index fdf7bb43ab..274a907832 100644 --- a/packages/mui-base/src/Field/utils/getCombinedFieldValidityData.ts +++ b/packages/mui-base/src/Field/utils/getCombinedFieldValidityData.ts @@ -1,4 +1,4 @@ -import { FieldValidityData } from '../Root/FieldRoot'; +import { FieldValidityData } from '../Root/FieldRoot.js'; /** * Combines the field's client-side, stateful validity data with the external invalid state to diff --git a/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.test.tsx b/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.test.tsx index 44b65dc34a..55b8aaa4c4 100644 --- a/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.test.tsx +++ b/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { createRenderer, screen } from '@mui/internal-test-utils'; import { Fieldset } from '@base_ui/react/Fieldset'; import { expect } from 'chai'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.tsx b/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.tsx index 5fbedd9654..8cfd4cdaaf 100644 --- a/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.tsx +++ b/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useFieldsetLegend } from './useFieldsetLegend'; -import { useFieldsetRootContext } from '../Root/FieldsetRootContext'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useFieldsetLegend } from './useFieldsetLegend.js'; +import { useFieldsetRootContext } from '../Root/FieldsetRootContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * Renders an element that labels the fieldset. diff --git a/packages/mui-base/src/Fieldset/Legend/useFieldsetLegend.ts b/packages/mui-base/src/Fieldset/Legend/useFieldsetLegend.ts index 2d07e6032b..522183d940 100644 --- a/packages/mui-base/src/Fieldset/Legend/useFieldsetLegend.ts +++ b/packages/mui-base/src/Fieldset/Legend/useFieldsetLegend.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useId } from '../../utils/useId'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useFieldsetRootContext } from '../Root/FieldsetRootContext'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useId } from '../../utils/useId.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useFieldsetRootContext } from '../Root/FieldsetRootContext.js'; export function useFieldsetLegend(params: useFieldsetLegend.Parameters) { const { id: idProp } = params; diff --git a/packages/mui-base/src/Fieldset/Root/FieldsetRoot.test.tsx b/packages/mui-base/src/Fieldset/Root/FieldsetRoot.test.tsx index 1172c88a78..308323a9f8 100644 --- a/packages/mui-base/src/Fieldset/Root/FieldsetRoot.test.tsx +++ b/packages/mui-base/src/Fieldset/Root/FieldsetRoot.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { createRenderer } from '@mui/internal-test-utils'; import { Fieldset } from '@base_ui/react/Fieldset'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Fieldset/Root/FieldsetRoot.tsx b/packages/mui-base/src/Fieldset/Root/FieldsetRoot.tsx index 74a47b859b..6acd687a81 100644 --- a/packages/mui-base/src/Fieldset/Root/FieldsetRoot.tsx +++ b/packages/mui-base/src/Fieldset/Root/FieldsetRoot.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { FieldsetRootContext } from './FieldsetRootContext'; -import { useFieldsetRoot } from './useFieldsetRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { FieldsetRootContext } from './FieldsetRootContext.js'; +import { useFieldsetRoot } from './useFieldsetRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * The foundation for building custom-styled fieldsets. diff --git a/packages/mui-base/src/Fieldset/Root/useFieldsetRoot.ts b/packages/mui-base/src/Fieldset/Root/useFieldsetRoot.ts index 914fc497a1..75da288e43 100644 --- a/packages/mui-base/src/Fieldset/Root/useFieldsetRoot.ts +++ b/packages/mui-base/src/Fieldset/Root/useFieldsetRoot.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; export function useFieldsetRoot() { const [legendId, setLegendId] = React.useState(undefined); diff --git a/packages/mui-base/src/Fieldset/index.parts.ts b/packages/mui-base/src/Fieldset/index.parts.ts index ee2ae05cbc..c1916077b3 100644 --- a/packages/mui-base/src/Fieldset/index.parts.ts +++ b/packages/mui-base/src/Fieldset/index.parts.ts @@ -1,2 +1,2 @@ -export { FieldsetRoot as Root } from './Root/FieldsetRoot'; -export { FieldsetLegend as Legend } from './Legend/FieldsetLegend'; +export { FieldsetRoot as Root } from './Root/FieldsetRoot.js'; +export { FieldsetLegend as Legend } from './Legend/FieldsetLegend.js'; diff --git a/packages/mui-base/src/Fieldset/index.ts b/packages/mui-base/src/Fieldset/index.ts index 1320ce1903..1f4503619f 100644 --- a/packages/mui-base/src/Fieldset/index.ts +++ b/packages/mui-base/src/Fieldset/index.ts @@ -1 +1 @@ -export * as Fieldset from './index.parts'; +export * as Fieldset from './index.parts.js'; diff --git a/packages/mui-base/src/Form/Root/FormRoot.test.tsx b/packages/mui-base/src/Form/Root/FormRoot.test.tsx index bfaca78d85..47b63c625d 100644 --- a/packages/mui-base/src/Form/Root/FormRoot.test.tsx +++ b/packages/mui-base/src/Form/Root/FormRoot.test.tsx @@ -3,7 +3,7 @@ import { Form } from '@base_ui/react/Form'; import { Field } from '@base_ui/react/Field'; import { expect } from 'chai'; import { createRenderer, fireEvent, screen } from '@mui/internal-test-utils'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Form/Root/FormRoot.tsx b/packages/mui-base/src/Form/Root/FormRoot.tsx index f458f0b8f0..2a6d57e0d6 100644 --- a/packages/mui-base/src/Form/Root/FormRoot.tsx +++ b/packages/mui-base/src/Form/Root/FormRoot.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { FormRootContext } from './FormRootContext'; -import { useEventCallback } from '../../utils/useEventCallback'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { FormRootContext } from './FormRootContext.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; /** * diff --git a/packages/mui-base/src/Form/Root/FormRootContext.ts b/packages/mui-base/src/Form/Root/FormRootContext.ts index 35370255df..71c7c37285 100644 --- a/packages/mui-base/src/Form/Root/FormRootContext.ts +++ b/packages/mui-base/src/Form/Root/FormRootContext.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import type { FieldValidityData } from '../../Field/Root/FieldRoot'; +import type { FieldValidityData } from '../../Field/Root/FieldRoot.js'; type Errors = Record; diff --git a/packages/mui-base/src/Form/index.parts.ts b/packages/mui-base/src/Form/index.parts.ts index 896025accf..e7f3b429f3 100644 --- a/packages/mui-base/src/Form/index.parts.ts +++ b/packages/mui-base/src/Form/index.parts.ts @@ -1 +1 @@ -export { FormRoot as Root } from './Root/FormRoot'; +export { FormRoot as Root } from './Root/FormRoot.js'; diff --git a/packages/mui-base/src/Form/index.ts b/packages/mui-base/src/Form/index.ts index 75652f7f18..871d335fcc 100644 --- a/packages/mui-base/src/Form/index.ts +++ b/packages/mui-base/src/Form/index.ts @@ -1 +1 @@ -export * as Form from './index.parts'; +export * as Form from './index.parts.js'; diff --git a/packages/mui-base/src/Menu/Arrow/MenuArrow.tsx b/packages/mui-base/src/Menu/Arrow/MenuArrow.tsx index 924ed047aa..af0757231f 100644 --- a/packages/mui-base/src/Menu/Arrow/MenuArrow.tsx +++ b/packages/mui-base/src/Menu/Arrow/MenuArrow.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useMenuArrow } from './useMenuArrow'; -import { useMenuPositionerContext } from '../Positioner/MenuPositionerContext'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useMenuArrow } from './useMenuArrow.js'; +import { useMenuPositionerContext } from '../Positioner/MenuPositionerContext.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders an arrow that points to the center of the anchor element. diff --git a/packages/mui-base/src/Menu/Arrow/useMenuArrow.ts b/packages/mui-base/src/Menu/Arrow/useMenuArrow.ts index 96cb5fef32..4fd0789303 100644 --- a/packages/mui-base/src/Menu/Arrow/useMenuArrow.ts +++ b/packages/mui-base/src/Menu/Arrow/useMenuArrow.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function useMenuArrow(params: useMenuArrow.Parameters): useMenuArrow.ReturnValue { const { arrowStyles } = params; diff --git a/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.test.tsx b/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.test.tsx index a8dff9d0a7..8339a52b02 100644 --- a/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.test.tsx +++ b/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.test.tsx @@ -5,8 +5,8 @@ import userEvent from '@testing-library/user-event'; import { fireEvent, act, waitFor } from '@mui/internal-test-utils'; import { FloatingRootContext, FloatingTree } from '@floating-ui/react'; import { Menu } from '@base_ui/react/Menu'; -import { describeConformance, createRenderer } from '../../../test'; -import { MenuRootContext } from '../Root/MenuRootContext'; +import { describeConformance, createRenderer } from '#test-utils'; +import { MenuRootContext } from '../Root/MenuRootContext.js'; const testRootContext: MenuRootContext = { floatingRootContext: {} as FloatingRootContext, diff --git a/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.tsx b/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.tsx index 7305bea6da..99ecdb5390 100644 --- a/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.tsx +++ b/packages/mui-base/src/Menu/CheckboxItem/MenuCheckboxItem.tsx @@ -2,14 +2,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingEvents, useFloatingTree, useListItem } from '@floating-ui/react'; -import { useMenuCheckboxItem } from './useMenuCheckboxItem'; -import { MenuCheckboxItemContext } from './MenuCheckboxItemContext'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useId } from '../../utils/useId'; -import type { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types'; -import { useForkRef } from '../../utils/useForkRef'; -import { itemMapping } from '../utils/styleHookMapping'; +import { useMenuCheckboxItem } from './useMenuCheckboxItem.js'; +import { MenuCheckboxItemContext } from './MenuCheckboxItemContext.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useId } from '../../utils/useId.js'; +import type { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { itemMapping } from '../utils/styleHookMapping.js'; const InnerMenuCheckboxItem = React.forwardRef(function InnerMenuItem( props: InnerMenuCheckboxItemProps, diff --git a/packages/mui-base/src/Menu/CheckboxItem/useMenuCheckboxItem.ts b/packages/mui-base/src/Menu/CheckboxItem/useMenuCheckboxItem.ts index 6b2dc30624..2dddc57bea 100644 --- a/packages/mui-base/src/Menu/CheckboxItem/useMenuCheckboxItem.ts +++ b/packages/mui-base/src/Menu/CheckboxItem/useMenuCheckboxItem.ts @@ -1,8 +1,8 @@ import * as React from 'react'; -import { useMenuItem } from '../Item/useMenuItem'; -import { useControlled } from '../../utils/useControlled'; -import { GenericHTMLProps } from '../../utils/types'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { useMenuItem } from '../Item/useMenuItem.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; /** * diff --git a/packages/mui-base/src/Menu/CheckboxItemIndicator/MenuCheckboxItemIndicator.tsx b/packages/mui-base/src/Menu/CheckboxItemIndicator/MenuCheckboxItemIndicator.tsx index 20399a7d1c..ef767dfc4f 100644 --- a/packages/mui-base/src/Menu/CheckboxItemIndicator/MenuCheckboxItemIndicator.tsx +++ b/packages/mui-base/src/Menu/CheckboxItemIndicator/MenuCheckboxItemIndicator.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useMenuCheckboxItemContext } from '../CheckboxItem/MenuCheckboxItemContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { BaseUIComponentProps } from '../../utils/types'; -import { itemMapping } from '../utils/styleHookMapping'; +import { useMenuCheckboxItemContext } from '../CheckboxItem/MenuCheckboxItemContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { itemMapping } from '../utils/styleHookMapping.js'; /** * diff --git a/packages/mui-base/src/Menu/Group/MenuGroup.tsx b/packages/mui-base/src/Menu/Group/MenuGroup.tsx index 498bd0a1ba..cb21c3962d 100644 --- a/packages/mui-base/src/Menu/Group/MenuGroup.tsx +++ b/packages/mui-base/src/Menu/Group/MenuGroup.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { MenuGroupContext } from './MenuGroupContext'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { MenuGroupContext } from './MenuGroupContext.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.test.tsx b/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.test.tsx index 335aa8f2e2..bb9c5b1a39 100644 --- a/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.test.tsx +++ b/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Menu } from '@base_ui/react/Menu'; import { createRenderer, describeConformance } from '#test-utils'; -import { MenuGroupContext } from '../Group/MenuGroupContext'; +import { MenuGroupContext } from '../Group/MenuGroupContext.js'; const testContext: MenuGroupContext = { setLabelId: () => {}, diff --git a/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.tsx b/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.tsx index 542eef9902..33f05ebaa1 100644 --- a/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.tsx +++ b/packages/mui-base/src/Menu/GroupLabel/MenuGroupLabel.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useId } from '../../utils/useId'; -import { useMenuGroupRootContext } from '../Group/MenuGroupContext'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useId } from '../../utils/useId.js'; +import { useMenuGroupRootContext } from '../Group/MenuGroupContext.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Menu/Item/MenuItem.test.tsx b/packages/mui-base/src/Menu/Item/MenuItem.test.tsx index d0d9bb7f03..622ad5d7c1 100644 --- a/packages/mui-base/src/Menu/Item/MenuItem.test.tsx +++ b/packages/mui-base/src/Menu/Item/MenuItem.test.tsx @@ -6,7 +6,7 @@ import { act, waitFor } from '@mui/internal-test-utils'; import { FloatingRootContext, FloatingTree } from '@floating-ui/react'; import { Menu } from '@base_ui/react/Menu'; import { describeConformance, createRenderer } from '#test-utils'; -import { MenuRootContext } from '../Root/MenuRootContext'; +import { MenuRootContext } from '../Root/MenuRootContext.js'; const testRootContext: MenuRootContext = { floatingRootContext: {} as FloatingRootContext, diff --git a/packages/mui-base/src/Menu/Item/MenuItem.tsx b/packages/mui-base/src/Menu/Item/MenuItem.tsx index bc18825499..d7cb9e42b7 100644 --- a/packages/mui-base/src/Menu/Item/MenuItem.tsx +++ b/packages/mui-base/src/Menu/Item/MenuItem.tsx @@ -2,12 +2,12 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingEvents, useFloatingTree, useListItem } from '@floating-ui/react'; -import { useMenuItem } from './useMenuItem'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useId } from '../../utils/useId'; -import type { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types'; -import { useForkRef } from '../../utils/useForkRef'; +import { useMenuItem } from './useMenuItem.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useId } from '../../utils/useId.js'; +import type { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types.js'; +import { useForkRef } from '../../utils/useForkRef.js'; const InnerMenuItem = React.forwardRef(function InnerMenuItem( props: InnerMenuItemProps, diff --git a/packages/mui-base/src/Menu/Item/useMenuItem.ts b/packages/mui-base/src/Menu/Item/useMenuItem.ts index cfa228f0a5..6d1634b868 100644 --- a/packages/mui-base/src/Menu/Item/useMenuItem.ts +++ b/packages/mui-base/src/Menu/Item/useMenuItem.ts @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import { FloatingEvents } from '@floating-ui/react'; -import { useButton } from '../../useButton'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { GenericHTMLProps } from '../../utils/types'; -import { MuiCancellableEvent } from '../../utils/MuiCancellableEvent'; +import { useButton } from '../../useButton/index.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { MuiCancellableEvent } from '../../utils/MuiCancellableEvent.js'; export function useMenuItem(params: useMenuItem.Parameters): useMenuItem.ReturnValue { const { diff --git a/packages/mui-base/src/Menu/Popup/MenuPopup.test.tsx b/packages/mui-base/src/Menu/Popup/MenuPopup.test.tsx index 4826f4c7ae..8765ccfe69 100644 --- a/packages/mui-base/src/Menu/Popup/MenuPopup.test.tsx +++ b/packages/mui-base/src/Menu/Popup/MenuPopup.test.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { Menu } from '@base_ui/react/Menu'; import { FloatingRootContext, FloatingTree } from '@floating-ui/react'; import { createRenderer, describeConformance } from '#test-utils'; -import { MenuPositionerContext } from '../Positioner/MenuPositionerContext'; -import { MenuRootContext } from '../Root/MenuRootContext'; +import { MenuPositionerContext } from '../Positioner/MenuPositionerContext.js'; +import { MenuRootContext } from '../Root/MenuRootContext.js'; const testRootContext: MenuRootContext = { floatingRootContext: {} as FloatingRootContext, diff --git a/packages/mui-base/src/Menu/Popup/MenuPopup.tsx b/packages/mui-base/src/Menu/Popup/MenuPopup.tsx index ec85814f3f..f0d3224ee3 100644 --- a/packages/mui-base/src/Menu/Popup/MenuPopup.tsx +++ b/packages/mui-base/src/Menu/Popup/MenuPopup.tsx @@ -2,15 +2,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { Side, useFloatingTree } from '@floating-ui/react'; -import { useMenuPopup } from './useMenuPopup'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useMenuPositionerContext } from '../Positioner/MenuPositionerContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; +import { useMenuPopup } from './useMenuPopup.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useMenuPositionerContext } from '../Positioner/MenuPositionerContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Menu/Positioner/MenuPositioner.test.tsx b/packages/mui-base/src/Menu/Positioner/MenuPositioner.test.tsx index 80e56f43c6..066b6b7fee 100644 --- a/packages/mui-base/src/Menu/Positioner/MenuPositioner.test.tsx +++ b/packages/mui-base/src/Menu/Positioner/MenuPositioner.test.tsx @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event'; import { flushMicrotasks } from '@mui/internal-test-utils'; import { Menu } from '@base_ui/react/Menu'; import { describeConformance, createRenderer } from '#test-utils'; -import { MenuRootContext } from '../Root/MenuRootContext'; +import { MenuRootContext } from '../Root/MenuRootContext.js'; const testRootContext: MenuRootContext = { floatingRootContext: undefined as unknown as FloatingRootContext, diff --git a/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx b/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx index ab837758a6..4e34e40228 100644 --- a/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx +++ b/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx @@ -9,14 +9,14 @@ import { Side, useFloatingNodeId, } from '@floating-ui/react'; -import { MenuPositionerContext } from './MenuPositionerContext'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import { useMenuPositioner } from './useMenuPositioner'; -import { HTMLElementType } from '../../utils/proptypes'; -import { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { MenuPositionerContext } from './MenuPositionerContext.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useMenuPositioner } from './useMenuPositioner.js'; +import { HTMLElementType } from '../../utils/proptypes.js'; +import { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders the element that positions the Menu popup. diff --git a/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts b/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts index 818bb235fe..764260709a 100644 --- a/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts +++ b/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts @@ -8,10 +8,10 @@ import type { Side, FloatingRootContext, } from '@floating-ui/react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useAnchorPositioning } from '../../utils/useAnchorPositioning'; -import type { GenericHTMLProps } from '../../utils/types'; -import { getInertValue } from '../../utils/getInertValue'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useAnchorPositioning } from '../../utils/useAnchorPositioning.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import { getInertValue } from '../../utils/getInertValue.js'; export function useMenuPositioner( params: useMenuPositioner.Parameters, diff --git a/packages/mui-base/src/Menu/RadioGroup/MenuRadioGroup.tsx b/packages/mui-base/src/Menu/RadioGroup/MenuRadioGroup.tsx index 53d8dedd0b..5ac2c688c3 100644 --- a/packages/mui-base/src/Menu/RadioGroup/MenuRadioGroup.tsx +++ b/packages/mui-base/src/Menu/RadioGroup/MenuRadioGroup.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { MenuRadioGroupContext } from './MenuRadioGroupContext'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useControlled } from '../../utils/useControlled'; -import { useEventCallback } from '../../utils/useEventCallback'; +import { MenuRadioGroupContext } from './MenuRadioGroupContext.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; const EMPTY_OBJECT = {}; const NOOP = () => {}; diff --git a/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.test.tsx b/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.test.tsx index a50b785dcd..edd10127a0 100644 --- a/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.test.tsx +++ b/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.test.tsx @@ -6,8 +6,8 @@ import { fireEvent, act, waitFor } from '@mui/internal-test-utils'; import { FloatingRootContext, FloatingTree } from '@floating-ui/react'; import { Menu } from '@base_ui/react/Menu'; import { describeConformance, createRenderer } from '#test-utils'; -import { MenuRadioGroupContext } from '../RadioGroup/MenuRadioGroupContext'; -import { MenuRootContext } from '../Root/MenuRootContext'; +import { MenuRadioGroupContext } from '../RadioGroup/MenuRadioGroupContext.js'; +import { MenuRootContext } from '../Root/MenuRootContext.js'; const testRootContext: MenuRootContext = { floatingRootContext: {} as FloatingRootContext, diff --git a/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.tsx b/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.tsx index e655bcf5e7..5aca7f6554 100644 --- a/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.tsx +++ b/packages/mui-base/src/Menu/RadioItem/MenuRadioItem.tsx @@ -2,15 +2,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingEvents, useFloatingTree, useListItem } from '@floating-ui/react'; -import { useMenuRadioItem } from './useMenuRadioItem'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useId } from '../../utils/useId'; -import type { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types'; -import { useForkRef } from '../../utils/useForkRef'; -import { useMenuRadioGroupContext } from '../RadioGroup/MenuRadioGroupContext'; -import { MenuRadioItemContext } from './MenuRadioItemContext'; -import { itemMapping } from '../utils/styleHookMapping'; +import { useMenuRadioItem } from './useMenuRadioItem.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useId } from '../../utils/useId.js'; +import type { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useMenuRadioGroupContext } from '../RadioGroup/MenuRadioGroupContext.js'; +import { MenuRadioItemContext } from './MenuRadioItemContext.js'; +import { itemMapping } from '../utils/styleHookMapping.js'; const InnerMenuRadioItem = React.forwardRef(function InnerMenuItem( props: InnerMenuRadioItemProps, diff --git a/packages/mui-base/src/Menu/RadioItem/useMenuRadioItem.ts b/packages/mui-base/src/Menu/RadioItem/useMenuRadioItem.ts index c897c7440f..c54c3f3a76 100644 --- a/packages/mui-base/src/Menu/RadioItem/useMenuRadioItem.ts +++ b/packages/mui-base/src/Menu/RadioItem/useMenuRadioItem.ts @@ -1,7 +1,7 @@ import * as React from 'react'; -import { useMenuItem } from '../Item/useMenuItem'; -import { GenericHTMLProps } from '../../utils/types'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { useMenuItem } from '../Item/useMenuItem.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; /** * diff --git a/packages/mui-base/src/Menu/RadioItemIndicator/MenuRadioItemIndicator.tsx b/packages/mui-base/src/Menu/RadioItemIndicator/MenuRadioItemIndicator.tsx index 393fee7acd..c14f7e322d 100644 --- a/packages/mui-base/src/Menu/RadioItemIndicator/MenuRadioItemIndicator.tsx +++ b/packages/mui-base/src/Menu/RadioItemIndicator/MenuRadioItemIndicator.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useMenuRadioItemContext } from '../RadioItem/MenuRadioItemContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { BaseUIComponentProps } from '../../utils/types'; -import { itemMapping } from '../utils/styleHookMapping'; +import { useMenuRadioItemContext } from '../RadioItem/MenuRadioItemContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { itemMapping } from '../utils/styleHookMapping.js'; /** * diff --git a/packages/mui-base/src/Menu/Root/MenuRoot.tsx b/packages/mui-base/src/Menu/Root/MenuRoot.tsx index 68802b020a..095bfea706 100644 --- a/packages/mui-base/src/Menu/Root/MenuRoot.tsx +++ b/packages/mui-base/src/Menu/Root/MenuRoot.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingTree } from '@floating-ui/react'; -import { MenuRootContext, useMenuRootContext } from './MenuRootContext'; -import { MenuDirection, MenuOrientation, useMenuRoot } from './useMenuRoot'; +import { MenuRootContext, useMenuRootContext } from './MenuRootContext.js'; +import { MenuDirection, MenuOrientation, useMenuRoot } from './useMenuRoot.js'; /** * diff --git a/packages/mui-base/src/Menu/Root/MenuRootContext.ts b/packages/mui-base/src/Menu/Root/MenuRootContext.ts index d00e0f939e..9529c973ed 100644 --- a/packages/mui-base/src/Menu/Root/MenuRootContext.ts +++ b/packages/mui-base/src/Menu/Root/MenuRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { useMenuRoot } from './useMenuRoot'; +import type { useMenuRoot } from './useMenuRoot.js'; export interface MenuRootContext extends useMenuRoot.ReturnValue { clickAndDragEnabled: boolean; diff --git a/packages/mui-base/src/Menu/Root/useMenuRoot.ts b/packages/mui-base/src/Menu/Root/useMenuRoot.ts index ff3b472abb..e0cbea88ea 100644 --- a/packages/mui-base/src/Menu/Root/useMenuRoot.ts +++ b/packages/mui-base/src/Menu/Root/useMenuRoot.ts @@ -12,12 +12,12 @@ import { useTypeahead, FloatingRootContext, } from '@floating-ui/react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { GenericHTMLProps } from '../../utils/types'; -import { useTransitionStatus } from '../../utils/useTransitionStatus'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useAnimationsFinished } from '../../utils/useAnimationsFinished'; -import { useControlled } from '../../utils/useControlled'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { useTransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useAnimationsFinished } from '../../utils/useAnimationsFinished.js'; +import { useControlled } from '../../utils/useControlled.js'; const EMPTY_ARRAY: never[] = []; diff --git a/packages/mui-base/src/Menu/SubmenuTrigger/SubmenuTrigger.tsx b/packages/mui-base/src/Menu/SubmenuTrigger/SubmenuTrigger.tsx index 9161e512f2..c6935e168b 100644 --- a/packages/mui-base/src/Menu/SubmenuTrigger/SubmenuTrigger.tsx +++ b/packages/mui-base/src/Menu/SubmenuTrigger/SubmenuTrigger.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { useFloatingTree, useListItem } from '@floating-ui/react'; -import { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { useId } from '../../utils/useId'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useSubmenuTrigger } from './useSubmenuTrigger'; -import { useForkRef } from '../../utils/useForkRef'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { BaseUIComponentProps, GenericHTMLProps } from '../../utils/types.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { useId } from '../../utils/useId.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useSubmenuTrigger } from './useSubmenuTrigger.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * diff --git a/packages/mui-base/src/Menu/SubmenuTrigger/useSubmenuTrigger.ts b/packages/mui-base/src/Menu/SubmenuTrigger/useSubmenuTrigger.ts index 79b5e2c4e7..413eb262b1 100644 --- a/packages/mui-base/src/Menu/SubmenuTrigger/useSubmenuTrigger.ts +++ b/packages/mui-base/src/Menu/SubmenuTrigger/useSubmenuTrigger.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import { FloatingEvents } from '@floating-ui/react'; -import { useMenuItem } from '../Item/useMenuItem'; -import { useForkRef } from '../../utils/useForkRef'; -import { GenericHTMLProps } from '../../utils/types'; +import { useMenuItem } from '../Item/useMenuItem.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { GenericHTMLProps } from '../../utils/types.js'; export function useSubmenuTrigger( parameters: useSubmenuTrigger.Parameters, diff --git a/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx b/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx index 836cb1488e..f83165f26c 100644 --- a/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx +++ b/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event'; import { act } from '@mui/internal-test-utils'; import { Menu } from '@base_ui/react/Menu'; import { describeConformance, createRenderer } from '#test-utils'; -import { MenuRootContext } from '../Root/MenuRootContext'; +import { MenuRootContext } from '../Root/MenuRootContext.js'; const testRootContext: MenuRootContext = { floatingRootContext: {} as FloatingRootContext, diff --git a/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx b/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx index 4c800e0957..efb2d90693 100644 --- a/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx +++ b/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx @@ -2,11 +2,11 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { useFloatingTree } from '@floating-ui/react'; -import { useMenuTrigger } from './useMenuTrigger'; -import { useMenuRootContext } from '../Root/MenuRootContext'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useMenuTrigger } from './useMenuTrigger.js'; +import { useMenuRootContext } from '../Root/MenuRootContext.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Menu/Trigger/useMenuTrigger.ts b/packages/mui-base/src/Menu/Trigger/useMenuTrigger.ts index e1da262aa7..7cfe9c803d 100644 --- a/packages/mui-base/src/Menu/Trigger/useMenuTrigger.ts +++ b/packages/mui-base/src/Menu/Trigger/useMenuTrigger.ts @@ -2,10 +2,10 @@ import * as React from 'react'; import { unstable_useForkRef as useForkRef } from '@mui/utils'; import { FloatingEvents } from '@floating-ui/react'; -import { useButton } from '../../useButton/useButton'; -import { GenericHTMLProps } from '../../utils/types'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { ownerDocument } from '../../utils/owner'; +import { useButton } from '../../useButton/useButton.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { ownerDocument } from '../../utils/owner.js'; export function useMenuTrigger(parameters: useMenuTrigger.Parameters): useMenuTrigger.ReturnValue { const { diff --git a/packages/mui-base/src/Menu/index.parts.ts b/packages/mui-base/src/Menu/index.parts.ts index ac63a706d5..efcc037829 100644 --- a/packages/mui-base/src/Menu/index.parts.ts +++ b/packages/mui-base/src/Menu/index.parts.ts @@ -1,15 +1,15 @@ -export { MenuArrow as Arrow } from './Arrow/MenuArrow'; -export { MenuCheckboxItem as CheckboxItem } from './CheckboxItem/MenuCheckboxItem'; -export { MenuCheckboxItemIndicator as CheckboxItemIndicator } from './CheckboxItemIndicator/MenuCheckboxItemIndicator'; -export { MenuGroup as Group } from './Group/MenuGroup'; -export { MenuGroupLabel as GroupLabel } from './GroupLabel/MenuGroupLabel'; -export { MenuItem as Item } from './Item/MenuItem'; -export { MenuPopup as Popup } from './Popup/MenuPopup'; -export { MenuPositioner as Positioner } from './Positioner/MenuPositioner'; -export { MenuRadioGroup as RadioGroup } from './RadioGroup/MenuRadioGroup'; -export { MenuRadioItem as RadioItem } from './RadioItem/MenuRadioItem'; -export { MenuRadioItemIndicator as RadioItemIndicator } from './RadioItemIndicator/MenuRadioItemIndicator'; -export { MenuRoot as Root } from './Root/MenuRoot'; -export { MenuTrigger as Trigger } from './Trigger/MenuTrigger'; -export { SeparatorRoot as Separator } from '../Separator/Root/SeparatorRoot'; -export { SubmenuTrigger } from './SubmenuTrigger/SubmenuTrigger'; +export { MenuArrow as Arrow } from './Arrow/MenuArrow.js'; +export { MenuCheckboxItem as CheckboxItem } from './CheckboxItem/MenuCheckboxItem.js'; +export { MenuCheckboxItemIndicator as CheckboxItemIndicator } from './CheckboxItemIndicator/MenuCheckboxItemIndicator.js'; +export { MenuGroup as Group } from './Group/MenuGroup.js'; +export { MenuGroupLabel as GroupLabel } from './GroupLabel/MenuGroupLabel.js'; +export { MenuItem as Item } from './Item/MenuItem.js'; +export { MenuPopup as Popup } from './Popup/MenuPopup.js'; +export { MenuPositioner as Positioner } from './Positioner/MenuPositioner.js'; +export { MenuRadioGroup as RadioGroup } from './RadioGroup/MenuRadioGroup.js'; +export { MenuRadioItem as RadioItem } from './RadioItem/MenuRadioItem.js'; +export { MenuRadioItemIndicator as RadioItemIndicator } from './RadioItemIndicator/MenuRadioItemIndicator.js'; +export { MenuRoot as Root } from './Root/MenuRoot.js'; +export { MenuTrigger as Trigger } from './Trigger/MenuTrigger.js'; +export { SeparatorRoot as Separator } from '../Separator/Root/SeparatorRoot.js'; +export { SubmenuTrigger } from './SubmenuTrigger/SubmenuTrigger.js'; diff --git a/packages/mui-base/src/Menu/index.ts b/packages/mui-base/src/Menu/index.ts index 515d1290d8..a6d60d32c4 100644 --- a/packages/mui-base/src/Menu/index.ts +++ b/packages/mui-base/src/Menu/index.ts @@ -1 +1 @@ -export * as Menu from './index.parts'; +export * as Menu from './index.parts.js'; diff --git a/packages/mui-base/src/Menu/utils/styleHookMapping.ts b/packages/mui-base/src/Menu/utils/styleHookMapping.ts index 35eb7e38d7..6dd564094b 100644 --- a/packages/mui-base/src/Menu/utils/styleHookMapping.ts +++ b/packages/mui-base/src/Menu/utils/styleHookMapping.ts @@ -1,4 +1,4 @@ -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; export const itemMapping: CustomStyleHookMapping<{ checked: boolean }> = { checked(value): Record { diff --git a/packages/mui-base/src/NoSsr/NoSsr.tsx b/packages/mui-base/src/NoSsr/NoSsr.tsx index 18bf1dda18..75eb6ca15f 100644 --- a/packages/mui-base/src/NoSsr/NoSsr.tsx +++ b/packages/mui-base/src/NoSsr/NoSsr.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { exactProp, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; -import { NoSsrProps } from './NoSsr.types'; +import { NoSsrProps } from './NoSsr.types.js'; /** * NoSsr purposely removes components from the subject of Server Side Rendering (SSR). diff --git a/packages/mui-base/src/NoSsr/index.ts b/packages/mui-base/src/NoSsr/index.ts index 546b249ab2..f06304dc7a 100644 --- a/packages/mui-base/src/NoSsr/index.ts +++ b/packages/mui-base/src/NoSsr/index.ts @@ -1,2 +1,2 @@ -export { NoSsr } from './NoSsr'; -export * from './NoSsr.types'; +export { NoSsr } from './NoSsr.js'; +export * from './NoSsr.types.js'; diff --git a/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.test.tsx b/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.test.tsx index ad08006575..f584c26ec0 100644 --- a/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.test.tsx +++ b/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.test.tsx @@ -3,8 +3,8 @@ import { expect } from 'chai'; import { screen, fireEvent } from '@mui/internal-test-utils'; import { NumberField } from '@base_ui/react/NumberField'; import { createRenderer, describeConformance } from '#test-utils'; -import { CHANGE_VALUE_TICK_DELAY, START_AUTO_CHANGE_DELAY } from '../utils/constants'; -import { NumberFieldRootContext } from '../Root/NumberFieldRootContext'; +import { CHANGE_VALUE_TICK_DELAY, START_AUTO_CHANGE_DELAY } from '../utils/constants.js'; +import { NumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; const testContext = { getDecrementButtonProps: (externalProps) => externalProps, diff --git a/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.tsx b/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.tsx index 049500f802..fe6d755854 100644 --- a/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.tsx +++ b/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { NumberFieldRoot } from '../Root/NumberFieldRoot'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { NumberFieldRoot } from '../Root/NumberFieldRoot.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * The decrement stepper button. diff --git a/packages/mui-base/src/NumberField/Group/NumberFieldGroup.test.tsx b/packages/mui-base/src/NumberField/Group/NumberFieldGroup.test.tsx index 167d3c78be..097e34e2ca 100644 --- a/packages/mui-base/src/NumberField/Group/NumberFieldGroup.test.tsx +++ b/packages/mui-base/src/NumberField/Group/NumberFieldGroup.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { screen } from '@mui/internal-test-utils'; import { NumberField } from '@base_ui/react/NumberField'; import { createRenderer, describeConformance } from '#test-utils'; -import { NumberFieldRootContext } from '../Root/NumberFieldRootContext'; +import { NumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; const testContext = { getGroupProps: (externalProps) => ({ role: 'group', ...externalProps }), diff --git a/packages/mui-base/src/NumberField/Group/NumberFieldGroup.tsx b/packages/mui-base/src/NumberField/Group/NumberFieldGroup.tsx index 28d0f25899..68bddf5aa1 100644 --- a/packages/mui-base/src/NumberField/Group/NumberFieldGroup.tsx +++ b/packages/mui-base/src/NumberField/Group/NumberFieldGroup.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { NumberFieldRoot } from '../Root/NumberFieldRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { NumberFieldRoot } from '../Root/NumberFieldRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * Groups interactive `NumberField` components together. diff --git a/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.test.tsx b/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.test.tsx index 5b18c69634..8f1b7a534c 100644 --- a/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.test.tsx +++ b/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.test.tsx @@ -3,8 +3,8 @@ import { expect } from 'chai'; import { screen, fireEvent } from '@mui/internal-test-utils'; import { NumberField } from '@base_ui/react/NumberField'; import { createRenderer, describeConformance } from '#test-utils'; -import { CHANGE_VALUE_TICK_DELAY, START_AUTO_CHANGE_DELAY } from '../utils/constants'; -import { NumberFieldRootContext } from '../Root/NumberFieldRootContext'; +import { CHANGE_VALUE_TICK_DELAY, START_AUTO_CHANGE_DELAY } from '../utils/constants.js'; +import { NumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; const testContext = { getIncrementButtonProps: (externalProps) => externalProps, diff --git a/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.tsx b/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.tsx index addb795444..8926e9fc10 100644 --- a/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.tsx +++ b/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { NumberFieldRoot } from '../Root/NumberFieldRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { NumberFieldRoot } from '../Root/NumberFieldRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * The increment stepper button. diff --git a/packages/mui-base/src/NumberField/Input/NumberFieldInput.test.tsx b/packages/mui-base/src/NumberField/Input/NumberFieldInput.test.tsx index ffa6e13487..4477f9f2ee 100644 --- a/packages/mui-base/src/NumberField/Input/NumberFieldInput.test.tsx +++ b/packages/mui-base/src/NumberField/Input/NumberFieldInput.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { act, screen, fireEvent } from '@mui/internal-test-utils'; import { NumberField } from '@base_ui/react/NumberField'; import { createRenderer, describeConformance } from '#test-utils'; -import { NumberFieldRootContext } from '../Root/NumberFieldRootContext'; +import { NumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; const testContext = { getInputProps: (externalProps) => externalProps, diff --git a/packages/mui-base/src/NumberField/Input/NumberFieldInput.tsx b/packages/mui-base/src/NumberField/Input/NumberFieldInput.tsx index 8638b289b5..d0818435bd 100644 --- a/packages/mui-base/src/NumberField/Input/NumberFieldInput.tsx +++ b/packages/mui-base/src/NumberField/Input/NumberFieldInput.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { NumberFieldRoot } from '../Root/NumberFieldRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { NumberFieldRoot } from '../Root/NumberFieldRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * The input element for the number field. diff --git a/packages/mui-base/src/NumberField/Root/NumberFieldRoot.tsx b/packages/mui-base/src/NumberField/Root/NumberFieldRoot.tsx index 1e8132eca3..c33f93e315 100644 --- a/packages/mui-base/src/NumberField/Root/NumberFieldRoot.tsx +++ b/packages/mui-base/src/NumberField/Root/NumberFieldRoot.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { NumberFieldRootContext } from './NumberFieldRootContext'; -import { UseNumberFieldRoot, useNumberFieldRoot } from './useNumberFieldRoot'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { FieldRoot } from '../../Field/Root/FieldRoot'; +import { NumberFieldRootContext } from './NumberFieldRootContext.js'; +import { UseNumberFieldRoot, useNumberFieldRoot } from './useNumberFieldRoot.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { FieldRoot } from '../../Field/Root/FieldRoot.js'; /** * The foundation for building custom-styled number fields. diff --git a/packages/mui-base/src/NumberField/Root/NumberFieldRootContext.ts b/packages/mui-base/src/NumberField/Root/NumberFieldRootContext.ts index 2da27b5270..c6554a0d63 100644 --- a/packages/mui-base/src/NumberField/Root/NumberFieldRootContext.ts +++ b/packages/mui-base/src/NumberField/Root/NumberFieldRootContext.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import type { UseNumberFieldRoot } from './useNumberFieldRoot'; -import type { NumberFieldRoot } from './NumberFieldRoot'; +import type { UseNumberFieldRoot } from './useNumberFieldRoot.js'; +import type { NumberFieldRoot } from './NumberFieldRoot.js'; export interface NumberFieldRootContext extends UseNumberFieldRoot.ReturnValue { ownerState: NumberFieldRoot.OwnerState; diff --git a/packages/mui-base/src/NumberField/Root/useNumberFieldRoot.ts b/packages/mui-base/src/NumberField/Root/useNumberFieldRoot.ts index c87b008644..59ffde7b30 100644 --- a/packages/mui-base/src/NumberField/Root/useNumberFieldRoot.ts +++ b/packages/mui-base/src/NumberField/Root/useNumberFieldRoot.ts @@ -1,15 +1,15 @@ 'use client'; import * as React from 'react'; -import { useScrub } from './useScrub'; -import { formatNumber } from '../utils/format'; -import { toValidatedNumber } from '../utils/validate'; +import { useScrub } from './useScrub.js'; +import { formatNumber } from '../utils/format.js'; +import { toValidatedNumber } from '../utils/validate.js'; import { ARABIC_RE, HAN_RE, PERCENTAGES, getNumberLocaleDetails, parseNumber, -} from '../utils/parse'; +} from '../utils/parse.js'; import { CHANGE_VALUE_TICK_DELAY, DEFAULT_STEP, @@ -17,21 +17,21 @@ import { SCROLLING_POINTER_MOVE_DISTANCE, START_AUTO_CHANGE_DELAY, TOUCH_TIMEOUT, -} from '../utils/constants'; -import { isIOS } from '../../utils/detectBrowser'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { ownerDocument, ownerWindow } from '../../utils/owner'; -import { useControlled } from '../../utils/useControlled'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useForcedRerendering } from '../../utils/useForcedRerendering'; -import { useId } from '../../utils/useId'; -import { useLatestRef } from '../../utils/useLatestRef'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; -import { useForkRef } from '../../utils/useForkRef'; -import { useField } from '../../Field/useField'; -import type { ScrubHandle } from './useScrub.types'; +} from '../utils/constants.js'; +import { isIOS } from '../../utils/detectBrowser.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { ownerDocument, ownerWindow } from '../../utils/owner.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useForcedRerendering } from '../../utils/useForcedRerendering.js'; +import { useId } from '../../utils/useId.js'; +import { useLatestRef } from '../../utils/useLatestRef.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useField } from '../../Field/useField.js'; +import type { ScrubHandle } from './useScrub.types.js'; export function useNumberFieldRoot( params: UseNumberFieldRoot.Parameters, diff --git a/packages/mui-base/src/NumberField/Root/useScrub.ts b/packages/mui-base/src/NumberField/Root/useScrub.ts index 85764f5bb9..dfe1fed0c8 100644 --- a/packages/mui-base/src/NumberField/Root/useScrub.ts +++ b/packages/mui-base/src/NumberField/Root/useScrub.ts @@ -1,15 +1,15 @@ 'use client'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import { ScrubHandle, ScrubParams } from './useScrub.types'; -import { DEFAULT_STEP } from '../utils/constants'; -import { getViewportRect } from '../utils/getViewportRect'; -import { subscribeToVisualViewportResize } from '../utils/subscribeToVisualViewportResize'; -import { ownerDocument, ownerWindow } from '../../utils/owner'; -import { useLatestRef } from '../../utils/useLatestRef'; -import { isWebKit } from '../../utils/detectBrowser'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { UseNumberFieldRoot } from './useNumberFieldRoot'; +import { ScrubHandle, ScrubParams } from './useScrub.types.js'; +import { DEFAULT_STEP } from '../utils/constants.js'; +import { getViewportRect } from '../utils/getViewportRect.js'; +import { subscribeToVisualViewportResize } from '../utils/subscribeToVisualViewportResize.js'; +import { ownerDocument, ownerWindow } from '../../utils/owner.js'; +import { useLatestRef } from '../../utils/useLatestRef.js'; +import { isWebKit } from '../../utils/detectBrowser.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { UseNumberFieldRoot } from './useNumberFieldRoot.js'; /** * @ignore - internal hook. diff --git a/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.test.tsx b/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.test.tsx index 8b23e00cf1..8ffe04bd83 100644 --- a/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.test.tsx +++ b/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.test.tsx @@ -3,8 +3,8 @@ import { expect } from 'chai'; import { screen, waitFor, act } from '@mui/internal-test-utils'; import { NumberField } from '@base_ui/react/NumberField'; import { createRenderer, describeConformance } from '#test-utils'; -import { isWebKit } from '../../utils/detectBrowser'; -import { NumberFieldRootContext } from '../Root/NumberFieldRootContext'; +import { isWebKit } from '../../utils/detectBrowser.js'; +import { NumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; function createPointerMoveEvent({ movementX = 0, movementY = 0 }) { return new PointerEvent('pointermove', { diff --git a/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.tsx b/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.tsx index 8ed06f68de..080c694ae5 100644 --- a/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.tsx +++ b/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { NumberFieldRoot } from '../Root/NumberFieldRoot'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { NumberFieldRoot } from '../Root/NumberFieldRoot.js'; /** * The scrub area element. diff --git a/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.test.tsx b/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.test.tsx index aed91b98c8..d02fc90dc3 100644 --- a/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.test.tsx +++ b/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.test.tsx @@ -3,8 +3,8 @@ import { expect } from 'chai'; import { screen } from '@mui/internal-test-utils'; import { NumberField } from '@base_ui/react/NumberField'; import { createRenderer, describeConformance } from '#test-utils'; -import { isWebKit } from '../../utils/detectBrowser'; -import { NumberFieldRootContext } from '../Root/NumberFieldRootContext'; +import { isWebKit } from '../../utils/detectBrowser.js'; +import { NumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; const testContext = { getScrubAreaCursorProps: (externalProps) => externalProps, diff --git a/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.tsx b/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.tsx index fcf17c3c3b..3a7db4beb4 100644 --- a/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.tsx +++ b/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; -import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext'; -import { isWebKit } from '../../utils/detectBrowser'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { NumberFieldRoot } from '../Root/NumberFieldRoot'; -import { ownerDocument } from '../../utils/owner'; +import { useNumberFieldRootContext } from '../Root/NumberFieldRootContext.js'; +import { isWebKit } from '../../utils/detectBrowser.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { NumberFieldRoot } from '../Root/NumberFieldRoot.js'; +import { ownerDocument } from '../../utils/owner.js'; /** * The scrub area cursor element. diff --git a/packages/mui-base/src/NumberField/index.parts.ts b/packages/mui-base/src/NumberField/index.parts.ts index 1f0f7cd871..4e4647ed3b 100644 --- a/packages/mui-base/src/NumberField/index.parts.ts +++ b/packages/mui-base/src/NumberField/index.parts.ts @@ -1,7 +1,7 @@ -export { NumberFieldRoot as Root } from './Root/NumberFieldRoot'; -export { NumberFieldGroup as Group } from './Group/NumberFieldGroup'; -export { NumberFieldIncrement as Increment } from './Increment/NumberFieldIncrement'; -export { NumberFieldDecrement as Decrement } from './Decrement/NumberFieldDecrement'; -export { NumberFieldInput as Input } from './Input/NumberFieldInput'; -export { NumberFieldScrubArea as ScrubArea } from './ScrubArea/NumberFieldScrubArea'; -export { NumberFieldScrubAreaCursor as ScrubAreaCursor } from './ScrubAreaCursor/NumberFieldScrubAreaCursor'; +export { NumberFieldRoot as Root } from './Root/NumberFieldRoot.js'; +export { NumberFieldGroup as Group } from './Group/NumberFieldGroup.js'; +export { NumberFieldIncrement as Increment } from './Increment/NumberFieldIncrement.js'; +export { NumberFieldDecrement as Decrement } from './Decrement/NumberFieldDecrement.js'; +export { NumberFieldInput as Input } from './Input/NumberFieldInput.js'; +export { NumberFieldScrubArea as ScrubArea } from './ScrubArea/NumberFieldScrubArea.js'; +export { NumberFieldScrubAreaCursor as ScrubAreaCursor } from './ScrubAreaCursor/NumberFieldScrubAreaCursor.js'; diff --git a/packages/mui-base/src/NumberField/index.ts b/packages/mui-base/src/NumberField/index.ts index e97deaf602..6a6bb454be 100644 --- a/packages/mui-base/src/NumberField/index.ts +++ b/packages/mui-base/src/NumberField/index.ts @@ -1 +1 @@ -export * as NumberField from './index.parts'; +export * as NumberField from './index.parts.js'; diff --git a/packages/mui-base/src/NumberField/utils/format.test.ts b/packages/mui-base/src/NumberField/utils/format.test.ts index c60eb7d7c5..5f6ff0238f 100644 --- a/packages/mui-base/src/NumberField/utils/format.test.ts +++ b/packages/mui-base/src/NumberField/utils/format.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { getFormatter } from './format'; +import { getFormatter } from './format.js'; const getOptions = (): Intl.NumberFormatOptions => ({ currency: 'USD', diff --git a/packages/mui-base/src/NumberField/utils/getViewportRect.ts b/packages/mui-base/src/NumberField/utils/getViewportRect.ts index 9deac53036..081a9e0e0c 100644 --- a/packages/mui-base/src/NumberField/utils/getViewportRect.ts +++ b/packages/mui-base/src/NumberField/utils/getViewportRect.ts @@ -1,4 +1,4 @@ -import { ownerWindow } from '../../utils/owner'; +import { ownerWindow } from '../../utils/owner.js'; // Calculates the viewport rect for the virtual cursor. export function getViewportRect(teleportDistance: number | undefined, scrubAreaEl: HTMLElement) { diff --git a/packages/mui-base/src/NumberField/utils/parse.test.ts b/packages/mui-base/src/NumberField/utils/parse.test.ts index 546c3cff4f..ed884078fe 100644 --- a/packages/mui-base/src/NumberField/utils/parse.test.ts +++ b/packages/mui-base/src/NumberField/utils/parse.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { getNumberLocaleDetails, parseNumber } from './parse'; +import { getNumberLocaleDetails, parseNumber } from './parse.js'; describe('NumberField parse', () => { describe('getNumberLocaleDetails', () => { diff --git a/packages/mui-base/src/NumberField/utils/parse.ts b/packages/mui-base/src/NumberField/utils/parse.ts index 8f400efdda..2486e51559 100644 --- a/packages/mui-base/src/NumberField/utils/parse.ts +++ b/packages/mui-base/src/NumberField/utils/parse.ts @@ -1,4 +1,4 @@ -import { getFormatter } from './format'; +import { getFormatter } from './format.js'; export const HAN_NUMERALS = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; export const ARABIC_NUMERALS = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩']; diff --git a/packages/mui-base/src/NumberField/utils/subscribeToVisualViewportResize.ts b/packages/mui-base/src/NumberField/utils/subscribeToVisualViewportResize.ts index 80bf993084..30c8cc4649 100644 --- a/packages/mui-base/src/NumberField/utils/subscribeToVisualViewportResize.ts +++ b/packages/mui-base/src/NumberField/utils/subscribeToVisualViewportResize.ts @@ -1,4 +1,4 @@ -import { ownerWindow } from '../../utils/owner'; +import { ownerWindow } from '../../utils/owner.js'; // This lets us invert the scale of the cursor to match the OS scale, in which the cursor doesn't // scale with the content on pinch-zoom. diff --git a/packages/mui-base/src/NumberField/utils/validate.test.ts b/packages/mui-base/src/NumberField/utils/validate.test.ts index 705f55ece0..788a4ad292 100644 --- a/packages/mui-base/src/NumberField/utils/validate.test.ts +++ b/packages/mui-base/src/NumberField/utils/validate.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { toValidatedNumber, removeFloatingPointErrors } from './validate'; +import { toValidatedNumber, removeFloatingPointErrors } from './validate.js'; const min = Number.MIN_SAFE_INTEGER; const max = Number.MAX_SAFE_INTEGER; diff --git a/packages/mui-base/src/NumberField/utils/validate.ts b/packages/mui-base/src/NumberField/utils/validate.ts index b8f2438f1b..7606cec1bd 100644 --- a/packages/mui-base/src/NumberField/utils/validate.ts +++ b/packages/mui-base/src/NumberField/utils/validate.ts @@ -1,5 +1,5 @@ -import { getFormatter } from './format'; -import { clamp } from '../../utils/clamp'; +import { getFormatter } from './format.js'; +import { clamp } from '../../utils/clamp.js'; export function removeFloatingPointErrors(value: number, format: Intl.NumberFormatOptions = {}) { return parseFloat( diff --git a/packages/mui-base/src/Popover/Arrow/PopoverArrow.tsx b/packages/mui-base/src/Popover/Arrow/PopoverArrow.tsx index aefb6210e6..c422cef134 100644 --- a/packages/mui-base/src/Popover/Arrow/PopoverArrow.tsx +++ b/packages/mui-base/src/Popover/Arrow/PopoverArrow.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { usePopoverPositionerContext } from '../Positioner/PopoverPositionerContext'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import { usePopoverArrow } from './usePopoverArrow'; -import type { Alignment, Side } from '../../utils/useAnchorPositioning'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { usePopoverPositionerContext } from '../Positioner/PopoverPositionerContext.js'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { usePopoverArrow } from './usePopoverArrow.js'; +import type { Alignment, Side } from '../../utils/useAnchorPositioning.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders an arrow that points to the center of the anchor element. diff --git a/packages/mui-base/src/Popover/Arrow/usePopoverArrow.ts b/packages/mui-base/src/Popover/Arrow/usePopoverArrow.ts index 3d34e3005d..158e93cafc 100644 --- a/packages/mui-base/src/Popover/Arrow/usePopoverArrow.ts +++ b/packages/mui-base/src/Popover/Arrow/usePopoverArrow.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePopoverArrow(params: usePopoverArrow.Parameters): usePopoverArrow.ReturnValue { const { arrowStyles, hidden } = params; diff --git a/packages/mui-base/src/Popover/Backdrop/PopoverBackdrop.tsx b/packages/mui-base/src/Popover/Backdrop/PopoverBackdrop.tsx index 429d6be4f5..028aa024d0 100644 --- a/packages/mui-base/src/Popover/Backdrop/PopoverBackdrop.tsx +++ b/packages/mui-base/src/Popover/Backdrop/PopoverBackdrop.tsx @@ -2,14 +2,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingPortal } from '@floating-ui/react'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { HTMLElementType } from '../../utils/proptypes'; -import { usePopoverBackdrop } from './usePopoverBackdrop'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { HTMLElementType } from '../../utils/proptypes.js'; +import { usePopoverBackdrop } from './usePopoverBackdrop.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Popover/Backdrop/usePopoverBackdrop.ts b/packages/mui-base/src/Popover/Backdrop/usePopoverBackdrop.ts index 08e5eadb97..cfddace2fe 100644 --- a/packages/mui-base/src/Popover/Backdrop/usePopoverBackdrop.ts +++ b/packages/mui-base/src/Popover/Backdrop/usePopoverBackdrop.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePopoverBackdrop(): usePopoverBackdrop.ReturnValue { const getBackdropProps = React.useCallback((externalProps = {}) => { diff --git a/packages/mui-base/src/Popover/Close/PopoverClose.tsx b/packages/mui-base/src/Popover/Close/PopoverClose.tsx index 65fb0ccd6c..b2974eacea 100644 --- a/packages/mui-base/src/Popover/Close/PopoverClose.tsx +++ b/packages/mui-base/src/Popover/Close/PopoverClose.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { usePopoverClose } from './usePopoverClose'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { usePopoverClose } from './usePopoverClose.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Popover/Close/usePopoverClose.ts b/packages/mui-base/src/Popover/Close/usePopoverClose.ts index a65d24f2f5..d1bb9fa211 100644 --- a/packages/mui-base/src/Popover/Close/usePopoverClose.ts +++ b/packages/mui-base/src/Popover/Close/usePopoverClose.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useEventCallback } from '../../utils/useEventCallback'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; export function usePopoverClose( params: usePopoverDescription.Parameters, diff --git a/packages/mui-base/src/Popover/Description/PopoverDescription.tsx b/packages/mui-base/src/Popover/Description/PopoverDescription.tsx index 0e8c15b5d2..90578d0ac0 100644 --- a/packages/mui-base/src/Popover/Description/PopoverDescription.tsx +++ b/packages/mui-base/src/Popover/Description/PopoverDescription.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { usePopoverDescription } from './usePopoverDescription'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { usePopoverDescription } from './usePopoverDescription.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Popover/Description/usePopoverDescription.ts b/packages/mui-base/src/Popover/Description/usePopoverDescription.ts index 9941d2db17..b58aebf827 100644 --- a/packages/mui-base/src/Popover/Description/usePopoverDescription.ts +++ b/packages/mui-base/src/Popover/Description/usePopoverDescription.ts @@ -1,7 +1,7 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; export function usePopoverDescription( params: usePopoverDescription.Parameters, diff --git a/packages/mui-base/src/Popover/Popup/PopoverPopup.tsx b/packages/mui-base/src/Popover/Popup/PopoverPopup.tsx index d919d9994e..33da16c428 100644 --- a/packages/mui-base/src/Popover/Popup/PopoverPopup.tsx +++ b/packages/mui-base/src/Popover/Popup/PopoverPopup.tsx @@ -1,16 +1,16 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePopoverPositionerContext } from '../Positioner/PopoverPositionerContext'; -import { usePopoverPopup } from './usePopoverPopup'; -import { useForkRef } from '../../utils/useForkRef'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePopoverPositionerContext } from '../Positioner/PopoverPositionerContext.js'; +import { usePopoverPopup } from './usePopoverPopup.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Popover/Popup/usePopoverPopup.ts b/packages/mui-base/src/Popover/Popup/usePopoverPopup.ts index 1326c98228..a1b6d4fc6e 100644 --- a/packages/mui-base/src/Popover/Popup/usePopoverPopup.ts +++ b/packages/mui-base/src/Popover/Popup/usePopoverPopup.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePopoverPopup(params: usePopoverPopup.Parameters): usePopoverPopup.ReturnValue { const { getProps, titleId, descriptionId } = params; diff --git a/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx b/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx index c4c6217157..a4f7f7d694 100644 --- a/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx +++ b/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx @@ -2,15 +2,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { usePopoverPositioner } from './usePopoverPositioner'; -import { PopoverPositionerContext } from './PopoverPositionerContext'; -import { HTMLElementType, refType } from '../../utils/proptypes'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { usePopoverPositioner } from './usePopoverPositioner.js'; +import { PopoverPositionerContext } from './PopoverPositionerContext.js'; +import { HTMLElementType, refType } from '../../utils/proptypes.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * The popover positioner element. diff --git a/packages/mui-base/src/Popover/Positioner/PopoverPositionerContext.ts b/packages/mui-base/src/Popover/Positioner/PopoverPositionerContext.ts index ff3eaae71e..916734aa83 100644 --- a/packages/mui-base/src/Popover/Positioner/PopoverPositionerContext.ts +++ b/packages/mui-base/src/Popover/Positioner/PopoverPositionerContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; export interface PopoverPositionerContext { side: Side; diff --git a/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx b/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx index 278b607ac5..f01ed7fa8e 100644 --- a/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx +++ b/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx @@ -6,11 +6,11 @@ import type { FloatingContext, FloatingRootContext, } from '@floating-ui/react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useAnchorPositioning } from '../../utils/useAnchorPositioning'; -import type { GenericHTMLProps } from '../../utils/types'; -import { getInertValue } from '../../utils/getInertValue'; -import { InteractionType } from '../../utils/useEnhancedClickHandler'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useAnchorPositioning } from '../../utils/useAnchorPositioning.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import { getInertValue } from '../../utils/getInertValue.js'; +import { InteractionType } from '../../utils/useEnhancedClickHandler.js'; export function usePopoverPositioner( params: usePopoverPositioner.Parameters, diff --git a/packages/mui-base/src/Popover/Root/PopoverRoot.test.tsx b/packages/mui-base/src/Popover/Root/PopoverRoot.test.tsx index 495fc2f1a7..c7ed262838 100644 --- a/packages/mui-base/src/Popover/Root/PopoverRoot.test.tsx +++ b/packages/mui-base/src/Popover/Root/PopoverRoot.test.tsx @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event'; import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer } from '#test-utils'; -import { OPEN_DELAY } from '../utils/constants'; +import { OPEN_DELAY } from '../utils/constants.js'; const user = userEvent.setup(); diff --git a/packages/mui-base/src/Popover/Root/PopoverRoot.tsx b/packages/mui-base/src/Popover/Root/PopoverRoot.tsx index 7a52ac417a..a54d26a153 100644 --- a/packages/mui-base/src/Popover/Root/PopoverRoot.tsx +++ b/packages/mui-base/src/Popover/Root/PopoverRoot.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { PopoverRootContext } from './PopoverRootContext'; -import { usePopoverRoot } from './usePopoverRoot'; -import { OPEN_DELAY } from '../utils/constants'; +import { PopoverRootContext } from './PopoverRootContext.js'; +import { usePopoverRoot } from './usePopoverRoot.js'; +import { OPEN_DELAY } from '../utils/constants.js'; /** * The foundation for building custom-styled popovers. diff --git a/packages/mui-base/src/Popover/Root/PopoverRootContext.ts b/packages/mui-base/src/Popover/Root/PopoverRootContext.ts index 9efaa21b9d..be99280740 100644 --- a/packages/mui-base/src/Popover/Root/PopoverRootContext.ts +++ b/packages/mui-base/src/Popover/Root/PopoverRootContext.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import type { OpenChangeReason, FloatingRootContext } from '@floating-ui/react'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import type { GenericHTMLProps } from '../../utils/types'; -import type { InteractionType } from '../../utils/useEnhancedClickHandler'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import type { InteractionType } from '../../utils/useEnhancedClickHandler.js'; export interface PopoverRootContext { open: boolean; diff --git a/packages/mui-base/src/Popover/Root/usePopoverRoot.ts b/packages/mui-base/src/Popover/Root/usePopoverRoot.ts index d91198215c..8d71366153 100644 --- a/packages/mui-base/src/Popover/Root/usePopoverRoot.ts +++ b/packages/mui-base/src/Popover/Root/usePopoverRoot.ts @@ -11,16 +11,16 @@ import { type OpenChangeReason, type FloatingRootContext, } from '@floating-ui/react'; -import { useControlled } from '../../utils/useControlled'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useTransitionStatus } from '../../utils/useTransitionStatus'; -import { useAnimationsFinished } from '../../utils/useAnimationsFinished'; -import { OPEN_DELAY } from '../utils/constants'; -import type { GenericHTMLProps } from '../../utils/types'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import { type InteractionType } from '../../utils/useEnhancedClickHandler'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useOpenInteractionType } from '../../utils/useOpenInteractionType'; +import { useControlled } from '../../utils/useControlled.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useTransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useAnimationsFinished } from '../../utils/useAnimationsFinished.js'; +import { OPEN_DELAY } from '../utils/constants.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import { type InteractionType } from '../../utils/useEnhancedClickHandler.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useOpenInteractionType } from '../../utils/useOpenInteractionType.js'; export function usePopoverRoot(params: usePopoverRoot.Parameters): usePopoverRoot.ReturnValue { const { diff --git a/packages/mui-base/src/Popover/Title/PopoverTitle.tsx b/packages/mui-base/src/Popover/Title/PopoverTitle.tsx index 3fc33d4991..fcdcb8fa99 100644 --- a/packages/mui-base/src/Popover/Title/PopoverTitle.tsx +++ b/packages/mui-base/src/Popover/Title/PopoverTitle.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { usePopoverTitle } from './usePopoverTitle'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { usePopoverTitle } from './usePopoverTitle.js'; const ownerState = {}; diff --git a/packages/mui-base/src/Popover/Title/usePopoverTitle.ts b/packages/mui-base/src/Popover/Title/usePopoverTitle.ts index 64fda4ac35..cbafe5744c 100644 --- a/packages/mui-base/src/Popover/Title/usePopoverTitle.ts +++ b/packages/mui-base/src/Popover/Title/usePopoverTitle.ts @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePopoverTitle(params: usePopoverTitle.Parameters): usePopoverTitle.ReturnValue { const { titleId, setTitleId } = params; diff --git a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx index 42906c985f..5046592e35 100644 --- a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx +++ b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { usePopoverRootContext } from '../Root/PopoverRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { usePopoverRootContext } from '../Root/PopoverRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders a trigger element that opens the popover. diff --git a/packages/mui-base/src/Popover/index.parts.ts b/packages/mui-base/src/Popover/index.parts.ts index a025e39621..1e4aeb6cca 100644 --- a/packages/mui-base/src/Popover/index.parts.ts +++ b/packages/mui-base/src/Popover/index.parts.ts @@ -1,9 +1,9 @@ -export { PopoverRoot as Root } from './Root/PopoverRoot'; -export { PopoverTrigger as Trigger } from './Trigger/PopoverTrigger'; -export { PopoverPositioner as Positioner } from './Positioner/PopoverPositioner'; -export { PopoverPopup as Popup } from './Popup/PopoverPopup'; -export { PopoverArrow as Arrow } from './Arrow/PopoverArrow'; -export { PopoverBackdrop as Backdrop } from './Backdrop/PopoverBackdrop'; -export { PopoverTitle as Title } from './Title/PopoverTitle'; -export { PopoverDescription as Description } from './Description/PopoverDescription'; -export { PopoverClose as Close } from './Close/PopoverClose'; +export { PopoverRoot as Root } from './Root/PopoverRoot.js'; +export { PopoverTrigger as Trigger } from './Trigger/PopoverTrigger.js'; +export { PopoverPositioner as Positioner } from './Positioner/PopoverPositioner.js'; +export { PopoverPopup as Popup } from './Popup/PopoverPopup.js'; +export { PopoverArrow as Arrow } from './Arrow/PopoverArrow.js'; +export { PopoverBackdrop as Backdrop } from './Backdrop/PopoverBackdrop.js'; +export { PopoverTitle as Title } from './Title/PopoverTitle.js'; +export { PopoverDescription as Description } from './Description/PopoverDescription.js'; +export { PopoverClose as Close } from './Close/PopoverClose.js'; diff --git a/packages/mui-base/src/Popover/index.ts b/packages/mui-base/src/Popover/index.ts index 9d2d8d70b5..0bd016df59 100644 --- a/packages/mui-base/src/Popover/index.ts +++ b/packages/mui-base/src/Popover/index.ts @@ -1 +1 @@ -export * as Popover from './index.parts'; +export * as Popover from './index.parts.js'; diff --git a/packages/mui-base/src/PreviewCard/Arrow/PreviewCardArrow.tsx b/packages/mui-base/src/PreviewCard/Arrow/PreviewCardArrow.tsx index b7f46824bd..819da2ce94 100644 --- a/packages/mui-base/src/PreviewCard/Arrow/PreviewCardArrow.tsx +++ b/packages/mui-base/src/PreviewCard/Arrow/PreviewCardArrow.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePreviewCardPositionerContext } from '../Positioner/PreviewCardPositionerContext'; -import { usePreviewCardArrow } from './usePreviewCardArrow'; -import { useForkRef } from '../../utils/useForkRef'; -import { usePreviewCardRootContext } from '../Root/PreviewCardContext'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { Alignment, Side } from '../../utils/useAnchorPositioning'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePreviewCardPositionerContext } from '../Positioner/PreviewCardPositionerContext.js'; +import { usePreviewCardArrow } from './usePreviewCardArrow.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { usePreviewCardRootContext } from '../Root/PreviewCardContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { Alignment, Side } from '../../utils/useAnchorPositioning.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * diff --git a/packages/mui-base/src/PreviewCard/Arrow/usePreviewCardArrow.ts b/packages/mui-base/src/PreviewCard/Arrow/usePreviewCardArrow.ts index 10626cc36a..fd0b65abaf 100644 --- a/packages/mui-base/src/PreviewCard/Arrow/usePreviewCardArrow.ts +++ b/packages/mui-base/src/PreviewCard/Arrow/usePreviewCardArrow.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; export function usePreviewCardArrow( params: usePreviewCardArrow.Parameters, diff --git a/packages/mui-base/src/PreviewCard/Backdrop/PreviewCardBackdrop.tsx b/packages/mui-base/src/PreviewCard/Backdrop/PreviewCardBackdrop.tsx index fea035ea55..fffb632945 100644 --- a/packages/mui-base/src/PreviewCard/Backdrop/PreviewCardBackdrop.tsx +++ b/packages/mui-base/src/PreviewCard/Backdrop/PreviewCardBackdrop.tsx @@ -2,14 +2,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingPortal } from '@floating-ui/react'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePreviewCardRootContext } from '../Root/PreviewCardContext'; -import { usePreviewCardBackdrop } from './usePreviewCardBackdrop'; -import { HTMLElementType } from '../../utils/proptypes'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePreviewCardRootContext } from '../Root/PreviewCardContext.js'; +import { usePreviewCardBackdrop } from './usePreviewCardBackdrop.js'; +import { HTMLElementType } from '../../utils/proptypes.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { type CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/PreviewCard/Backdrop/usePreviewCardBackdrop.ts b/packages/mui-base/src/PreviewCard/Backdrop/usePreviewCardBackdrop.ts index a6d90254af..038550bced 100644 --- a/packages/mui-base/src/PreviewCard/Backdrop/usePreviewCardBackdrop.ts +++ b/packages/mui-base/src/PreviewCard/Backdrop/usePreviewCardBackdrop.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePreviewCardBackdrop(): usePreviewCardBackdrop.ReturnValue { const getBackdropProps = React.useCallback((externalProps = {}) => { diff --git a/packages/mui-base/src/PreviewCard/Popup/PreviewCardPopup.tsx b/packages/mui-base/src/PreviewCard/Popup/PreviewCardPopup.tsx index 606c8575a8..c4ac15ea4b 100644 --- a/packages/mui-base/src/PreviewCard/Popup/PreviewCardPopup.tsx +++ b/packages/mui-base/src/PreviewCard/Popup/PreviewCardPopup.tsx @@ -1,16 +1,16 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePreviewCardRootContext } from '../Root/PreviewCardContext'; -import { usePreviewCardPositionerContext } from '../Positioner/PreviewCardPositionerContext'; -import { usePreviewCardPopup } from './usePreviewCardPopup'; -import { useForkRef } from '../../utils/useForkRef'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import type { Alignment, Side } from '../../utils/useAnchorPositioning'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePreviewCardRootContext } from '../Root/PreviewCardContext.js'; +import { usePreviewCardPositionerContext } from '../Positioner/PreviewCardPositionerContext.js'; +import { usePreviewCardPopup } from './usePreviewCardPopup.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import type { Alignment, Side } from '../../utils/useAnchorPositioning.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/PreviewCard/Popup/usePreviewCardPopup.ts b/packages/mui-base/src/PreviewCard/Popup/usePreviewCardPopup.ts index f98b11e65b..53f52fc335 100644 --- a/packages/mui-base/src/PreviewCard/Popup/usePreviewCardPopup.ts +++ b/packages/mui-base/src/PreviewCard/Popup/usePreviewCardPopup.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePreviewCardPopup( params: usePreviewCardPopup.Parameters, diff --git a/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx b/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx index 6b1f32b035..6bf329f94b 100644 --- a/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx +++ b/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx @@ -2,15 +2,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingPortal } from '@floating-ui/react'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePreviewCardRootContext } from '../Root/PreviewCardContext'; -import { usePreviewCardPositioner } from './usePreviewCardPositioner'; -import { PreviewCardPositionerContext } from './PreviewCardPositionerContext'; -import { useForkRef } from '../../utils/useForkRef'; -import { HTMLElementType } from '../../utils/proptypes'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePreviewCardRootContext } from '../Root/PreviewCardContext.js'; +import { usePreviewCardPositioner } from './usePreviewCardPositioner.js'; +import { PreviewCardPositionerContext } from './PreviewCardPositionerContext.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { HTMLElementType } from '../../utils/proptypes.js'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * diff --git a/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositionerContext.ts b/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositionerContext.ts index 3d096866ad..9ad4d73a9e 100644 --- a/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositionerContext.ts +++ b/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositionerContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; export interface PreviewCardPositionerContext { side: Side; diff --git a/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts b/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts index 3a9991d890..2eb517bda5 100644 --- a/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts +++ b/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts @@ -6,9 +6,9 @@ import type { VirtualElement, FloatingRootContext, } from '@floating-ui/react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useAnchorPositioning, type Side } from '../../utils/useAnchorPositioning'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useAnchorPositioning, type Side } from '../../utils/useAnchorPositioning.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function usePreviewCardPositioner( params: usePreviewCardPositioner.Parameters, diff --git a/packages/mui-base/src/PreviewCard/Root/PreviewCardContext.ts b/packages/mui-base/src/PreviewCard/Root/PreviewCardContext.ts index caf410616b..4859dc1e6f 100644 --- a/packages/mui-base/src/PreviewCard/Root/PreviewCardContext.ts +++ b/packages/mui-base/src/PreviewCard/Root/PreviewCardContext.ts @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; import type { OpenChangeReason, FloatingRootContext } from '@floating-ui/react'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import type { GenericHTMLProps } from '../../utils/types'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export interface PreviewCardRootContext { open: boolean; diff --git a/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.test.tsx b/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.test.tsx index 33949b762b..8a0afda4b6 100644 --- a/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.test.tsx +++ b/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.test.tsx @@ -4,7 +4,7 @@ import { act, fireEvent, screen, flushMicrotasks } from '@mui/internal-test-util import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer } from '#test-utils'; -import { CLOSE_DELAY, OPEN_DELAY } from '../utils/constants'; +import { CLOSE_DELAY, OPEN_DELAY } from '../utils/constants.js'; function Root(props: PreviewCard.Root.Props) { return ; diff --git a/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.tsx b/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.tsx index d9b07b5c18..b8dd14fb6c 100644 --- a/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.tsx +++ b/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { PreviewCardRootContext } from './PreviewCardContext'; -import { usePreviewCardRoot } from './usePreviewCardRoot'; -import { CLOSE_DELAY, OPEN_DELAY } from '../utils/constants'; +import { PreviewCardRootContext } from './PreviewCardContext.js'; +import { usePreviewCardRoot } from './usePreviewCardRoot.js'; +import { CLOSE_DELAY, OPEN_DELAY } from '../utils/constants.js'; /** * diff --git a/packages/mui-base/src/PreviewCard/Root/usePreviewCardRoot.ts b/packages/mui-base/src/PreviewCard/Root/usePreviewCardRoot.ts index 7b9e9dfe62..adc70386d7 100644 --- a/packages/mui-base/src/PreviewCard/Root/usePreviewCardRoot.ts +++ b/packages/mui-base/src/PreviewCard/Root/usePreviewCardRoot.ts @@ -9,14 +9,14 @@ import { type OpenChangeReason, type FloatingRootContext, } from '@floating-ui/react'; -import { useControlled } from '../../utils/useControlled'; -import { useTransitionStatus } from '../../utils/useTransitionStatus'; -import { useAnimationsFinished } from '../../utils/useAnimationsFinished'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useFocusExtended } from '../utils/useFocusExtended'; -import { OPEN_DELAY, CLOSE_DELAY } from '../utils/constants'; -import type { GenericHTMLProps } from '../../utils/types'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; +import { useControlled } from '../../utils/useControlled.js'; +import { useTransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useAnimationsFinished } from '../../utils/useAnimationsFinished.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useFocusExtended } from '../utils/useFocusExtended.js'; +import { OPEN_DELAY, CLOSE_DELAY } from '../utils/constants.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; export function usePreviewCardRoot( params: usePreviewCardRoot.Parameters, diff --git a/packages/mui-base/src/PreviewCard/Trigger/PreviewCardTrigger.tsx b/packages/mui-base/src/PreviewCard/Trigger/PreviewCardTrigger.tsx index df558fb5e3..0c28414559 100644 --- a/packages/mui-base/src/PreviewCard/Trigger/PreviewCardTrigger.tsx +++ b/packages/mui-base/src/PreviewCard/Trigger/PreviewCardTrigger.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { usePreviewCardRootContext } from '../Root/PreviewCardContext'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { usePreviewCardRootContext } from '../Root/PreviewCardContext.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * diff --git a/packages/mui-base/src/PreviewCard/index.parts.ts b/packages/mui-base/src/PreviewCard/index.parts.ts index 291940ad66..080064d7db 100644 --- a/packages/mui-base/src/PreviewCard/index.parts.ts +++ b/packages/mui-base/src/PreviewCard/index.parts.ts @@ -1,6 +1,6 @@ -export { PreviewCardRoot as Root } from './Root/PreviewCardRoot'; -export { PreviewCardTrigger as Trigger } from './Trigger/PreviewCardTrigger'; -export { PreviewCardPositioner as Positioner } from './Positioner/PreviewCardPositioner'; -export { PreviewCardPopup as Popup } from './Popup/PreviewCardPopup'; -export { PreviewCardArrow as Arrow } from './Arrow/PreviewCardArrow'; -export { PreviewCardBackdrop as Backdrop } from './Backdrop/PreviewCardBackdrop'; +export { PreviewCardRoot as Root } from './Root/PreviewCardRoot.js'; +export { PreviewCardTrigger as Trigger } from './Trigger/PreviewCardTrigger.js'; +export { PreviewCardPositioner as Positioner } from './Positioner/PreviewCardPositioner.js'; +export { PreviewCardPopup as Popup } from './Popup/PreviewCardPopup.js'; +export { PreviewCardArrow as Arrow } from './Arrow/PreviewCardArrow.js'; +export { PreviewCardBackdrop as Backdrop } from './Backdrop/PreviewCardBackdrop.js'; diff --git a/packages/mui-base/src/PreviewCard/index.ts b/packages/mui-base/src/PreviewCard/index.ts index 848affb96f..0316fb4e66 100644 --- a/packages/mui-base/src/PreviewCard/index.ts +++ b/packages/mui-base/src/PreviewCard/index.ts @@ -1 +1 @@ -export * as PreviewCard from './index.parts'; +export * as PreviewCard from './index.parts.js'; diff --git a/packages/mui-base/src/PreviewCard/utils/useFocusExtended.ts b/packages/mui-base/src/PreviewCard/utils/useFocusExtended.ts index bf793694dd..62f5efe67f 100644 --- a/packages/mui-base/src/PreviewCard/utils/useFocusExtended.ts +++ b/packages/mui-base/src/PreviewCard/utils/useFocusExtended.ts @@ -3,7 +3,7 @@ import * as React from 'react'; import { getWindow, isHTMLElement } from '@floating-ui/utils/dom'; import type { FloatingRootContext, ElementProps } from '@floating-ui/react'; import { activeElement, contains, getDocument } from '@floating-ui/react/utils'; -import { OPEN_DELAY } from './constants'; +import { OPEN_DELAY } from './constants.js'; interface UseFocusExtendedProps { delay?: number; diff --git a/packages/mui-base/src/Progress/Indicator/ProgressIndicator.test.tsx b/packages/mui-base/src/Progress/Indicator/ProgressIndicator.test.tsx index 9a8fe202a3..c1880a3d32 100644 --- a/packages/mui-base/src/Progress/Indicator/ProgressIndicator.test.tsx +++ b/packages/mui-base/src/Progress/Indicator/ProgressIndicator.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { Progress } from '@base_ui/react/Progress'; import { createRenderer, describeConformance } from '#test-utils'; -import { ProgressRootContext } from '../Root/ProgressRootContext'; +import { ProgressRootContext } from '../Root/ProgressRootContext.js'; const contextValue: ProgressRootContext = { direction: 'ltr', diff --git a/packages/mui-base/src/Progress/Indicator/ProgressIndicator.tsx b/packages/mui-base/src/Progress/Indicator/ProgressIndicator.tsx index ab75c82749..3c05fa7a0d 100644 --- a/packages/mui-base/src/Progress/Indicator/ProgressIndicator.tsx +++ b/packages/mui-base/src/Progress/Indicator/ProgressIndicator.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useProgressIndicator } from './useProgressIndicator'; -import { ProgressRoot } from '../Root/ProgressRoot'; -import { useProgressRootContext } from '../Root/ProgressRootContext'; -import { progressStyleHookMapping } from '../Root/styleHooks'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useProgressIndicator } from './useProgressIndicator.js'; +import { ProgressRoot } from '../Root/ProgressRoot.js'; +import { useProgressRootContext } from '../Root/ProgressRootContext.js'; +import { progressStyleHookMapping } from '../Root/styleHooks.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Progress/Indicator/useProgressIndicator.ts b/packages/mui-base/src/Progress/Indicator/useProgressIndicator.ts index 4e7e76e121..aeabb6d07c 100644 --- a/packages/mui-base/src/Progress/Indicator/useProgressIndicator.ts +++ b/packages/mui-base/src/Progress/Indicator/useProgressIndicator.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { ProgressDirection } from '../Root/useProgressRoot'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { ProgressDirection } from '../Root/useProgressRoot.js'; function valueToPercent(value: number, min: number, max: number) { return ((value - min) * 100) / (max - min); diff --git a/packages/mui-base/src/Progress/Root/ProgressRoot.tsx b/packages/mui-base/src/Progress/Root/ProgressRoot.tsx index 4ea9522a30..6e7de9aa94 100644 --- a/packages/mui-base/src/Progress/Root/ProgressRoot.tsx +++ b/packages/mui-base/src/Progress/Root/ProgressRoot.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { type ProgressDirection, ProgressStatus, useProgressRoot } from './useProgressRoot'; -import { ProgressRootContext } from './ProgressRootContext'; -import { progressStyleHookMapping } from './styleHooks'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { type ProgressDirection, ProgressStatus, useProgressRoot } from './useProgressRoot.js'; +import { ProgressRootContext } from './ProgressRootContext.js'; +import { progressStyleHookMapping } from './styleHooks.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Progress/Root/ProgressRootContext.tsx b/packages/mui-base/src/Progress/Root/ProgressRootContext.tsx index 0293733894..e0103e42f6 100644 --- a/packages/mui-base/src/Progress/Root/ProgressRootContext.tsx +++ b/packages/mui-base/src/Progress/Root/ProgressRootContext.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import type { ProgressRoot } from './ProgressRoot'; -import type { useProgressRoot } from './useProgressRoot'; +import type { ProgressRoot } from './ProgressRoot.js'; +import type { useProgressRoot } from './useProgressRoot.js'; export type ProgressRootContext = Omit & { ownerState: ProgressRoot.OwnerState; diff --git a/packages/mui-base/src/Progress/Root/styleHooks.ts b/packages/mui-base/src/Progress/Root/styleHooks.ts index 9a6d365f92..3bed259c5a 100644 --- a/packages/mui-base/src/Progress/Root/styleHooks.ts +++ b/packages/mui-base/src/Progress/Root/styleHooks.ts @@ -1,5 +1,5 @@ -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import type { ProgressRoot } from './ProgressRoot'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import type { ProgressRoot } from './ProgressRoot.js'; export const progressStyleHookMapping: CustomStyleHookMapping = { direction: () => null, diff --git a/packages/mui-base/src/Progress/Root/useProgressRoot.ts b/packages/mui-base/src/Progress/Root/useProgressRoot.ts index 31fdc5f411..b884504d13 100644 --- a/packages/mui-base/src/Progress/Root/useProgressRoot.ts +++ b/packages/mui-base/src/Progress/Root/useProgressRoot.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; export type ProgressStatus = 'indeterminate' | 'progressing' | 'complete'; diff --git a/packages/mui-base/src/Progress/Track/ProgressTrack.test.tsx b/packages/mui-base/src/Progress/Track/ProgressTrack.test.tsx index a643ac732f..1b59d4ef69 100644 --- a/packages/mui-base/src/Progress/Track/ProgressTrack.test.tsx +++ b/packages/mui-base/src/Progress/Track/ProgressTrack.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Progress } from '@base_ui/react/Progress'; import { createRenderer, describeConformance } from '#test-utils'; -import { ProgressRootContext } from '../Root/ProgressRootContext'; +import { ProgressRootContext } from '../Root/ProgressRootContext.js'; const contextValue: ProgressRootContext = { direction: 'ltr', diff --git a/packages/mui-base/src/Progress/Track/ProgressTrack.tsx b/packages/mui-base/src/Progress/Track/ProgressTrack.tsx index d635f2c9e3..cf2041b38c 100644 --- a/packages/mui-base/src/Progress/Track/ProgressTrack.tsx +++ b/packages/mui-base/src/Progress/Track/ProgressTrack.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useProgressRootContext } from '../Root/ProgressRootContext'; -import { progressStyleHookMapping } from '../Root/styleHooks'; -import { ProgressRoot } from '../Root/ProgressRoot'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useProgressRootContext } from '../Root/ProgressRootContext.js'; +import { progressStyleHookMapping } from '../Root/styleHooks.js'; +import { ProgressRoot } from '../Root/ProgressRoot.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Progress/index.parts.ts b/packages/mui-base/src/Progress/index.parts.ts index 5e0d1453f4..00e1b44a24 100644 --- a/packages/mui-base/src/Progress/index.parts.ts +++ b/packages/mui-base/src/Progress/index.parts.ts @@ -1,8 +1,8 @@ -export { ProgressRoot as Root } from './Root/ProgressRoot'; -export { ProgressTrack as Track } from './Track/ProgressTrack'; -export { ProgressIndicator as Indicator } from './Indicator/ProgressIndicator'; +export { ProgressRoot as Root } from './Root/ProgressRoot.js'; +export { ProgressTrack as Track } from './Track/ProgressTrack.js'; +export { ProgressIndicator as Indicator } from './Indicator/ProgressIndicator.js'; export type { ProgressStatus as Status, ProgressDirection as Direction, -} from './Root/useProgressRoot'; +} from './Root/useProgressRoot.js'; diff --git a/packages/mui-base/src/Progress/index.ts b/packages/mui-base/src/Progress/index.ts index ee913fe81a..7afc4c42a1 100644 --- a/packages/mui-base/src/Progress/index.ts +++ b/packages/mui-base/src/Progress/index.ts @@ -1 +1 @@ -export * as Progress from './index.parts'; +export * as Progress from './index.parts.js'; diff --git a/packages/mui-base/src/Radio/Indicator/RadioIndicator.test.tsx b/packages/mui-base/src/Radio/Indicator/RadioIndicator.test.tsx index 9250c941fa..d272710e48 100644 --- a/packages/mui-base/src/Radio/Indicator/RadioIndicator.test.tsx +++ b/packages/mui-base/src/Radio/Indicator/RadioIndicator.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { createRenderer } from '@mui/internal-test-utils'; import { Radio } from '@base_ui/react/Radio'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Radio/Indicator/RadioIndicator.tsx b/packages/mui-base/src/Radio/Indicator/RadioIndicator.tsx index 30562a691a..54f888022e 100644 --- a/packages/mui-base/src/Radio/Indicator/RadioIndicator.tsx +++ b/packages/mui-base/src/Radio/Indicator/RadioIndicator.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useRadioRootContext } from '../Root/RadioRootContext'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useRadioRootContext } from '../Root/RadioRootContext.js'; const customStyleHookMapping: CustomStyleHookMapping = { checked(value) { diff --git a/packages/mui-base/src/Radio/Root/RadioRoot.test.tsx b/packages/mui-base/src/Radio/Root/RadioRoot.test.tsx index 75fac1a111..1af1375490 100644 --- a/packages/mui-base/src/Radio/Root/RadioRoot.test.tsx +++ b/packages/mui-base/src/Radio/Root/RadioRoot.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { createRenderer } from '@mui/internal-test-utils'; import { Radio } from '@base_ui/react/Radio'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Radio/Root/RadioRoot.tsx b/packages/mui-base/src/Radio/Root/RadioRoot.tsx index a0369e79be..437087773e 100644 --- a/packages/mui-base/src/Radio/Root/RadioRoot.tsx +++ b/packages/mui-base/src/Radio/Root/RadioRoot.tsx @@ -1,15 +1,15 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useRadioGroupRootContext } from '../../RadioGroup/Root/RadioGroupRootContext'; -import { useRadioRoot } from './useRadioRoot'; -import { RadioRootContext } from './RadioRootContext'; -import { CompositeItem } from '../../Composite/Item/CompositeItem'; -import { NOOP } from '../../utils/noop'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useRadioGroupRootContext } from '../../RadioGroup/Root/RadioGroupRootContext.js'; +import { useRadioRoot } from './useRadioRoot.js'; +import { RadioRootContext } from './RadioRootContext.js'; +import { CompositeItem } from '../../Composite/Item/CompositeItem.js'; +import { NOOP } from '../../utils/noop.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; const customStyleHookMapping: CustomStyleHookMapping = { checked(value) { diff --git a/packages/mui-base/src/Radio/Root/useRadioRoot.tsx b/packages/mui-base/src/Radio/Root/useRadioRoot.tsx index 87dda643b5..82f1c2158e 100644 --- a/packages/mui-base/src/Radio/Root/useRadioRoot.tsx +++ b/packages/mui-base/src/Radio/Root/useRadioRoot.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { visuallyHidden } from '../../utils/visuallyHidden'; -import { useRadioGroupRootContext } from '../../RadioGroup/Root/RadioGroupRootContext'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { visuallyHidden } from '../../utils/visuallyHidden.js'; +import { useRadioGroupRootContext } from '../../RadioGroup/Root/RadioGroupRootContext.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; /** * diff --git a/packages/mui-base/src/Radio/index.parts.ts b/packages/mui-base/src/Radio/index.parts.ts index e5baf0747d..ee7170d791 100644 --- a/packages/mui-base/src/Radio/index.parts.ts +++ b/packages/mui-base/src/Radio/index.parts.ts @@ -1,2 +1,2 @@ -export { RadioRoot as Root } from './Root/RadioRoot'; -export { RadioIndicator as Indicator } from './Indicator/RadioIndicator'; +export { RadioRoot as Root } from './Root/RadioRoot.js'; +export { RadioIndicator as Indicator } from './Indicator/RadioIndicator.js'; diff --git a/packages/mui-base/src/Radio/index.ts b/packages/mui-base/src/Radio/index.ts index 19f101399e..b796ce5e81 100644 --- a/packages/mui-base/src/Radio/index.ts +++ b/packages/mui-base/src/Radio/index.ts @@ -1 +1 @@ -export * as Radio from './index.parts'; +export * as Radio from './index.parts.js'; diff --git a/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.test.tsx b/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.test.tsx index 2a2c38e33a..762727c283 100644 --- a/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.test.tsx +++ b/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.test.tsx @@ -5,7 +5,7 @@ import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer, act, screen, fireEvent } from '@mui/internal-test-utils'; import userEvent from '@testing-library/user-event'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance } from '#test-utils'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); diff --git a/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.tsx b/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.tsx index be5658b2a9..9b387f2abf 100644 --- a/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.tsx +++ b/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.tsx @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { CompositeRoot } from '../../Composite/Root/CompositeRoot'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useRadioGroupRoot } from './useRadioGroupRoot'; -import { RadioGroupRootContext } from './RadioGroupRootContext'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { CompositeRoot } from '../../Composite/Root/CompositeRoot.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useRadioGroupRoot } from './useRadioGroupRoot.js'; +import { RadioGroupRootContext } from './RadioGroupRootContext.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; /** * * Demos: diff --git a/packages/mui-base/src/RadioGroup/Root/RadioGroupRootContext.ts b/packages/mui-base/src/RadioGroup/Root/RadioGroupRootContext.ts index 73fe309707..e41179a69b 100644 --- a/packages/mui-base/src/RadioGroup/Root/RadioGroupRootContext.ts +++ b/packages/mui-base/src/RadioGroup/Root/RadioGroupRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { NOOP } from '../../utils/noop'; +import { NOOP } from '../../utils/noop.js'; export interface RadioGroupRootContext { disabled: boolean | undefined; diff --git a/packages/mui-base/src/RadioGroup/Root/useRadioGroupRoot.ts b/packages/mui-base/src/RadioGroup/Root/useRadioGroupRoot.ts index 6af3cfe882..3cfc9391b9 100644 --- a/packages/mui-base/src/RadioGroup/Root/useRadioGroupRoot.ts +++ b/packages/mui-base/src/RadioGroup/Root/useRadioGroupRoot.ts @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import { contains } from '@floating-ui/react/utils'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useControlled } from '../../utils/useControlled'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useId } from '../../utils/useId'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; -import { useField } from '../../Field/useField'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useId } from '../../utils/useId.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; +import { useField } from '../../Field/useField.js'; /** * diff --git a/packages/mui-base/src/RadioGroup/index.parts.ts b/packages/mui-base/src/RadioGroup/index.parts.ts index f78d654570..89d7b6adbb 100644 --- a/packages/mui-base/src/RadioGroup/index.parts.ts +++ b/packages/mui-base/src/RadioGroup/index.parts.ts @@ -1 +1 @@ -export { RadioGroupRoot as Root } from './Root/RadioGroupRoot'; +export { RadioGroupRoot as Root } from './Root/RadioGroupRoot.js'; diff --git a/packages/mui-base/src/RadioGroup/index.ts b/packages/mui-base/src/RadioGroup/index.ts index 4dd85fb1eb..9684fc7660 100644 --- a/packages/mui-base/src/RadioGroup/index.ts +++ b/packages/mui-base/src/RadioGroup/index.ts @@ -1 +1 @@ -export * as RadioGroup from './index.parts'; +export * as RadioGroup from './index.parts.js'; diff --git a/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.test.tsx b/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.test.tsx index dd185c84b3..712b7f3d08 100644 --- a/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.test.tsx +++ b/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.test.tsx @@ -2,8 +2,7 @@ import * as React from 'react'; import { ScrollArea } from '@base_ui/react/ScrollArea'; import { expect } from 'chai'; import { screen, describeSkipIf } from '@mui/internal-test-utils'; -import { createRenderer } from '#test-utils'; -import { describeConformance } from '../../../test/describeConformance'; +import { createRenderer, describeConformance } from '#test-utils'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); diff --git a/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.tsx b/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.tsx index 1dd3a9099a..3982c2bc75 100644 --- a/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.tsx +++ b/packages/mui-base/src/ScrollArea/Corner/ScrollAreaCorner.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext'; -import { useForkRef } from '../../utils/useForkRef'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext.js'; +import { useForkRef } from '../../utils/useForkRef.js'; const ownerState = {}; diff --git a/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.test.tsx b/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.test.tsx index 85c0b95d0c..9db9514518 100644 --- a/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.test.tsx +++ b/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.test.tsx @@ -1,9 +1,8 @@ import * as React from 'react'; import { ScrollArea } from '@base_ui/react/ScrollArea'; import { screen, describeSkipIf } from '@mui/internal-test-utils'; -import { createRenderer } from '#test-utils'; +import { describeConformance, createRenderer } from '#test-utils'; import { expect } from 'chai'; -import { describeConformance } from '../../../test/describeConformance'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); diff --git a/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.tsx b/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.tsx index 9b23399f37..d5c412da4a 100644 --- a/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.tsx +++ b/packages/mui-base/src/ScrollArea/Root/ScrollAreaRoot.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { ScrollAreaRootContext } from './ScrollAreaRootContext'; -import { useScrollAreaRoot } from './useScrollAreaRoot'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { ScrollAreaRootContext } from './ScrollAreaRootContext.js'; +import { useScrollAreaRoot } from './useScrollAreaRoot.js'; const ownerState = {}; diff --git a/packages/mui-base/src/ScrollArea/Root/useScrollAreaRoot.ts b/packages/mui-base/src/ScrollArea/Root/useScrollAreaRoot.ts index 3ad05cf104..01817f6144 100644 --- a/packages/mui-base/src/ScrollArea/Root/useScrollAreaRoot.ts +++ b/packages/mui-base/src/ScrollArea/Root/useScrollAreaRoot.ts @@ -1,9 +1,9 @@ import * as React from 'react'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useId } from '../../utils/useId'; -import { SCROLL_TIMEOUT } from '../constants'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useId } from '../../utils/useId.js'; +import { SCROLL_TIMEOUT } from '../constants.js'; interface Size { width: number; diff --git a/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.test.tsx b/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.test.tsx index 0eb2297c52..adbabd33d9 100644 --- a/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.test.tsx +++ b/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.test.tsx @@ -1,10 +1,9 @@ import * as React from 'react'; import { ScrollArea } from '@base_ui/react/ScrollArea'; import { screen, fireEvent } from '@mui/internal-test-utils'; -import { createRenderer } from '#test-utils'; +import { createRenderer, describeConformance } from '#test-utils'; import { expect } from 'chai'; -import { describeConformance } from '../../../test/describeConformance'; -import { SCROLL_TIMEOUT } from '../constants'; +import { SCROLL_TIMEOUT } from '../constants.js'; describe('', () => { const { render, clock } = createRenderer(); diff --git a/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.tsx b/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.tsx index a906f8604f..e24705a5eb 100644 --- a/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.tsx +++ b/packages/mui-base/src/ScrollArea/Scrollbar/ScrollAreaScrollbar.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext'; -import { useForkRef } from '../../utils/useForkRef'; -import { ScrollAreaScrollbarContext } from './ScrollAreaScrollbarContext'; -import { useScrollAreaScrollbar } from './useScrollAreaScrollbar'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { ScrollAreaScrollbarContext } from './ScrollAreaScrollbarContext.js'; +import { useScrollAreaScrollbar } from './useScrollAreaScrollbar.js'; /** * diff --git a/packages/mui-base/src/ScrollArea/Scrollbar/useScrollAreaScrollbar.ts b/packages/mui-base/src/ScrollArea/Scrollbar/useScrollAreaScrollbar.ts index a771793352..8e3b0626e3 100644 --- a/packages/mui-base/src/ScrollArea/Scrollbar/useScrollAreaScrollbar.ts +++ b/packages/mui-base/src/ScrollArea/Scrollbar/useScrollAreaScrollbar.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext'; -import { mergeReactProps } from '../../utils/mergeReactProps'; +import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; export function useScrollAreaScrollbar(params: useScrollAreaScrollbar.Parameters) { const { orientation } = params; diff --git a/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.test.tsx b/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.test.tsx index 2d17485e26..4bb969841e 100644 --- a/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.test.tsx +++ b/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; -import { createRenderer } from '#test-utils'; +import { createRenderer, describeConformance } from '#test-utils'; import { ScrollArea } from '@base_ui/react/ScrollArea'; -import { describeConformance } from '../../../test/describeConformance'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.tsx b/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.tsx index 61cf24f80b..5af4c5c58b 100644 --- a/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.tsx +++ b/packages/mui-base/src/ScrollArea/Thumb/ScrollAreaThumb.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext'; -import { useForkRef } from '../../utils/useForkRef'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useScrollAreaScrollbarContext } from '../Scrollbar/ScrollAreaScrollbarContext'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useScrollAreaScrollbarContext } from '../Scrollbar/ScrollAreaScrollbarContext.js'; /** * diff --git a/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.test.tsx b/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.test.tsx index 16a15c03ea..2e65bdc927 100644 --- a/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.test.tsx +++ b/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { ScrollArea } from '@base_ui/react/ScrollArea'; -import { createRenderer } from '#test-utils'; -import { describeConformance } from '../../../test/describeConformance'; +import { describeConformance, createRenderer } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.tsx b/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.tsx index ccd54a9532..91cfa4b8b7 100644 --- a/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.tsx +++ b/packages/mui-base/src/ScrollArea/Viewport/ScrollAreaViewport.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext'; -import { useScrollAreaViewport } from './useScrollAreaViewport'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext.js'; +import { useScrollAreaViewport } from './useScrollAreaViewport.js'; const ownerState = {}; diff --git a/packages/mui-base/src/ScrollArea/Viewport/useScrollAreaViewport.tsx b/packages/mui-base/src/ScrollArea/Viewport/useScrollAreaViewport.tsx index 57694594c2..96d0814c9d 100644 --- a/packages/mui-base/src/ScrollArea/Viewport/useScrollAreaViewport.tsx +++ b/packages/mui-base/src/ScrollArea/Viewport/useScrollAreaViewport.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { MIN_THUMB_SIZE } from '../constants'; +import { useScrollAreaRootContext } from '../Root/ScrollAreaRootContext.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { MIN_THUMB_SIZE } from '../constants.js'; export function useScrollAreaViewport(params: useScrollAreaViewport.Parameters) { const { children } = params; diff --git a/packages/mui-base/src/ScrollArea/index.parts.ts b/packages/mui-base/src/ScrollArea/index.parts.ts index a6193a16bd..72c7e77d57 100644 --- a/packages/mui-base/src/ScrollArea/index.parts.ts +++ b/packages/mui-base/src/ScrollArea/index.parts.ts @@ -1,5 +1,5 @@ -export { ScrollAreaRoot as Root } from './Root/ScrollAreaRoot'; -export { ScrollAreaViewport as Viewport } from './Viewport/ScrollAreaViewport'; -export { ScrollAreaScrollbar as Scrollbar } from './Scrollbar/ScrollAreaScrollbar'; -export { ScrollAreaThumb as Thumb } from './Thumb/ScrollAreaThumb'; -export { ScrollAreaCorner as Corner } from './Corner/ScrollAreaCorner'; +export { ScrollAreaRoot as Root } from './Root/ScrollAreaRoot.js'; +export { ScrollAreaViewport as Viewport } from './Viewport/ScrollAreaViewport.js'; +export { ScrollAreaScrollbar as Scrollbar } from './Scrollbar/ScrollAreaScrollbar.js'; +export { ScrollAreaThumb as Thumb } from './Thumb/ScrollAreaThumb.js'; +export { ScrollAreaCorner as Corner } from './Corner/ScrollAreaCorner.js'; diff --git a/packages/mui-base/src/ScrollArea/index.ts b/packages/mui-base/src/ScrollArea/index.ts index 0b92c3a71f..6301ab0f3e 100644 --- a/packages/mui-base/src/ScrollArea/index.ts +++ b/packages/mui-base/src/ScrollArea/index.ts @@ -1 +1 @@ -export * as ScrollArea from './index.parts'; +export * as ScrollArea from './index.parts.js'; diff --git a/packages/mui-base/src/Separator/Root/SeparatorRoot.tsx b/packages/mui-base/src/Separator/Root/SeparatorRoot.tsx index 4928d77f47..42d42e1901 100644 --- a/packages/mui-base/src/Separator/Root/SeparatorRoot.tsx +++ b/packages/mui-base/src/Separator/Root/SeparatorRoot.tsx @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; const EMPTY_OBJECT = {}; diff --git a/packages/mui-base/src/Separator/index.parts.ts b/packages/mui-base/src/Separator/index.parts.ts index 01851cba2b..777cba2f28 100644 --- a/packages/mui-base/src/Separator/index.parts.ts +++ b/packages/mui-base/src/Separator/index.parts.ts @@ -1 +1 @@ -export { SeparatorRoot as Root } from './Root/SeparatorRoot'; +export { SeparatorRoot as Root } from './Root/SeparatorRoot.js'; diff --git a/packages/mui-base/src/Separator/index.ts b/packages/mui-base/src/Separator/index.ts index da5e8c68cb..c594d352ce 100644 --- a/packages/mui-base/src/Separator/index.ts +++ b/packages/mui-base/src/Separator/index.ts @@ -1 +1 @@ -export * as Separator from './index.parts'; +export * as Separator from './index.parts.js'; diff --git a/packages/mui-base/src/Slider/Control/SliderControl.test.tsx b/packages/mui-base/src/Slider/Control/SliderControl.test.tsx index 14c3b7981a..0aa728f20c 100644 --- a/packages/mui-base/src/Slider/Control/SliderControl.test.tsx +++ b/packages/mui-base/src/Slider/Control/SliderControl.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Slider } from '@base_ui/react/Slider'; import { createRenderer, describeConformance } from '#test-utils'; -import { SliderRootContext } from '../Root/SliderRootContext'; -import { NOOP } from '../../utils/noop'; +import { SliderRootContext } from '../Root/SliderRootContext.js'; +import { NOOP } from '../../utils/noop.js'; const testRootContext: SliderRootContext = { active: -1, diff --git a/packages/mui-base/src/Slider/Control/SliderControl.tsx b/packages/mui-base/src/Slider/Control/SliderControl.tsx index 6d4cb09d80..854edcd210 100644 --- a/packages/mui-base/src/Slider/Control/SliderControl.tsx +++ b/packages/mui-base/src/Slider/Control/SliderControl.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useSliderRootContext } from '../Root/SliderRootContext'; -import { sliderStyleHookMapping } from '../Root/styleHooks'; -import type { SliderRoot } from '../Root/SliderRoot'; -import { useSliderControl } from './useSliderControl'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useSliderRootContext } from '../Root/SliderRootContext.js'; +import { sliderStyleHookMapping } from '../Root/styleHooks.js'; +import type { SliderRoot } from '../Root/SliderRoot.js'; +import { useSliderControl } from './useSliderControl.js'; /** * * Demos: diff --git a/packages/mui-base/src/Slider/Control/useSliderControl.ts b/packages/mui-base/src/Slider/Control/useSliderControl.ts index 32fcc0c5f1..0e83fbbeed 100644 --- a/packages/mui-base/src/Slider/Control/useSliderControl.ts +++ b/packages/mui-base/src/Slider/Control/useSliderControl.ts @@ -1,17 +1,17 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { ownerDocument } from '../../utils/owner'; -import type { GenericHTMLProps } from '../../utils/types'; -import { useForkRef } from '../../utils/useForkRef'; -import { useEventCallback } from '../../utils/useEventCallback'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { ownerDocument } from '../../utils/owner.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; import { focusThumb, trackFinger, type useSliderRoot, validateMinimumDistance, -} from '../Root/useSliderRoot'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; +} from '../Root/useSliderRoot.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2; diff --git a/packages/mui-base/src/Slider/Indicator/SliderIndicator.test.tsx b/packages/mui-base/src/Slider/Indicator/SliderIndicator.test.tsx index 842d83fd73..f3b357c9cf 100644 --- a/packages/mui-base/src/Slider/Indicator/SliderIndicator.test.tsx +++ b/packages/mui-base/src/Slider/Indicator/SliderIndicator.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Slider } from '@base_ui/react/Slider'; import { createRenderer, describeConformance } from '#test-utils'; -import { SliderRootContext } from '../Root/SliderRootContext'; -import { NOOP } from '../../utils/noop'; +import { SliderRootContext } from '../Root/SliderRootContext.js'; +import { NOOP } from '../../utils/noop.js'; const testRootContext: SliderRootContext = { active: -1, diff --git a/packages/mui-base/src/Slider/Indicator/SliderIndicator.tsx b/packages/mui-base/src/Slider/Indicator/SliderIndicator.tsx index aec14a7077..eb18b6b050 100644 --- a/packages/mui-base/src/Slider/Indicator/SliderIndicator.tsx +++ b/packages/mui-base/src/Slider/Indicator/SliderIndicator.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useSliderRootContext } from '../Root/SliderRootContext'; -import { sliderStyleHookMapping } from '../Root/styleHooks'; -import type { SliderRoot } from '../Root/SliderRoot'; -import { useSliderIndicator } from './useSliderIndicator'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useSliderRootContext } from '../Root/SliderRootContext.js'; +import { sliderStyleHookMapping } from '../Root/styleHooks.js'; +import type { SliderRoot } from '../Root/SliderRoot.js'; +import { useSliderIndicator } from './useSliderIndicator.js'; /** * * Demos: diff --git a/packages/mui-base/src/Slider/Indicator/useSliderIndicator.ts b/packages/mui-base/src/Slider/Indicator/useSliderIndicator.ts index 0c0255c767..45fa514141 100644 --- a/packages/mui-base/src/Slider/Indicator/useSliderIndicator.ts +++ b/packages/mui-base/src/Slider/Indicator/useSliderIndicator.ts @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; -import type { useSliderRoot } from '../Root/useSliderRoot'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import type { useSliderRoot } from '../Root/useSliderRoot.js'; const axisProps = { horizontal: { diff --git a/packages/mui-base/src/Slider/Output/SliderOutput.test.tsx b/packages/mui-base/src/Slider/Output/SliderOutput.test.tsx index a223875a01..6f7603d606 100644 --- a/packages/mui-base/src/Slider/Output/SliderOutput.test.tsx +++ b/packages/mui-base/src/Slider/Output/SliderOutput.test.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { expect } from 'chai'; import { Slider } from '@base_ui/react/Slider'; import { createRenderer, describeConformance } from '#test-utils'; -import { SliderRootContext } from '../Root/SliderRootContext'; -import { NOOP } from '../../utils/noop'; +import { SliderRootContext } from '../Root/SliderRootContext.js'; +import { NOOP } from '../../utils/noop.js'; const testRootContext: SliderRootContext = { active: -1, diff --git a/packages/mui-base/src/Slider/Output/SliderOutput.tsx b/packages/mui-base/src/Slider/Output/SliderOutput.tsx index e2a306cfcc..2b9197526a 100644 --- a/packages/mui-base/src/Slider/Output/SliderOutput.tsx +++ b/packages/mui-base/src/Slider/Output/SliderOutput.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useSliderRootContext } from '../Root/SliderRootContext'; -import { sliderStyleHookMapping } from '../Root/styleHooks'; -import type { SliderRoot } from '../Root/SliderRoot'; -import { useSliderOutput } from './useSliderOutput'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useSliderRootContext } from '../Root/SliderRootContext.js'; +import { sliderStyleHookMapping } from '../Root/styleHooks.js'; +import type { SliderRoot } from '../Root/SliderRoot.js'; +import { useSliderOutput } from './useSliderOutput.js'; /** * * Demos: diff --git a/packages/mui-base/src/Slider/Output/useSliderOutput.ts b/packages/mui-base/src/Slider/Output/useSliderOutput.ts index 638f62d6ec..2aa1dce5f4 100644 --- a/packages/mui-base/src/Slider/Output/useSliderOutput.ts +++ b/packages/mui-base/src/Slider/Output/useSliderOutput.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { useSliderRoot } from '../Root/useSliderRoot'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { useSliderRoot } from '../Root/useSliderRoot.js'; export function useSliderOutput( parameters: useSliderOutput.Parameters, diff --git a/packages/mui-base/src/Slider/Root/SliderRoot.tsx b/packages/mui-base/src/Slider/Root/SliderRoot.tsx index 0346f83f65..3436bf5038 100644 --- a/packages/mui-base/src/Slider/Root/SliderRoot.tsx +++ b/packages/mui-base/src/Slider/Root/SliderRoot.tsx @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { FieldRoot } from '../../Field/Root/FieldRoot'; -import { CompositeList } from '../../Composite/List/CompositeList'; -import { sliderStyleHookMapping } from './styleHooks'; -import { useSliderRoot } from './useSliderRoot'; -import { SliderRootContext } from './SliderRootContext'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { FieldRoot } from '../../Field/Root/FieldRoot.js'; +import { CompositeList } from '../../Composite/List/CompositeList.js'; +import { sliderStyleHookMapping } from './styleHooks.js'; +import { useSliderRoot } from './useSliderRoot.js'; +import { SliderRootContext } from './SliderRootContext.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; /** * diff --git a/packages/mui-base/src/Slider/Root/SliderRootContext.ts b/packages/mui-base/src/Slider/Root/SliderRootContext.ts index 60e7e613a2..e836983797 100644 --- a/packages/mui-base/src/Slider/Root/SliderRootContext.ts +++ b/packages/mui-base/src/Slider/Root/SliderRootContext.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import type { SliderRoot } from './SliderRoot'; -import type { useSliderRoot } from './useSliderRoot'; +import type { SliderRoot } from './SliderRoot.js'; +import type { useSliderRoot } from './useSliderRoot.js'; export interface SliderRootContext extends Omit { ownerState: SliderRoot.OwnerState; diff --git a/packages/mui-base/src/Slider/Root/styleHooks.ts b/packages/mui-base/src/Slider/Root/styleHooks.ts index 72b3b2879e..7059a6a079 100644 --- a/packages/mui-base/src/Slider/Root/styleHooks.ts +++ b/packages/mui-base/src/Slider/Root/styleHooks.ts @@ -1,5 +1,5 @@ -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import type { SliderRoot } from './SliderRoot'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import type { SliderRoot } from './SliderRoot.js'; export const sliderStyleHookMapping: CustomStyleHookMapping = { activeThumbIndex: () => null, diff --git a/packages/mui-base/src/Slider/Root/useSliderRoot.ts b/packages/mui-base/src/Slider/Root/useSliderRoot.ts index 1984aa5ac4..a6a59f8d08 100644 --- a/packages/mui-base/src/Slider/Root/useSliderRoot.ts +++ b/packages/mui-base/src/Slider/Root/useSliderRoot.ts @@ -1,21 +1,21 @@ 'use client'; import * as React from 'react'; import { activeElement } from '@floating-ui/react/utils'; -import { areArraysEqual } from '../../utils/areArraysEqual'; -import { clamp } from '../../utils/clamp'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { ownerDocument } from '../../utils/owner'; -import { useControlled } from '../../utils/useControlled'; -import { useForkRef } from '../../utils/useForkRef'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { percentToValue, roundValueToStep, valueToPercent } from '../utils'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useId } from '../../utils/useId'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; -import { asc } from '../utils/asc'; -import { setValueIndex } from '../utils/setValueIndex'; -import { getSliderValue } from '../utils/getSliderValue'; -import { useField } from '../../Field/useField'; +import { areArraysEqual } from '../../utils/areArraysEqual.js'; +import { clamp } from '../../utils/clamp.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { ownerDocument } from '../../utils/owner.js'; +import { useControlled } from '../../utils/useControlled.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { percentToValue, roundValueToStep, valueToPercent } from '../utils.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useId } from '../../utils/useId.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; +import { asc } from '../utils/asc.js'; +import { setValueIndex } from '../utils/setValueIndex.js'; +import { getSliderValue } from '../utils/getSliderValue.js'; +import { useField } from '../../Field/useField.js'; function findClosest(values: number[], currentValue: number) { const { index: closestIndex } = diff --git a/packages/mui-base/src/Slider/Thumb/SliderThumb.test.tsx b/packages/mui-base/src/Slider/Thumb/SliderThumb.test.tsx index c6d8a78e32..ed865ec65e 100644 --- a/packages/mui-base/src/Slider/Thumb/SliderThumb.test.tsx +++ b/packages/mui-base/src/Slider/Thumb/SliderThumb.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Slider } from '@base_ui/react/Slider'; import { createRenderer, describeConformance } from '#test-utils'; -import { SliderRootContext } from '../Root/SliderRootContext'; -import { NOOP } from '../../utils/noop'; +import { SliderRootContext } from '../Root/SliderRootContext.js'; +import { NOOP } from '../../utils/noop.js'; const testRootContext: SliderRootContext = { active: -1, diff --git a/packages/mui-base/src/Slider/Thumb/SliderThumb.tsx b/packages/mui-base/src/Slider/Thumb/SliderThumb.tsx index 06d8600a84..15b67b9999 100644 --- a/packages/mui-base/src/Slider/Thumb/SliderThumb.tsx +++ b/packages/mui-base/src/Slider/Thumb/SliderThumb.tsx @@ -1,15 +1,15 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { getStyleHookProps } from '../../utils/getStyleHookProps'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { resolveClassName } from '../../utils/resolveClassName'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useForkRef } from '../../utils/useForkRef'; -import type { SliderRoot } from '../Root/SliderRoot'; -import { useSliderRootContext } from '../Root/SliderRootContext'; -import { useSliderThumb } from './useSliderThumb'; -import { isReactVersionAtLeast } from '../../utils/reactVersion'; +import { getStyleHookProps } from '../../utils/getStyleHookProps.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { resolveClassName } from '../../utils/resolveClassName.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { SliderRoot } from '../Root/SliderRoot.js'; +import { useSliderRootContext } from '../Root/SliderRootContext.js'; +import { useSliderThumb } from './useSliderThumb.js'; +import { isReactVersionAtLeast } from '../../utils/reactVersion.js'; function defaultRender( props: React.ComponentPropsWithRef<'span'>, diff --git a/packages/mui-base/src/Slider/Thumb/useSliderThumb.ts b/packages/mui-base/src/Slider/Thumb/useSliderThumb.ts index e1bc15ee48..15a2d581ab 100644 --- a/packages/mui-base/src/Slider/Thumb/useSliderThumb.ts +++ b/packages/mui-base/src/Slider/Thumb/useSliderThumb.ts @@ -1,16 +1,16 @@ 'use client'; import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { GenericHTMLProps } from '../../utils/types'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useForkRef } from '../../utils/useForkRef'; -import { useId } from '../../utils/useId'; -import { visuallyHidden } from '../../utils/visuallyHidden'; -import { useCompositeListItem } from '../../Composite/List/useCompositeListItem'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { getSliderValue } from '../utils/getSliderValue'; -import type { useSliderRoot } from '../Root/useSliderRoot'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { GenericHTMLProps } from '../../utils/types.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useId } from '../../utils/useId.js'; +import { visuallyHidden } from '../../utils/visuallyHidden.js'; +import { useCompositeListItem } from '../../Composite/List/useCompositeListItem.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { getSliderValue } from '../utils/getSliderValue.js'; +import type { useSliderRoot } from '../Root/useSliderRoot.js'; function getNewValue( thumbValue: number, diff --git a/packages/mui-base/src/Slider/Track/SliderTrack.test.tsx b/packages/mui-base/src/Slider/Track/SliderTrack.test.tsx index bfbda12629..a872374423 100644 --- a/packages/mui-base/src/Slider/Track/SliderTrack.test.tsx +++ b/packages/mui-base/src/Slider/Track/SliderTrack.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Slider } from '@base_ui/react/Slider'; import { createRenderer, describeConformance } from '#test-utils'; -import { SliderRootContext } from '../Root/SliderRootContext'; -import { NOOP } from '../../utils/noop'; +import { SliderRootContext } from '../Root/SliderRootContext.js'; +import { NOOP } from '../../utils/noop.js'; const testRootContext: SliderRootContext = { active: -1, diff --git a/packages/mui-base/src/Slider/Track/SliderTrack.tsx b/packages/mui-base/src/Slider/Track/SliderTrack.tsx index 4f6c42655d..219a64ab1e 100644 --- a/packages/mui-base/src/Slider/Track/SliderTrack.tsx +++ b/packages/mui-base/src/Slider/Track/SliderTrack.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { BaseUIComponentProps } from '../../utils/types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useSliderRootContext } from '../Root/SliderRootContext'; -import type { SliderRoot } from '../Root/SliderRoot'; -import { sliderStyleHookMapping } from '../Root/styleHooks'; +import { BaseUIComponentProps } from '../../utils/types.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useSliderRootContext } from '../Root/SliderRootContext.js'; +import type { SliderRoot } from '../Root/SliderRoot.js'; +import { sliderStyleHookMapping } from '../Root/styleHooks.js'; /** * * Demos: diff --git a/packages/mui-base/src/Slider/index.parts.ts b/packages/mui-base/src/Slider/index.parts.ts index fc64fa908e..a638034674 100644 --- a/packages/mui-base/src/Slider/index.parts.ts +++ b/packages/mui-base/src/Slider/index.parts.ts @@ -1,6 +1,6 @@ -export { SliderRoot as Root } from './Root/SliderRoot'; -export { SliderOutput as Output } from './Output/SliderOutput'; -export { SliderControl as Control } from './Control/SliderControl'; -export { SliderTrack as Track } from './Track/SliderTrack'; -export { SliderThumb as Thumb } from './Thumb/SliderThumb'; -export { SliderIndicator as Indicator } from './Indicator/SliderIndicator'; +export { SliderRoot as Root } from './Root/SliderRoot.js'; +export { SliderOutput as Output } from './Output/SliderOutput.js'; +export { SliderControl as Control } from './Control/SliderControl.js'; +export { SliderTrack as Track } from './Track/SliderTrack.js'; +export { SliderThumb as Thumb } from './Thumb/SliderThumb.js'; +export { SliderIndicator as Indicator } from './Indicator/SliderIndicator.js'; diff --git a/packages/mui-base/src/Slider/index.ts b/packages/mui-base/src/Slider/index.ts index 953696abeb..0cf025b442 100644 --- a/packages/mui-base/src/Slider/index.ts +++ b/packages/mui-base/src/Slider/index.ts @@ -1 +1 @@ -export * as Slider from './index.parts'; +export * as Slider from './index.parts.js'; diff --git a/packages/mui-base/src/Slider/utils/getSliderValue.ts b/packages/mui-base/src/Slider/utils/getSliderValue.ts index efe7d2019f..171a252131 100644 --- a/packages/mui-base/src/Slider/utils/getSliderValue.ts +++ b/packages/mui-base/src/Slider/utils/getSliderValue.ts @@ -1,5 +1,5 @@ -import { clamp } from '../../utils/clamp'; -import { setValueIndex } from './setValueIndex'; +import { clamp } from '../../utils/clamp.js'; +import { setValueIndex } from './setValueIndex.js'; interface GetSliderValueParameters { valueInput: number; diff --git a/packages/mui-base/src/Slider/utils/setValueIndex.ts b/packages/mui-base/src/Slider/utils/setValueIndex.ts index 291e096495..80a80ada94 100644 --- a/packages/mui-base/src/Slider/utils/setValueIndex.ts +++ b/packages/mui-base/src/Slider/utils/setValueIndex.ts @@ -1,4 +1,4 @@ -import { asc } from './asc'; +import { asc } from './asc.js'; export function setValueIndex({ values, diff --git a/packages/mui-base/src/Switch/Root/SwitchRoot.tsx b/packages/mui-base/src/Switch/Root/SwitchRoot.tsx index 40831d0b5d..2fe9406298 100644 --- a/packages/mui-base/src/Switch/Root/SwitchRoot.tsx +++ b/packages/mui-base/src/Switch/Root/SwitchRoot.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import refType from '@mui/utils/refType'; -import { useSwitchRoot } from './useSwitchRoot'; -import { SwitchRootContext } from './SwitchRootContext'; -import { styleHookMapping } from '../styleHooks'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { FieldRoot } from '../../Field/Root/FieldRoot'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useSwitchRoot } from './useSwitchRoot.js'; +import { SwitchRootContext } from './SwitchRootContext.js'; +import { styleHookMapping } from '../styleHooks.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { FieldRoot } from '../../Field/Root/FieldRoot.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * The foundation for building custom-styled switches. diff --git a/packages/mui-base/src/Switch/Root/SwitchRootContext.ts b/packages/mui-base/src/Switch/Root/SwitchRootContext.ts index ab61d06538..46f31acf90 100644 --- a/packages/mui-base/src/Switch/Root/SwitchRootContext.ts +++ b/packages/mui-base/src/Switch/Root/SwitchRootContext.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import type { SwitchRoot } from './SwitchRoot'; +import type { SwitchRoot } from './SwitchRoot.js'; export type SwitchRootContext = SwitchRoot.OwnerState; diff --git a/packages/mui-base/src/Switch/Root/useSwitchRoot.ts b/packages/mui-base/src/Switch/Root/useSwitchRoot.ts index 3dd896d081..a4ec46b9a9 100644 --- a/packages/mui-base/src/Switch/Root/useSwitchRoot.ts +++ b/packages/mui-base/src/Switch/Root/useSwitchRoot.ts @@ -1,15 +1,15 @@ 'use client'; import * as React from 'react'; -import { useControlled } from '../../utils/useControlled'; -import { useForkRef } from '../../utils/useForkRef'; -import { visuallyHidden } from '../../utils/visuallyHidden'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { useId } from '../../utils/useId'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation'; -import { useField } from '../../Field/useField'; +import { useControlled } from '../../utils/useControlled.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { visuallyHidden } from '../../utils/visuallyHidden.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import { useId } from '../../utils/useId.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { useFieldControlValidation } from '../../Field/Control/useFieldControlValidation.js'; +import { useField } from '../../Field/useField.js'; export function useSwitchRoot(params: useSwitchRoot.Parameters): useSwitchRoot.ReturnValue { const { diff --git a/packages/mui-base/src/Switch/Thumb/SwitchThumb.test.tsx b/packages/mui-base/src/Switch/Thumb/SwitchThumb.test.tsx index 8f002d66b7..b4d1b69e76 100644 --- a/packages/mui-base/src/Switch/Thumb/SwitchThumb.test.tsx +++ b/packages/mui-base/src/Switch/Thumb/SwitchThumb.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Switch } from '@base_ui/react/Switch'; import { createRenderer, describeConformance } from '#test-utils'; -import { SwitchRootContext } from '../Root/SwitchRootContext'; +import { SwitchRootContext } from '../Root/SwitchRootContext.js'; const testContext: SwitchRootContext = { checked: false, diff --git a/packages/mui-base/src/Switch/Thumb/SwitchThumb.tsx b/packages/mui-base/src/Switch/Thumb/SwitchThumb.tsx index 831ee3c0e2..4f3a86b0a7 100644 --- a/packages/mui-base/src/Switch/Thumb/SwitchThumb.tsx +++ b/packages/mui-base/src/Switch/Thumb/SwitchThumb.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { SwitchRoot } from '../Root/SwitchRoot'; -import { useSwitchRootContext } from '../Root/SwitchRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { styleHookMapping } from '../styleHooks'; +import type { SwitchRoot } from '../Root/SwitchRoot.js'; +import { useSwitchRootContext } from '../Root/SwitchRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useFieldRootContext } from '../../Field/Root/FieldRootContext.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { styleHookMapping } from '../styleHooks.js'; /** * diff --git a/packages/mui-base/src/Switch/index.parts.ts b/packages/mui-base/src/Switch/index.parts.ts index 7edb4a4336..b0e562ceb2 100644 --- a/packages/mui-base/src/Switch/index.parts.ts +++ b/packages/mui-base/src/Switch/index.parts.ts @@ -1,2 +1,2 @@ -export { SwitchRoot as Root } from './Root/SwitchRoot'; -export { SwitchThumb as Thumb } from './Thumb/SwitchThumb'; +export { SwitchRoot as Root } from './Root/SwitchRoot.js'; +export { SwitchThumb as Thumb } from './Thumb/SwitchThumb.js'; diff --git a/packages/mui-base/src/Switch/index.ts b/packages/mui-base/src/Switch/index.ts index 4b7a983cb3..94826b5df3 100644 --- a/packages/mui-base/src/Switch/index.ts +++ b/packages/mui-base/src/Switch/index.ts @@ -1 +1 @@ -export * as Switch from './index.parts'; +export * as Switch from './index.parts.js'; diff --git a/packages/mui-base/src/Switch/styleHooks.ts b/packages/mui-base/src/Switch/styleHooks.ts index c95bcd792a..0f266e99b2 100644 --- a/packages/mui-base/src/Switch/styleHooks.ts +++ b/packages/mui-base/src/Switch/styleHooks.ts @@ -1,5 +1,5 @@ -import type { SwitchRoot } from './Root/SwitchRoot'; -import type { CustomStyleHookMapping } from '../utils/getStyleHookProps'; +import type { SwitchRoot } from './Root/SwitchRoot.js'; +import type { CustomStyleHookMapping } from '../utils/getStyleHookProps.js'; export const styleHookMapping: CustomStyleHookMapping = { checked(value): Record { diff --git a/packages/mui-base/src/Tabs/Root/TabsProvider.tsx b/packages/mui-base/src/Tabs/Root/TabsProvider.tsx index d8d2e55157..62dd787780 100644 --- a/packages/mui-base/src/Tabs/Root/TabsProvider.tsx +++ b/packages/mui-base/src/Tabs/Root/TabsProvider.tsx @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { TabsRootContext } from './TabsRootContext'; -import { CompoundComponentContext, CompoundComponentContextValue } from '../../useCompound'; +import { TabsRootContext } from './TabsRootContext.js'; +import { CompoundComponentContext, CompoundComponentContextValue } from '../../useCompound/index.js'; export type TabPanelMetadata = { id: string | undefined; diff --git a/packages/mui-base/src/Tabs/Root/TabsRoot.tsx b/packages/mui-base/src/Tabs/Root/TabsRoot.tsx index 7660a562d1..9edc7afd61 100644 --- a/packages/mui-base/src/Tabs/Root/TabsRoot.tsx +++ b/packages/mui-base/src/Tabs/Root/TabsRoot.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useTabsRoot } from './useTabsRoot'; -import { tabsStyleHookMapping } from './styleHooks'; -import { TabsProvider } from './TabsProvider'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useTabsRoot } from './useTabsRoot.js'; +import { tabsStyleHookMapping } from './styleHooks.js'; +import { TabsProvider } from './TabsProvider.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Tabs/Root/TabsRootContext.ts b/packages/mui-base/src/Tabs/Root/TabsRootContext.ts index ac011c009d..bc3be7d975 100644 --- a/packages/mui-base/src/Tabs/Root/TabsRootContext.ts +++ b/packages/mui-base/src/Tabs/Root/TabsRootContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { type TabActivationDirection } from './TabsRoot'; +import { type TabActivationDirection } from './TabsRoot.js'; export interface TabsRootContext { /** diff --git a/packages/mui-base/src/Tabs/Root/styleHooks.ts b/packages/mui-base/src/Tabs/Root/styleHooks.ts index 0e9a3c4fb3..2be1a74991 100644 --- a/packages/mui-base/src/Tabs/Root/styleHooks.ts +++ b/packages/mui-base/src/Tabs/Root/styleHooks.ts @@ -1,5 +1,5 @@ -import type { TabsRoot } from './TabsRoot'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; +import type { TabsRoot } from './TabsRoot.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; export const tabsStyleHookMapping: CustomStyleHookMapping = { direction: () => null, diff --git a/packages/mui-base/src/Tabs/Root/useTabsRoot.ts b/packages/mui-base/src/Tabs/Root/useTabsRoot.ts index 8c9e49354d..c88d5033e8 100644 --- a/packages/mui-base/src/Tabs/Root/useTabsRoot.ts +++ b/packages/mui-base/src/Tabs/Root/useTabsRoot.ts @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; -import type { TabActivationDirection } from './TabsRoot'; -import type { TabsProviderValue, TabPanelMetadata } from './TabsProvider'; -import { useCompoundParent } from '../../useCompound'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useControlled } from '../../utils/useControlled'; +import type { TabActivationDirection } from './TabsRoot.js'; +import type { TabsProviderValue, TabPanelMetadata } from './TabsProvider.js'; +import { useCompoundParent } from '../../useCompound/index.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useControlled } from '../../utils/useControlled.js'; export interface TabMetadata { disabled: boolean; diff --git a/packages/mui-base/src/Tabs/Tab/Tab.test.tsx b/packages/mui-base/src/Tabs/Tab/Tab.test.tsx index 5a899d1fb5..332002dc34 100644 --- a/packages/mui-base/src/Tabs/Tab/Tab.test.tsx +++ b/packages/mui-base/src/Tabs/Tab/Tab.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Tabs } from '@base_ui/react/Tabs'; import { createRenderer, describeConformance } from '#test-utils'; -import { TabsListProviderValue, TabsListProvider } from '../TabsList/TabsListProvider'; -import { TabsRootContext } from '../Root/TabsRootContext'; +import { TabsListProviderValue, TabsListProvider } from '../TabsList/TabsListProvider.js'; +import { TabsRootContext } from '../Root/TabsRootContext.js'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Tabs/Tab/Tab.tsx b/packages/mui-base/src/Tabs/Tab/Tab.tsx index 217fef7cbb..7a2ccc893a 100644 --- a/packages/mui-base/src/Tabs/Tab/Tab.tsx +++ b/packages/mui-base/src/Tabs/Tab/Tab.tsx @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useTab } from './useTab'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { TabsOrientation } from '../Root/TabsRoot'; +import { useTab } from './useTab.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { TabsOrientation } from '../Root/TabsRoot.js'; /** * diff --git a/packages/mui-base/src/Tabs/Tab/useTab.test.tsx b/packages/mui-base/src/Tabs/Tab/useTab.test.tsx index 7d7e5a3041..d7d524f79c 100644 --- a/packages/mui-base/src/Tabs/Tab/useTab.test.tsx +++ b/packages/mui-base/src/Tabs/Tab/useTab.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer, screen, fireEvent } from '@mui/internal-test-utils'; import { Tabs } from '@base_ui/react/Tabs'; -import { useTab } from './useTab'; +import { useTab } from './useTab.js'; describe('useTab', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Tabs/Tab/useTab.ts b/packages/mui-base/src/Tabs/Tab/useTab.ts index 204ba177c2..1965788599 100644 --- a/packages/mui-base/src/Tabs/Tab/useTab.ts +++ b/packages/mui-base/src/Tabs/Tab/useTab.ts @@ -1,14 +1,14 @@ 'use client'; import * as React from 'react'; -import { useTabsRootContext } from '../Root/TabsRootContext'; -import { TabMetadata } from '../Root/useTabsRoot'; -import { useCompoundItem } from '../../useCompound'; -import { useListItem } from '../../useList'; -import { useButton } from '../../useButton'; -import { useId } from '../../utils/useId'; -import { useForkRef } from '../../utils/useForkRef'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { TabsOrientation } from '../Root/TabsRoot'; +import { useTabsRootContext } from '../Root/TabsRootContext.js'; +import { TabMetadata } from '../Root/useTabsRoot.js'; +import { useCompoundItem } from '../../useCompound/index.js'; +import { useListItem } from '../../useList/index.js'; +import { useButton } from '../../useButton/index.js'; +import { useId } from '../../utils/useId.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { TabsOrientation } from '../Root/TabsRoot.js'; function tabValueGenerator(otherTabValues: Set) { return otherTabValues.size; diff --git a/packages/mui-base/src/Tabs/TabIndicator/TabIndicator.tsx b/packages/mui-base/src/Tabs/TabIndicator/TabIndicator.tsx index 49d2594124..9025b4a9f9 100644 --- a/packages/mui-base/src/Tabs/TabIndicator/TabIndicator.tsx +++ b/packages/mui-base/src/Tabs/TabIndicator/TabIndicator.tsx @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { ActiveTabPosition, useTabIndicator } from './useTabIndicator'; -import { script as prehydrationScript } from './prehydrationScript.min'; -import type { TabsDirection, TabsOrientation, TabsRoot } from '../Root/TabsRoot'; -import { useTabsRootContext } from '../Root/TabsRootContext'; -import { tabsStyleHookMapping } from '../Root/styleHooks'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { ActiveTabPosition, useTabIndicator } from './useTabIndicator.js'; +import { script as prehydrationScript } from './prehydrationScript.min.js'; +import type { TabsDirection, TabsOrientation, TabsRoot } from '../Root/TabsRoot.js'; +import { useTabsRootContext } from '../Root/TabsRootContext.js'; +import { tabsStyleHookMapping } from '../Root/styleHooks.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; const noop = () => null; diff --git a/packages/mui-base/src/Tabs/TabIndicator/useTabIndicator.ts b/packages/mui-base/src/Tabs/TabIndicator/useTabIndicator.ts index 8571028952..bc6deb026a 100644 --- a/packages/mui-base/src/Tabs/TabIndicator/useTabIndicator.ts +++ b/packages/mui-base/src/Tabs/TabIndicator/useTabIndicator.ts @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; -import { useTabsListContext } from '../TabsList/TabsListContext'; -import { useTabsRootContext } from '../Root/TabsRootContext'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useForcedRerendering } from '../../utils/useForcedRerendering'; -import type { TabsDirection, TabsOrientation, TabActivationDirection } from '../Root/TabsRoot'; +import { useTabsListContext } from '../TabsList/TabsListContext.js'; +import { useTabsRootContext } from '../Root/TabsRootContext.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useForcedRerendering } from '../../utils/useForcedRerendering.js'; +import type { TabsDirection, TabsOrientation, TabActivationDirection } from '../Root/TabsRoot.js'; function round(value: number) { return Math.round(value * 100) * 0.01; diff --git a/packages/mui-base/src/Tabs/TabPanel/TabPanel.test.tsx b/packages/mui-base/src/Tabs/TabPanel/TabPanel.test.tsx index 727044873a..33f5155cef 100644 --- a/packages/mui-base/src/Tabs/TabPanel/TabPanel.test.tsx +++ b/packages/mui-base/src/Tabs/TabPanel/TabPanel.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Tabs } from '@base_ui/react/Tabs'; import { createRenderer, describeConformance } from '#test-utils'; -import { TabsProvider, TabsProviderValue } from '../Root/TabsProvider'; +import { TabsProvider, TabsProviderValue } from '../Root/TabsProvider.js'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Tabs/TabPanel/TabPanel.tsx b/packages/mui-base/src/Tabs/TabPanel/TabPanel.tsx index d01692b243..0e5fa1705f 100644 --- a/packages/mui-base/src/Tabs/TabPanel/TabPanel.tsx +++ b/packages/mui-base/src/Tabs/TabPanel/TabPanel.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useTabPanel } from './useTabPanel'; -import { tabsStyleHookMapping } from '../Root/styleHooks'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { TabsRoot } from '../Root/TabsRoot'; -import type { BaseUIComponentProps } from '../../utils/types'; +import { useTabPanel } from './useTabPanel.js'; +import { tabsStyleHookMapping } from '../Root/styleHooks.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { TabsRoot } from '../Root/TabsRoot.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Tabs/TabPanel/useTabPanel.test.tsx b/packages/mui-base/src/Tabs/TabPanel/useTabPanel.test.tsx index bbbe3ba408..b9d0bedfb0 100644 --- a/packages/mui-base/src/Tabs/TabPanel/useTabPanel.test.tsx +++ b/packages/mui-base/src/Tabs/TabPanel/useTabPanel.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer, screen, fireEvent } from '@mui/internal-test-utils'; import { Tabs } from '@base_ui/react/Tabs'; -import { useTabPanel } from './useTabPanel'; +import { useTabPanel } from './useTabPanel.js'; describe('useTabPanel', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Tabs/TabPanel/useTabPanel.ts b/packages/mui-base/src/Tabs/TabPanel/useTabPanel.ts index 7ffb05ac4e..763fe39787 100644 --- a/packages/mui-base/src/Tabs/TabPanel/useTabPanel.ts +++ b/packages/mui-base/src/Tabs/TabPanel/useTabPanel.ts @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; -import { useTabsRootContext } from '../Root/TabsRootContext'; -import { useCompoundItem } from '../../useCompound'; -import { useId } from '../../utils/useId'; -import { useForkRef } from '../../utils/useForkRef'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { TabActivationDirection, TabsDirection, TabsOrientation } from '../Root/TabsRoot'; +import { useTabsRootContext } from '../Root/TabsRootContext.js'; +import { useCompoundItem } from '../../useCompound/index.js'; +import { useId } from '../../utils/useId.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { TabActivationDirection, TabsDirection, TabsOrientation } from '../Root/TabsRoot.js'; function tabPanelValueGenerator(otherTabPanelValues: Set) { return otherTabPanelValues.size; diff --git a/packages/mui-base/src/Tabs/TabsList/TabsList.test.tsx b/packages/mui-base/src/Tabs/TabsList/TabsList.test.tsx index 9f040541c5..35cde83615 100644 --- a/packages/mui-base/src/Tabs/TabsList/TabsList.test.tsx +++ b/packages/mui-base/src/Tabs/TabsList/TabsList.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { act } from '@mui/internal-test-utils'; import { Tabs } from '@base_ui/react/Tabs'; import { createRenderer, describeConformance } from '#test-utils'; -import { TabsRootContext } from '../Root/TabsRootContext'; +import { TabsRootContext } from '../Root/TabsRootContext.js'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Tabs/TabsList/TabsList.tsx b/packages/mui-base/src/Tabs/TabsList/TabsList.tsx index 140f0a8d9d..ee34071eeb 100644 --- a/packages/mui-base/src/Tabs/TabsList/TabsList.tsx +++ b/packages/mui-base/src/Tabs/TabsList/TabsList.tsx @@ -1,12 +1,12 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useTabsList } from './useTabsList'; -import { TabsListProvider } from './TabsListProvider'; -import { tabsStyleHookMapping } from '../Root/styleHooks'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { TabsRoot } from '../Root/TabsRoot'; -import { BaseUIComponentProps } from '../../utils/types'; +import { useTabsList } from './useTabsList.js'; +import { TabsListProvider } from './TabsListProvider.js'; +import { tabsStyleHookMapping } from '../Root/styleHooks.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { TabsRoot } from '../Root/TabsRoot.js'; +import { BaseUIComponentProps } from '../../utils/types.js'; /** * diff --git a/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx b/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx index 3567bc5205..ef768b79e2 100644 --- a/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx +++ b/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { TabsListContext } from './TabsListContext'; -import { TabMetadata } from '../Root/useTabsRoot'; -import { ListContext, ListContextValue } from '../../useList/ListContext'; -import { CompoundComponentContext, CompoundComponentContextValue } from '../../useCompound'; -import { refType } from '../../utils/proptypes'; +import { TabsListContext } from './TabsListContext.js'; +import { TabMetadata } from '../Root/useTabsRoot.js'; +import { ListContext, ListContextValue } from '../../useList/ListContext.js'; +import { CompoundComponentContext, CompoundComponentContextValue } from '../../useCompound/index.js'; +import { refType } from '../../utils/proptypes.js'; export type TabsListProviderValue = CompoundComponentContextValue & ListContextValue & diff --git a/packages/mui-base/src/Tabs/TabsList/tabsListReducer.ts b/packages/mui-base/src/Tabs/TabsList/tabsListReducer.ts index 903bed29a6..88789d3458 100644 --- a/packages/mui-base/src/Tabs/TabsList/tabsListReducer.ts +++ b/packages/mui-base/src/Tabs/TabsList/tabsListReducer.ts @@ -5,8 +5,8 @@ import { listReducer, ListActionTypes, moveHighlight, -} from '../../useList'; -import { ActionWithContext } from '../../utils/useControllableReducer.types'; +} from '../../useList/index.js'; +import { ActionWithContext } from '../../utils/useControllableReducer.types.js'; export type TabsListActionContext = ListActionContext & { activateOnFocus: boolean; diff --git a/packages/mui-base/src/Tabs/TabsList/useTabsList.test.tsx b/packages/mui-base/src/Tabs/TabsList/useTabsList.test.tsx index 7a89c7d6df..a891d6ae2c 100644 --- a/packages/mui-base/src/Tabs/TabsList/useTabsList.test.tsx +++ b/packages/mui-base/src/Tabs/TabsList/useTabsList.test.tsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer, screen, fireEvent } from '@mui/internal-test-utils'; import { Tabs } from '@base_ui/react/Tabs'; -import { useTabsList } from './useTabsList'; +import { useTabsList } from './useTabsList.js'; describe('useTabsList', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/Tabs/TabsList/useTabsList.ts b/packages/mui-base/src/Tabs/TabsList/useTabsList.ts index 5ecbbbb81f..99dcbdbc59 100644 --- a/packages/mui-base/src/Tabs/TabsList/useTabsList.ts +++ b/packages/mui-base/src/Tabs/TabsList/useTabsList.ts @@ -1,16 +1,16 @@ 'use client'; import * as React from 'react'; -import { TabsListActionTypes, tabsListReducer, ValueChangeAction } from './tabsListReducer'; -import { useTabsRootContext } from '../Root/TabsRootContext'; -import { type TabMetadata } from '../Root/useTabsRoot'; -import { type TabsOrientation, type TabActivationDirection } from '../Root/TabsRoot'; -import { useCompoundParent } from '../../useCompound'; -import { useList, ListState, UseListParameters, ListAction } from '../../useList'; -import { useForkRef } from '../../utils/useForkRef'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useEnhancedEffect } from '../../utils/useEnhancedEffect'; -import { TabsDirection } from '../Root/TabsRoot'; -import { TabsListProviderValue } from './TabsListProvider'; +import { TabsListActionTypes, tabsListReducer, ValueChangeAction } from './tabsListReducer.js'; +import { useTabsRootContext } from '../Root/TabsRootContext.js'; +import { type TabMetadata } from '../Root/useTabsRoot.js'; +import { type TabsOrientation, type TabActivationDirection } from '../Root/TabsRoot.js'; +import { useCompoundParent } from '../../useCompound/index.js'; +import { useList, ListState, UseListParameters, ListAction } from '../../useList/index.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useEnhancedEffect } from '../../utils/useEnhancedEffect.js'; +import { TabsDirection } from '../Root/TabsRoot.js'; +import { TabsListProviderValue } from './TabsListProvider.js'; function useTabsList(parameters: useTabsList.Parameters): useTabsList.ReturnValue { const { rootRef: externalRef, loop, activateOnFocus } = parameters; diff --git a/packages/mui-base/src/Tabs/index.parts.ts b/packages/mui-base/src/Tabs/index.parts.ts index acb9d122d3..6338c15565 100644 --- a/packages/mui-base/src/Tabs/index.parts.ts +++ b/packages/mui-base/src/Tabs/index.parts.ts @@ -1,5 +1,5 @@ -export { TabsRoot as Root } from './Root/TabsRoot'; -export { Tab } from './Tab/Tab'; -export { TabIndicator as Indicator } from './TabIndicator/TabIndicator'; -export { TabPanel as Panel } from './TabPanel/TabPanel'; -export { TabsList as List } from './TabsList/TabsList'; +export { TabsRoot as Root } from './Root/TabsRoot.js'; +export { Tab } from './Tab/Tab.js'; +export { TabIndicator as Indicator } from './TabIndicator/TabIndicator.js'; +export { TabPanel as Panel } from './TabPanel/TabPanel.js'; +export { TabsList as List } from './TabsList/TabsList.js'; diff --git a/packages/mui-base/src/Tabs/index.ts b/packages/mui-base/src/Tabs/index.ts index 10ed66c376..5eaaf4b7d9 100644 --- a/packages/mui-base/src/Tabs/index.ts +++ b/packages/mui-base/src/Tabs/index.ts @@ -1 +1 @@ -export * as Tabs from './index.parts'; +export * as Tabs from './index.parts.js'; diff --git a/packages/mui-base/src/TextInput/TextInput.test.tsx b/packages/mui-base/src/TextInput/TextInput.test.tsx index cd487f933b..ab92445728 100644 --- a/packages/mui-base/src/TextInput/TextInput.test.tsx +++ b/packages/mui-base/src/TextInput/TextInput.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { TextInput } from '@base_ui/react/TextInput'; import { createRenderer } from '@mui/internal-test-utils'; -import { describeConformance } from '../../test/describeConformance'; +import { describeConformance } from '#test-utils'; describe('', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/TextInput/TextInput.tsx b/packages/mui-base/src/TextInput/TextInput.tsx index 07a2ce107a..0162afa7cf 100644 --- a/packages/mui-base/src/TextInput/TextInput.tsx +++ b/packages/mui-base/src/TextInput/TextInput.tsx @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import type { BaseUIComponentProps } from '../utils/types'; -import { Field } from '../Field'; +import type { BaseUIComponentProps } from '../utils/types.js'; +import { Field } from '../Field/index.js'; /** * diff --git a/packages/mui-base/src/TextInput/index.ts b/packages/mui-base/src/TextInput/index.ts index 26de90a7e3..7d460a985c 100644 --- a/packages/mui-base/src/TextInput/index.ts +++ b/packages/mui-base/src/TextInput/index.ts @@ -1 +1 @@ -export { TextInput } from './TextInput'; +export { TextInput } from './TextInput.js'; diff --git a/packages/mui-base/src/Tooltip/Arrow/TooltipArrow.tsx b/packages/mui-base/src/Tooltip/Arrow/TooltipArrow.tsx index 33951b87b9..71c9fe58ff 100644 --- a/packages/mui-base/src/Tooltip/Arrow/TooltipArrow.tsx +++ b/packages/mui-base/src/Tooltip/Arrow/TooltipArrow.tsx @@ -1,13 +1,13 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import { useTooltipPositionerContext } from '../Positioner/TooltipPositionerContext'; -import { useTooltipArrow } from './useTooltipArrow'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useTooltipPositionerContext } from '../Positioner/TooltipPositionerContext.js'; +import { useTooltipArrow } from './useTooltipArrow.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders an arrow that points to the center of the anchor element. diff --git a/packages/mui-base/src/Tooltip/Arrow/useTooltipArrow.ts b/packages/mui-base/src/Tooltip/Arrow/useTooltipArrow.ts index 09735b9f35..4477903c62 100644 --- a/packages/mui-base/src/Tooltip/Arrow/useTooltipArrow.ts +++ b/packages/mui-base/src/Tooltip/Arrow/useTooltipArrow.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function useTooltipArrow(params: useTooltipArrow.Parameters): useTooltipArrow.ReturnValue { const { arrowStyles, hidden } = params; diff --git a/packages/mui-base/src/Tooltip/Popup/TooltipPopup.tsx b/packages/mui-base/src/Tooltip/Popup/TooltipPopup.tsx index 7c062a8f8e..42ac8780b0 100644 --- a/packages/mui-base/src/Tooltip/Popup/TooltipPopup.tsx +++ b/packages/mui-base/src/Tooltip/Popup/TooltipPopup.tsx @@ -1,15 +1,15 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useTooltipRootContext } from '../Root/TooltipRootContext'; -import { useTooltipPositionerContext } from '../Positioner/TooltipPositionerContext'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { Alignment, Side } from '../../utils/useAnchorPositioning'; -import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; -import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useTooltipRootContext } from '../Root/TooltipRootContext.js'; +import { useTooltipPositionerContext } from '../Positioner/TooltipPositionerContext.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { Alignment, Side } from '../../utils/useAnchorPositioning.js'; +import type { CustomStyleHookMapping } from '../../utils/getStyleHookProps.js'; +import { popupOpenStateMapping as baseMapping } from '../../utils/popupOpenStateMapping.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, diff --git a/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx b/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx index f29d0f2b2c..305fd46eec 100644 --- a/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx +++ b/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx @@ -2,15 +2,15 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { FloatingPortal } from '@floating-ui/react'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { HTMLElementType } from '../../utils/proptypes'; -import { useForkRef } from '../../utils/useForkRef'; -import { useTooltipRootContext } from '../Root/TooltipRootContext'; -import { TooltipPositionerContext } from './TooltipPositionerContext'; -import { useTooltipPositioner } from './useTooltipPositioner'; -import type { BaseUIComponentProps } from '../../utils/types'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; -import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { HTMLElementType } from '../../utils/proptypes.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import { useTooltipRootContext } from '../Root/TooltipRootContext.js'; +import { TooltipPositionerContext } from './TooltipPositionerContext.js'; +import { useTooltipPositioner } from './useTooltipPositioner.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; +import { popupOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * The tooltip positioner element. diff --git a/packages/mui-base/src/Tooltip/Positioner/TooltipPositionerContext.ts b/packages/mui-base/src/Tooltip/Positioner/TooltipPositionerContext.ts index f3b1dab4ce..e9acd2d3fe 100644 --- a/packages/mui-base/src/Tooltip/Positioner/TooltipPositionerContext.ts +++ b/packages/mui-base/src/Tooltip/Positioner/TooltipPositionerContext.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import type { Side, Alignment } from '../../utils/useAnchorPositioning'; +import type { Side, Alignment } from '../../utils/useAnchorPositioning.js'; export interface TooltipPositionerContext { open: boolean; diff --git a/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts b/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts index 55ef351f98..af6f58b4c1 100644 --- a/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts +++ b/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts @@ -1,8 +1,8 @@ import * as React from 'react'; import type { Boundary, Padding, VirtualElement, FloatingRootContext } from '@floating-ui/react'; -import { mergeReactProps } from '../../utils/mergeReactProps'; -import { useAnchorPositioning } from '../../utils/useAnchorPositioning'; -import type { GenericHTMLProps } from '../../utils/types'; +import { mergeReactProps } from '../../utils/mergeReactProps.js'; +import { useAnchorPositioning } from '../../utils/useAnchorPositioning.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function useTooltipPositioner( params: useTooltipPositioner.Parameters, diff --git a/packages/mui-base/src/Tooltip/Provider/TooltipProvider.test.tsx b/packages/mui-base/src/Tooltip/Provider/TooltipProvider.test.tsx index 503541aff9..6d3ea54183 100644 --- a/packages/mui-base/src/Tooltip/Provider/TooltipProvider.test.tsx +++ b/packages/mui-base/src/Tooltip/Provider/TooltipProvider.test.tsx @@ -3,7 +3,7 @@ import { Tooltip } from '@base_ui/react/Tooltip'; import { screen, fireEvent, flushMicrotasks } from '@mui/internal-test-utils'; import { expect } from 'chai'; import { createRenderer } from '#test-utils'; -import { OPEN_DELAY } from '../utils/constants'; +import { OPEN_DELAY } from '../utils/constants.js'; describe('', () => { const { render, clock } = createRenderer(); diff --git a/packages/mui-base/src/Tooltip/Root/TooltipRoot.test.tsx b/packages/mui-base/src/Tooltip/Root/TooltipRoot.test.tsx index e95ceb6330..b3bd0be15f 100644 --- a/packages/mui-base/src/Tooltip/Root/TooltipRoot.test.tsx +++ b/packages/mui-base/src/Tooltip/Root/TooltipRoot.test.tsx @@ -4,7 +4,7 @@ import { act, fireEvent, flushMicrotasks, screen } from '@mui/internal-test-util import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer } from '#test-utils'; -import { OPEN_DELAY } from '../utils/constants'; +import { OPEN_DELAY } from '../utils/constants.js'; function Root(props: Tooltip.Root.Props) { return ; diff --git a/packages/mui-base/src/Tooltip/Root/TooltipRoot.tsx b/packages/mui-base/src/Tooltip/Root/TooltipRoot.tsx index 4a8c1e2cf9..a221d0e349 100644 --- a/packages/mui-base/src/Tooltip/Root/TooltipRoot.tsx +++ b/packages/mui-base/src/Tooltip/Root/TooltipRoot.tsx @@ -1,9 +1,9 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { TooltipRootContext } from './TooltipRootContext'; -import { useTooltipRoot } from './useTooltipRoot'; -import { OPEN_DELAY } from '../utils/constants'; +import { TooltipRootContext } from './TooltipRootContext.js'; +import { useTooltipRoot } from './useTooltipRoot.js'; +import { OPEN_DELAY } from '../utils/constants.js'; /** * The foundation for building custom-styled tooltips. diff --git a/packages/mui-base/src/Tooltip/Root/TooltipRootContext.ts b/packages/mui-base/src/Tooltip/Root/TooltipRootContext.ts index 94c5924467..b1a2ecb50e 100644 --- a/packages/mui-base/src/Tooltip/Root/TooltipRootContext.ts +++ b/packages/mui-base/src/Tooltip/Root/TooltipRootContext.ts @@ -1,8 +1,8 @@ 'use client'; import * as React from 'react'; import type { FloatingRootContext, OpenChangeReason } from '@floating-ui/react'; -import type { GenericHTMLProps } from '../../utils/types'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; +import type { GenericHTMLProps } from '../../utils/types.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; export interface TooltipRootContext { open: boolean; diff --git a/packages/mui-base/src/Tooltip/Root/useTooltipRoot.ts b/packages/mui-base/src/Tooltip/Root/useTooltipRoot.ts index bda68dfbef..9acb5ca47a 100644 --- a/packages/mui-base/src/Tooltip/Root/useTooltipRoot.ts +++ b/packages/mui-base/src/Tooltip/Root/useTooltipRoot.ts @@ -12,13 +12,13 @@ import { type OpenChangeReason, type FloatingRootContext, } from '@floating-ui/react'; -import { useControlled } from '../../utils/useControlled'; -import { useTransitionStatus } from '../../utils/useTransitionStatus'; -import { useAnimationsFinished } from '../../utils/useAnimationsFinished'; -import { useEventCallback } from '../../utils/useEventCallback'; -import { OPEN_DELAY } from '../utils/constants'; -import type { TransitionStatus } from '../../utils/useTransitionStatus'; -import type { GenericHTMLProps } from '../../utils/types'; +import { useControlled } from '../../utils/useControlled.js'; +import { useTransitionStatus } from '../../utils/useTransitionStatus.js'; +import { useAnimationsFinished } from '../../utils/useAnimationsFinished.js'; +import { useEventCallback } from '../../utils/useEventCallback.js'; +import { OPEN_DELAY } from '../utils/constants.js'; +import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; +import type { GenericHTMLProps } from '../../utils/types.js'; export function useTooltipRoot(params: useTooltipRoot.Parameters): useTooltipRoot.ReturnValue { const { diff --git a/packages/mui-base/src/Tooltip/Trigger/TooltipTrigger.tsx b/packages/mui-base/src/Tooltip/Trigger/TooltipTrigger.tsx index 6bbe0f039b..795074dd27 100644 --- a/packages/mui-base/src/Tooltip/Trigger/TooltipTrigger.tsx +++ b/packages/mui-base/src/Tooltip/Trigger/TooltipTrigger.tsx @@ -1,11 +1,11 @@ 'use client'; import * as React from 'react'; import PropTypes from 'prop-types'; -import { useTooltipRootContext } from '../Root/TooltipRootContext'; -import { useComponentRenderer } from '../../utils/useComponentRenderer'; -import { useForkRef } from '../../utils/useForkRef'; -import type { BaseUIComponentProps } from '../../utils/types'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { useTooltipRootContext } from '../Root/TooltipRootContext.js'; +import { useComponentRenderer } from '../../utils/useComponentRenderer.js'; +import { useForkRef } from '../../utils/useForkRef.js'; +import type { BaseUIComponentProps } from '../../utils/types.js'; +import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping.js'; /** * Renders a trigger element that opens the tooltip. diff --git a/packages/mui-base/src/Tooltip/index.parts.ts b/packages/mui-base/src/Tooltip/index.parts.ts index 00ec741c91..2ce89fe958 100644 --- a/packages/mui-base/src/Tooltip/index.parts.ts +++ b/packages/mui-base/src/Tooltip/index.parts.ts @@ -1,6 +1,6 @@ -export { TooltipRoot as Root } from './Root/TooltipRoot'; -export { TooltipTrigger as Trigger } from './Trigger/TooltipTrigger'; -export { TooltipPositioner as Positioner } from './Positioner/TooltipPositioner'; -export { TooltipPopup as Popup } from './Popup/TooltipPopup'; -export { TooltipArrow as Arrow } from './Arrow/TooltipArrow'; -export { TooltipProvider as Provider } from './Provider/TooltipProvider'; +export { TooltipRoot as Root } from './Root/TooltipRoot.js'; +export { TooltipTrigger as Trigger } from './Trigger/TooltipTrigger.js'; +export { TooltipPositioner as Positioner } from './Positioner/TooltipPositioner.js'; +export { TooltipPopup as Popup } from './Popup/TooltipPopup.js'; +export { TooltipArrow as Arrow } from './Arrow/TooltipArrow.js'; +export { TooltipProvider as Provider } from './Provider/TooltipProvider.js'; diff --git a/packages/mui-base/src/Tooltip/index.ts b/packages/mui-base/src/Tooltip/index.ts index 6fb3a4251d..090fcb0ead 100644 --- a/packages/mui-base/src/Tooltip/index.ts +++ b/packages/mui-base/src/Tooltip/index.ts @@ -1 +1 @@ -export * as Tooltip from './index.parts'; +export * as Tooltip from './index.parts.js'; diff --git a/packages/mui-base/src/index.test.js b/packages/mui-base/src/index.test.js index 9c58e4534d..2409e3ef4a 100644 --- a/packages/mui-base/src/index.test.js +++ b/packages/mui-base/src/index.test.js @@ -4,7 +4,8 @@ * import the entire lib for coverage reporting */ import { expect } from 'chai'; -import * as BaseUI from './index'; +// eslint-disable-next-line import/no-unresolved +import * as BaseUI from './index.js'; describe('@base_ui/react', () => { it('should have exports', () => { diff --git a/packages/mui-base/src/index.ts b/packages/mui-base/src/index.ts index de4bdf0f23..0fedefda9b 100644 --- a/packages/mui-base/src/index.ts +++ b/packages/mui-base/src/index.ts @@ -1,22 +1,22 @@ -export * from './Accordion'; -export * from './AlertDialog'; -export * from './Checkbox'; -export * from './CheckboxGroup'; -export * from './Collapsible'; -export * from './Dialog'; -export * from './Field'; -export * from './Fieldset'; -export * from './Form'; -export * from './Menu'; -export * from './NumberField'; -export * from './Popover'; -export * from './PreviewCard'; -export * from './Progress'; -export * from './RadioGroup'; -export * from './ScrollArea'; -export * from './Separator'; -export * from './Slider'; -export * from './Switch'; -export * from './Tabs'; -export * from './TextInput'; -export * from './Tooltip'; +export * from './Accordion/index.js'; +export * from './AlertDialog/index.js'; +export * from './Checkbox/index.js'; +export * from './CheckboxGroup/index.js'; +export * from './Collapsible/index.js'; +export * from './Dialog/index.js'; +export * from './Field/index.js'; +export * from './Fieldset/index.js'; +export * from './Form/index.js'; +export * from './Menu/index.js'; +export * from './NumberField/index.js'; +export * from './Popover/index.js'; +export * from './PreviewCard/index.js'; +export * from './Progress/index.js'; +export * from './RadioGroup/index.js'; +export * from './ScrollArea/index.js'; +export * from './Separator/index.js'; +export * from './Slider/index.js'; +export * from './Switch/index.js'; +export * from './Tabs/index.js'; +export * from './TextInput/index.js'; +export * from './Tooltip/index.js'; diff --git a/packages/mui-base/src/useButton/index.ts b/packages/mui-base/src/useButton/index.ts index 95acb7a36d..f8111d9064 100644 --- a/packages/mui-base/src/useButton/index.ts +++ b/packages/mui-base/src/useButton/index.ts @@ -1 +1 @@ -export { useButton } from './useButton'; +export { useButton } from './useButton.js'; diff --git a/packages/mui-base/src/useButton/useButton.ts b/packages/mui-base/src/useButton/useButton.ts index 1a7bd3fe60..73b067b08e 100644 --- a/packages/mui-base/src/useButton/useButton.ts +++ b/packages/mui-base/src/useButton/useButton.ts @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; -import { useForkRef } from '../utils/useForkRef'; -import { extractEventHandlers } from '../utils/extractEventHandlers'; -import { useRootElementName } from '../utils/useRootElementName'; -import { EventHandlers } from '../utils/types'; -import { MuiCancellableEvent } from '../utils/MuiCancellableEvent'; +import { useForkRef } from '../utils/useForkRef.js'; +import { extractEventHandlers } from '../utils/extractEventHandlers.js'; +import { useRootElementName } from '../utils/useRootElementName.js'; +import { EventHandlers } from '../utils/types.js'; +import { MuiCancellableEvent } from '../utils/MuiCancellableEvent.js'; export function useButton(parameters: useButton.Parameters = {}): useButton.ReturnValue { const { diff --git a/packages/mui-base/src/useCompound/index.ts b/packages/mui-base/src/useCompound/index.ts index 2fea72863a..06a5be3e68 100644 --- a/packages/mui-base/src/useCompound/index.ts +++ b/packages/mui-base/src/useCompound/index.ts @@ -1,2 +1,2 @@ -export * from './useCompoundParent'; -export * from './useCompoundItem'; +export * from './useCompoundParent.js'; +export * from './useCompoundItem.js'; diff --git a/packages/mui-base/src/useCompound/useCompound.test.tsx b/packages/mui-base/src/useCompound/useCompound.test.tsx index d508805cbf..8e76aae607 100644 --- a/packages/mui-base/src/useCompound/useCompound.test.tsx +++ b/packages/mui-base/src/useCompound/useCompound.test.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { expect } from 'chai'; import { render } from '@mui/internal-test-utils'; -import { CompoundComponentContext, useCompoundParent } from './useCompoundParent'; -import { useCompoundItem } from './useCompoundItem'; +import { CompoundComponentContext, useCompoundParent } from './useCompoundParent.js'; +import { useCompoundItem } from './useCompoundItem.js'; type ItemValue = { value: string; ref: React.RefObject }; diff --git a/packages/mui-base/src/useCompound/useCompoundItem.ts b/packages/mui-base/src/useCompound/useCompoundItem.ts index 1c65a8d8da..b9cbe1d0e2 100644 --- a/packages/mui-base/src/useCompound/useCompoundItem.ts +++ b/packages/mui-base/src/useCompound/useCompoundItem.ts @@ -5,7 +5,7 @@ import { CompoundComponentContext, CompoundComponentContextValue, KeyGenerator, -} from './useCompoundParent'; +} from './useCompoundParent.js'; export interface UseCompoundItemReturnValue { /** diff --git a/packages/mui-base/src/useList/ListContext.ts b/packages/mui-base/src/useList/ListContext.ts index 323a10023a..8b1568712b 100644 --- a/packages/mui-base/src/useList/ListContext.ts +++ b/packages/mui-base/src/useList/ListContext.ts @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { ListAction } from './listActions.types'; -import { ListItemState } from './useList.types'; +import { ListAction } from './listActions.types.js'; +import { ListItemState } from './useList.types.js'; export interface ListContextValue { dispatch: (action: ListAction) => void; diff --git a/packages/mui-base/src/useList/index.ts b/packages/mui-base/src/useList/index.ts index 1d6568987e..f9f1eda871 100644 --- a/packages/mui-base/src/useList/index.ts +++ b/packages/mui-base/src/useList/index.ts @@ -1,9 +1,9 @@ -export { useList } from './useList'; -export * from './useList.types'; +export { useList } from './useList.js'; +export * from './useList.types.js'; -export { useListItem } from './useListItem'; -export * from './useListItem.types'; +export { useListItem } from './useListItem.js'; +export * from './useListItem.types.js'; -export * from './listReducer'; -export * from './listActions.types'; -export * from './ListContext'; +export * from './listReducer.js'; +export * from './listActions.types.js'; +export * from './ListContext.js'; diff --git a/packages/mui-base/src/useList/listReducer.test.ts b/packages/mui-base/src/useList/listReducer.test.ts index 1a60ac1f74..758f579719 100644 --- a/packages/mui-base/src/useList/listReducer.test.ts +++ b/packages/mui-base/src/useList/listReducer.test.ts @@ -1,8 +1,8 @@ import * as React from 'react'; import { expect } from 'chai'; -import { listReducer } from './listReducer'; -import { ListReducerAction, ListState } from './useList.types'; -import { ListActionTypes } from './listActions.types'; +import { listReducer } from './listReducer.js'; +import { ListReducerAction, ListState } from './useList.types.js'; +import { ListActionTypes } from './listActions.types.js'; describe('listReducer', () => { describe('action: blur', () => { diff --git a/packages/mui-base/src/useList/listReducer.ts b/packages/mui-base/src/useList/listReducer.ts index 975d692834..c3a4f918bc 100644 --- a/packages/mui-base/src/useList/listReducer.ts +++ b/packages/mui-base/src/useList/listReducer.ts @@ -1,5 +1,5 @@ -import { ListActionTypes } from './listActions.types'; -import { ListState, ListReducerAction, ListActionContext, SelectionMode } from './useList.types'; +import { ListActionTypes } from './listActions.types.js'; +import { ListState, ListReducerAction, ListActionContext, SelectionMode } from './useList.types.js'; type ItemPredicate = (item: ItemValue, index: number) => boolean; diff --git a/packages/mui-base/src/useList/useList.test.tsx b/packages/mui-base/src/useList/useList.test.tsx index ca25e9101b..bfe8b8bb8f 100644 --- a/packages/mui-base/src/useList/useList.test.tsx +++ b/packages/mui-base/src/useList/useList.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { SinonSpy, spy } from 'sinon'; import { createRenderer, createEvent, fireEvent } from '@mui/internal-test-utils'; -import { useList } from './useList'; +import { useList } from './useList.js'; describe('useList', () => { const { render } = createRenderer(); diff --git a/packages/mui-base/src/useList/useList.ts b/packages/mui-base/src/useList/useList.ts index 92f922e3c0..319549c664 100644 --- a/packages/mui-base/src/useList/useList.ts +++ b/packages/mui-base/src/useList/useList.ts @@ -8,22 +8,22 @@ import { ListState, ListActionContext, UseListReturnValue, -} from './useList.types'; -import { ListActionTypes, ListAction } from './listActions.types'; -import { ListContextValue } from './ListContext'; -import { listReducer as defaultReducer } from './listReducer'; +} from './useList.types.js'; +import { ListActionTypes, ListAction } from './listActions.types.js'; +import { ListContextValue } from './ListContext.js'; +import { listReducer as defaultReducer } from './listReducer.js'; -import { useControllableReducer } from '../utils/useControllableReducer'; +import { useControllableReducer } from '../utils/useControllableReducer.js'; import { ControllableReducerAction, StateChangeCallback, StateComparers, -} from '../utils/useControllableReducer.types'; -import { areArraysEqual } from '../utils/areArraysEqual'; -import { useTextNavigation } from '../utils/useTextNavigation'; -import { MuiCancellableEvent } from '../utils/MuiCancellableEvent'; -import { extractEventHandlers } from '../utils/extractEventHandlers'; -import { EventHandlers } from '../utils/types'; +} from '../utils/useControllableReducer.types.js'; +import { areArraysEqual } from '../utils/areArraysEqual.js'; +import { useTextNavigation } from '../utils/useTextNavigation.js'; +import { MuiCancellableEvent } from '../utils/MuiCancellableEvent.js'; +import { extractEventHandlers } from '../utils/extractEventHandlers.js'; +import { EventHandlers } from '../utils/types.js'; const EMPTY_OBJECT = {}; const NOOP = () => {}; diff --git a/packages/mui-base/src/useList/useList.types.ts b/packages/mui-base/src/useList/useList.types.ts index 33c12b4386..726af9563e 100644 --- a/packages/mui-base/src/useList/useList.types.ts +++ b/packages/mui-base/src/useList/useList.types.ts @@ -1,13 +1,13 @@ import * as React from 'react'; import { Simplify } from '@mui/types'; -import { ListAction } from './listActions.types'; +import { ListAction } from './listActions.types.js'; import { ActionWithContext, ControllableReducerAction, StateChangeCallback, -} from '../utils/useControllableReducer.types'; -import type { ListContextValue } from './ListContext'; -import { MuiCancellableEventHandler } from '../utils/MuiCancellableEvent'; +} from '../utils/useControllableReducer.types.js'; +import type { ListContextValue } from './ListContext.js'; +import { MuiCancellableEventHandler } from '../utils/MuiCancellableEvent.js'; type ListActionContextRequiredKeys = | 'disabledItemsFocusable' diff --git a/packages/mui-base/src/useList/useListItem.ts b/packages/mui-base/src/useList/useListItem.ts index 9999748450..4308d15478 100644 --- a/packages/mui-base/src/useList/useListItem.ts +++ b/packages/mui-base/src/useList/useListItem.ts @@ -1,10 +1,10 @@ 'use client'; import * as React from 'react'; -import { extractEventHandlers } from '../utils/extractEventHandlers'; -import { EventHandlers } from '../utils/types'; -import { UseListItemParameters, UseListItemReturnValue } from './useListItem.types'; -import { ListActionTypes } from './listActions.types'; -import { ListContext } from './ListContext'; +import { extractEventHandlers } from '../utils/extractEventHandlers.js'; +import { EventHandlers } from '../utils/types.js'; +import { UseListItemParameters, UseListItemReturnValue } from './useListItem.types.js'; +import { ListActionTypes } from './listActions.types.js'; +import { ListContext } from './ListContext.js'; /** * Contains the logic for an item of a list-like component (for example Select, Menu, etc.). diff --git a/packages/mui-base/src/utils/collapsibleOpenStateMapping.ts b/packages/mui-base/src/utils/collapsibleOpenStateMapping.ts index 6f35357a7a..b1e27bcebc 100644 --- a/packages/mui-base/src/utils/collapsibleOpenStateMapping.ts +++ b/packages/mui-base/src/utils/collapsibleOpenStateMapping.ts @@ -1,4 +1,4 @@ -import type { CustomStyleHookMapping } from './getStyleHookProps'; +import type { CustomStyleHookMapping } from './getStyleHookProps.js'; export const triggerOpenStateMapping: CustomStyleHookMapping<{ open: boolean }> = { open(value) { diff --git a/packages/mui-base/src/utils/evaluateRenderProp.test.tsx b/packages/mui-base/src/utils/evaluateRenderProp.test.tsx index be21e9641b..32932dc2dd 100644 --- a/packages/mui-base/src/utils/evaluateRenderProp.test.tsx +++ b/packages/mui-base/src/utils/evaluateRenderProp.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { evaluateRenderProp } from './evaluateRenderProp'; +import { evaluateRenderProp } from './evaluateRenderProp.js'; describe('evaluateRenderProp', () => { describe('function', () => { diff --git a/packages/mui-base/src/utils/evaluateRenderProp.ts b/packages/mui-base/src/utils/evaluateRenderProp.ts index a87db824e0..e0c60aa156 100644 --- a/packages/mui-base/src/utils/evaluateRenderProp.ts +++ b/packages/mui-base/src/utils/evaluateRenderProp.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import type { BaseUIComponentProps } from './types'; -import { mergeReactProps } from './mergeReactProps'; +import type { BaseUIComponentProps } from './types.js'; +import { mergeReactProps } from './mergeReactProps.js'; export function evaluateRenderProp( render: BaseUIComponentProps['render'], diff --git a/packages/mui-base/src/utils/extractEventHandlers.test.ts b/packages/mui-base/src/utils/extractEventHandlers.test.ts index 130f5dd514..9b144521ee 100644 --- a/packages/mui-base/src/utils/extractEventHandlers.test.ts +++ b/packages/mui-base/src/utils/extractEventHandlers.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { extractEventHandlers } from './extractEventHandlers'; +import { extractEventHandlers } from './extractEventHandlers.js'; describe('extractEventHandlers', () => { it('extracts the fields starting with `on[A-Z]` and being a function', () => { diff --git a/packages/mui-base/src/utils/extractEventHandlers.ts b/packages/mui-base/src/utils/extractEventHandlers.ts index e3998c358e..1c6faa373a 100644 --- a/packages/mui-base/src/utils/extractEventHandlers.ts +++ b/packages/mui-base/src/utils/extractEventHandlers.ts @@ -1,4 +1,4 @@ -import { EventHandlers } from './types'; +import { EventHandlers } from './types.js'; /** * Extracts event handlers from a given object. diff --git a/packages/mui-base/src/utils/getInertValue.ts b/packages/mui-base/src/utils/getInertValue.ts index c1f1b9c435..f2a1824192 100644 --- a/packages/mui-base/src/utils/getInertValue.ts +++ b/packages/mui-base/src/utils/getInertValue.ts @@ -1,4 +1,4 @@ -import { isReactVersionAtLeast } from './reactVersion'; +import { isReactVersionAtLeast } from './reactVersion.js'; /** * Return the inert attribute taking into consideration the React version. diff --git a/packages/mui-base/src/utils/getStyleHookProps.test.ts b/packages/mui-base/src/utils/getStyleHookProps.test.ts index 5b998195e8..99ba95ba90 100644 --- a/packages/mui-base/src/utils/getStyleHookProps.test.ts +++ b/packages/mui-base/src/utils/getStyleHookProps.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { getStyleHookProps } from './getStyleHookProps'; +import { getStyleHookProps } from './getStyleHookProps.js'; describe('getStyleHookProps', () => { it('converts the state fields to data attributes', () => { diff --git a/packages/mui-base/src/utils/index.ts b/packages/mui-base/src/utils/index.ts index 579f5c2262..18ec844a92 100644 --- a/packages/mui-base/src/utils/index.ts +++ b/packages/mui-base/src/utils/index.ts @@ -1,7 +1,7 @@ // Public utils -export * from './prepareForSlot'; -export * from './MuiCancellableEvent'; -export * from './useScrollLock'; -export * from './useTransitionStatus'; -export * from './visuallyHidden'; +export * from './prepareForSlot.js'; +export * from './MuiCancellableEvent.js'; +export * from './useScrollLock.js'; +export * from './useTransitionStatus.js'; +export * from './visuallyHidden.js'; diff --git a/packages/mui-base/src/utils/mergeReactProps.test.ts b/packages/mui-base/src/utils/mergeReactProps.test.ts index e8e2e9efc3..a4a0097dd3 100644 --- a/packages/mui-base/src/utils/mergeReactProps.test.ts +++ b/packages/mui-base/src/utils/mergeReactProps.test.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { spy } from 'sinon'; -import { mergeReactProps } from './mergeReactProps'; +import { mergeReactProps } from './mergeReactProps.js'; describe('mergeReactProps', () => { it('merges event handlers', () => { diff --git a/packages/mui-base/src/utils/mergeReactProps.ts b/packages/mui-base/src/utils/mergeReactProps.ts index 61cac24252..4c6cf6ed17 100644 --- a/packages/mui-base/src/utils/mergeReactProps.ts +++ b/packages/mui-base/src/utils/mergeReactProps.ts @@ -1,5 +1,5 @@ import type * as React from 'react'; -import type { BaseUIEvent, WithBaseUIEvent } from './types'; +import type { BaseUIEvent, WithBaseUIEvent } from './types.js'; /** * Merges multiple sets of React props such that their event handlers are called in sequence (the user's diff --git a/packages/mui-base/src/utils/popupOpenStateMapping.ts b/packages/mui-base/src/utils/popupOpenStateMapping.ts index a17d2248f4..4cd67ad858 100644 --- a/packages/mui-base/src/utils/popupOpenStateMapping.ts +++ b/packages/mui-base/src/utils/popupOpenStateMapping.ts @@ -1,4 +1,4 @@ -import type { CustomStyleHookMapping } from './getStyleHookProps'; +import type { CustomStyleHookMapping } from './getStyleHookProps.js'; export const triggerOpenStateMapping: CustomStyleHookMapping<{ open: boolean }> = { open(value) { diff --git a/packages/mui-base/src/utils/prepareForSlot.spec.tsx b/packages/mui-base/src/utils/prepareForSlot.spec.tsx index 06da36af5f..b2ac14988d 100644 --- a/packages/mui-base/src/utils/prepareForSlot.spec.tsx +++ b/packages/mui-base/src/utils/prepareForSlot.spec.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { prepareForSlot } from './prepareForSlot'; +import { prepareForSlot } from './prepareForSlot.js'; interface Props { a: string; diff --git a/packages/mui-base/src/utils/useAnchorPositioning.ts b/packages/mui-base/src/utils/useAnchorPositioning.ts index b5d468fa5f..6278f81cac 100644 --- a/packages/mui-base/src/utils/useAnchorPositioning.ts +++ b/packages/mui-base/src/utils/useAnchorPositioning.ts @@ -19,7 +19,7 @@ import { type FloatingContext, } from '@floating-ui/react'; import { getSide, getAlignment } from '@floating-ui/utils'; -import { useEnhancedEffect } from './useEnhancedEffect'; +import { useEnhancedEffect } from './useEnhancedEffect.js'; export type Side = 'top' | 'bottom' | 'left' | 'right'; export type Alignment = 'start' | 'center' | 'end'; diff --git a/packages/mui-base/src/utils/useAnimatedElement.ts b/packages/mui-base/src/utils/useAnimatedElement.ts index 3a947023b9..f1f3352f42 100644 --- a/packages/mui-base/src/utils/useAnimatedElement.ts +++ b/packages/mui-base/src/utils/useAnimatedElement.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { useAnimationsFinished } from './useAnimationsFinished'; -import { useTransitionStatus } from './useTransitionStatus'; +import { useAnimationsFinished } from './useAnimationsFinished.js'; +import { useTransitionStatus } from './useTransitionStatus.js'; interface UseAnimatedElementParameters { open: boolean; diff --git a/packages/mui-base/src/utils/useAnimationsFinished.ts b/packages/mui-base/src/utils/useAnimationsFinished.ts index ce5865f1ad..3b29c96d68 100644 --- a/packages/mui-base/src/utils/useAnimationsFinished.ts +++ b/packages/mui-base/src/utils/useAnimationsFinished.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { useEventCallback } from './useEventCallback'; +import { useEventCallback } from './useEventCallback.js'; /** * Executes a function once all animations have finished on the provided element. diff --git a/packages/mui-base/src/utils/useComponentRenderer.ts b/packages/mui-base/src/utils/useComponentRenderer.ts index 00788adbfa..bf9b5dcf19 100644 --- a/packages/mui-base/src/utils/useComponentRenderer.ts +++ b/packages/mui-base/src/utils/useComponentRenderer.ts @@ -1,10 +1,10 @@ import * as React from 'react'; -import type { ComponentRenderFn } from './types'; -import { CustomStyleHookMapping, getStyleHookProps } from './getStyleHookProps'; -import { resolveClassName } from './resolveClassName'; -import { evaluateRenderProp } from './evaluateRenderProp'; -import { useRenderPropForkRef } from './useRenderPropForkRef'; -import { defaultRenderFunctions } from './defaultRenderFunctions'; +import type { ComponentRenderFn } from './types.js'; +import { CustomStyleHookMapping, getStyleHookProps } from './getStyleHookProps.js'; +import { resolveClassName } from './resolveClassName.js'; +import { evaluateRenderProp } from './evaluateRenderProp.js'; +import { useRenderPropForkRef } from './useRenderPropForkRef.js'; +import { defaultRenderFunctions } from './defaultRenderFunctions.js'; export interface ComponentRendererSettings { /** diff --git a/packages/mui-base/src/utils/useControllableReducer.test.tsx b/packages/mui-base/src/utils/useControllableReducer.test.tsx index 37e043b2c7..c1634f4d73 100644 --- a/packages/mui-base/src/utils/useControllableReducer.test.tsx +++ b/packages/mui-base/src/utils/useControllableReducer.test.tsx @@ -2,8 +2,8 @@ import { expect } from 'chai'; import * as React from 'react'; import { spy } from 'sinon'; import { createRenderer } from '@mui/internal-test-utils'; -import { useControllableReducer } from './useControllableReducer'; -import { ControllableReducerParameters } from './useControllableReducer.types'; +import { useControllableReducer } from './useControllableReducer.js'; +import { ControllableReducerParameters } from './useControllableReducer.types.js'; interface TestState { make: string; diff --git a/packages/mui-base/src/utils/useControllableReducer.ts b/packages/mui-base/src/utils/useControllableReducer.ts index 544a46e84a..cef5c7c133 100644 --- a/packages/mui-base/src/utils/useControllableReducer.ts +++ b/packages/mui-base/src/utils/useControllableReducer.ts @@ -6,7 +6,7 @@ import { ControllableReducerParameters, StateChangeCallback, StateComparers, -} from './useControllableReducer.types'; +} from './useControllableReducer.types.js'; function areEqual(a: any, b: any): boolean { return a === b; diff --git a/packages/mui-base/src/utils/useLatestRef.ts b/packages/mui-base/src/utils/useLatestRef.ts index f55403a8e1..dd08a69cca 100644 --- a/packages/mui-base/src/utils/useLatestRef.ts +++ b/packages/mui-base/src/utils/useLatestRef.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { useEnhancedEffect } from './useEnhancedEffect'; +import { useEnhancedEffect } from './useEnhancedEffect.js'; /** * @ignore - internal hook. diff --git a/packages/mui-base/src/utils/useOpenInteractionType.ts b/packages/mui-base/src/utils/useOpenInteractionType.ts index f868104ddd..e591da6c6b 100644 --- a/packages/mui-base/src/utils/useOpenInteractionType.ts +++ b/packages/mui-base/src/utils/useOpenInteractionType.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { InteractionType, useEnhancedClickHandler } from './useEnhancedClickHandler'; +import { InteractionType, useEnhancedClickHandler } from './useEnhancedClickHandler.js'; /** * Determines the interaction type (keyboard, mouse, touch, etc.) that opened the component. diff --git a/packages/mui-base/src/utils/useRenderPropForkRef.ts b/packages/mui-base/src/utils/useRenderPropForkRef.ts index 828a578d9d..66e3bc3ef3 100644 --- a/packages/mui-base/src/utils/useRenderPropForkRef.ts +++ b/packages/mui-base/src/utils/useRenderPropForkRef.ts @@ -1,7 +1,7 @@ import * as React from 'react'; -import type { BaseUIComponentProps } from './types'; -import { useForkRef } from './useForkRef'; -import { isReactVersionAtLeast } from './reactVersion'; +import type { BaseUIComponentProps } from './types.js'; +import { useForkRef } from './useForkRef.js'; +import { isReactVersionAtLeast } from './reactVersion.js'; /** * Merges the rendering element's `ref` in addition to the other `ref`s. diff --git a/packages/mui-base/src/utils/useScrollLock.ts b/packages/mui-base/src/utils/useScrollLock.ts index f358c60418..18bad3a620 100644 --- a/packages/mui-base/src/utils/useScrollLock.ts +++ b/packages/mui-base/src/utils/useScrollLock.ts @@ -1,6 +1,6 @@ -import { isIOS } from './detectBrowser'; -import { ownerDocument } from './owner'; -import { useEnhancedEffect } from './useEnhancedEffect'; +import { isIOS } from './detectBrowser.js'; +import { ownerDocument } from './owner.js'; +import { useEnhancedEffect } from './useEnhancedEffect.js'; let originalHtmlStyles = {}; let originalBodyStyles = {}; diff --git a/packages/mui-base/src/utils/useTransitionStatus.ts b/packages/mui-base/src/utils/useTransitionStatus.ts index b7fe4e53df..16b6fd26b5 100644 --- a/packages/mui-base/src/utils/useTransitionStatus.ts +++ b/packages/mui-base/src/utils/useTransitionStatus.ts @@ -1,6 +1,6 @@ 'use client'; import * as React from 'react'; -import { useEnhancedEffect } from './useEnhancedEffect'; +import { useEnhancedEffect } from './useEnhancedEffect.js'; export type TransitionStatus = 'entering' | 'exiting' | undefined; diff --git a/packages/mui-base/test/conformanceTests/className.tsx b/packages/mui-base/test/conformanceTests/className.tsx index b05efdb4c3..75a1674795 100644 --- a/packages/mui-base/test/conformanceTests/className.tsx +++ b/packages/mui-base/test/conformanceTests/className.tsx @@ -3,8 +3,8 @@ import { expect } from 'chai'; import type { ConformantComponentProps, BaseUiConformanceTestsOptions, -} from '../describeConformance'; -import { throwMissingPropError } from './utils'; +} from '../describeConformance.js'; +import { throwMissingPropError } from './utils.js'; export function testClassName( element: React.ReactElement, diff --git a/packages/mui-base/test/conformanceTests/propForwarding.tsx b/packages/mui-base/test/conformanceTests/propForwarding.tsx index 79d3936a76..720692a987 100644 --- a/packages/mui-base/test/conformanceTests/propForwarding.tsx +++ b/packages/mui-base/test/conformanceTests/propForwarding.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; import { flushMicrotasks, randomStringValue } from '@mui/internal-test-utils'; -import { throwMissingPropError } from './utils'; +import { throwMissingPropError } from './utils.js'; import type { ConformantComponentProps, BaseUiConformanceTestsOptions, -} from '../describeConformance'; +} from '../describeConformance.js'; export function testPropForwarding( element: React.ReactElement, diff --git a/packages/mui-base/test/conformanceTests/refForwarding.tsx b/packages/mui-base/test/conformanceTests/refForwarding.tsx index 9279b1df27..b98714f8ea 100644 --- a/packages/mui-base/test/conformanceTests/refForwarding.tsx +++ b/packages/mui-base/test/conformanceTests/refForwarding.tsx @@ -3,8 +3,8 @@ import { expect } from 'chai'; import type { ConformantComponentProps, BaseUiConformanceTestsOptions, -} from '../describeConformance'; -import { throwMissingPropError } from './utils'; +} from '../describeConformance.js'; +import { throwMissingPropError } from './utils.js'; async function verifyRef( element: React.ReactElement, diff --git a/packages/mui-base/test/conformanceTests/renderProp.tsx b/packages/mui-base/test/conformanceTests/renderProp.tsx index 59f4e2190e..a739b74bcd 100644 --- a/packages/mui-base/test/conformanceTests/renderProp.tsx +++ b/packages/mui-base/test/conformanceTests/renderProp.tsx @@ -4,8 +4,8 @@ import { randomStringValue } from '@mui/internal-test-utils'; import type { ConformantComponentProps, BaseUiConformanceTestsOptions, -} from '../describeConformance'; -import { throwMissingPropError } from './utils'; +} from '../describeConformance.js'; +import { throwMissingPropError } from './utils.js'; export function testRenderProp( element: React.ReactElement, diff --git a/packages/mui-base/test/describeConformance.tsx b/packages/mui-base/test/describeConformance.tsx index d5daea9ac9..905271f236 100644 --- a/packages/mui-base/test/describeConformance.tsx +++ b/packages/mui-base/test/describeConformance.tsx @@ -5,10 +5,10 @@ import { RenderOptions, createDescribe, } from '@mui/internal-test-utils'; -import { testPropForwarding } from './conformanceTests/propForwarding'; -import { testRefForwarding } from './conformanceTests/refForwarding'; -import { testRenderProp } from './conformanceTests/renderProp'; -import { testClassName } from './conformanceTests/className'; +import { testPropForwarding } from './conformanceTests/propForwarding.js'; +import { testRefForwarding } from './conformanceTests/refForwarding.js'; +import { testRenderProp } from './conformanceTests/renderProp.js'; +import { testClassName } from './conformanceTests/className.js'; export type ConformantComponentProps = { render?: React.ReactElement | ((props: Record) => React.ReactNode); diff --git a/packages/mui-base/test/index.ts b/packages/mui-base/test/index.ts index 19595a45e5..54e6f5e26b 100644 --- a/packages/mui-base/test/index.ts +++ b/packages/mui-base/test/index.ts @@ -1,2 +1,2 @@ -export { createRenderer } from './createRenderer'; -export { describeConformance } from './describeConformance'; +export { createRenderer } from './createRenderer.js'; +export { describeConformance } from './describeConformance.js'; diff --git a/packages/mui-base/vitest.config.ts b/packages/mui-base/vitest.config.ts index b14b2143d4..5d77140ef7 100644 --- a/packages/mui-base/vitest.config.ts +++ b/packages/mui-base/vitest.config.ts @@ -1,5 +1,5 @@ import { mergeConfig, defineProject } from 'vitest/config'; -import sharedConfig from '../../vitest.shared'; +import sharedConfig from '../../vitest.shared.js'; export default mergeConfig( sharedConfig, From 2cbb886c04c030ee6542f1e0bf8739be4989d5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 8 Nov 2024 14:42:13 +0100 Subject: [PATCH 2/5] Configure Next.js to find nonexisting .js files --- docs/next.config.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 5486f626e4..538c256dc5 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -72,6 +72,11 @@ const nextConfig = { ...config.resolve.alias, docs: path.resolve(workspaceRoot, 'docs'), }, + extensionAlias: { + '.js': ['.js', '.jsx', '.ts', '.tsx'], + '.mjs': ['.mjs', '.mts'], + '.cjs': ['.cjs', '.cts'], + }, }, module: { ...config.module, From 9a2babe252cf701bfae93f9af74316c757ad121c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 8 Nov 2024 14:47:08 +0100 Subject: [PATCH 3/5] Fix the root test file --- packages/mui-base/src/{index.test.js => index.test.ts} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename packages/mui-base/src/{index.test.js => index.test.ts} (82%) diff --git a/packages/mui-base/src/index.test.js b/packages/mui-base/src/index.test.ts similarity index 82% rename from packages/mui-base/src/index.test.js rename to packages/mui-base/src/index.test.ts index 2409e3ef4a..d5fcbcb261 100644 --- a/packages/mui-base/src/index.test.js +++ b/packages/mui-base/src/index.test.ts @@ -4,7 +4,6 @@ * import the entire lib for coverage reporting */ import { expect } from 'chai'; -// eslint-disable-next-line import/no-unresolved import * as BaseUI from './index.js'; describe('@base_ui/react', () => { @@ -14,7 +13,7 @@ describe('@base_ui/react', () => { it('should not have undefined exports', () => { Object.keys(BaseUI).forEach((exportKey) => { - expect(Boolean(BaseUI[exportKey])).to.equal(true); + expect(Boolean((BaseUI as Record)[exportKey])).to.equal(true); }); }); }); From 35b8c2c9dbb9fd389b663c8b7575e8a9ceafa0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 8 Nov 2024 15:09:47 +0100 Subject: [PATCH 4/5] Prettier --- packages/mui-base/src/Tabs/Root/TabsProvider.tsx | 5 ++++- packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/mui-base/src/Tabs/Root/TabsProvider.tsx b/packages/mui-base/src/Tabs/Root/TabsProvider.tsx index 62dd787780..94bad27a35 100644 --- a/packages/mui-base/src/Tabs/Root/TabsProvider.tsx +++ b/packages/mui-base/src/Tabs/Root/TabsProvider.tsx @@ -2,7 +2,10 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { TabsRootContext } from './TabsRootContext.js'; -import { CompoundComponentContext, CompoundComponentContextValue } from '../../useCompound/index.js'; +import { + CompoundComponentContext, + CompoundComponentContextValue, +} from '../../useCompound/index.js'; export type TabPanelMetadata = { id: string | undefined; diff --git a/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx b/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx index ef768b79e2..5f0d2d3165 100644 --- a/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx +++ b/packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx @@ -4,7 +4,10 @@ import PropTypes from 'prop-types'; import { TabsListContext } from './TabsListContext.js'; import { TabMetadata } from '../Root/useTabsRoot.js'; import { ListContext, ListContextValue } from '../../useList/ListContext.js'; -import { CompoundComponentContext, CompoundComponentContextValue } from '../../useCompound/index.js'; +import { + CompoundComponentContext, + CompoundComponentContextValue, +} from '../../useCompound/index.js'; import { refType } from '../../utils/proptypes.js'; export type TabsListProviderValue = CompoundComponentContextValue & From aebc7eeceaf620073455596f4a0e52d8d1e98219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 8 Nov 2024 15:11:17 +0100 Subject: [PATCH 5/5] Fix regression tests config --- test/regressions/webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/regressions/webpack.config.js b/test/regressions/webpack.config.js index 301dab27e7..12d194880b 100644 --- a/test/regressions/webpack.config.js +++ b/test/regressions/webpack.config.js @@ -88,6 +88,11 @@ module.exports = { // Exclude polyfill and treat 'zlib' as an empty module since it is not required. next -> gzip-size relies on it. zlib: false, }, + extensionAlias: { + '.js': ['.js', '.jsx', '.ts', '.tsx'], + '.mjs': ['.mjs', '.mts'], + '.cjs': ['.cjs', '.cts'], + }, }, // TODO: 'browserslist:modern' // See https://github.com/webpack/webpack/issues/14203