@mui/base
Advanced tools
Comparing version 5.0.0-beta.12 to 5.0.0-beta.13
/** | ||
* @mui/base v5.0.0-beta.12 | ||
* @mui/base v5.0.0-beta.13 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
/** | ||
* @mui/base v5.0.0-beta.12 | ||
* @mui/base v5.0.0-beta.13 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -923,3 +923,3 @@ 'use client'; | ||
var handleInputMouseDown = function handleInputMouseDown(event) { | ||
if (inputValue === '' || !open) { | ||
if (!disabledProp && (inputValue === '' || !open)) { | ||
handlePopupIndicator(event); | ||
@@ -926,0 +926,0 @@ } |
@@ -176,8 +176,7 @@ 'use client'; | ||
var getRootProps = function getRootProps() { | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var propsEventHandlers = extractEventHandlers(parameters); | ||
var externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var externalEventHandlers = _extends({}, extractEventHandlers(parameters), extractEventHandlers(externalProps)); | ||
var props = _extends({ | ||
type: type | ||
}, externalEventHandlers, buttonProps, { | ||
}, externalEventHandlers, buttonProps, externalProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -184,0 +183,0 @@ onClick: createHandleClick(externalEventHandlers), |
/** | ||
* @mui/base v5.0.0-beta.12 | ||
* @mui/base v5.0.0-beta.13 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -848,3 +848,3 @@ 'use client'; | ||
const handleInputMouseDown = event => { | ||
if (inputValue === '' || !open) { | ||
if (!disabledProp && (inputValue === '' || !open)) { | ||
handlePopupIndicator(event); | ||
@@ -851,0 +851,0 @@ } |
@@ -145,8 +145,7 @@ 'use client'; | ||
} | ||
const getRootProps = (otherHandlers = {}) => { | ||
const propsEventHandlers = extractEventHandlers(parameters); | ||
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
const getRootProps = (externalProps = {}) => { | ||
const externalEventHandlers = _extends({}, extractEventHandlers(parameters), extractEventHandlers(externalProps)); | ||
const props = _extends({ | ||
type | ||
}, externalEventHandlers, buttonProps, { | ||
}, externalEventHandlers, buttonProps, externalProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -153,0 +152,0 @@ onClick: createHandleClick(externalEventHandlers), |
/** | ||
* @mui/base v5.0.0-beta.12 | ||
* @mui/base v5.0.0-beta.13 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -862,3 +862,3 @@ "use strict"; | ||
const handleInputMouseDown = event => { | ||
if (inputValue === '' || !open) { | ||
if (!disabledProp && (inputValue === '' || !open)) { | ||
handlePopupIndicator(event); | ||
@@ -865,0 +865,0 @@ } |
@@ -164,8 +164,7 @@ "use strict"; | ||
} | ||
const getRootProps = (otherHandlers = {}) => { | ||
const propsEventHandlers = (0, _extractEventHandlers.extractEventHandlers)(parameters); | ||
const externalEventHandlers = (0, _extends2.default)({}, propsEventHandlers, otherHandlers); | ||
const getRootProps = (externalProps = {}) => { | ||
const externalEventHandlers = (0, _extends2.default)({}, (0, _extractEventHandlers.extractEventHandlers)(parameters), (0, _extractEventHandlers.extractEventHandlers)(externalProps)); | ||
const props = (0, _extends2.default)({ | ||
type | ||
}, externalEventHandlers, buttonProps, { | ||
}, externalEventHandlers, buttonProps, externalProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -172,0 +171,0 @@ onClick: createHandleClick(externalEventHandlers), |
{ | ||
"name": "@mui/base", | ||
"version": "5.0.0-beta.12", | ||
"version": "5.0.0-beta.13", | ||
"private": false, | ||
@@ -44,3 +44,3 @@ "author": "MUI Team", | ||
"@mui/types": "^7.2.4", | ||
"@mui/utils": "^5.14.6", | ||
"@mui/utils": "^5.14.7", | ||
"@popperjs/core": "^2.11.8", | ||
@@ -47,0 +47,0 @@ "clsx": "^2.0.0", |
@@ -854,3 +854,3 @@ 'use client'; | ||
const handleInputMouseDown = event => { | ||
if (inputValue === '' || !open) { | ||
if (!disabledProp && (inputValue === '' || !open)) { | ||
handlePopupIndicator(event); | ||
@@ -857,0 +857,0 @@ } |
@@ -156,8 +156,7 @@ 'use client'; | ||
} | ||
const getRootProps = (otherHandlers = {}) => { | ||
const propsEventHandlers = extractEventHandlers(parameters); | ||
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
const getRootProps = (externalProps = {}) => { | ||
const externalEventHandlers = _extends({}, extractEventHandlers(parameters), extractEventHandlers(externalProps)); | ||
const props = _extends({ | ||
type | ||
}, externalEventHandlers, buttonProps, { | ||
}, externalEventHandlers, buttonProps, externalProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -164,0 +163,0 @@ onClick: createHandleClick(externalEventHandlers), |
import * as React from 'react'; | ||
import { EventHandlers } from '../utils/types'; | ||
import { MuiCancellableEventHandler } from '../utils/MuiCancellableEvent'; | ||
@@ -40,10 +39,10 @@ export interface UseButtonParameters { | ||
} | ||
export type UseButtonRootSlotProps<TOther = {}> = TOther & UseButtonRootSlotOwnProps; | ||
export type UseButtonRootSlotProps<ExternalProps = {}> = ExternalProps & UseButtonRootSlotOwnProps; | ||
export interface UseButtonReturnValue { | ||
/** | ||
* Resolver for the root slot's props. | ||
* @param otherHandlers event handlers for the root slot | ||
* @param externalProps additional props for the root slot | ||
* @returns props that should be spread on the root slot | ||
*/ | ||
getRootProps: <TOther extends EventHandlers = {}>(otherHandlers?: TOther) => UseButtonRootSlotProps<TOther>; | ||
getRootProps: <ExternalProps extends Record<string, any> = {}>(externalProps?: ExternalProps) => UseButtonRootSlotProps<ExternalProps>; | ||
/** | ||
@@ -50,0 +49,0 @@ * If `true`, the component is being focused using keyboard. |
Sorry, the diff of this file is too big to display
2765515
56309
Updated@mui/utils@^5.14.7