Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into refactor/slider-c…
Browse files Browse the repository at this point in the history
…omposite
  • Loading branch information
mj12albert committed Oct 10, 2024
2 parents 1d2c4d2 + bde120f commit 97dc5b8
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/mui-base/src/AlertDialog/Root/AlertDialogRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { useDialogRoot } from '../../Dialog/Root/useDialogRoot';
*
* - [AlertDialogRoot API](https://base-ui.netlify.app/components/react-alert-dialog/#api-reference-AlertDialogRoot)
*/
function AlertDialogRoot(props: AlertDialogRoot.Props) {
const AlertDialogRoot: React.FC<AlertDialogRoot.Props> = function AlertDialogRoot(props) {
const { children, defaultOpen, onOpenChange, open: openProp, animated = true } = props;

const dialogRootContext = React.useContext(AlertDialogRootContext);
Expand All @@ -41,7 +41,7 @@ function AlertDialogRoot(props: AlertDialogRoot.Props) {
{children}
</AlertDialogRootContext.Provider>
);
}
};

namespace AlertDialogRoot {
export type Props = Omit<DialogRoot.Props, 'modal' | 'dismissible'>;
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Field/Validity/FieldValidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { FieldValidityData } from '../Root/FieldRoot';
*
* - [FieldValidity API](https://base-ui.netlify.app/components/react-field/#api-reference-FieldValidity)
*/
function FieldValidity(props: FieldValidity.Props) {
const FieldValidity: React.FC<FieldValidity.Props> = function FieldValidity(props) {
const { validityData, invalid } = useFieldRootContext(false);

const fieldValidityState: FieldValidityState = React.useMemo(() => {
Expand All @@ -28,7 +28,7 @@ function FieldValidity(props: FieldValidity.Props) {
}, [validityData, invalid]);

return <React.Fragment>{props.children(fieldValidityState)}</React.Fragment>;
}
};

export interface FieldValidityState extends Omit<FieldValidityData, 'state'> {
validity: FieldValidityData['state'];
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Menu/Root/MenuRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MenuDirection, MenuOrientation, useMenuRoot } from './useMenuRoot';
*
* - [MenuRoot API](https://base-ui.netlify.app/components/react-menu/#api-reference-MenuRoot)
*/
function MenuRoot(props: MenuRoot.Props) {
const MenuRoot: React.FC<MenuRoot.Props> = function MenuRoot(props) {
const {
animated = true,
children,
Expand Down Expand Up @@ -89,7 +89,7 @@ function MenuRoot(props: MenuRoot.Props) {
}

return <MenuRootContext.Provider value={context}>{children}</MenuRootContext.Provider>;
}
};

namespace MenuRoot {
export interface Props {
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Popover/Root/PopoverRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { OPEN_DELAY } from '../utils/constants';
*
* - [PopoverRoot API](https://base-ui.netlify.app/components/react-popover/#api-reference-PopoverRoot)
*/
function PopoverRoot(props: PopoverRoot.Props) {
const PopoverRoot: React.FC<PopoverRoot.Props> = function PopoverRoot(props) {
const { openOnHover = false, delayType = 'rest', delay, closeDelay = 0, animated = true } = props;

const delayWithDefault = delay ?? OPEN_DELAY;
Expand Down Expand Up @@ -105,7 +105,7 @@ function PopoverRoot(props: PopoverRoot.Props) {
return (
<PopoverRootContext.Provider value={contextValue}>{props.children}</PopoverRootContext.Provider>
);
}
};

namespace PopoverRoot {
export interface OwnerState {}
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CLOSE_DELAY, OPEN_DELAY } from '../utils/constants';
*
* - [PreviewCardRoot API](https://base-ui.netlify.app/components/react-preview-card/#api-reference-PreviewCardRoot)
*/
function PreviewCardRoot(props: PreviewCardRoot.Props) {
const PreviewCardRoot: React.FC<PreviewCardRoot.Props> = function PreviewCardRoot(props) {
const { delayType = 'rest', delay, closeDelay, animated = true } = props;

const delayWithDefault = delay ?? OPEN_DELAY;
Expand Down Expand Up @@ -92,7 +92,7 @@ function PreviewCardRoot(props: PreviewCardRoot.Props) {
{props.children}
</PreviewCardRootContext.Provider>
);
}
};

namespace PreviewCardRoot {
export interface OwnerState {}
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Tabs/Root/TabsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface TabsProviderProps {
*
* @ignore - do not document.
*/
function TabsProvider(props: TabsProviderProps) {
const TabsProvider: React.FC<TabsProviderProps> = function TabsProvider(props) {
const { value: valueProp, children } = props;
const {
direction,
Expand Down Expand Up @@ -76,7 +76,7 @@ function TabsProvider(props: TabsProviderProps) {
<TabsRootContext.Provider value={tabsContextValue}>{children}</TabsRootContext.Provider>
</CompoundComponentContext.Provider>
);
}
};

TabsProvider.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Tabs/TabsList/TabsListProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface TabsListProviderProps {
*
* @ignore - do not document.
*/
function TabsListProvider(props: TabsListProviderProps) {
const TabsListProvider: React.FC<TabsListProviderProps> = function TabsListProvider(props) {
const { value, children } = props;
const {
dispatch,
Expand Down Expand Up @@ -65,7 +65,7 @@ function TabsListProvider(props: TabsListProviderProps) {
</ListContext.Provider>
</CompoundComponentContext.Provider>
);
}
};

TabsListProvider.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Tooltip/Provider/TooltipProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import { FloatingDelayGroup } from '@floating-ui/react';
*
* - [TooltipProvider API](https://base-ui.netlify.app/components/react-tooltip/#api-reference-TooltipProvider)
*/
function TooltipProvider(props: TooltipProvider.Props) {
const TooltipProvider: React.FC<TooltipProvider.Props> = function TooltipProvider(props) {
const { delay, closeDelay, timeout = 400 } = props;
return (
<FloatingDelayGroup delay={{ open: delay ?? 0, close: closeDelay ?? 0 }} timeoutMs={timeout}>
{props.children}
</FloatingDelayGroup>
);
}
};

namespace TooltipProvider {
export interface Props {
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Tooltip/Root/TooltipRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { OPEN_DELAY } from '../utils/constants';
*
* - [TooltipRoot API](https://base-ui.netlify.app/components/react-tooltip/#api-reference-TooltipRoot)
*/
function TooltipRoot(props: TooltipRoot.Props) {
const TooltipRoot: React.FC<TooltipRoot.Props> = function TooltipRoot(props) {
const {
delayType = 'rest',
delay,
Expand Down Expand Up @@ -102,7 +102,7 @@ function TooltipRoot(props: TooltipRoot.Props) {
return (
<TooltipRootContext.Provider value={contextValue}>{props.children}</TooltipRootContext.Provider>
);
}
};

namespace TooltipRoot {
export interface OwnerState {}
Expand Down

0 comments on commit 97dc5b8

Please sign in to comment.