From 2ba6d613ab137342905988956f8f37041715a97a Mon Sep 17 00:00:00 2001 From: Albert Yu Date: Tue, 19 Sep 2023 15:51:52 +0800 Subject: [PATCH] Revert "Remove use client from Base UI index files" This reverts commit 3874182b1abee7e1925c229ae5366dcbeaf48061. --- packages/mui-base/src/Badge/index.ts | 1 + packages/mui-base/src/Button/index.ts | 1 + packages/mui-base/src/Input/index.ts | 1 + packages/mui-base/src/MenuButton/index.ts | 1 + packages/mui-base/src/MultiSelect/index.ts | 1 + packages/mui-base/src/NoSsr/index.ts | 1 + packages/mui-base/src/Option/index.ts | 1 + packages/mui-base/src/OptionGroup/index.ts | 1 + packages/mui-base/src/Popper/index.ts | 1 + packages/mui-base/src/Portal/index.ts | 1 + packages/mui-base/src/Select/index.ts | 1 + packages/mui-base/src/Slider/index.ts | 1 + packages/mui-base/src/Snackbar/index.ts | 1 + packages/mui-base/src/Switch/index.ts | 1 + packages/mui-base/src/Tab/index.ts | 1 + packages/mui-base/src/TabPanel/index.ts | 1 + packages/mui-base/src/TablePagination/index.ts | 1 + packages/mui-base/src/Tabs/index.ts | 1 + packages/mui-base/src/TabsList/index.ts | 1 + packages/mui-base/src/TextareaAutosize/index.ts | 1 + packages/mui-base/src/Unstable_NumberInput/index.ts | 1 + packages/mui-base/src/Unstable_Popup/index.ts | 1 + packages/mui-base/src/index.js | 1 + packages/mui-base/src/unstable_useModal/index.ts | 1 + packages/mui-base/src/unstable_useNumberInput/index.ts | 1 + packages/mui-base/src/useAutocomplete/index.js | 1 + packages/mui-base/src/useBadge/index.ts | 1 + packages/mui-base/src/useButton/index.ts | 1 + packages/mui-base/src/useDropdown/index.ts | 1 + packages/mui-base/src/useInput/index.ts | 1 + packages/mui-base/src/useList/index.ts | 1 + packages/mui-base/src/useMenu/index.ts | 1 + packages/mui-base/src/useMenuButton/index.ts | 1 + packages/mui-base/src/useMenuItem/index.ts | 1 + packages/mui-base/src/useOption/index.ts | 1 + packages/mui-base/src/useSelect/index.ts | 1 + packages/mui-base/src/useSlider/index.ts | 1 + packages/mui-base/src/useSnackbar/index.ts | 1 + packages/mui-base/src/useSwitch/index.ts | 1 + packages/mui-base/src/useTab/index.ts | 1 + packages/mui-base/src/useTabPanel/index.ts | 1 + packages/mui-base/src/useTabs/index.ts | 1 + packages/mui-base/src/useTabsList/index.ts | 1 + packages/mui-base/src/utils/index.ts | 1 + 44 files changed, 44 insertions(+) diff --git a/packages/mui-base/src/Badge/index.ts b/packages/mui-base/src/Badge/index.ts index 8ffeb88dbba238..b208878eab3a79 100644 --- a/packages/mui-base/src/Badge/index.ts +++ b/packages/mui-base/src/Badge/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Badge } from './Badge'; export * from './Badge.types'; export * from './badgeClasses'; diff --git a/packages/mui-base/src/Button/index.ts b/packages/mui-base/src/Button/index.ts index d23520e56dc38a..e5bd68604d8616 100644 --- a/packages/mui-base/src/Button/index.ts +++ b/packages/mui-base/src/Button/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Button } from './Button'; export * from './buttonClasses'; diff --git a/packages/mui-base/src/Input/index.ts b/packages/mui-base/src/Input/index.ts index a803fa5897284e..01badf40652a64 100644 --- a/packages/mui-base/src/Input/index.ts +++ b/packages/mui-base/src/Input/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Input } from './Input'; export * from './Input.types'; diff --git a/packages/mui-base/src/MenuButton/index.ts b/packages/mui-base/src/MenuButton/index.ts index fcc222955256b7..721bc436d4aa5f 100644 --- a/packages/mui-base/src/MenuButton/index.ts +++ b/packages/mui-base/src/MenuButton/index.ts @@ -1,3 +1,4 @@ +'use client'; export { MenuButton } from './MenuButton'; export * from './MenuButton.types'; diff --git a/packages/mui-base/src/MultiSelect/index.ts b/packages/mui-base/src/MultiSelect/index.ts index 7140f36c68d271..0cefde7155a3f5 100644 --- a/packages/mui-base/src/MultiSelect/index.ts +++ b/packages/mui-base/src/MultiSelect/index.ts @@ -1 +1,2 @@ +'use client'; export { MultiSelect } from './MultiSelect'; diff --git a/packages/mui-base/src/NoSsr/index.ts b/packages/mui-base/src/NoSsr/index.ts index 546b249ab2a159..f13019fe10e496 100644 --- a/packages/mui-base/src/NoSsr/index.ts +++ b/packages/mui-base/src/NoSsr/index.ts @@ -1,2 +1,3 @@ +'use client'; export { NoSsr } from './NoSsr'; export * from './NoSsr.types'; diff --git a/packages/mui-base/src/Option/index.ts b/packages/mui-base/src/Option/index.ts index e24160d9d9e896..aff8577b4c7f60 100644 --- a/packages/mui-base/src/Option/index.ts +++ b/packages/mui-base/src/Option/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Option } from './Option'; export * from './Option.types'; diff --git a/packages/mui-base/src/OptionGroup/index.ts b/packages/mui-base/src/OptionGroup/index.ts index 3a0f78ea6341fd..a75ed89f2baa42 100644 --- a/packages/mui-base/src/OptionGroup/index.ts +++ b/packages/mui-base/src/OptionGroup/index.ts @@ -1,3 +1,4 @@ +'use client'; export { OptionGroup } from './OptionGroup'; export * from './OptionGroup.types'; diff --git a/packages/mui-base/src/Popper/index.ts b/packages/mui-base/src/Popper/index.ts index d03b4dee371934..7ebed8baf38471 100644 --- a/packages/mui-base/src/Popper/index.ts +++ b/packages/mui-base/src/Popper/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Popper } from './Popper'; export type { PopperPlacementType, diff --git a/packages/mui-base/src/Portal/index.ts b/packages/mui-base/src/Portal/index.ts index 605321409b2dfb..96ba019d5a6662 100644 --- a/packages/mui-base/src/Portal/index.ts +++ b/packages/mui-base/src/Portal/index.ts @@ -1,2 +1,3 @@ +'use client'; export { Portal } from './Portal'; export * from './Portal.types'; diff --git a/packages/mui-base/src/Select/index.ts b/packages/mui-base/src/Select/index.ts index 02dc19409172f0..c5bdc3eed2e5e8 100644 --- a/packages/mui-base/src/Select/index.ts +++ b/packages/mui-base/src/Select/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Select } from './Select'; export * from './selectClasses'; diff --git a/packages/mui-base/src/Slider/index.ts b/packages/mui-base/src/Slider/index.ts index 9f88f0dea704f4..8471da75345a5d 100644 --- a/packages/mui-base/src/Slider/index.ts +++ b/packages/mui-base/src/Slider/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Slider } from './Slider'; export * from './Slider.types'; export * from './sliderClasses'; diff --git a/packages/mui-base/src/Snackbar/index.ts b/packages/mui-base/src/Snackbar/index.ts index 69928fa25e7e3c..7f109fda1d2aa8 100644 --- a/packages/mui-base/src/Snackbar/index.ts +++ b/packages/mui-base/src/Snackbar/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Snackbar } from './Snackbar'; export * from './Snackbar.types'; diff --git a/packages/mui-base/src/Switch/index.ts b/packages/mui-base/src/Switch/index.ts index 262700928a490b..6eced9996c3933 100644 --- a/packages/mui-base/src/Switch/index.ts +++ b/packages/mui-base/src/Switch/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Switch } from './Switch'; export * from './Switch.types'; diff --git a/packages/mui-base/src/Tab/index.ts b/packages/mui-base/src/Tab/index.ts index 1bcbf62239164f..57e49f6c0a3301 100644 --- a/packages/mui-base/src/Tab/index.ts +++ b/packages/mui-base/src/Tab/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Tab } from './Tab'; export * from './Tab.types'; diff --git a/packages/mui-base/src/TabPanel/index.ts b/packages/mui-base/src/TabPanel/index.ts index fe6efbb02f7582..bb4daa1483deff 100644 --- a/packages/mui-base/src/TabPanel/index.ts +++ b/packages/mui-base/src/TabPanel/index.ts @@ -1,3 +1,4 @@ +'use client'; export { TabPanel } from './TabPanel'; export * from './TabPanel.types'; diff --git a/packages/mui-base/src/TablePagination/index.ts b/packages/mui-base/src/TablePagination/index.ts index 5df389b39e3838..b816f218d6fb28 100644 --- a/packages/mui-base/src/TablePagination/index.ts +++ b/packages/mui-base/src/TablePagination/index.ts @@ -1,3 +1,4 @@ +'use client'; export { TablePagination } from './TablePagination'; export * from './TablePagination.types'; diff --git a/packages/mui-base/src/Tabs/index.ts b/packages/mui-base/src/Tabs/index.ts index 74e3bbc11c5901..abc967c576aee4 100644 --- a/packages/mui-base/src/Tabs/index.ts +++ b/packages/mui-base/src/Tabs/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Tabs } from './Tabs'; export * from './TabsContext'; export * from './tabsClasses'; diff --git a/packages/mui-base/src/TabsList/index.ts b/packages/mui-base/src/TabsList/index.ts index 949c40dd684d5d..2828f9b042908b 100644 --- a/packages/mui-base/src/TabsList/index.ts +++ b/packages/mui-base/src/TabsList/index.ts @@ -1,3 +1,4 @@ +'use client'; export { TabsList } from './TabsList'; export * from './TabsList.types'; diff --git a/packages/mui-base/src/TextareaAutosize/index.ts b/packages/mui-base/src/TextareaAutosize/index.ts index db9394e5a772c2..50814f03aacbaf 100644 --- a/packages/mui-base/src/TextareaAutosize/index.ts +++ b/packages/mui-base/src/TextareaAutosize/index.ts @@ -1,2 +1,3 @@ +'use client'; export { TextareaAutosize } from './TextareaAutosize'; export * from './TextareaAutosize.types'; diff --git a/packages/mui-base/src/Unstable_NumberInput/index.ts b/packages/mui-base/src/Unstable_NumberInput/index.ts index 6054499cf76658..90624d08f20894 100644 --- a/packages/mui-base/src/Unstable_NumberInput/index.ts +++ b/packages/mui-base/src/Unstable_NumberInput/index.ts @@ -1,3 +1,4 @@ +'use client'; export { NumberInput as Unstable_NumberInput } from './NumberInput'; export * from './numberInputClasses'; export * from './NumberInput.types'; diff --git a/packages/mui-base/src/Unstable_Popup/index.ts b/packages/mui-base/src/Unstable_Popup/index.ts index 2cca58dddf89bf..d352f36e412402 100644 --- a/packages/mui-base/src/Unstable_Popup/index.ts +++ b/packages/mui-base/src/Unstable_Popup/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Popup as Unstable_Popup } from './Popup'; export * from './Popup.types'; export * from './popupClasses'; diff --git a/packages/mui-base/src/index.js b/packages/mui-base/src/index.js index 14cf8e63f6c5e9..36c4f8b5a3624c 100644 --- a/packages/mui-base/src/index.js +++ b/packages/mui-base/src/index.js @@ -1,3 +1,4 @@ +'use client'; export * from './utils'; export * from './Badge'; export * from './Button'; diff --git a/packages/mui-base/src/unstable_useModal/index.ts b/packages/mui-base/src/unstable_useModal/index.ts index e73759cf2012e2..cdfed6b550e5de 100644 --- a/packages/mui-base/src/unstable_useModal/index.ts +++ b/packages/mui-base/src/unstable_useModal/index.ts @@ -1,3 +1,4 @@ +'use client'; export { useModal as unstable_useModal } from './useModal'; export * from './useModal.types'; export * from './ModalManager'; diff --git a/packages/mui-base/src/unstable_useNumberInput/index.ts b/packages/mui-base/src/unstable_useNumberInput/index.ts index 108cb06c2f97e4..b9197013917a74 100644 --- a/packages/mui-base/src/unstable_useNumberInput/index.ts +++ b/packages/mui-base/src/unstable_useNumberInput/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useNumberInput as unstable_useNumberInput } from './useNumberInput'; export * from './useNumberInput.types'; diff --git a/packages/mui-base/src/useAutocomplete/index.js b/packages/mui-base/src/useAutocomplete/index.js index 1c769dc17cdad7..7fea413747e9c0 100644 --- a/packages/mui-base/src/useAutocomplete/index.js +++ b/packages/mui-base/src/useAutocomplete/index.js @@ -1 +1,2 @@ +'use client'; export * from './useAutocomplete'; diff --git a/packages/mui-base/src/useBadge/index.ts b/packages/mui-base/src/useBadge/index.ts index d8376e70c1f11e..220df311fcc197 100644 --- a/packages/mui-base/src/useBadge/index.ts +++ b/packages/mui-base/src/useBadge/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useBadge } from './useBadge'; export * from './useBadge.types'; diff --git a/packages/mui-base/src/useButton/index.ts b/packages/mui-base/src/useButton/index.ts index f52872ae10fc94..53c84ebfd52737 100644 --- a/packages/mui-base/src/useButton/index.ts +++ b/packages/mui-base/src/useButton/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useButton } from './useButton'; export * from './useButton.types'; diff --git a/packages/mui-base/src/useDropdown/index.ts b/packages/mui-base/src/useDropdown/index.ts index 31bf24a2a9704d..79fc0ef7f3c3de 100644 --- a/packages/mui-base/src/useDropdown/index.ts +++ b/packages/mui-base/src/useDropdown/index.ts @@ -1,3 +1,4 @@ +'use client'; export * from './useDropdown'; export * from './useDropdown.types'; export * from './DropdownContext'; diff --git a/packages/mui-base/src/useInput/index.ts b/packages/mui-base/src/useInput/index.ts index 34acd62df73202..c37d6a9cd223c5 100644 --- a/packages/mui-base/src/useInput/index.ts +++ b/packages/mui-base/src/useInput/index.ts @@ -1,3 +1,4 @@ +'use client'; export { useInput } from './useInput'; export * from './useInput.types'; diff --git a/packages/mui-base/src/useList/index.ts b/packages/mui-base/src/useList/index.ts index 1d6568987ef809..045af1c489c25f 100644 --- a/packages/mui-base/src/useList/index.ts +++ b/packages/mui-base/src/useList/index.ts @@ -1,3 +1,4 @@ +'use client'; export { useList } from './useList'; export * from './useList.types'; diff --git a/packages/mui-base/src/useMenu/index.ts b/packages/mui-base/src/useMenu/index.ts index dbd252273d5452..0d08ba73cf9aea 100644 --- a/packages/mui-base/src/useMenu/index.ts +++ b/packages/mui-base/src/useMenu/index.ts @@ -1,3 +1,4 @@ +'use client'; export { useMenu } from './useMenu'; export * from './useMenu.types'; export * from './MenuProvider'; diff --git a/packages/mui-base/src/useMenuButton/index.ts b/packages/mui-base/src/useMenuButton/index.ts index d933dea9d2049d..0f9d874d50129e 100644 --- a/packages/mui-base/src/useMenuButton/index.ts +++ b/packages/mui-base/src/useMenuButton/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useMenuButton } from './useMenuButton'; export * from './useMenuButton.types'; diff --git a/packages/mui-base/src/useMenuItem/index.ts b/packages/mui-base/src/useMenuItem/index.ts index 7dfa69be451d99..60a95a4be0eea2 100644 --- a/packages/mui-base/src/useMenuItem/index.ts +++ b/packages/mui-base/src/useMenuItem/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useMenuItem } from './useMenuItem'; export * from './useMenuItem.types'; diff --git a/packages/mui-base/src/useOption/index.ts b/packages/mui-base/src/useOption/index.ts index fe3351ac1cb5b6..87256d7d0f64fd 100644 --- a/packages/mui-base/src/useOption/index.ts +++ b/packages/mui-base/src/useOption/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useOption } from './useOption'; export * from './useOption.types'; diff --git a/packages/mui-base/src/useSelect/index.ts b/packages/mui-base/src/useSelect/index.ts index 014e5d90811167..7773d46920a911 100644 --- a/packages/mui-base/src/useSelect/index.ts +++ b/packages/mui-base/src/useSelect/index.ts @@ -1,3 +1,4 @@ +'use client'; export { useSelect } from './useSelect'; export * from './useSelect.types'; export * from './SelectProvider'; diff --git a/packages/mui-base/src/useSlider/index.ts b/packages/mui-base/src/useSlider/index.ts index 0e8b89eb00ffad..f13ff862e30dad 100644 --- a/packages/mui-base/src/useSlider/index.ts +++ b/packages/mui-base/src/useSlider/index.ts @@ -1,2 +1,3 @@ +'use client'; export * from './useSlider'; export * from './useSlider.types'; diff --git a/packages/mui-base/src/useSnackbar/index.ts b/packages/mui-base/src/useSnackbar/index.ts index 9a595a63e425c4..123fce143e7074 100644 --- a/packages/mui-base/src/useSnackbar/index.ts +++ b/packages/mui-base/src/useSnackbar/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useSnackbar } from './useSnackbar'; export * from './useSnackbar.types'; diff --git a/packages/mui-base/src/useSwitch/index.ts b/packages/mui-base/src/useSwitch/index.ts index 0e89a92173862c..2c0e7428f08750 100644 --- a/packages/mui-base/src/useSwitch/index.ts +++ b/packages/mui-base/src/useSwitch/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useSwitch } from './useSwitch'; export * from './useSwitch.types'; diff --git a/packages/mui-base/src/useTab/index.ts b/packages/mui-base/src/useTab/index.ts index c455a73bd484ed..a2e4fd0ffbc9e8 100644 --- a/packages/mui-base/src/useTab/index.ts +++ b/packages/mui-base/src/useTab/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useTab } from './useTab'; export * from './useTab.types'; diff --git a/packages/mui-base/src/useTabPanel/index.ts b/packages/mui-base/src/useTabPanel/index.ts index 2e72d19f4276c1..b50d04d1a8d7ea 100644 --- a/packages/mui-base/src/useTabPanel/index.ts +++ b/packages/mui-base/src/useTabPanel/index.ts @@ -1,2 +1,3 @@ +'use client'; export { useTabPanel } from './useTabPanel'; export * from './useTabPanel.types'; diff --git a/packages/mui-base/src/useTabs/index.ts b/packages/mui-base/src/useTabs/index.ts index c12b85bf869619..6638acfe020e04 100644 --- a/packages/mui-base/src/useTabs/index.ts +++ b/packages/mui-base/src/useTabs/index.ts @@ -1,3 +1,4 @@ +'use client'; export * from './useTabs'; export * from './useTabs.types'; export * from './TabsProvider'; diff --git a/packages/mui-base/src/useTabsList/index.ts b/packages/mui-base/src/useTabsList/index.ts index 0241cfc8f8c486..4ba3e5e23c4633 100644 --- a/packages/mui-base/src/useTabsList/index.ts +++ b/packages/mui-base/src/useTabsList/index.ts @@ -1,3 +1,4 @@ +'use client'; export { useTabsList } from './useTabsList'; export * from './useTabsList.types'; export * from './TabsListProvider'; diff --git a/packages/mui-base/src/utils/index.ts b/packages/mui-base/src/utils/index.ts index 38706998ff36b6..574814884c595b 100644 --- a/packages/mui-base/src/utils/index.ts +++ b/packages/mui-base/src/utils/index.ts @@ -1,3 +1,4 @@ +'use client'; export { appendOwnerState } from './appendOwnerState'; export { areArraysEqual } from './areArraysEqual'; export { ClassNameConfigurator } from './ClassNameConfigurator';