@mui/base
Advanced tools
Comparing version 5.0.0-beta.1 to 5.0.0-beta.2
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["badgeContent", "children", "invisible", "max", "slotProps", "slots", "showZero"]; | ||
import * as React from 'react'; | ||
@@ -33,11 +36,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
badgeContent: badgeContentProp, | ||
children, | ||
invisible: invisibleProp, | ||
max: maxProp = 99, | ||
slotProps = {}, | ||
slots = {}, | ||
showZero = false, | ||
...other | ||
} = props; | ||
children, | ||
max: maxProp = 99, | ||
slotProps = {}, | ||
slots = {}, | ||
showZero = false | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -48,8 +49,6 @@ badgeContent, | ||
invisible | ||
} = useBadge({ | ||
...props, | ||
} = useBadge(_extends({}, props, { | ||
max: maxProp | ||
}); | ||
const ownerState = { | ||
...props, | ||
})); | ||
const ownerState = _extends({}, props, { | ||
badgeContent, | ||
@@ -59,3 +58,3 @@ invisible, | ||
showZero | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -80,9 +79,7 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'span'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [children, /*#__PURE__*/_jsx(BadgeComponent, { | ||
...badgeProps, | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [children, /*#__PURE__*/_jsx(BadgeComponent, _extends({}, badgeProps, { | ||
children: displayValue | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
@@ -89,0 +86,0 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface BadgeClasses { |
@@ -0,0 +0,0 @@ export { default } from './Badge'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -34,11 +37,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
action, | ||
children, | ||
disabled, | ||
focusableWhenDisabled = false, | ||
onFocusVisible, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
action, | ||
children, | ||
focusableWhenDisabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const buttonRef = React.useRef(); | ||
@@ -50,6 +51,5 @@ const { | ||
getRootProps | ||
} = useButton({ | ||
...props, | ||
} = useButton(_extends({}, props, { | ||
focusableWhenDisabled | ||
}); | ||
})); | ||
React.useImperativeHandle(action, () => ({ | ||
@@ -61,8 +61,7 @@ focusVisible: () => { | ||
}), [setFocusVisible]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
active, | ||
focusableWhenDisabled, | ||
focusVisible | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -82,6 +81,5 @@ const defaultElement = other.href || other.to ? 'a' : 'button'; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -88,0 +86,0 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface ButtonClasses { |
@@ -0,0 +0,0 @@ export { default } from './Button'; |
export { unstable_ClassNameGenerator } from '@mui/utils'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
export { default } from './ClickAwayListener'; | ||
export * from './ClickAwayListener'; |
export { unstable_composeClasses as default } from '@mui/utils'; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
export { default } from './FocusTrap'; | ||
export * from './FocusTrap.types'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["defaultValue", "children", "disabled", "error", "onChange", "required", "slotProps", "slots", "value"]; | ||
import * as React from 'react'; | ||
@@ -67,13 +70,13 @@ import PropTypes from 'prop-types'; | ||
const { | ||
defaultValue, | ||
children, | ||
disabled = false, | ||
error = false, | ||
onChange, | ||
required = false, | ||
slotProps = {}, | ||
slots = {}, | ||
value: incomingValue, | ||
...other | ||
} = props; | ||
defaultValue, | ||
children, | ||
disabled = false, | ||
error = false, | ||
onChange, | ||
required = false, | ||
slotProps = {}, | ||
slots = {}, | ||
value: incomingValue | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const [value, setValue] = useControlled({ | ||
@@ -89,4 +92,3 @@ controlled: incomingValue, | ||
React.useEffect(() => setFocused(isFocused => disabled ? false : isFocused), [disabled]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled, | ||
@@ -97,3 +99,3 @@ error, | ||
required | ||
}; | ||
}); | ||
const childContext = React.useMemo(() => { | ||
@@ -140,5 +142,3 @@ return { | ||
value: childContext, | ||
children: /*#__PURE__*/_jsx(Root, { | ||
...rootProps | ||
}) | ||
children: /*#__PURE__*/_jsx(Root, _extends({}, rootProps)) | ||
}); | ||
@@ -145,0 +145,0 @@ }); |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface FormControlClasses { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export { default } from './FormControl'; |
@@ -0,0 +0,0 @@ import { UseFormControlContextReturnValue } from './FormControl.types'; |
export { unstable_generateUtilityClass as default } from '@mui/utils'; | ||
export type { GlobalStateSlot } from '@mui/utils'; |
export { unstable_generateUtilityClasses as default } from '@mui/utils'; |
/** | ||
* @mui/base v5.0.0-beta.1 | ||
* @mui/base v5.0.0-beta.2 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -0,0 +0,0 @@ export { default } from './Input'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"]; | ||
import * as React from 'react'; | ||
@@ -41,34 +44,34 @@ import PropTypes from 'prop-types'; | ||
const { | ||
'aria-describedby': ariaDescribedby, | ||
'aria-label': ariaLabel, | ||
'aria-labelledby': ariaLabelledby, | ||
autoComplete, | ||
autoFocus, | ||
className, | ||
defaultValue, | ||
disabled, | ||
endAdornment, | ||
error, | ||
id, | ||
multiline = false, | ||
name, | ||
onClick, | ||
onChange, | ||
onKeyDown, | ||
onKeyUp, | ||
onFocus, | ||
onBlur, | ||
placeholder, | ||
readOnly, | ||
required, | ||
startAdornment, | ||
value, | ||
type: typeProp, | ||
rows, | ||
slotProps = {}, | ||
slots = {}, | ||
minRows, | ||
maxRows, | ||
...other | ||
} = props; | ||
'aria-describedby': ariaDescribedby, | ||
'aria-label': ariaLabel, | ||
'aria-labelledby': ariaLabelledby, | ||
autoComplete, | ||
autoFocus, | ||
className, | ||
defaultValue, | ||
disabled, | ||
endAdornment, | ||
error, | ||
id, | ||
multiline = false, | ||
name, | ||
onClick, | ||
onChange, | ||
onKeyDown, | ||
onKeyUp, | ||
onFocus, | ||
onBlur, | ||
placeholder, | ||
readOnly, | ||
required, | ||
startAdornment, | ||
value, | ||
type: typeProp, | ||
rows, | ||
slotProps = {}, | ||
slots = {}, | ||
minRows, | ||
maxRows | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -93,4 +96,3 @@ getRootProps, | ||
const type = !multiline ? typeProp != null ? typeProp : 'text' : undefined; | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled: disabledState, | ||
@@ -102,3 +104,3 @@ error: errorState, | ||
type | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -134,14 +136,10 @@ const propsToForward = { | ||
elementType: InputComponent, | ||
getSlotProps: otherHandlers => getInputProps({ | ||
...otherHandlers, | ||
...propsToForward | ||
getSlotProps: otherHandlers => getInputProps(_extends({}, otherHandlers, propsToForward)), | ||
externalSlotProps: slotProps.input, | ||
additionalProps: _extends({ | ||
rows: multiline ? rows : undefined | ||
}, multiline && !isHostComponent(InputComponent) && { | ||
minRows: rows || minRows, | ||
maxRows: rows || maxRows | ||
}), | ||
externalSlotProps: slotProps.input, | ||
additionalProps: { | ||
rows: multiline ? rows : undefined, | ||
...(multiline && !isHostComponent(InputComponent) && { | ||
minRows: rows || minRows, | ||
maxRows: rows || maxRows | ||
}) | ||
}, | ||
ownerState, | ||
@@ -159,8 +157,5 @@ className: classes.input | ||
} | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [startAdornment, /*#__PURE__*/_jsx(InputComponent, { | ||
...inputProps | ||
}), endAdornment] | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [startAdornment, /*#__PURE__*/_jsx(InputComponent, _extends({}, inputProps)), endAdornment] | ||
})); | ||
}); | ||
@@ -167,0 +162,0 @@ process.env.NODE_ENV !== "production" ? Input.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface InputClasses { |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -46,3 +44,3 @@ import PropTypes from 'prop-types'; | ||
other = _objectWithoutProperties(props, ["badgeContent", "children", "invisible", "max", "slotProps", "slots", "showZero"]); | ||
var _useBadge = useBadge(_objectSpread(_objectSpread({}, props), {}, { | ||
var _useBadge = useBadge(_extends({}, props, { | ||
max: maxProp | ||
@@ -54,3 +52,3 @@ })), | ||
invisible = _useBadge.invisible; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
badgeContent: badgeContent, | ||
@@ -80,4 +78,4 @@ invisible: invisible, | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [children, /*#__PURE__*/_jsx(BadgeComponent, _objectSpread(_objectSpread({}, badgeProps), {}, { | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [children, /*#__PURE__*/_jsx(BadgeComponent, _extends({}, badgeProps, { | ||
children: displayValue | ||
@@ -84,0 +82,0 @@ }))] |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -47,3 +45,3 @@ import PropTypes from 'prop-types'; | ||
var buttonRef = React.useRef(); | ||
var _useButton = useButton(_objectSpread(_objectSpread({}, props), {}, { | ||
var _useButton = useButton(_extends({}, props, { | ||
focusableWhenDisabled: focusableWhenDisabled | ||
@@ -63,3 +61,3 @@ })), | ||
}, [setFocusVisible]); | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
active: active, | ||
@@ -83,3 +81,3 @@ focusableWhenDisabled: focusableWhenDisabled, | ||
}); | ||
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
@@ -86,0 +84,0 @@ })); |
@@ -1,6 +0,4 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -103,3 +101,3 @@ import PropTypes from 'prop-types'; | ||
}, [disabled]); | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
disabled: disabled, | ||
@@ -152,3 +150,3 @@ error: error, | ||
value: childContext, | ||
children: /*#__PURE__*/_jsx(Root, _objectSpread({}, rootProps)) | ||
children: /*#__PURE__*/_jsx(Root, _extends({}, rootProps)) | ||
}); | ||
@@ -155,0 +153,0 @@ }); |
/** | ||
* @mui/base v5.0.0-beta.1 | ||
* @mui/base v5.0.0-beta.2 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -94,3 +92,3 @@ import PropTypes from 'prop-types'; | ||
var type = !multiline ? typeProp != null ? typeProp : 'text' : undefined; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
disabled: disabledState, | ||
@@ -134,6 +132,6 @@ error: errorState, | ||
getSlotProps: function getSlotProps(otherHandlers) { | ||
return getInputProps(_objectSpread(_objectSpread({}, otherHandlers), propsToForward)); | ||
return getInputProps(_extends({}, otherHandlers, propsToForward)); | ||
}, | ||
externalSlotProps: slotProps.input, | ||
additionalProps: _objectSpread({ | ||
additionalProps: _extends({ | ||
rows: multiline ? rows : undefined | ||
@@ -156,4 +154,4 @@ }, multiline && !isHostComponent(InputComponent) && { | ||
} | ||
return /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [startAdornment, /*#__PURE__*/_jsx(InputComponent, _objectSpread({}, inputProps)), endAdornment] | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [startAdornment, /*#__PURE__*/_jsx(InputComponent, _extends({}, inputProps)), endAdornment] | ||
})); | ||
@@ -160,0 +158,0 @@ }); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -63,3 +61,3 @@ import PropTypes from 'prop-types'; | ||
}, [dispatch]); | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
open: open | ||
@@ -91,4 +89,4 @@ }); | ||
}); | ||
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: /*#__PURE__*/_jsx(Listbox, _objectSpread(_objectSpread({}, listboxProps), {}, { | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: /*#__PURE__*/_jsx(Listbox, _extends({}, listboxProps, { | ||
children: /*#__PURE__*/_jsx(MenuProvider, { | ||
@@ -95,0 +93,0 @@ value: contextValue, |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -52,3 +50,3 @@ import PropTypes from 'prop-types'; | ||
highlighted = _useMenuItem.highlighted; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
disabled: disabled, | ||
@@ -68,3 +66,3 @@ focusVisible: focusVisible, | ||
}); | ||
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
@@ -71,0 +69,0 @@ })); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -160,3 +158,3 @@ import PropTypes from 'prop-types'; | ||
}, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]); | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
closeAfterTransition: closeAfterTransition, | ||
@@ -266,4 +264,4 @@ disableAutoFocus: disableAutoFocus, | ||
disablePortal: disablePortal, | ||
children: /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, _objectSpread({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, { | ||
children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, { | ||
disableEnforceFocus: disableEnforceFocus, | ||
@@ -270,0 +268,0 @@ disableAutoFocus: disableAutoFocus, |
@@ -140,2 +140,4 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
_classCallCheck(this, ModalManager); | ||
this.containers = void 0; | ||
this.modals = void 0; | ||
this.modals = []; | ||
@@ -142,0 +144,0 @@ this.containers = []; |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -56,3 +54,3 @@ import PropTypes from 'prop-types'; | ||
index = _useOption.index; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
disabled: disabled, | ||
@@ -72,3 +70,3 @@ highlighted: highlighted, | ||
}); | ||
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
@@ -75,0 +73,0 @@ })); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -67,6 +65,6 @@ import PropTypes from 'prop-types'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [/*#__PURE__*/_jsx(Label, _objectSpread(_objectSpread({}, labelProps), {}, { | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Label, _extends({}, labelProps, { | ||
children: props.label | ||
})), /*#__PURE__*/_jsx(List, _objectSpread(_objectSpread({}, listProps), {}, { | ||
})), /*#__PURE__*/_jsx(List, _extends({}, listProps, { | ||
children: props.children | ||
@@ -73,0 +71,0 @@ }))] |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -138,5 +136,5 @@ import { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
} | ||
var popper = createPopper(resolvedAnchorElement, tooltipRef.current, _objectSpread(_objectSpread({ | ||
var popper = createPopper(resolvedAnchorElement, tooltipRef.current, _extends({ | ||
placement: rtlPlacement | ||
}, popperOptions), {}, { | ||
}, popperOptions, { | ||
modifiers: popperModifiers | ||
@@ -169,3 +167,3 @@ })); | ||
}); | ||
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: typeof children === 'function' ? children(childProps) : children | ||
@@ -243,3 +241,3 @@ })); | ||
container: container, | ||
children: /*#__PURE__*/_jsx(PopperTooltip, _objectSpread(_objectSpread({ | ||
children: /*#__PURE__*/_jsx(PopperTooltip, _extends({ | ||
anchorEl: anchorEl, | ||
@@ -256,4 +254,4 @@ direction: direction, | ||
slots: slots | ||
}, other), {}, { | ||
style: _objectSpread({ | ||
}, other, { | ||
style: _extends({ | ||
// Prevents scroll issue, waiting for Popper.js to add this style once initiated. | ||
@@ -260,0 +258,0 @@ position: 'fixed', |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -143,3 +141,3 @@ import PropTypes from 'prop-types'; | ||
open = _useSelect.open; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
active: buttonActive, | ||
@@ -198,6 +196,6 @@ defaultListboxOpen: defaultListboxOpen, | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, buttonProps), {}, { | ||
children: [/*#__PURE__*/_jsx(Button, _extends({}, buttonProps, { | ||
children: renderValue(selectedOptionsMetadata) | ||
})), buttonDefined && /*#__PURE__*/_jsx(PopperComponent, _objectSpread(_objectSpread({}, popperProps), {}, { | ||
children: /*#__PURE__*/_jsx(ListboxRoot, _objectSpread(_objectSpread({}, listboxProps), {}, { | ||
})), buttonDefined && /*#__PURE__*/_jsx(PopperComponent, _extends({}, popperProps, { | ||
children: /*#__PURE__*/_jsx(ListboxRoot, _extends({}, listboxProps, { | ||
children: /*#__PURE__*/_jsx(SelectProvider, { | ||
@@ -204,0 +202,0 @@ value: contextValue, |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -97,3 +95,3 @@ import PropTypes from 'prop-types'; | ||
// consider extracting to hook an reusing the lint rule for the variants | ||
var partialOwnerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var partialOwnerState = _extends({}, props, { | ||
marks: marksProp, | ||
@@ -111,3 +109,3 @@ disabled: disabled, | ||
}); | ||
var _useSlider = useSlider(_objectSpread(_objectSpread({}, partialOwnerState), {}, { | ||
var _useSlider = useSlider(_extends({}, partialOwnerState, { | ||
rootRef: forwardedRef | ||
@@ -128,3 +126,3 @@ })), | ||
trackLeap = _useSlider.trackLeap; | ||
var ownerState = _objectSpread(_objectSpread({}, partialOwnerState), {}, { | ||
var ownerState = _extends({}, partialOwnerState, { | ||
marked: marks.length > 0 && marks.some(function (mark) { | ||
@@ -158,3 +156,3 @@ return mark.label; | ||
additionalProps: { | ||
style: _objectSpread(_objectSpread({}, axisProps[axis].offset(trackOffset)), axisProps[axis].leap(trackLeap)) | ||
style: _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap)) | ||
}, | ||
@@ -197,4 +195,4 @@ ownerState: ownerState, | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [/*#__PURE__*/_jsx(Rail, _objectSpread({}, railProps)), /*#__PURE__*/_jsx(Track, _objectSpread({}, trackProps)), marks.filter(function (mark) { | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Rail, _extends({}, railProps)), /*#__PURE__*/_jsx(Track, _extends({}, trackProps)), marks.filter(function (mark) { | ||
return mark.value >= min && mark.value <= max; | ||
@@ -211,16 +209,16 @@ }).map(function (mark, index) { | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx(Mark, _objectSpread(_objectSpread(_objectSpread({ | ||
children: [/*#__PURE__*/_jsx(Mark, _extends({ | ||
"data-index": index | ||
}, markProps), !isHostComponent(Mark) && { | ||
}, markProps, !isHostComponent(Mark) && { | ||
markActive: markActive | ||
}), {}, { | ||
style: _objectSpread(_objectSpread({}, style), markProps.style), | ||
}, { | ||
style: _extends({}, style, markProps.style), | ||
className: clsx(markProps.className, markActive && classes.markActive) | ||
})), mark.label != null ? /*#__PURE__*/_jsx(MarkLabel, _objectSpread(_objectSpread(_objectSpread({ | ||
})), mark.label != null ? /*#__PURE__*/_jsx(MarkLabel, _extends({ | ||
"aria-hidden": true, | ||
"data-index": index | ||
}, markLabelProps), !isHostComponent(MarkLabel) && { | ||
}, markLabelProps, !isHostComponent(MarkLabel) && { | ||
markLabelActive: markActive | ||
}), {}, { | ||
style: _objectSpread(_objectSpread({}, style), markLabelProps.style), | ||
}, { | ||
style: _extends({}, style, markLabelProps.style), | ||
className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive), | ||
@@ -233,10 +231,10 @@ children: mark.label | ||
var style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/_jsxs(Thumb, _objectSpread(_objectSpread({ | ||
return /*#__PURE__*/_jsxs(Thumb, _extends({ | ||
"data-index": index | ||
}, thumbProps), {}, { | ||
}, thumbProps, { | ||
className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible), | ||
style: _objectSpread(_objectSpread({}, style), {}, { | ||
style: _extends({}, style, { | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined | ||
}, thumbProps.style), | ||
children: [/*#__PURE__*/_jsx(Input, _objectSpread({ | ||
children: [/*#__PURE__*/_jsx(Input, _extends({ | ||
"data-index": index, | ||
@@ -248,7 +246,7 @@ "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel, | ||
value: values[index] | ||
}, inputProps)), ValueLabel ? /*#__PURE__*/_jsx(ValueLabel, _objectSpread(_objectSpread(_objectSpread({}, !isHostComponent(ValueLabel) && { | ||
}, inputProps)), ValueLabel ? /*#__PURE__*/_jsx(ValueLabel, _extends({}, !isHostComponent(ValueLabel) && { | ||
valueLabelFormat: valueLabelFormat, | ||
index: index, | ||
disabled: disabled | ||
}), valueLabelProps), {}, { | ||
}, valueLabelProps, { | ||
children: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat | ||
@@ -255,0 +253,0 @@ })) : null] |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -52,3 +50,3 @@ import PropTypes from 'prop-types'; | ||
var classes = useUtilityClasses(); | ||
var _useSnackbar = useSnackbar(_objectSpread(_objectSpread({}, props), {}, { | ||
var _useSnackbar = useSnackbar(_extends({}, props, { | ||
autoHideDuration: autoHideDuration, | ||
@@ -91,4 +89,4 @@ disableWindowBlurListener: disableWindowBlurListener, | ||
} | ||
return /*#__PURE__*/_jsx(ClickAwayListener, _objectSpread(_objectSpread({}, clickAwayListenerProps), {}, { | ||
children: /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
return /*#__PURE__*/_jsx(ClickAwayListener, _extends({}, clickAwayListenerProps, { | ||
children: /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
@@ -95,0 +93,0 @@ })) |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -71,3 +69,3 @@ import PropTypes from 'prop-types'; | ||
readOnly = _useSwitch.readOnly; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
checked: checked, | ||
@@ -114,4 +112,4 @@ disabled: disabled, | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [/*#__PURE__*/_jsx(Track, _objectSpread({}, trackProps)), /*#__PURE__*/_jsx(Thumb, _objectSpread({}, thumbProps)), /*#__PURE__*/_jsx(Input, _objectSpread({}, inputProps))] | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Track, _extends({}, trackProps)), /*#__PURE__*/_jsx(Thumb, _extends({}, thumbProps)), /*#__PURE__*/_jsx(Input, _extends({}, inputProps))] | ||
})); | ||
@@ -118,0 +116,0 @@ }); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -49,3 +47,3 @@ import PropTypes from 'prop-types'; | ||
var handleRef = useForkRef(tabRef, forwardedRef); | ||
var _useTab = useTab(_objectSpread(_objectSpread({}, props), {}, { | ||
var _useTab = useTab(_extends({}, props, { | ||
rootRef: handleRef | ||
@@ -57,3 +55,3 @@ })), | ||
getRootProps = _useTab.getRootProps; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
active: active, | ||
@@ -77,3 +75,3 @@ disabled: disabled, | ||
}); | ||
return /*#__PURE__*/_jsx(TabRoot, _objectSpread(_objectSpread({}, tabRootProps), {}, { | ||
return /*#__PURE__*/_jsx(TabRoot, _extends({}, tabRootProps, { | ||
children: children | ||
@@ -80,0 +78,0 @@ })); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -174,9 +172,9 @@ import PropTypes from 'prop-types'; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: /*#__PURE__*/_jsxs(Toolbar, _objectSpread(_objectSpread({}, toolbarProps), {}, { | ||
children: [/*#__PURE__*/_jsx(Spacer, _objectSpread({}, spacerProps)), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabel, _objectSpread(_objectSpread({}, selectLabelProps), {}, { | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: /*#__PURE__*/_jsxs(Toolbar, _extends({}, toolbarProps, { | ||
children: [/*#__PURE__*/_jsx(Spacer, _extends({}, spacerProps)), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabel, _extends({}, selectLabelProps, { | ||
children: labelRowsPerPage | ||
})), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({}, selectProps), {}, { | ||
})), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(Select, _extends({}, selectProps, { | ||
children: rowsPerPageOptions.map(function (rowsPerPageOption) { | ||
return /*#__PURE__*/_createElement(MenuItem, _objectSpread(_objectSpread({}, menuItemProps), {}, { | ||
return /*#__PURE__*/_createElement(MenuItem, _extends({}, menuItemProps, { | ||
key: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption, | ||
@@ -186,3 +184,3 @@ value: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption | ||
}) | ||
})), /*#__PURE__*/_jsx(DisplayedRows, _objectSpread(_objectSpread({}, displayedRowsProps), {}, { | ||
})), /*#__PURE__*/_jsx(DisplayedRows, _extends({}, displayedRowsProps, { | ||
children: labelDisplayedRows({ | ||
@@ -194,3 +192,3 @@ from: count === 0 ? 0 : page * rowsPerPage + 1, | ||
}) | ||
})), /*#__PURE__*/_jsx(Actions, _objectSpread({}, actionsProps))] | ||
})), /*#__PURE__*/_jsx(Actions, _extends({}, actionsProps))] | ||
})) | ||
@@ -197,0 +195,0 @@ })); |
@@ -1,6 +0,4 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var _span, _span2, _span3, _span4; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -131,10 +129,10 @@ import { useSlotProps } from '../utils'; | ||
var BackPageIcon = (_slots$backPageIcon = slots.backPageIcon) != null ? _slots$backPageIcon : BackPageIconDefault; | ||
return /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, rootProps), {}, { | ||
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButton, _objectSpread(_objectSpread({}, firstButtonProps), {}, { | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButton, _extends({}, firstButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(LastPageIcon, {}) : /*#__PURE__*/_jsx(FirstPageIcon, {}) | ||
})), /*#__PURE__*/_jsx(BackButton, _objectSpread(_objectSpread({}, backButtonProps), {}, { | ||
})), /*#__PURE__*/_jsx(BackButton, _extends({}, backButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(NextPageIcon, {}) : /*#__PURE__*/_jsx(BackPageIcon, {}) | ||
})), /*#__PURE__*/_jsx(NextButton, _objectSpread(_objectSpread({}, nextButtonProps), {}, { | ||
})), /*#__PURE__*/_jsx(NextButton, _extends({}, nextButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(BackPageIcon, {}) : /*#__PURE__*/_jsx(NextPageIcon, {}) | ||
})), showLastButton && /*#__PURE__*/_jsx(LastButton, _objectSpread(_objectSpread({}, lastButtonProps), {}, { | ||
})), showLastButton && /*#__PURE__*/_jsx(LastButton, _extends({}, lastButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(FirstPageIcon, {}) : /*#__PURE__*/_jsx(LastPageIcon, {}) | ||
@@ -141,0 +139,0 @@ }))] |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -42,3 +40,3 @@ import PropTypes from 'prop-types'; | ||
getRootProps = _useTabPanel.getRootProps; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
hidden: hidden | ||
@@ -60,3 +58,3 @@ }); | ||
}); | ||
return /*#__PURE__*/_jsx(TabPanelRoot, _objectSpread(_objectSpread({}, tabPanelRootProps), {}, { | ||
return /*#__PURE__*/_jsx(TabPanelRoot, _extends({}, tabPanelRootProps, { | ||
children: !hidden && children | ||
@@ -63,0 +61,0 @@ })); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -50,3 +48,3 @@ import PropTypes from 'prop-types'; | ||
contextValue = _useTabs.contextValue; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
orientation: orientation, | ||
@@ -67,3 +65,3 @@ direction: direction | ||
}); | ||
return /*#__PURE__*/_jsx(TabsRoot, _objectSpread(_objectSpread({}, tabsRootProps), {}, { | ||
return /*#__PURE__*/_jsx(TabsRoot, _extends({}, tabsRootProps, { | ||
children: /*#__PURE__*/_jsx(TabsProvider, { | ||
@@ -70,0 +68,0 @@ value: contextValue, |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -47,3 +45,3 @@ import PropTypes from 'prop-types'; | ||
contextValue = _useTabsList.contextValue; | ||
var ownerState = _objectSpread(_objectSpread({}, props), {}, { | ||
var ownerState = _extends({}, props, { | ||
isRtl: isRtl, | ||
@@ -64,3 +62,3 @@ orientation: orientation | ||
value: contextValue, | ||
children: /*#__PURE__*/_jsx(TabsListRoot, _objectSpread(_objectSpread({}, tabsListRootProps), {}, { | ||
children: /*#__PURE__*/_jsx(TabsListRoot, _extends({}, tabsListRootProps, { | ||
children: children | ||
@@ -67,0 +65,0 @@ })) |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -198,3 +196,3 @@ import PropTypes from 'prop-types'; | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx("textarea", _objectSpread({ | ||
children: [/*#__PURE__*/_jsx("textarea", _extends({ | ||
value: value, | ||
@@ -206,3 +204,3 @@ onChange: handleChange, | ||
rows: minRows, | ||
style: _objectSpread({ | ||
style: _extends({ | ||
height: state.outerHeightStyle, | ||
@@ -219,3 +217,3 @@ // Need a large enough difference to allow scrolling. | ||
tabIndex: -1, | ||
style: _objectSpread(_objectSpread(_objectSpread({}, styles.shadow), style), {}, { | ||
style: _extends({}, styles.shadow, style, { | ||
padding: 0 | ||
@@ -222,0 +220,0 @@ }) |
@@ -1,6 +0,4 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
/* eslint-disable no-constant-condition */ | ||
@@ -961,5 +959,5 @@ import * as React from 'react'; | ||
var other = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread({ | ||
return _extends({ | ||
'aria-owns': listboxAvailable ? "".concat(id, "-listbox") : null | ||
}, other), {}, { | ||
}, other, { | ||
onKeyDown: handleKeyDown(other), | ||
@@ -1014,3 +1012,3 @@ onMouseDown: handleMouseDown, | ||
var index = _ref4.index; | ||
return _objectSpread({ | ||
return _extends({ | ||
key: index, | ||
@@ -1017,0 +1015,0 @@ 'data-tag-index': index, |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -175,3 +173,3 @@ import { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; | ||
var propsEventHandlers = extractEventHandlers(parameters); | ||
var externalEventHandlers = _objectSpread(_objectSpread({}, propsEventHandlers), otherHandlers); | ||
var externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
@@ -181,5 +179,5 @@ // onFocusVisible can be present on the props, but since it's not a valid React event handler, | ||
delete externalEventHandlers.onFocusVisible; | ||
return _objectSpread(_objectSpread(_objectSpread({ | ||
return _extends({ | ||
type: type | ||
}, externalEventHandlers), buttonProps), {}, { | ||
}, externalEventHandlers, buttonProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -186,0 +184,0 @@ onClick: createHandleClick(externalEventHandlers), |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -143,4 +141,4 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
var propsEventHandlers = extractEventHandlers(parameters, ['onBlur', 'onChange', 'onFocus']); | ||
var externalEventHandlers = _objectSpread(_objectSpread({}, propsEventHandlers), extractEventHandlers(externalProps)); | ||
return _objectSpread(_objectSpread(_objectSpread({}, externalProps), externalEventHandlers), {}, { | ||
var externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); | ||
return _extends({}, externalProps, externalEventHandlers, { | ||
onClick: handleClick(externalEventHandlers) | ||
@@ -156,4 +154,4 @@ }); | ||
}; | ||
var externalEventHandlers = _objectSpread(_objectSpread({}, propsEventHandlers), extractEventHandlers(externalProps)); | ||
var mergedEventHandlers = _objectSpread(_objectSpread(_objectSpread({}, externalProps), externalEventHandlers), {}, { | ||
var externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); | ||
var mergedEventHandlers = _extends({}, externalProps, externalEventHandlers, { | ||
onBlur: handleBlur(externalEventHandlers), | ||
@@ -163,3 +161,3 @@ onChange: handleChange(externalEventHandlers), | ||
}); | ||
return _objectSpread(_objectSpread({}, mergedEventHandlers), {}, { | ||
return _extends({}, mergedEventHandlers, { | ||
'aria-invalid': error || undefined, | ||
@@ -166,0 +164,0 @@ defaultValue: defaultValue, |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import { ListActionTypes } from './listActions.types'; | ||
@@ -170,3 +168,3 @@ /** | ||
var newSelectedValues = toggleSelection(item, selectedValues, selectionMode, itemComparer); | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
selectedValues: newSelectedValues, | ||
@@ -182,15 +180,15 @@ highlightedValue: item | ||
case 'Home': | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'start', context) | ||
}); | ||
case 'End': | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'end', context) | ||
}); | ||
case 'PageUp': | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -pageSize, context) | ||
}); | ||
case 'PageDown': | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, pageSize, context) | ||
@@ -202,3 +200,3 @@ }); | ||
} | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -1, context) | ||
@@ -210,3 +208,3 @@ }); | ||
} | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 1, context) | ||
@@ -220,3 +218,3 @@ }); | ||
var offset = orientation === 'horizontal-ltr' ? -1 : 1; | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
@@ -231,3 +229,3 @@ }); | ||
var _offset = orientation === 'horizontal-ltr' ? 1 : -1; | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, _offset, context) | ||
@@ -251,3 +249,3 @@ }); | ||
} | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: null | ||
@@ -279,3 +277,3 @@ }); | ||
// The nextItem is the element to be highlighted | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: nextItem | ||
@@ -312,3 +310,3 @@ }); | ||
}); | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: newHighlightedValue, | ||
@@ -315,0 +313,0 @@ selectedValues: newSelectedValues |
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -147,3 +145,3 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
var actionContext = React.useMemo(function () { | ||
return _objectSpread(_objectSpread({}, reducerActionContext), listActionContext); | ||
return _extends({}, reducerActionContext, listActionContext); | ||
}, [reducerActionContext, listActionContext]); | ||
@@ -255,3 +253,3 @@ var _useControllableReduc = useControllableReducer({ | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread({}, otherHandlers), {}, { | ||
return _extends({}, otherHandlers, { | ||
'aria-activedescendant': focusManagement === 'activeDescendant' && highlightedValue != null ? getItemId(highlightedValue) : undefined, | ||
@@ -258,0 +256,0 @@ onBlur: createHandleBlur(otherHandlers), |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -95,3 +93,3 @@ import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread({}, otherHandlers), {}, { | ||
return _extends({}, otherHandlers, { | ||
onClick: createHandleClick(otherHandlers), | ||
@@ -98,0 +96,0 @@ onPointerOver: handlePointerOverEvents ? createHandlePointerOver(otherHandlers) : undefined, |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { ListActionTypes, listReducer } from '../useList'; | ||
@@ -13,3 +11,3 @@ export default function menuReducer(state, action) { | ||
if (newState.highlightedValue === null && action.context.items.length > 0) { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
highlightedValue: action.context.items[0] | ||
@@ -20,3 +18,3 @@ }); | ||
if (action.event.key === 'Escape') { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
open: false | ||
@@ -29,3 +27,3 @@ }); | ||
if (!((_action$context$listb = action.context.listboxRef.current) != null && _action$context$listb.contains(action.event.relatedTarget))) { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
open: false, | ||
@@ -32,0 +30,0 @@ highlightedValue: action.context.items[0] |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -108,3 +106,3 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
var rootProps = getRootProps(otherHandlers); | ||
return _objectSpread(_objectSpread(_objectSpread({}, otherHandlers), rootProps), {}, { | ||
return _extends({}, otherHandlers, rootProps, { | ||
role: 'menu' | ||
@@ -118,3 +116,3 @@ }); | ||
return { | ||
contextValue: _objectSpread(_objectSpread({}, compoundComponentContextValue), listContextValue), | ||
contextValue: _extends({}, compoundComponentContextValue, listContextValue), | ||
dispatch: dispatch, | ||
@@ -121,0 +119,0 @@ getListboxProps: getListboxProps, |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -66,3 +64,3 @@ import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread(_objectSpread({}, otherHandlers), getButtonProps(otherHandlers)), {}, { | ||
return _extends({}, otherHandlers, getButtonProps(otherHandlers), { | ||
role: 'menuitem' | ||
@@ -81,5 +79,5 @@ }); | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var resolvedButtonProps = _objectSpread(_objectSpread({}, otherHandlers), getButtonProps(otherHandlers)); | ||
var resolvedMenuItemProps = _objectSpread(_objectSpread({}, resolvedButtonProps), getListRootProps(resolvedButtonProps)); | ||
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, otherHandlers), resolvedButtonProps), resolvedMenuItemProps), {}, { | ||
var resolvedButtonProps = _extends({}, otherHandlers, getButtonProps(otherHandlers)); | ||
var resolvedMenuItemProps = _extends({}, resolvedButtonProps, getListRootProps(resolvedButtonProps)); | ||
return _extends({}, otherHandlers, resolvedButtonProps, resolvedMenuItemProps, { | ||
role: 'menuitem', | ||
@@ -86,0 +84,0 @@ ref: handleRef |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -49,3 +47,3 @@ import { unstable_useForkRef as useForkRef, unstable_useId as useId } from '@mui/utils'; | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread(_objectSpread({}, otherHandlers), getListItemProps(otherHandlers)), {}, { | ||
return _extends({}, otherHandlers, getListItemProps(otherHandlers), { | ||
id: id, | ||
@@ -52,0 +50,0 @@ ref: handleRef, |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { moveHighlight, listReducer, ListActionTypes } from '../useList'; | ||
@@ -12,3 +10,3 @@ import { SelectActionTypes } from './useSelect.types'; | ||
var itemToHighlight = (_state$selectedValues = state.selectedValues[0]) != null ? _state$selectedValues : moveHighlight(null, 'start', action.context); | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
open: !open, | ||
@@ -23,3 +21,3 @@ highlightedValue: !open ? itemToHighlight : null | ||
if (action.event.key === 'Escape') { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
open: false | ||
@@ -29,3 +27,3 @@ }); | ||
if (selectionMode === 'single' && (action.event.key === 'Enter' || action.event.key === ' ')) { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
open: false | ||
@@ -37,3 +35,3 @@ }); | ||
var _state$selectedValues2; | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
open: true, | ||
@@ -45,3 +43,3 @@ highlightedValue: (_state$selectedValues2 = state.selectedValues[0]) != null ? _state$selectedValues2 : moveHighlight(null, 'start', action.context) | ||
var _state$selectedValues3; | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
open: true, | ||
@@ -55,3 +53,3 @@ highlightedValue: (_state$selectedValues3 = state.selectedValues[0]) != null ? _state$selectedValues3 : moveHighlight(null, 'end', action.context) | ||
if (selectionMode === 'single') { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
open: false | ||
@@ -62,3 +60,3 @@ }); | ||
case ListActionTypes.blur: | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
open: false | ||
@@ -65,0 +63,0 @@ }); |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -210,3 +208,3 @@ import { unstable_useForkRef as useForkRef, unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread({}, otherHandlers), {}, { | ||
return _extends({}, otherHandlers, { | ||
onClick: createHandleButtonClick(otherHandlers), | ||
@@ -227,3 +225,3 @@ ref: mergedListRootRef, | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread({}, otherHandlers), {}, { | ||
return _extends({}, otherHandlers, { | ||
id: listboxId, | ||
@@ -243,3 +241,3 @@ role: 'listbox', | ||
var contextValue = React.useMemo(function () { | ||
return _objectSpread(_objectSpread({}, listContextValue), compoundComponentContextValue); | ||
return _extends({}, listContextValue, compoundComponentContextValue); | ||
}, [listContextValue, compoundComponentContextValue]); | ||
@@ -246,0 +244,0 @@ var selectValue; |
@@ -1,7 +0,5 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -588,4 +586,4 @@ import { unstable_ownerDocument as ownerDocument, unstable_useControlled as useControlled, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible, visuallyHidden } from '@mui/utils'; | ||
}; | ||
var mergedEventHandlers = _objectSpread(_objectSpread({}, otherHandlers), ownEventHandlers); | ||
return _objectSpread({ | ||
var mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers); | ||
return _extends({ | ||
ref: handleRef | ||
@@ -615,3 +613,3 @@ }, mergedEventHandlers); | ||
}; | ||
return _objectSpread(_objectSpread({}, otherHandlers), ownEventHandlers); | ||
return _extends({}, otherHandlers, ownEventHandlers); | ||
}; | ||
@@ -626,4 +624,4 @@ var getHiddenInputProps = function getHiddenInputProps() { | ||
}; | ||
var mergedEventHandlers = _objectSpread(_objectSpread({}, otherHandlers), ownEventHandlers); | ||
return _objectSpread(_objectSpread({ | ||
var mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers); | ||
return _extends({ | ||
tabIndex: tabIndex, | ||
@@ -640,4 +638,4 @@ 'aria-labelledby': ariaLabelledby, | ||
disabled: disabled | ||
}, mergedEventHandlers), {}, { | ||
style: _objectSpread(_objectSpread({}, visuallyHidden), {}, { | ||
}, mergedEventHandlers, { | ||
style: _extends({}, visuallyHidden, { | ||
direction: isRtl ? 'rtl' : 'ltr', | ||
@@ -644,0 +642,0 @@ // So that VoiceOver's focus indicator matches the thumb's dimensions |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -130,8 +128,8 @@ import { unstable_useEventCallback as useEventCallback } from '@mui/utils'; | ||
var propsEventHandlers = extractEventHandlers(parameters); | ||
var externalEventHandlers = _objectSpread(_objectSpread({}, propsEventHandlers), otherHandlers); | ||
return _objectSpread(_objectSpread({ | ||
var externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
return _extends({ | ||
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced. | ||
// See https://github.com/mui/material-ui/issues/29080 | ||
role: 'presentation' | ||
}, externalEventHandlers), {}, { | ||
}, externalEventHandlers, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -138,0 +136,0 @@ onFocus: createHandleFocus(externalEventHandlers), |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -94,3 +92,3 @@ import { unstable_useControlled as useControlled, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; | ||
var otherProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread({ | ||
return _extends({ | ||
checked: checkedProp, | ||
@@ -103,3 +101,3 @@ defaultChecked: defaultChecked, | ||
type: 'checkbox' | ||
}, otherProps), {}, { | ||
}, otherProps, { | ||
onChange: createHandleInputChange(otherProps), | ||
@@ -106,0 +104,0 @@ onFocus: createHandleFocus(otherProps), |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -68,5 +66,5 @@ import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var resolvedTabProps = _objectSpread(_objectSpread({}, otherHandlers), getTabProps(otherHandlers)); | ||
var resolvedButtonProps = _objectSpread(_objectSpread({}, resolvedTabProps), getButtonProps(resolvedTabProps)); | ||
return _objectSpread(_objectSpread({}, resolvedButtonProps), {}, { | ||
var resolvedTabProps = _extends({}, otherHandlers, getTabProps(otherHandlers)); | ||
var resolvedButtonProps = _extends({}, resolvedTabProps, getButtonProps(resolvedTabProps)); | ||
return _extends({}, resolvedButtonProps, { | ||
role: 'tab', | ||
@@ -73,0 +71,0 @@ 'aria-controls': tabPanelId, |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import * as React from 'react'; | ||
@@ -54,3 +52,3 @@ import { unstable_useControlled as useControlled } from '@mui/utils'; | ||
return { | ||
contextValue: _objectSpread({ | ||
contextValue: _extends({ | ||
direction: direction, | ||
@@ -57,0 +55,0 @@ getTabId: getTabId, |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { listReducer, ListActionTypes, moveHighlight } from '../useList'; | ||
@@ -8,3 +6,3 @@ import { TabsListActionTypes } from './useTabsList.types'; | ||
if (action.type === TabsListActionTypes.valueChange) { | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
return _extends({}, state, { | ||
highlightedValue: action.value | ||
@@ -17,3 +15,3 @@ }); | ||
if (newState.selectedValues.length > 0) { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
highlightedValue: newState.selectedValues[0] | ||
@@ -25,3 +23,3 @@ }); | ||
if (selectionFollowsFocus && newState.highlightedValue != null) { | ||
return _objectSpread(_objectSpread({}, newState), {}, { | ||
return _extends({}, newState, { | ||
selectedValues: [newState.highlightedValue] | ||
@@ -28,0 +26,0 @@ }); |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -116,3 +114,3 @@ import { useTabsContext } from '../Tabs'; | ||
var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread(_objectSpread(_objectSpread({}, otherHandlers), getListboxRootProps(otherHandlers)), {}, { | ||
return _extends({}, otherHandlers, getListboxRootProps(otherHandlers), { | ||
'aria-orientation': orientation === 'vertical' ? 'vertical' : undefined, | ||
@@ -123,3 +121,3 @@ role: 'tablist' | ||
return { | ||
contextValue: _objectSpread(_objectSpread({}, compoundComponentContextValue), listContextValue), | ||
contextValue: _extends({}, compoundComponentContextValue, listContextValue), | ||
dispatch: dispatch, | ||
@@ -126,0 +124,0 @@ getRootProps: getRootProps, |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import isHostComponent from './isHostComponent'; | ||
@@ -23,5 +21,5 @@ | ||
} | ||
return _objectSpread(_objectSpread({}, otherProps), {}, { | ||
ownerState: _objectSpread(_objectSpread({}, otherProps.ownerState), ownerState) | ||
return _extends({}, otherProps, { | ||
ownerState: _extends({}, otherProps.ownerState, ownerState) | ||
}); | ||
} |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
/** | ||
@@ -20,6 +18,6 @@ * Combines the two get*Props functions from Base UI hooks into one. | ||
return function (external) { | ||
var firstResult = _objectSpread(_objectSpread({}, external), getFirstProps(external)); | ||
var result = _objectSpread(_objectSpread({}, firstResult), getSecondProps(firstResult)); | ||
var firstResult = _extends({}, external, getFirstProps(external)); | ||
var result = _extends({}, firstResult, getSecondProps(firstResult)); | ||
return result; | ||
}; | ||
} |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import clsx from 'clsx'; | ||
@@ -30,4 +28,4 @@ import extractEventHandlers from './extractEventHandlers'; | ||
var _joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className); | ||
var _mergedStyle = _objectSpread(_objectSpread(_objectSpread({}, additionalProps == null ? void 0 : additionalProps.style), externalForwardedProps == null ? void 0 : externalForwardedProps.style), externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
var _props = _objectSpread(_objectSpread(_objectSpread({}, additionalProps), externalForwardedProps), externalSlotProps); | ||
var _mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
var _props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps); | ||
if (_joinedClasses.length > 0) { | ||
@@ -48,3 +46,3 @@ _props.className = _joinedClasses; | ||
var eventHandlers = extractEventHandlers(_objectSpread(_objectSpread({}, externalForwardedProps), externalSlotProps)); | ||
var eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps)); | ||
var componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps); | ||
@@ -59,4 +57,4 @@ var otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps); | ||
var joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className); | ||
var mergedStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, internalSlotProps == null ? void 0 : internalSlotProps.style), additionalProps == null ? void 0 : additionalProps.style), externalForwardedProps == null ? void 0 : externalForwardedProps.style), externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, internalSlotProps), additionalProps), otherPropsWithoutEventHandlers), componentsPropsWithoutEventHandlers); | ||
var mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
var props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers); | ||
if (joinedClasses.length > 0) { | ||
@@ -63,0 +61,0 @@ props.className = joinedClasses; |
@@ -1,4 +0,2 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -16,3 +14,3 @@ function areEqual(a, b) { | ||
function getControlledState(internalState, controlledProps) { | ||
var augmentedState = _objectSpread({}, internalState); | ||
var augmentedState = _extends({}, internalState); | ||
Object.keys(controlledProps).forEach(function (key) { | ||
@@ -104,3 +102,3 @@ if (controlledProps[key] !== undefined) { | ||
var dispatchWithContext = React.useCallback(function (action) { | ||
dispatch(_objectSpread(_objectSpread({}, action), {}, { | ||
dispatch(_extends({}, action, { | ||
context: actionContext | ||
@@ -107,0 +105,0 @@ })); |
@@ -1,5 +0,3 @@ | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
@@ -24,3 +22,3 @@ import appendOwnerState from './appendOwnerState'; | ||
var resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState); | ||
var _mergeSlotProps = mergeSlotProps(_objectSpread(_objectSpread({}, rest), {}, { | ||
var _mergeSlotProps = mergeSlotProps(_extends({}, rest, { | ||
externalSlotProps: resolvedComponentsProps | ||
@@ -31,3 +29,3 @@ })), | ||
var ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref); | ||
var props = appendOwnerState(elementType, _objectSpread(_objectSpread({}, mergedProps), {}, { | ||
var props = appendOwnerState(elementType, _extends({}, mergedProps, { | ||
ref: ref | ||
@@ -34,0 +32,0 @@ }), ownerState); |
@@ -0,0 +0,0 @@ export { default } from './Menu'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["actions", "anchorEl", "children", "defaultOpen", "listboxId", "onOpenChange", "open", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -35,13 +38,13 @@ import PropTypes from 'prop-types'; | ||
const { | ||
actions, | ||
anchorEl, | ||
children, | ||
defaultOpen, | ||
listboxId, | ||
onOpenChange, | ||
open: openProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
actions, | ||
anchorEl, | ||
children, | ||
defaultOpen, | ||
listboxId, | ||
onOpenChange, | ||
open: openProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -61,6 +64,5 @@ contextValue, | ||
}), [dispatch]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
open | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -90,6 +92,4 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : Popper; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
children: /*#__PURE__*/_jsx(Listbox, { | ||
...listboxProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: /*#__PURE__*/_jsx(Listbox, _extends({}, listboxProps, { | ||
children: /*#__PURE__*/_jsx(MenuProvider, { | ||
@@ -99,4 +99,4 @@ value: contextValue, | ||
}) | ||
}) | ||
}); | ||
})) | ||
})); | ||
}); | ||
@@ -103,0 +103,0 @@ process.env.NODE_ENV !== "production" ? Menu.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface MenuClasses { |
@@ -0,0 +0,0 @@ export { default } from './MenuItem'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "disabled", "label", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -33,9 +36,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
disabled: disabledProp = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
disabled: disabledProp = false, | ||
label, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -51,8 +54,7 @@ getRootProps, | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled, | ||
focusVisible, | ||
highlighted | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -68,6 +70,5 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'li'; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -74,0 +75,0 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface MenuItemClasses { |
@@ -0,0 +0,0 @@ export { default } from './Modal'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -59,25 +62,25 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
closeAfterTransition = false, | ||
container, | ||
disableAutoFocus = false, | ||
disableEnforceFocus = false, | ||
disableEscapeKeyDown = false, | ||
disablePortal = false, | ||
disableRestoreFocus = false, | ||
disableScrollLock = false, | ||
hideBackdrop = false, | ||
keepMounted = false, | ||
// private | ||
manager: managerProp = defaultManager, | ||
onBackdropClick, | ||
onClose, | ||
onKeyDown, | ||
open, | ||
onTransitionEnter, | ||
onTransitionExited, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
closeAfterTransition = false, | ||
container, | ||
disableAutoFocus = false, | ||
disableEnforceFocus = false, | ||
disableEscapeKeyDown = false, | ||
disablePortal = false, | ||
disableRestoreFocus = false, | ||
disableScrollLock = false, | ||
hideBackdrop = false, | ||
keepMounted = false, | ||
// private | ||
manager: managerProp = defaultManager, | ||
onBackdropClick, | ||
onClose, | ||
onKeyDown, | ||
open, | ||
onTransitionEnter, | ||
onTransitionExited, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
// TODO: `modal`` must change its type in this file to match the type of methods | ||
@@ -145,4 +148,3 @@ // provided by `ModalManager` | ||
}, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
closeAfterTransition, | ||
@@ -158,3 +160,3 @@ disableAutoFocus, | ||
keepMounted | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -253,7 +255,4 @@ const handleEnter = () => { | ||
disablePortal: disablePortal, | ||
children: /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, { | ||
...backdropProps | ||
}) : null, /*#__PURE__*/_jsx(FocusTrap, { | ||
children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, { | ||
disableEnforceFocus: disableEnforceFocus, | ||
@@ -266,3 +265,3 @@ disableAutoFocus: disableAutoFocus, | ||
})] | ||
}) | ||
})) | ||
}); | ||
@@ -269,0 +268,0 @@ }); |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface ModalClasses { |
@@ -0,0 +0,0 @@ export interface ManagedModalProps { |
@@ -137,2 +137,4 @@ import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils'; | ||
constructor() { | ||
this.containers = void 0; | ||
this.modals = void 0; | ||
this.modals = []; | ||
@@ -139,0 +141,0 @@ this.containers = []; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["badgeContent", "children", "invisible", "max", "slotProps", "slots", "showZero"]; | ||
import * as React from 'react'; | ||
@@ -32,11 +35,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
badgeContent: badgeContentProp, | ||
children, | ||
invisible: invisibleProp, | ||
max: maxProp = 99, | ||
slotProps = {}, | ||
slots = {}, | ||
showZero = false, | ||
...other | ||
} = props; | ||
children, | ||
max: maxProp = 99, | ||
slotProps = {}, | ||
slots = {}, | ||
showZero = false | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -47,8 +48,6 @@ badgeContent, | ||
invisible | ||
} = useBadge({ | ||
...props, | ||
} = useBadge(_extends({}, props, { | ||
max: maxProp | ||
}); | ||
const ownerState = { | ||
...props, | ||
})); | ||
const ownerState = _extends({}, props, { | ||
badgeContent, | ||
@@ -58,3 +57,3 @@ invisible, | ||
showZero | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -79,9 +78,7 @@ const Root = slots.root ?? 'span'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [children, /*#__PURE__*/_jsx(BadgeComponent, { | ||
...badgeProps, | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [children, /*#__PURE__*/_jsx(BadgeComponent, _extends({}, badgeProps, { | ||
children: displayValue | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
@@ -88,0 +85,0 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -33,11 +36,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
action, | ||
children, | ||
disabled, | ||
focusableWhenDisabled = false, | ||
onFocusVisible, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
action, | ||
children, | ||
focusableWhenDisabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const buttonRef = React.useRef(); | ||
@@ -49,6 +50,5 @@ const { | ||
getRootProps | ||
} = useButton({ | ||
...props, | ||
} = useButton(_extends({}, props, { | ||
focusableWhenDisabled | ||
}); | ||
})); | ||
React.useImperativeHandle(action, () => ({ | ||
@@ -60,8 +60,7 @@ focusVisible: () => { | ||
}), [setFocusVisible]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
active, | ||
focusableWhenDisabled, | ||
focusVisible | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -81,6 +80,5 @@ const defaultElement = other.href || other.to ? 'a' : 'button'; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -87,0 +85,0 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["defaultValue", "children", "disabled", "error", "onChange", "required", "slotProps", "slots", "value"]; | ||
import * as React from 'react'; | ||
@@ -66,13 +69,13 @@ import PropTypes from 'prop-types'; | ||
const { | ||
defaultValue, | ||
children, | ||
disabled = false, | ||
error = false, | ||
onChange, | ||
required = false, | ||
slotProps = {}, | ||
slots = {}, | ||
value: incomingValue, | ||
...other | ||
} = props; | ||
defaultValue, | ||
children, | ||
disabled = false, | ||
error = false, | ||
onChange, | ||
required = false, | ||
slotProps = {}, | ||
slots = {}, | ||
value: incomingValue | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const [value, setValue] = useControlled({ | ||
@@ -88,4 +91,3 @@ controlled: incomingValue, | ||
React.useEffect(() => setFocused(isFocused => disabled ? false : isFocused), [disabled]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled, | ||
@@ -96,3 +98,3 @@ error, | ||
required | ||
}; | ||
}); | ||
const childContext = React.useMemo(() => { | ||
@@ -139,5 +141,3 @@ return { | ||
value: childContext, | ||
children: /*#__PURE__*/_jsx(Root, { | ||
...rootProps | ||
}) | ||
children: /*#__PURE__*/_jsx(Root, _extends({}, rootProps)) | ||
}); | ||
@@ -144,0 +144,0 @@ }); |
/** | ||
* @mui/base v5.0.0-beta.1 | ||
* @mui/base v5.0.0-beta.2 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"]; | ||
import * as React from 'react'; | ||
@@ -40,34 +43,34 @@ import PropTypes from 'prop-types'; | ||
const { | ||
'aria-describedby': ariaDescribedby, | ||
'aria-label': ariaLabel, | ||
'aria-labelledby': ariaLabelledby, | ||
autoComplete, | ||
autoFocus, | ||
className, | ||
defaultValue, | ||
disabled, | ||
endAdornment, | ||
error, | ||
id, | ||
multiline = false, | ||
name, | ||
onClick, | ||
onChange, | ||
onKeyDown, | ||
onKeyUp, | ||
onFocus, | ||
onBlur, | ||
placeholder, | ||
readOnly, | ||
required, | ||
startAdornment, | ||
value, | ||
type: typeProp, | ||
rows, | ||
slotProps = {}, | ||
slots = {}, | ||
minRows, | ||
maxRows, | ||
...other | ||
} = props; | ||
'aria-describedby': ariaDescribedby, | ||
'aria-label': ariaLabel, | ||
'aria-labelledby': ariaLabelledby, | ||
autoComplete, | ||
autoFocus, | ||
className, | ||
defaultValue, | ||
disabled, | ||
endAdornment, | ||
error, | ||
id, | ||
multiline = false, | ||
name, | ||
onClick, | ||
onChange, | ||
onKeyDown, | ||
onKeyUp, | ||
onFocus, | ||
onBlur, | ||
placeholder, | ||
readOnly, | ||
required, | ||
startAdornment, | ||
value, | ||
type: typeProp, | ||
rows, | ||
slotProps = {}, | ||
slots = {}, | ||
minRows, | ||
maxRows | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -92,4 +95,3 @@ getRootProps, | ||
const type = !multiline ? typeProp ?? 'text' : undefined; | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled: disabledState, | ||
@@ -101,3 +103,3 @@ error: errorState, | ||
type | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -133,14 +135,10 @@ const propsToForward = { | ||
elementType: InputComponent, | ||
getSlotProps: otherHandlers => getInputProps({ | ||
...otherHandlers, | ||
...propsToForward | ||
getSlotProps: otherHandlers => getInputProps(_extends({}, otherHandlers, propsToForward)), | ||
externalSlotProps: slotProps.input, | ||
additionalProps: _extends({ | ||
rows: multiline ? rows : undefined | ||
}, multiline && !isHostComponent(InputComponent) && { | ||
minRows: rows || minRows, | ||
maxRows: rows || maxRows | ||
}), | ||
externalSlotProps: slotProps.input, | ||
additionalProps: { | ||
rows: multiline ? rows : undefined, | ||
...(multiline && !isHostComponent(InputComponent) && { | ||
minRows: rows || minRows, | ||
maxRows: rows || maxRows | ||
}) | ||
}, | ||
ownerState, | ||
@@ -158,8 +156,5 @@ className: classes.input | ||
} | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [startAdornment, /*#__PURE__*/_jsx(InputComponent, { | ||
...inputProps | ||
}), endAdornment] | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [startAdornment, /*#__PURE__*/_jsx(InputComponent, _extends({}, inputProps)), endAdornment] | ||
})); | ||
}); | ||
@@ -166,0 +161,0 @@ process.env.NODE_ENV !== "production" ? Input.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["actions", "anchorEl", "children", "defaultOpen", "listboxId", "onOpenChange", "open", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -34,13 +37,13 @@ import PropTypes from 'prop-types'; | ||
const { | ||
actions, | ||
anchorEl, | ||
children, | ||
defaultOpen, | ||
listboxId, | ||
onOpenChange, | ||
open: openProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
actions, | ||
anchorEl, | ||
children, | ||
defaultOpen, | ||
listboxId, | ||
onOpenChange, | ||
open: openProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -60,6 +63,5 @@ contextValue, | ||
}), [dispatch]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
open | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -89,6 +91,4 @@ const Root = slots.root ?? Popper; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
children: /*#__PURE__*/_jsx(Listbox, { | ||
...listboxProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: /*#__PURE__*/_jsx(Listbox, _extends({}, listboxProps, { | ||
children: /*#__PURE__*/_jsx(MenuProvider, { | ||
@@ -98,4 +98,4 @@ value: contextValue, | ||
}) | ||
}) | ||
}); | ||
})) | ||
})); | ||
}); | ||
@@ -102,0 +102,0 @@ process.env.NODE_ENV !== "production" ? Menu.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "disabled", "label", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -32,9 +35,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
disabled: disabledProp = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
disabled: disabledProp = false, | ||
label, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -50,8 +53,7 @@ getRootProps, | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled, | ||
focusVisible, | ||
highlighted | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -67,6 +69,5 @@ const Root = slots.root ?? 'li'; | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -73,0 +74,0 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -58,25 +61,25 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
closeAfterTransition = false, | ||
container, | ||
disableAutoFocus = false, | ||
disableEnforceFocus = false, | ||
disableEscapeKeyDown = false, | ||
disablePortal = false, | ||
disableRestoreFocus = false, | ||
disableScrollLock = false, | ||
hideBackdrop = false, | ||
keepMounted = false, | ||
// private | ||
manager: managerProp = defaultManager, | ||
onBackdropClick, | ||
onClose, | ||
onKeyDown, | ||
open, | ||
onTransitionEnter, | ||
onTransitionExited, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
closeAfterTransition = false, | ||
container, | ||
disableAutoFocus = false, | ||
disableEnforceFocus = false, | ||
disableEscapeKeyDown = false, | ||
disablePortal = false, | ||
disableRestoreFocus = false, | ||
disableScrollLock = false, | ||
hideBackdrop = false, | ||
keepMounted = false, | ||
// private | ||
manager: managerProp = defaultManager, | ||
onBackdropClick, | ||
onClose, | ||
onKeyDown, | ||
open, | ||
onTransitionEnter, | ||
onTransitionExited, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
// TODO: `modal`` must change its type in this file to match the type of methods | ||
@@ -144,4 +147,3 @@ // provided by `ModalManager` | ||
}, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
closeAfterTransition, | ||
@@ -157,3 +159,3 @@ disableAutoFocus, | ||
keepMounted | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -252,7 +254,4 @@ const handleEnter = () => { | ||
disablePortal: disablePortal, | ||
children: /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, { | ||
...backdropProps | ||
}) : null, /*#__PURE__*/_jsx(FocusTrap, { | ||
children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropComponent, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, { | ||
disableEnforceFocus: disableEnforceFocus, | ||
@@ -265,3 +264,3 @@ disableAutoFocus: disableAutoFocus, | ||
})] | ||
}) | ||
})) | ||
}); | ||
@@ -268,0 +267,0 @@ }); |
@@ -137,2 +137,4 @@ import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils'; | ||
constructor() { | ||
this.containers = void 0; | ||
this.modals = void 0; | ||
this.modals = []; | ||
@@ -139,0 +141,0 @@ this.containers = []; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "disabled", "label", "slotProps", "slots", "value"]; | ||
import * as React from 'react'; | ||
@@ -27,10 +30,10 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
disabled = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
value, | ||
...other | ||
} = props; | ||
children, | ||
disabled = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
value | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const Root = slots.root ?? 'li'; | ||
@@ -54,4 +57,3 @@ const optionRef = React.useRef(null); | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled, | ||
@@ -61,3 +63,3 @@ highlighted, | ||
selected | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -72,6 +74,5 @@ const rootProps = useSlotProps({ | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -78,0 +79,0 @@ process.env.NODE_ENV !== "production" ? Option.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["disabled", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -31,7 +34,7 @@ import PropTypes from 'prop-types'; | ||
const { | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const Root = slots?.root || 'li'; | ||
@@ -63,12 +66,9 @@ const Label = slots?.label || 'span'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/_jsx(Label, { | ||
...labelProps, | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Label, _extends({}, labelProps, { | ||
children: props.label | ||
}), /*#__PURE__*/_jsx(List, { | ||
...listProps, | ||
})), /*#__PURE__*/_jsx(List, _extends({}, listProps, { | ||
children: props.children | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
@@ -75,0 +75,0 @@ process.env.NODE_ENV !== "production" ? OptionGroup.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,5 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], | ||
_excluded2 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -46,19 +50,18 @@ import { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const { | ||
anchorEl, | ||
children, | ||
direction, | ||
disablePortal, | ||
modifiers, | ||
open, | ||
placement: initialPlacement, | ||
popperOptions, | ||
popperRef: popperRefProp, | ||
slotProps = {}, | ||
slots = {}, | ||
TransitionProps, | ||
// @ts-ignore internal logic | ||
ownerState: ownerStateProp, | ||
// prevent from spreading to DOM, it can come from the parent component e.g. Select. | ||
...other | ||
} = props; | ||
anchorEl, | ||
children, | ||
direction, | ||
disablePortal, | ||
modifiers, | ||
open, | ||
placement: initialPlacement, | ||
popperOptions, | ||
popperRef: popperRefProp, | ||
slotProps = {}, | ||
slots = {}, | ||
TransitionProps | ||
// @ts-ignore internal logic | ||
// prevent from spreading to DOM, it can come from the parent component e.g. Select. | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const tooltipRef = React.useRef(null); | ||
@@ -131,7 +134,7 @@ const ownRef = useForkRef(tooltipRef, forwardedRef); | ||
} | ||
const popper = createPopper(resolvedAnchorElement, tooltipRef.current, { | ||
placement: rtlPlacement, | ||
...popperOptions, | ||
const popper = createPopper(resolvedAnchorElement, tooltipRef.current, _extends({ | ||
placement: rtlPlacement | ||
}, popperOptions, { | ||
modifiers: popperModifiers | ||
}); | ||
})); | ||
handlePopperRefRef.current(popper); | ||
@@ -162,6 +165,5 @@ return () => { | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: typeof children === 'function' ? children(childProps) : children | ||
}); | ||
})); | ||
}); | ||
@@ -182,19 +184,19 @@ | ||
const { | ||
anchorEl, | ||
children, | ||
container: containerProp, | ||
direction = 'ltr', | ||
disablePortal = false, | ||
keepMounted = false, | ||
modifiers, | ||
open, | ||
placement = 'bottom', | ||
popperOptions = defaultPopperOptions, | ||
popperRef, | ||
style, | ||
transition = false, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
anchorEl, | ||
children, | ||
container: containerProp, | ||
direction = 'ltr', | ||
disablePortal = false, | ||
keepMounted = false, | ||
modifiers, | ||
open, | ||
placement = 'bottom', | ||
popperOptions = defaultPopperOptions, | ||
popperRef, | ||
style, | ||
transition = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded2); | ||
const [exited, setExited] = React.useState(true); | ||
@@ -230,3 +232,3 @@ const handleEnter = () => { | ||
container: container, | ||
children: /*#__PURE__*/_jsx(PopperTooltip, { | ||
children: /*#__PURE__*/_jsx(PopperTooltip, _extends({ | ||
anchorEl: anchorEl, | ||
@@ -242,5 +244,5 @@ direction: direction, | ||
slotProps: slotProps, | ||
slots: slots, | ||
...other, | ||
style: { | ||
slots: slots | ||
}, other, { | ||
style: _extends({ | ||
// Prevents scroll issue, waiting for Popper.js to add this style once initiated. | ||
@@ -251,8 +253,7 @@ position: 'fixed', | ||
left: 0, | ||
display, | ||
...style | ||
}, | ||
display | ||
}, style), | ||
TransitionProps: transitionProps, | ||
children: children | ||
}) | ||
})) | ||
}); | ||
@@ -259,0 +260,0 @@ }); |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "slotProps", "slots", "value"]; | ||
import * as React from 'react'; | ||
@@ -68,21 +71,21 @@ import PropTypes from 'prop-types'; | ||
const { | ||
autoFocus, | ||
children, | ||
defaultValue, | ||
defaultListboxOpen = false, | ||
disabled: disabledProp, | ||
getSerializedValue = defaultFormValueProvider, | ||
listboxId, | ||
listboxOpen: listboxOpenProp, | ||
multiple = false, | ||
name, | ||
onChange, | ||
onListboxOpenChange, | ||
getOptionAsString = defaultOptionStringifier, | ||
renderValue: renderValueProp, | ||
slotProps = {}, | ||
slots = {}, | ||
value: valueProp, | ||
...other | ||
} = props; | ||
autoFocus, | ||
children, | ||
defaultValue, | ||
defaultListboxOpen = false, | ||
disabled: disabledProp, | ||
getSerializedValue = defaultFormValueProvider, | ||
listboxId, | ||
listboxOpen: listboxOpenProp, | ||
multiple = false, | ||
name, | ||
onChange, | ||
onListboxOpenChange, | ||
getOptionAsString = defaultOptionStringifier, | ||
renderValue: renderValueProp, | ||
slotProps = {}, | ||
slots = {}, | ||
value: valueProp | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const renderValue = renderValueProp ?? defaultRenderValue; | ||
@@ -127,4 +130,3 @@ const [buttonDefined, setButtonDefined] = React.useState(false); | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
active: buttonActive, | ||
@@ -138,3 +140,3 @@ defaultListboxOpen, | ||
value | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -179,9 +181,6 @@ const buttonProps = useSlotProps({ | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx(Button, { | ||
...buttonProps, | ||
children: [/*#__PURE__*/_jsx(Button, _extends({}, buttonProps, { | ||
children: renderValue(selectedOptionsMetadata) | ||
}), buttonDefined && /*#__PURE__*/_jsx(PopperComponent, { | ||
...popperProps, | ||
children: /*#__PURE__*/_jsx(ListboxRoot, { | ||
...listboxProps, | ||
})), buttonDefined && /*#__PURE__*/_jsx(PopperComponent, _extends({}, popperProps, { | ||
children: /*#__PURE__*/_jsx(ListboxRoot, _extends({}, listboxProps, { | ||
children: /*#__PURE__*/_jsx(SelectProvider, { | ||
@@ -191,4 +190,4 @@ value: contextValue, | ||
}) | ||
}) | ||
}), name && /*#__PURE__*/_jsx("input", { | ||
})) | ||
})), name && /*#__PURE__*/_jsx("input", { | ||
type: "hidden", | ||
@@ -195,0 +194,0 @@ name: name, |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelFormat", "isRtl", "defaultValue", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -55,34 +58,28 @@ import PropTypes from 'prop-types'; | ||
const { | ||
'aria-label': ariaLabel, | ||
'aria-valuetext': ariaValuetext, | ||
'aria-labelledby': ariaLabelledby, | ||
className, | ||
disableSwap = false, | ||
disabled = false, | ||
getAriaLabel, | ||
getAriaValueText, | ||
marks: marksProp = false, | ||
max = 100, | ||
min = 0, | ||
name, | ||
onChange, | ||
onChangeCommitted, | ||
orientation = 'horizontal', | ||
scale = Identity, | ||
step = 1, | ||
tabIndex, | ||
track = 'normal', | ||
value: valueProp, | ||
valueLabelFormat = Identity, | ||
isRtl = false, | ||
defaultValue, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
'aria-label': ariaLabel, | ||
'aria-valuetext': ariaValuetext, | ||
'aria-labelledby': ariaLabelledby, | ||
className, | ||
disableSwap = false, | ||
disabled = false, | ||
getAriaLabel, | ||
getAriaValueText, | ||
marks: marksProp = false, | ||
max = 100, | ||
min = 0, | ||
orientation = 'horizontal', | ||
scale = Identity, | ||
step = 1, | ||
track = 'normal', | ||
valueLabelFormat = Identity, | ||
isRtl = false, | ||
defaultValue, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
// all props with defaults | ||
// consider extracting to hook an reusing the lint rule for the variants | ||
const partialOwnerState = { | ||
...props, | ||
const partialOwnerState = _extends({}, props, { | ||
marks: marksProp, | ||
@@ -99,3 +96,3 @@ disabled, | ||
valueLabelFormat | ||
}; | ||
}); | ||
const { | ||
@@ -115,12 +112,10 @@ axisProps, | ||
trackLeap | ||
} = useSlider({ | ||
...partialOwnerState, | ||
} = useSlider(_extends({}, partialOwnerState, { | ||
rootRef: forwardedRef | ||
}); | ||
const ownerState = { | ||
...partialOwnerState, | ||
})); | ||
const ownerState = _extends({}, partialOwnerState, { | ||
marked: marks.length > 0 && marks.some(mark => mark.label), | ||
dragging, | ||
focusedThumbIndex | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -148,6 +143,3 @@ const Root = slots.root ?? 'span'; | ||
additionalProps: { | ||
style: { | ||
...axisProps[axis].offset(trackOffset), | ||
...axisProps[axis].leap(trackLeap) | ||
} | ||
style: _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap)) | ||
}, | ||
@@ -190,9 +182,4 @@ ownerState, | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/_jsx(Rail, { | ||
...railProps | ||
}), /*#__PURE__*/_jsx(Track, { | ||
...trackProps | ||
}), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => { | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Rail, _extends({}, railProps)), /*#__PURE__*/_jsx(Track, _extends({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => { | ||
const percent = valueToPercent(mark.value, min, max); | ||
@@ -207,27 +194,19 @@ const style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx(Mark, { | ||
"data-index": index, | ||
...markProps, | ||
...(!isHostComponent(Mark) && { | ||
markActive | ||
}), | ||
style: { | ||
...style, | ||
...markProps.style | ||
}, | ||
children: [/*#__PURE__*/_jsx(Mark, _extends({ | ||
"data-index": index | ||
}, markProps, !isHostComponent(Mark) && { | ||
markActive | ||
}, { | ||
style: _extends({}, style, markProps.style), | ||
className: clsx(markProps.className, markActive && classes.markActive) | ||
}), mark.label != null ? /*#__PURE__*/_jsx(MarkLabel, { | ||
})), mark.label != null ? /*#__PURE__*/_jsx(MarkLabel, _extends({ | ||
"aria-hidden": true, | ||
"data-index": index, | ||
...markLabelProps, | ||
...(!isHostComponent(MarkLabel) && { | ||
markLabelActive: markActive | ||
}), | ||
style: { | ||
...style, | ||
...markLabelProps.style | ||
}, | ||
"data-index": index | ||
}, markLabelProps, !isHostComponent(MarkLabel) && { | ||
markLabelActive: markActive | ||
}, { | ||
style: _extends({}, style, markLabelProps.style), | ||
className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive), | ||
children: mark.label | ||
}) : null] | ||
})) : null] | ||
}, index); | ||
@@ -237,12 +216,10 @@ }), values.map((value, index) => { | ||
const style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/_jsxs(Thumb, { | ||
"data-index": index, | ||
...thumbProps, | ||
return /*#__PURE__*/_jsxs(Thumb, _extends({ | ||
"data-index": index | ||
}, thumbProps, { | ||
className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible), | ||
style: { | ||
...style, | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined, | ||
...thumbProps.style | ||
}, | ||
children: [/*#__PURE__*/_jsx(Input, { | ||
style: _extends({}, style, { | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined | ||
}, thumbProps.style), | ||
children: [/*#__PURE__*/_jsx(Input, _extends({ | ||
"data-index": index, | ||
@@ -253,16 +230,13 @@ "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel, | ||
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext, | ||
value: values[index], | ||
...inputProps | ||
}), ValueLabel ? /*#__PURE__*/_jsx(ValueLabel, { | ||
...(!isHostComponent(ValueLabel) && { | ||
valueLabelFormat, | ||
index, | ||
disabled | ||
}), | ||
...valueLabelProps, | ||
value: values[index] | ||
}, inputProps)), ValueLabel ? /*#__PURE__*/_jsx(ValueLabel, _extends({}, !isHostComponent(ValueLabel) && { | ||
valueLabelFormat, | ||
index, | ||
disabled | ||
}, valueLabelProps, { | ||
children: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat | ||
}) : null] | ||
}, index); | ||
})) : null] | ||
}), index); | ||
})] | ||
}); | ||
})); | ||
}); | ||
@@ -269,0 +243,0 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["autoHideDuration", "children", "disableWindowBlurListener", "exited", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -29,17 +32,13 @@ import PropTypes from 'prop-types'; | ||
const { | ||
autoHideDuration = null, | ||
children, | ||
disableWindowBlurListener = false, | ||
exited = true, | ||
onBlur, | ||
onClose, | ||
onFocus, | ||
onMouseEnter, | ||
onMouseLeave, | ||
open, | ||
resumeHideDuration, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
autoHideDuration = null, | ||
children, | ||
disableWindowBlurListener = false, | ||
exited = true, | ||
onClose, | ||
open, | ||
resumeHideDuration, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const classes = useUtilityClasses(); | ||
@@ -49,4 +48,3 @@ const { | ||
onClickAway | ||
} = useSnackbar({ | ||
...props, | ||
} = useSnackbar(_extends({}, props, { | ||
autoHideDuration, | ||
@@ -57,3 +55,3 @@ disableWindowBlurListener, | ||
resumeHideDuration | ||
}); | ||
})); | ||
const ownerState = props; | ||
@@ -88,9 +86,7 @@ const Root = slots.root || 'div'; | ||
} | ||
return /*#__PURE__*/_jsx(ClickAwayListener, { | ||
...clickAwayListenerProps, | ||
children: /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(ClickAwayListener, _extends({}, clickAwayListenerProps, { | ||
children: /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}) | ||
}); | ||
})) | ||
})); | ||
}); | ||
@@ -97,0 +93,0 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -39,15 +42,14 @@ import PropTypes from 'prop-types'; | ||
const { | ||
checked: checkedProp, | ||
defaultChecked, | ||
disabled: disabledProp, | ||
onBlur, | ||
onChange, | ||
onFocus, | ||
onFocusVisible, | ||
readOnly: readOnlyProp, | ||
required, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
checked: checkedProp, | ||
defaultChecked, | ||
disabled: disabledProp, | ||
onBlur, | ||
onChange, | ||
onFocus, | ||
onFocusVisible, | ||
readOnly: readOnlyProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const useSwitchProps = { | ||
@@ -70,4 +72,3 @@ checked: checkedProp, | ||
} = useSwitch(useSwitchProps); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
checked, | ||
@@ -77,3 +78,3 @@ disabled, | ||
readOnly | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -113,12 +114,5 @@ const Root = slots.root ?? 'span'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/_jsx(Track, { | ||
...trackProps | ||
}), /*#__PURE__*/_jsx(Thumb, { | ||
...thumbProps | ||
}), /*#__PURE__*/_jsx(Input, { | ||
...inputProps | ||
})] | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Track, _extends({}, trackProps)), /*#__PURE__*/_jsx(Thumb, _extends({}, thumbProps)), /*#__PURE__*/_jsx(Input, _extends({}, inputProps))] | ||
})); | ||
}); | ||
@@ -125,0 +119,0 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["action", "children", "value", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -32,13 +35,8 @@ import PropTypes from 'prop-types'; | ||
const { | ||
action, | ||
children, | ||
value: valueProp, | ||
disabled = false, | ||
onChange, | ||
onClick, | ||
onFocus, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const tabRef = React.useRef(); | ||
@@ -51,8 +49,6 @@ const handleRef = useForkRef(tabRef, forwardedRef); | ||
getRootProps | ||
} = useTab({ | ||
...props, | ||
} = useTab(_extends({}, props, { | ||
rootRef: handleRef | ||
}); | ||
const ownerState = { | ||
...props, | ||
})); | ||
const ownerState = _extends({}, props, { | ||
active, | ||
@@ -62,3 +58,3 @@ disabled, | ||
selected | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -77,6 +73,5 @@ const TabRoot = slots.root ?? 'button'; | ||
}); | ||
return /*#__PURE__*/_jsx(TabRoot, { | ||
...tabRootProps, | ||
return /*#__PURE__*/_jsx(TabRoot, _extends({}, tabRootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -83,0 +78,0 @@ process.env.NODE_ENV !== "production" ? Tab.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["colSpan", "count", "getItemAriaLabel", "labelDisplayedRows", "labelId", "labelRowsPerPage", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "selectId", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -52,18 +55,18 @@ import PropTypes from 'prop-types'; | ||
const { | ||
colSpan: colSpanProp, | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
labelDisplayedRows = defaultLabelDisplayedRows, | ||
labelId: labelIdProp, | ||
labelRowsPerPage = 'Rows per page:', | ||
onPageChange, | ||
onRowsPerPageChange, | ||
page, | ||
rowsPerPage, | ||
rowsPerPageOptions = [10, 25, 50, 100], | ||
selectId: selectIdProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
colSpan: colSpanProp, | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
labelDisplayedRows = defaultLabelDisplayedRows, | ||
labelId: labelIdProp, | ||
labelRowsPerPage = 'Rows per page:', | ||
onPageChange, | ||
onRowsPerPageChange, | ||
page, | ||
rowsPerPage, | ||
rowsPerPageOptions = [10, 25, 50, 100], | ||
selectId: selectIdProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const ownerState = props; | ||
@@ -165,20 +168,12 @@ const classes = useUtilityClasses(); | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
children: /*#__PURE__*/_jsxs(Toolbar, { | ||
...toolbarProps, | ||
children: [/*#__PURE__*/_jsx(Spacer, { | ||
...spacerProps | ||
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabel, { | ||
...selectLabelProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: /*#__PURE__*/_jsxs(Toolbar, _extends({}, toolbarProps, { | ||
children: [/*#__PURE__*/_jsx(Spacer, _extends({}, spacerProps)), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabel, _extends({}, selectLabelProps, { | ||
children: labelRowsPerPage | ||
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(Select, { | ||
...selectProps, | ||
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/_createElement(MenuItem, { | ||
...menuItemProps, | ||
})), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(Select, _extends({}, selectProps, { | ||
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/_createElement(MenuItem, _extends({}, menuItemProps, { | ||
key: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption, | ||
value: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption | ||
}, typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption)) | ||
}), /*#__PURE__*/_jsx(DisplayedRows, { | ||
...displayedRowsProps, | ||
}), typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption)) | ||
})), /*#__PURE__*/_jsx(DisplayedRows, _extends({}, displayedRowsProps, { | ||
children: labelDisplayedRows({ | ||
@@ -190,7 +185,5 @@ from: count === 0 ? 0 : page * rowsPerPage + 1, | ||
}) | ||
}), /*#__PURE__*/_jsx(Actions, { | ||
...actionsProps | ||
})] | ||
}) | ||
}); | ||
})), /*#__PURE__*/_jsx(Actions, _extends({}, actionsProps))] | ||
})) | ||
})); | ||
}); | ||
@@ -197,0 +190,0 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["count", "getItemAriaLabel", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "direction", "ownerState", "slotProps", "slots"]; | ||
var _span, _span2, _span3, _span4; | ||
@@ -35,16 +38,17 @@ import * as React from 'react'; | ||
const { | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
onPageChange, | ||
page, | ||
rowsPerPage, | ||
showFirstButton = false, | ||
showLastButton = false, | ||
direction, | ||
// @ts-ignore | ||
ownerState: ownerStateProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
onPageChange, | ||
page, | ||
rowsPerPage, | ||
showFirstButton = false, | ||
showLastButton = false, | ||
direction | ||
// @ts-ignore | ||
, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const ownerState = props; | ||
@@ -125,19 +129,14 @@ const handleFirstPageButtonClick = event => { | ||
const BackPageIcon = slots.backPageIcon ?? BackPageIconDefault; | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButton, { | ||
...firstButtonProps, | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButton, _extends({}, firstButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(LastPageIcon, {}) : /*#__PURE__*/_jsx(FirstPageIcon, {}) | ||
}), /*#__PURE__*/_jsx(BackButton, { | ||
...backButtonProps, | ||
})), /*#__PURE__*/_jsx(BackButton, _extends({}, backButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(NextPageIcon, {}) : /*#__PURE__*/_jsx(BackPageIcon, {}) | ||
}), /*#__PURE__*/_jsx(NextButton, { | ||
...nextButtonProps, | ||
})), /*#__PURE__*/_jsx(NextButton, _extends({}, nextButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(BackPageIcon, {}) : /*#__PURE__*/_jsx(NextPageIcon, {}) | ||
}), showLastButton && /*#__PURE__*/_jsx(LastButton, { | ||
...lastButtonProps, | ||
})), showLastButton && /*#__PURE__*/_jsx(LastButton, _extends({}, lastButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(FirstPageIcon, {}) : /*#__PURE__*/_jsx(LastPageIcon, {}) | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
export default TablePaginationActions; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "value", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -30,8 +33,7 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
value, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -41,6 +43,5 @@ hidden, | ||
} = useTabPanel(props); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
hidden | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -60,6 +61,5 @@ const TabPanelRoot = slots.root ?? 'div'; | ||
}); | ||
return /*#__PURE__*/_jsx(TabPanelRoot, { | ||
...tabPanelRootProps, | ||
return /*#__PURE__*/_jsx(TabPanelRoot, _extends({}, tabPanelRootProps, { | ||
children: !hidden && children | ||
}); | ||
})); | ||
}); | ||
@@ -66,0 +66,0 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "value", "defaultValue", "orientation", "direction", "onChange", "selectionFollowsFocus", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -32,21 +35,16 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
value: valueProp, | ||
defaultValue, | ||
orientation = 'horizontal', | ||
direction = 'ltr', | ||
onChange, | ||
selectionFollowsFocus, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
orientation = 'horizontal', | ||
direction = 'ltr', | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
contextValue | ||
} = useTabs(props); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
orientation, | ||
direction | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -64,4 +62,3 @@ const TabsRoot = slots.root ?? 'div'; | ||
}); | ||
return /*#__PURE__*/_jsx(TabsRoot, { | ||
...tabsRootProps, | ||
return /*#__PURE__*/_jsx(TabsRoot, _extends({}, tabsRootProps, { | ||
children: /*#__PURE__*/_jsx(TabsProvider, { | ||
@@ -71,3 +68,3 @@ value: contextValue, | ||
}) | ||
}); | ||
})); | ||
}); | ||
@@ -74,0 +71,0 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes /* remove-proptypes */ = { |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -32,7 +35,7 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -46,7 +49,6 @@ isRtl, | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
isRtl, | ||
orientation | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -64,6 +66,5 @@ const TabsListRoot = slots.root ?? 'div'; | ||
value: contextValue, | ||
children: /*#__PURE__*/_jsx(TabsListRoot, { | ||
...tabsListRootProps, | ||
children: /*#__PURE__*/_jsx(TabsListRoot, _extends({}, tabsListRootProps, { | ||
children: children | ||
}) | ||
})) | ||
}); | ||
@@ -70,0 +71,0 @@ }); |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["onChange", "maxRows", "minRows", "style", "value"]; | ||
import * as React from 'react'; | ||
@@ -42,9 +45,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
onChange, | ||
maxRows, | ||
minRows = 1, | ||
style, | ||
value, | ||
...other | ||
} = props; | ||
onChange, | ||
maxRows, | ||
minRows = 1, | ||
style, | ||
value | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -198,3 +201,3 @@ current: isControlled | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx("textarea", { | ||
children: [/*#__PURE__*/_jsx("textarea", _extends({ | ||
value: value, | ||
@@ -206,11 +209,9 @@ onChange: handleChange, | ||
rows: minRows, | ||
style: { | ||
style: _extends({ | ||
height: state.outerHeightStyle, | ||
// Need a large enough difference to allow scrolling. | ||
// This prevents infinite rendering loop. | ||
overflow: state.overflow ? 'hidden' : undefined, | ||
...style | ||
}, | ||
...other | ||
}), /*#__PURE__*/_jsx("textarea", { | ||
overflow: state.overflow ? 'hidden' : undefined | ||
}, style) | ||
}, other)), /*#__PURE__*/_jsx("textarea", { | ||
"aria-hidden": true, | ||
@@ -221,7 +222,5 @@ className: props.className, | ||
tabIndex: -1, | ||
style: { | ||
...styles.shadow, | ||
...style, | ||
style: _extends({}, styles.shadow, style, { | ||
padding: 0 | ||
} | ||
}) | ||
})] | ||
@@ -228,0 +227,0 @@ }); |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
/* eslint-disable no-constant-condition */ | ||
@@ -881,5 +882,5 @@ import * as React from 'react'; | ||
return { | ||
getRootProps: (other = {}) => ({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null, | ||
...other, | ||
getRootProps: (other = {}) => _extends({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null | ||
}, other, { | ||
onKeyDown: handleKeyDown(other), | ||
@@ -925,9 +926,8 @@ onMouseDown: handleMouseDown, | ||
index | ||
}) => ({ | ||
}) => _extends({ | ||
key: index, | ||
'data-tag-index': index, | ||
tabIndex: -1, | ||
...(!readOnly && { | ||
onDelete: handleTagDelete(index) | ||
}) | ||
tabIndex: -1 | ||
}, !readOnly && { | ||
onDelete: handleTagDelete(index) | ||
}), | ||
@@ -934,0 +934,0 @@ getListboxProps: () => ({ |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -141,6 +142,3 @@ import { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; | ||
const propsEventHandlers = extractEventHandlers(parameters); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...otherHandlers | ||
}; | ||
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
@@ -150,6 +148,5 @@ // onFocusVisible can be present on the props, but since it's not a valid React event handler, | ||
delete externalEventHandlers.onFocusVisible; | ||
return { | ||
type, | ||
...externalEventHandlers, | ||
...buttonProps, | ||
return _extends({ | ||
type | ||
}, externalEventHandlers, buttonProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -163,3 +160,3 @@ onClick: createHandleClick(externalEventHandlers), | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -166,0 +163,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils"; | ||
@@ -120,11 +121,6 @@ import * as React from 'react'; | ||
const propsEventHandlers = extractEventHandlers(parameters, ['onBlur', 'onChange', 'onFocus']); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...extractEventHandlers(externalProps) | ||
}; | ||
return { | ||
...externalProps, | ||
...externalEventHandlers, | ||
const externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); | ||
return _extends({}, externalProps, externalEventHandlers, { | ||
onClick: handleClick(externalEventHandlers) | ||
}; | ||
}); | ||
}; | ||
@@ -137,15 +133,9 @@ const getInputProps = (externalProps = {}) => { | ||
}; | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...extractEventHandlers(externalProps) | ||
}; | ||
const mergedEventHandlers = { | ||
...externalProps, | ||
...externalEventHandlers, | ||
const externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); | ||
const mergedEventHandlers = _extends({}, externalProps, externalEventHandlers, { | ||
onBlur: handleBlur(externalEventHandlers), | ||
onChange: handleChange(externalEventHandlers), | ||
onFocus: handleFocus(externalEventHandlers) | ||
}; | ||
return { | ||
...mergedEventHandlers, | ||
}); | ||
return _extends({}, mergedEventHandlers, { | ||
'aria-invalid': error || undefined, | ||
@@ -157,3 +147,3 @@ defaultValue: defaultValue, | ||
disabled | ||
}; | ||
}); | ||
}; | ||
@@ -160,0 +150,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { ListActionTypes } from './listActions.types'; | ||
@@ -163,7 +164,6 @@ /** | ||
const newSelectedValues = toggleSelection(item, selectedValues, selectionMode, itemComparer); | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
selectedValues: newSelectedValues, | ||
highlightedValue: item | ||
}; | ||
}); | ||
} | ||
@@ -178,21 +178,17 @@ function handleKeyDown(key, state, context) { | ||
case 'Home': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'start', context) | ||
}; | ||
}); | ||
case 'End': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'end', context) | ||
}; | ||
}); | ||
case 'PageUp': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -pageSize, context) | ||
}; | ||
}); | ||
case 'PageDown': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, pageSize, context) | ||
}; | ||
}); | ||
case 'ArrowUp': | ||
@@ -202,6 +198,5 @@ if (orientation !== 'vertical') { | ||
} | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -1, context) | ||
}; | ||
}); | ||
case 'ArrowDown': | ||
@@ -211,6 +206,5 @@ if (orientation !== 'vertical') { | ||
} | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 1, context) | ||
}; | ||
}); | ||
case 'ArrowLeft': | ||
@@ -222,6 +216,5 @@ { | ||
const offset = orientation === 'horizontal-ltr' ? -1 : 1; | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
}; | ||
}); | ||
} | ||
@@ -234,6 +227,5 @@ case 'ArrowRight': | ||
const offset = orientation === 'horizontal-ltr' ? 1 : -1; | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
}; | ||
}); | ||
} | ||
@@ -255,6 +247,5 @@ case 'Enter': | ||
} | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: null | ||
}; | ||
}); | ||
} | ||
@@ -285,6 +276,5 @@ function textCriteriaMatches(nextFocus, searchString, stringifyItem) { | ||
// The nextItem is the element to be highlighted | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: nextItem | ||
}; | ||
}); | ||
} | ||
@@ -313,7 +303,6 @@ // Move to the next element. | ||
const newSelectedValues = selectedValues.filter(selectedValue => items.some(item => itemComparer(item, selectedValue))); | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: newHighlightedValue, | ||
selectedValues: newSelectedValues | ||
}; | ||
}); | ||
} | ||
@@ -320,0 +309,0 @@ export default function listReducer(state, action) { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -118,6 +119,3 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const reducer = externalReducer ?? defaultReducer; | ||
const actionContext = React.useMemo(() => ({ | ||
...reducerActionContext, | ||
...listActionContext | ||
}), [reducerActionContext, listActionContext]); | ||
const actionContext = React.useMemo(() => _extends({}, reducerActionContext, listActionContext), [reducerActionContext, listActionContext]); | ||
const [state, dispatch] = useControllableReducer({ | ||
@@ -219,4 +217,3 @@ reducer, | ||
const getRootProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return _extends({}, otherHandlers, { | ||
'aria-activedescendant': focusManagement === 'activeDescendant' && highlightedValue != null ? getItemId(highlightedValue) : undefined, | ||
@@ -227,3 +224,3 @@ onBlur: createHandleBlur(otherHandlers), | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -230,0 +227,0 @@ const getItemState = React.useCallback(item => { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -88,4 +89,3 @@ import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; | ||
} | ||
const getRootProps = (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
const getRootProps = (otherHandlers = {}) => _extends({}, otherHandlers, { | ||
onClick: createHandleClick(otherHandlers), | ||
@@ -92,0 +92,0 @@ onPointerOver: handlePointerOverEvents ? createHandlePointerOver(otherHandlers) : undefined, |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { ListActionTypes, listReducer } from '../useList'; | ||
@@ -10,13 +11,11 @@ export default function menuReducer(state, action) { | ||
if (newState.highlightedValue === null && action.context.items.length > 0) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
highlightedValue: action.context.items[0] | ||
}; | ||
}); | ||
} | ||
if (action.type === ListActionTypes.keyDown) { | ||
if (action.event.key === 'Escape') { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
@@ -26,7 +25,6 @@ } | ||
if (!action.context.listboxRef.current?.contains(action.event.relatedTarget)) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false, | ||
highlightedValue: action.context.items[0] | ||
}; | ||
}); | ||
} | ||
@@ -33,0 +31,0 @@ } |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -91,7 +92,5 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const rootProps = getRootProps(otherHandlers); | ||
return { | ||
...otherHandlers, | ||
...rootProps, | ||
return _extends({}, otherHandlers, rootProps, { | ||
role: 'menu' | ||
}; | ||
}); | ||
}; | ||
@@ -103,6 +102,3 @@ React.useDebugValue({ | ||
return { | ||
contextValue: { | ||
...compoundComponentContextValue, | ||
...listContextValue | ||
}, | ||
contextValue: _extends({}, compoundComponentContextValue, listContextValue), | ||
dispatch, | ||
@@ -109,0 +105,0 @@ getListboxProps, |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -63,5 +64,3 @@ import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
return { | ||
getRootProps: (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
...getButtonProps(otherHandlers), | ||
getRootProps: (otherHandlers = {}) => _extends({}, otherHandlers, getButtonProps(otherHandlers), { | ||
role: 'menuitem' | ||
@@ -78,17 +77,8 @@ }), | ||
const getRootProps = (otherHandlers = {}) => { | ||
const resolvedButtonProps = { | ||
...otherHandlers, | ||
...getButtonProps(otherHandlers) | ||
}; | ||
const resolvedMenuItemProps = { | ||
...resolvedButtonProps, | ||
...getListRootProps(resolvedButtonProps) | ||
}; | ||
return { | ||
...otherHandlers, | ||
...resolvedButtonProps, | ||
...resolvedMenuItemProps, | ||
const resolvedButtonProps = _extends({}, otherHandlers, getButtonProps(otherHandlers)); | ||
const resolvedMenuItemProps = _extends({}, resolvedButtonProps, getListRootProps(resolvedButtonProps)); | ||
return _extends({}, otherHandlers, resolvedButtonProps, resolvedMenuItemProps, { | ||
role: 'menuitem', | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -95,0 +85,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -46,5 +47,3 @@ import { unstable_useForkRef as useForkRef, unstable_useId as useId } from '@mui/utils'; | ||
return { | ||
getRootProps: (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
...getListItemProps(otherHandlers), | ||
getRootProps: (otherHandlers = {}) => _extends({}, otherHandlers, getListItemProps(otherHandlers), { | ||
id, | ||
@@ -51,0 +50,0 @@ ref: handleRef, |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { moveHighlight, listReducer, ListActionTypes } from '../useList'; | ||
@@ -14,7 +15,6 @@ import { SelectActionTypes } from './useSelect.types'; | ||
const itemToHighlight = state.selectedValues[0] ?? moveHighlight(null, 'start', action.context); | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
open: !open, | ||
highlightedValue: !open ? itemToHighlight : null | ||
}; | ||
}); | ||
} | ||
@@ -26,27 +26,23 @@ const newState = listReducer(state, action); | ||
if (action.event.key === 'Escape') { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
if (selectionMode === 'single' && (action.event.key === 'Enter' || action.event.key === ' ')) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
} else { | ||
if (action.event.key === 'Enter' || action.event.key === ' ' || action.event.key === 'ArrowDown') { | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
open: true, | ||
highlightedValue: state.selectedValues[0] ?? moveHighlight(null, 'start', action.context) | ||
}; | ||
}); | ||
} | ||
if (action.event.key === 'ArrowUp') { | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
open: true, | ||
highlightedValue: state.selectedValues[0] ?? moveHighlight(null, 'end', action.context) | ||
}; | ||
}); | ||
} | ||
@@ -57,13 +53,11 @@ } | ||
if (selectionMode === 'single') { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
break; | ||
case ListActionTypes.blur: | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
default: | ||
@@ -70,0 +64,0 @@ return newState; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -185,4 +186,3 @@ import { unstable_useForkRef as useForkRef, unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; | ||
const getSelectTriggerProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return _extends({}, otherHandlers, { | ||
onClick: createHandleButtonClick(otherHandlers), | ||
@@ -193,3 +193,3 @@ ref: mergedListRootRef, | ||
'aria-controls': listboxId | ||
}; | ||
}); | ||
}; | ||
@@ -202,4 +202,3 @@ const getButtonProps = (otherHandlers = {}) => { | ||
const getListboxProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return _extends({}, otherHandlers, { | ||
id: listboxId, | ||
@@ -210,3 +209,3 @@ role: 'listbox', | ||
onMouseDown: preventDefault // to prevent the button from losing focus when interacting with the listbox | ||
}; | ||
}); | ||
}; | ||
@@ -219,6 +218,3 @@ | ||
}); | ||
const contextValue = React.useMemo(() => ({ | ||
...listContextValue, | ||
...compoundComponentContextValue | ||
}), [listContextValue, compoundComponentContextValue]); | ||
const contextValue = React.useMemo(() => _extends({}, listContextValue, compoundComponentContextValue), [listContextValue, compoundComponentContextValue]); | ||
let selectValue; | ||
@@ -225,0 +221,0 @@ if (props.multiple) { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -540,10 +541,6 @@ import { unstable_ownerDocument as ownerDocument, unstable_useControlled as useControlled, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible, visuallyHidden } from '@mui/utils'; | ||
}; | ||
const mergedEventHandlers = { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return { | ||
ref: handleRef, | ||
...mergedEventHandlers | ||
}; | ||
const mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers); | ||
return _extends({ | ||
ref: handleRef | ||
}, mergedEventHandlers); | ||
}; | ||
@@ -564,6 +561,3 @@ const createHandleMouseOver = otherHandlers => event => { | ||
}; | ||
return { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return _extends({}, otherHandlers, ownEventHandlers); | ||
}; | ||
@@ -576,7 +570,4 @@ const getHiddenInputProps = (otherHandlers = {}) => { | ||
}; | ||
const mergedEventHandlers = { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return { | ||
const mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers); | ||
return _extends({ | ||
tabIndex, | ||
@@ -592,6 +583,5 @@ 'aria-labelledby': ariaLabelledby, | ||
step: parameters.step ?? undefined, | ||
disabled, | ||
...mergedEventHandlers, | ||
style: { | ||
...visuallyHidden, | ||
disabled | ||
}, mergedEventHandlers, { | ||
style: _extends({}, visuallyHidden, { | ||
direction: isRtl ? 'rtl' : 'ltr', | ||
@@ -601,4 +591,4 @@ // So that VoiceOver's focus indicator matches the thumb's dimensions | ||
height: '100%' | ||
} | ||
}; | ||
}) | ||
}); | ||
}; | ||
@@ -605,0 +595,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -118,11 +119,8 @@ import { unstable_useEventCallback as useEventCallback } from '@mui/utils'; | ||
const propsEventHandlers = extractEventHandlers(parameters); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...otherHandlers | ||
}; | ||
return { | ||
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
return _extends({ | ||
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced. | ||
// See https://github.com/mui/material-ui/issues/29080 | ||
role: 'presentation', | ||
...externalEventHandlers, | ||
role: 'presentation' | ||
}, externalEventHandlers, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -132,3 +130,3 @@ onFocus: createHandleFocus(externalEventHandlers), | ||
onMouseLeave: createMouseLeave(externalEventHandlers) | ||
}; | ||
}); | ||
}; | ||
@@ -135,0 +133,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -77,3 +78,3 @@ import { unstable_useControlled as useControlled, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; | ||
const handleInputRef = useForkRef(focusVisibleRef, inputRef); | ||
const getInputProps = (otherProps = {}) => ({ | ||
const getInputProps = (otherProps = {}) => _extends({ | ||
checked: checkedProp, | ||
@@ -85,4 +86,4 @@ defaultChecked, | ||
required, | ||
type: 'checkbox', | ||
...otherProps, | ||
type: 'checkbox' | ||
}, otherProps, { | ||
onChange: createHandleInputChange(otherProps), | ||
@@ -89,0 +90,0 @@ onFocus: createHandleFocus(otherProps), |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -67,12 +68,5 @@ import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const getRootProps = (otherHandlers = {}) => { | ||
const resolvedTabProps = { | ||
...otherHandlers, | ||
...getTabProps(otherHandlers) | ||
}; | ||
const resolvedButtonProps = { | ||
...resolvedTabProps, | ||
...getButtonProps(resolvedTabProps) | ||
}; | ||
return { | ||
...resolvedButtonProps, | ||
const resolvedTabProps = _extends({}, otherHandlers, getTabProps(otherHandlers)); | ||
const resolvedButtonProps = _extends({}, resolvedTabProps, getButtonProps(resolvedTabProps)); | ||
return _extends({}, resolvedButtonProps, { | ||
role: 'tab', | ||
@@ -83,3 +77,3 @@ 'aria-controls': tabPanelId, | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -86,0 +80,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -48,3 +49,3 @@ import { unstable_useControlled as useControlled } from '@mui/utils'; | ||
return { | ||
contextValue: { | ||
contextValue: _extends({ | ||
direction, | ||
@@ -57,7 +58,6 @@ getTabId, | ||
selectionFollowsFocus, | ||
value, | ||
...compoundComponentContextValue | ||
} | ||
value | ||
}, compoundComponentContextValue) | ||
}; | ||
} | ||
export default useTabs; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { listReducer, ListActionTypes, moveHighlight } from '../useList'; | ||
@@ -5,6 +6,5 @@ import { TabsListActionTypes } from './useTabsList.types'; | ||
if (action.type === TabsListActionTypes.valueChange) { | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: action.value | ||
}; | ||
}); | ||
} | ||
@@ -19,6 +19,5 @@ const newState = listReducer(state, action); | ||
if (newState.selectedValues.length > 0) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
highlightedValue: newState.selectedValues[0] | ||
}; | ||
}); | ||
} | ||
@@ -28,8 +27,7 @@ moveHighlight(null, 'reset', action.context); | ||
if (selectionFollowsFocus && newState.highlightedValue != null) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
selectedValues: [newState.highlightedValue] | ||
}; | ||
}); | ||
} | ||
return newState; | ||
} |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -105,14 +106,9 @@ import { useTabsContext } from '../Tabs'; | ||
const getRootProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
...getListboxRootProps(otherHandlers), | ||
return _extends({}, otherHandlers, getListboxRootProps(otherHandlers), { | ||
'aria-orientation': orientation === 'vertical' ? 'vertical' : undefined, | ||
role: 'tablist' | ||
}; | ||
}); | ||
}; | ||
return { | ||
contextValue: { | ||
...compoundComponentContextValue, | ||
...listContextValue | ||
}, | ||
contextValue: _extends({}, compoundComponentContextValue, listContextValue), | ||
dispatch, | ||
@@ -119,0 +115,0 @@ getRootProps, |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import isHostComponent from './isHostComponent'; | ||
@@ -20,9 +21,5 @@ | ||
} | ||
return { | ||
...otherProps, | ||
ownerState: { | ||
...otherProps.ownerState, | ||
...ownerState | ||
} | ||
}; | ||
return _extends({}, otherProps, { | ||
ownerState: _extends({}, otherProps.ownerState, ownerState) | ||
}); | ||
} |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
/** | ||
@@ -17,12 +18,6 @@ * Combines the two get*Props functions from Base UI hooks into one. | ||
return external => { | ||
const firstResult = { | ||
...external, | ||
...getFirstProps(external) | ||
}; | ||
const result = { | ||
...firstResult, | ||
...getSecondProps(firstResult) | ||
}; | ||
const firstResult = _extends({}, external, getFirstProps(external)); | ||
const result = _extends({}, firstResult, getSecondProps(firstResult)); | ||
return result; | ||
}; | ||
} |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import clsx from 'clsx'; | ||
@@ -29,12 +30,4 @@ import extractEventHandlers from './extractEventHandlers'; | ||
const joinedClasses = clsx(externalForwardedProps?.className, externalSlotProps?.className, className, additionalProps?.className); | ||
const mergedStyle = { | ||
...additionalProps?.style, | ||
...externalForwardedProps?.style, | ||
...externalSlotProps?.style | ||
}; | ||
const props = { | ||
...additionalProps, | ||
...externalForwardedProps, | ||
...externalSlotProps | ||
}; | ||
const mergedStyle = _extends({}, additionalProps?.style, externalForwardedProps?.style, externalSlotProps?.style); | ||
const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps); | ||
if (joinedClasses.length > 0) { | ||
@@ -55,6 +48,3 @@ props.className = joinedClasses; | ||
const eventHandlers = extractEventHandlers({ | ||
...externalForwardedProps, | ||
...externalSlotProps | ||
}); | ||
const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps)); | ||
const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps); | ||
@@ -69,14 +59,4 @@ const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps); | ||
const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className); | ||
const mergedStyle = { | ||
...internalSlotProps?.style, | ||
...additionalProps?.style, | ||
...externalForwardedProps?.style, | ||
...externalSlotProps?.style | ||
}; | ||
const props = { | ||
...internalSlotProps, | ||
...additionalProps, | ||
...otherPropsWithoutEventHandlers, | ||
...componentsPropsWithoutEventHandlers | ||
}; | ||
const mergedStyle = _extends({}, internalSlotProps?.style, additionalProps?.style, externalForwardedProps?.style, externalSlotProps?.style); | ||
const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers); | ||
if (joinedClasses.length > 0) { | ||
@@ -83,0 +63,0 @@ props.className = joinedClasses; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -13,5 +14,3 @@ function areEqual(a, b) { | ||
function getControlledState(internalState, controlledProps) { | ||
const augmentedState = { | ||
...internalState | ||
}; | ||
const augmentedState = _extends({}, internalState); | ||
Object.keys(controlledProps).forEach(key => { | ||
@@ -104,6 +103,5 @@ if (controlledProps[key] !== undefined) { | ||
const dispatchWithContext = React.useCallback(action => { | ||
dispatch({ | ||
...action, | ||
dispatch(_extends({}, action, { | ||
context: actionContext | ||
}); | ||
})); | ||
}, [actionContext]); | ||
@@ -110,0 +108,0 @@ useStateChangeDetection({ |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["elementType", "externalSlotProps", "ownerState"]; | ||
import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
@@ -15,7 +18,7 @@ import appendOwnerState from './appendOwnerState'; | ||
const { | ||
elementType, | ||
externalSlotProps, | ||
ownerState, | ||
...rest | ||
} = parameters; | ||
elementType, | ||
externalSlotProps, | ||
ownerState | ||
} = parameters, | ||
rest = _objectWithoutPropertiesLoose(parameters, _excluded); | ||
const resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState); | ||
@@ -25,12 +28,10 @@ const { | ||
internalRef | ||
} = mergeSlotProps({ | ||
...rest, | ||
} = mergeSlotProps(_extends({}, rest, { | ||
externalSlotProps: resolvedComponentsProps | ||
}); | ||
})); | ||
const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref); | ||
const props = appendOwnerState(elementType, { | ||
...mergedProps, | ||
const props = appendOwnerState(elementType, _extends({}, mergedProps, { | ||
ref | ||
}, ownerState); | ||
}), ownerState); | ||
return props; | ||
} |
export { default } from './MultiSelect'; |
@@ -0,0 +0,0 @@ /** |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -17,2 +19,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["badgeContent", "children", "invisible", "max", "slotProps", "slots", "showZero"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -43,11 +46,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
badgeContent: badgeContentProp, | ||
children, | ||
invisible: invisibleProp, | ||
max: maxProp = 99, | ||
slotProps = {}, | ||
slots = {}, | ||
showZero = false, | ||
...other | ||
} = props; | ||
children, | ||
max: maxProp = 99, | ||
slotProps = {}, | ||
slots = {}, | ||
showZero = false | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -58,8 +59,6 @@ badgeContent, | ||
invisible | ||
} = (0, _useBadge.default)({ | ||
...props, | ||
} = (0, _useBadge.default)((0, _extends2.default)({}, props, { | ||
max: maxProp | ||
}); | ||
const ownerState = { | ||
...props, | ||
})); | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
badgeContent, | ||
@@ -69,3 +68,3 @@ invisible, | ||
showZero | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -90,9 +89,7 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'span'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeComponent, { | ||
...badgeProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeComponent, (0, _extends2.default)({}, badgeProps, { | ||
children: displayValue | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
@@ -99,0 +96,0 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -17,2 +19,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -45,11 +48,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
action, | ||
children, | ||
disabled, | ||
focusableWhenDisabled = false, | ||
onFocusVisible, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
action, | ||
children, | ||
focusableWhenDisabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const buttonRef = React.useRef(); | ||
@@ -61,6 +62,5 @@ const { | ||
getRootProps | ||
} = (0, _useButton.default)({ | ||
...props, | ||
} = (0, _useButton.default)((0, _extends2.default)({}, props, { | ||
focusableWhenDisabled | ||
}); | ||
})); | ||
React.useImperativeHandle(action, () => ({ | ||
@@ -72,8 +72,7 @@ focusVisible: () => { | ||
}), [setFocusVisible]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
active, | ||
focusableWhenDisabled, | ||
focusVisible | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -93,6 +92,5 @@ const defaultElement = other.href || other.to ? 'a' : 'button'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -99,0 +97,0 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["defaultValue", "children", "disabled", "error", "onChange", "required", "slotProps", "slots", "value"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -78,13 +81,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
defaultValue, | ||
children, | ||
disabled = false, | ||
error = false, | ||
onChange, | ||
required = false, | ||
slotProps = {}, | ||
slots = {}, | ||
value: incomingValue, | ||
...other | ||
} = props; | ||
defaultValue, | ||
children, | ||
disabled = false, | ||
error = false, | ||
onChange, | ||
required = false, | ||
slotProps = {}, | ||
slots = {}, | ||
value: incomingValue | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const [value, setValue] = (0, _utils.unstable_useControlled)({ | ||
@@ -100,4 +103,3 @@ controlled: incomingValue, | ||
React.useEffect(() => setFocused(isFocused => disabled ? false : isFocused), [disabled]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
disabled, | ||
@@ -108,3 +110,3 @@ error, | ||
required | ||
}; | ||
}); | ||
const childContext = React.useMemo(() => { | ||
@@ -151,5 +153,3 @@ return { | ||
value: childContext, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps | ||
}) | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps)) | ||
}); | ||
@@ -156,0 +156,0 @@ }); |
/** | ||
* @mui/base v5.0.0-beta.1 | ||
* @mui/base v5.0.0-beta.2 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -51,34 +54,34 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
'aria-describedby': ariaDescribedby, | ||
'aria-label': ariaLabel, | ||
'aria-labelledby': ariaLabelledby, | ||
autoComplete, | ||
autoFocus, | ||
className, | ||
defaultValue, | ||
disabled, | ||
endAdornment, | ||
error, | ||
id, | ||
multiline = false, | ||
name, | ||
onClick, | ||
onChange, | ||
onKeyDown, | ||
onKeyUp, | ||
onFocus, | ||
onBlur, | ||
placeholder, | ||
readOnly, | ||
required, | ||
startAdornment, | ||
value, | ||
type: typeProp, | ||
rows, | ||
slotProps = {}, | ||
slots = {}, | ||
minRows, | ||
maxRows, | ||
...other | ||
} = props; | ||
'aria-describedby': ariaDescribedby, | ||
'aria-label': ariaLabel, | ||
'aria-labelledby': ariaLabelledby, | ||
autoComplete, | ||
autoFocus, | ||
className, | ||
defaultValue, | ||
disabled, | ||
endAdornment, | ||
error, | ||
id, | ||
multiline = false, | ||
name, | ||
onClick, | ||
onChange, | ||
onKeyDown, | ||
onKeyUp, | ||
onFocus, | ||
onBlur, | ||
placeholder, | ||
readOnly, | ||
required, | ||
startAdornment, | ||
value, | ||
type: typeProp, | ||
rows, | ||
slotProps = {}, | ||
slots = {}, | ||
minRows, | ||
maxRows | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -103,4 +106,3 @@ getRootProps, | ||
const type = !multiline ? typeProp != null ? typeProp : 'text' : undefined; | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
disabled: disabledState, | ||
@@ -112,3 +114,3 @@ error: errorState, | ||
type | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -144,14 +146,10 @@ const propsToForward = { | ||
elementType: InputComponent, | ||
getSlotProps: otherHandlers => getInputProps({ | ||
...otherHandlers, | ||
...propsToForward | ||
getSlotProps: otherHandlers => getInputProps((0, _extends2.default)({}, otherHandlers, propsToForward)), | ||
externalSlotProps: slotProps.input, | ||
additionalProps: (0, _extends2.default)({ | ||
rows: multiline ? rows : undefined | ||
}, multiline && !(0, _isHostComponent.default)(InputComponent) && { | ||
minRows: rows || minRows, | ||
maxRows: rows || maxRows | ||
}), | ||
externalSlotProps: slotProps.input, | ||
additionalProps: { | ||
rows: multiline ? rows : undefined, | ||
...(multiline && !(0, _isHostComponent.default)(InputComponent) && { | ||
minRows: rows || minRows, | ||
maxRows: rows || maxRows | ||
}) | ||
}, | ||
ownerState, | ||
@@ -169,8 +167,5 @@ className: classes.input | ||
} | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [startAdornment, /*#__PURE__*/(0, _jsxRuntime.jsx)(InputComponent, { | ||
...inputProps | ||
}), endAdornment] | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [startAdornment, /*#__PURE__*/(0, _jsxRuntime.jsx)(InputComponent, (0, _extends2.default)({}, inputProps)), endAdornment] | ||
})); | ||
}); | ||
@@ -177,0 +172,0 @@ process.env.NODE_ENV !== "production" ? Input.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -20,2 +22,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["actions", "anchorEl", "children", "defaultOpen", "listboxId", "onOpenChange", "open", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -46,13 +49,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
actions, | ||
anchorEl, | ||
children, | ||
defaultOpen, | ||
listboxId, | ||
onOpenChange, | ||
open: openProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
actions, | ||
anchorEl, | ||
children, | ||
defaultOpen, | ||
listboxId, | ||
onOpenChange, | ||
open: openProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -72,6 +75,5 @@ contextValue, | ||
}), [dispatch]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
open | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -101,6 +103,4 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : _Popper.default; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Listbox, { | ||
...listboxProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Listbox, (0, _extends2.default)({}, listboxProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuProvider.default, { | ||
@@ -110,4 +110,4 @@ value: contextValue, | ||
}) | ||
}) | ||
}); | ||
})) | ||
})); | ||
}); | ||
@@ -114,0 +114,0 @@ process.env.NODE_ENV !== "production" ? Menu.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -17,2 +19,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["children", "disabled", "label", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -44,9 +47,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
children, | ||
disabled: disabledProp = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
disabled: disabledProp = false, | ||
label, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -62,8 +65,7 @@ getRootProps, | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
disabled, | ||
focusVisible, | ||
highlighted | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -79,6 +81,5 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'li'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -85,0 +86,0 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -20,2 +22,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -69,25 +72,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
children, | ||
closeAfterTransition = false, | ||
container, | ||
disableAutoFocus = false, | ||
disableEnforceFocus = false, | ||
disableEscapeKeyDown = false, | ||
disablePortal = false, | ||
disableRestoreFocus = false, | ||
disableScrollLock = false, | ||
hideBackdrop = false, | ||
keepMounted = false, | ||
// private | ||
manager: managerProp = defaultManager, | ||
onBackdropClick, | ||
onClose, | ||
onKeyDown, | ||
open, | ||
onTransitionEnter, | ||
onTransitionExited, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
closeAfterTransition = false, | ||
container, | ||
disableAutoFocus = false, | ||
disableEnforceFocus = false, | ||
disableEscapeKeyDown = false, | ||
disablePortal = false, | ||
disableRestoreFocus = false, | ||
disableScrollLock = false, | ||
hideBackdrop = false, | ||
keepMounted = false, | ||
// private | ||
manager: managerProp = defaultManager, | ||
onBackdropClick, | ||
onClose, | ||
onKeyDown, | ||
open, | ||
onTransitionEnter, | ||
onTransitionExited, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
// TODO: `modal`` must change its type in this file to match the type of methods | ||
@@ -155,4 +158,3 @@ // provided by `ModalManager` | ||
}, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
closeAfterTransition, | ||
@@ -168,3 +170,3 @@ disableAutoFocus, | ||
keepMounted | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -263,7 +265,4 @@ const handleEnter = () => { | ||
disablePortal: disablePortal, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropComponent, { | ||
...backdropProps | ||
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusTrap.default, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropComponent, (0, _extends2.default)({}, backdropProps)) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusTrap.default, { | ||
disableEnforceFocus: disableEnforceFocus, | ||
@@ -276,3 +275,3 @@ disableAutoFocus: disableAutoFocus, | ||
})] | ||
}) | ||
})) | ||
}); | ||
@@ -279,0 +278,0 @@ }); |
@@ -144,2 +144,4 @@ "use strict"; | ||
constructor() { | ||
this.containers = void 0; | ||
this.modals = void 0; | ||
this.modals = []; | ||
@@ -146,0 +148,0 @@ this.containers = []; |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["children", "disabled", "label", "slotProps", "slots", "value"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -39,10 +42,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
children, | ||
disabled = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
value, | ||
...other | ||
} = props; | ||
children, | ||
disabled = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
value | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const Root = (_slots$root = slots.root) != null ? _slots$root : 'li'; | ||
@@ -66,4 +69,3 @@ const optionRef = React.useRef(null); | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
disabled, | ||
@@ -73,3 +75,3 @@ highlighted, | ||
selected | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -84,6 +86,5 @@ const rootProps = (0, _utils2.useSlotProps)({ | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -90,0 +91,0 @@ process.env.NODE_ENV !== "production" ? Option.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -16,2 +18,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["disabled", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -41,7 +44,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const Root = (slots == null ? void 0 : slots.root) || 'li'; | ||
@@ -73,12 +76,9 @@ const Label = (slots == null ? void 0 : slots.label) || 'span'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Label, { | ||
...labelProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Label, (0, _extends2.default)({}, labelProps, { | ||
children: props.label | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(List, { | ||
...listProps, | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(List, (0, _extends2.default)({}, listProps, { | ||
children: props.children | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
@@ -85,0 +85,0 @@ process.env.NODE_ENV !== "production" ? OptionGroup.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -19,2 +21,4 @@ var _utils = require("@mui/utils"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], | ||
_excluded2 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -58,19 +62,18 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
anchorEl, | ||
children, | ||
direction, | ||
disablePortal, | ||
modifiers, | ||
open, | ||
placement: initialPlacement, | ||
popperOptions, | ||
popperRef: popperRefProp, | ||
slotProps = {}, | ||
slots = {}, | ||
TransitionProps, | ||
// @ts-ignore internal logic | ||
ownerState: ownerStateProp, | ||
// prevent from spreading to DOM, it can come from the parent component e.g. Select. | ||
...other | ||
} = props; | ||
anchorEl, | ||
children, | ||
direction, | ||
disablePortal, | ||
modifiers, | ||
open, | ||
placement: initialPlacement, | ||
popperOptions, | ||
popperRef: popperRefProp, | ||
slotProps = {}, | ||
slots = {}, | ||
TransitionProps | ||
// @ts-ignore internal logic | ||
// prevent from spreading to DOM, it can come from the parent component e.g. Select. | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const tooltipRef = React.useRef(null); | ||
@@ -143,7 +146,7 @@ const ownRef = (0, _utils.unstable_useForkRef)(tooltipRef, forwardedRef); | ||
} | ||
const popper = (0, _core.createPopper)(resolvedAnchorElement, tooltipRef.current, { | ||
placement: rtlPlacement, | ||
...popperOptions, | ||
const popper = (0, _core.createPopper)(resolvedAnchorElement, tooltipRef.current, (0, _extends2.default)({ | ||
placement: rtlPlacement | ||
}, popperOptions, { | ||
modifiers: popperModifiers | ||
}); | ||
})); | ||
handlePopperRefRef.current(popper); | ||
@@ -174,6 +177,5 @@ return () => { | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: typeof children === 'function' ? children(childProps) : children | ||
}); | ||
})); | ||
}); | ||
@@ -194,19 +196,19 @@ | ||
const { | ||
anchorEl, | ||
children, | ||
container: containerProp, | ||
direction = 'ltr', | ||
disablePortal = false, | ||
keepMounted = false, | ||
modifiers, | ||
open, | ||
placement = 'bottom', | ||
popperOptions = defaultPopperOptions, | ||
popperRef, | ||
style, | ||
transition = false, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
anchorEl, | ||
children, | ||
container: containerProp, | ||
direction = 'ltr', | ||
disablePortal = false, | ||
keepMounted = false, | ||
modifiers, | ||
open, | ||
placement = 'bottom', | ||
popperOptions = defaultPopperOptions, | ||
popperRef, | ||
style, | ||
transition = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2); | ||
const [exited, setExited] = React.useState(true); | ||
@@ -242,3 +244,3 @@ const handleEnter = () => { | ||
container: container, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PopperTooltip, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PopperTooltip, (0, _extends2.default)({ | ||
anchorEl: anchorEl, | ||
@@ -254,5 +256,5 @@ direction: direction, | ||
slotProps: slotProps, | ||
slots: slots, | ||
...other, | ||
style: { | ||
slots: slots | ||
}, other, { | ||
style: (0, _extends2.default)({ | ||
// Prevents scroll issue, waiting for Popper.js to add this style once initiated. | ||
@@ -263,8 +265,7 @@ position: 'fixed', | ||
left: 0, | ||
display, | ||
...style | ||
}, | ||
display | ||
}, style), | ||
TransitionProps: transitionProps, | ||
children: children | ||
}) | ||
})) | ||
}); | ||
@@ -271,0 +272,0 @@ }); |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -21,2 +23,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "slotProps", "slots", "value"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -80,21 +83,21 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
autoFocus, | ||
children, | ||
defaultValue, | ||
defaultListboxOpen = false, | ||
disabled: disabledProp, | ||
getSerializedValue = defaultFormValueProvider, | ||
listboxId, | ||
listboxOpen: listboxOpenProp, | ||
multiple = false, | ||
name, | ||
onChange, | ||
onListboxOpenChange, | ||
getOptionAsString = _defaultOptionStringifier.default, | ||
renderValue: renderValueProp, | ||
slotProps = {}, | ||
slots = {}, | ||
value: valueProp, | ||
...other | ||
} = props; | ||
autoFocus, | ||
children, | ||
defaultValue, | ||
defaultListboxOpen = false, | ||
disabled: disabledProp, | ||
getSerializedValue = defaultFormValueProvider, | ||
listboxId, | ||
listboxOpen: listboxOpenProp, | ||
multiple = false, | ||
name, | ||
onChange, | ||
onListboxOpenChange, | ||
getOptionAsString = _defaultOptionStringifier.default, | ||
renderValue: renderValueProp, | ||
slotProps = {}, | ||
slots = {}, | ||
value: valueProp | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const renderValue = renderValueProp != null ? renderValueProp : defaultRenderValue; | ||
@@ -139,4 +142,3 @@ const [buttonDefined, setButtonDefined] = React.useState(false); | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
active: buttonActive, | ||
@@ -150,3 +152,3 @@ defaultListboxOpen, | ||
value | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -192,9 +194,6 @@ const buttonProps = (0, _utils2.useSlotProps)({ | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Button, { | ||
...buttonProps, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Button, (0, _extends2.default)({}, buttonProps, { | ||
children: renderValue(selectedOptionsMetadata) | ||
}), buttonDefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(PopperComponent, { | ||
...popperProps, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ListboxRoot, { | ||
...listboxProps, | ||
})), buttonDefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(PopperComponent, (0, _extends2.default)({}, popperProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ListboxRoot, (0, _extends2.default)({}, listboxProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectProvider.default, { | ||
@@ -204,4 +203,4 @@ value: contextValue, | ||
}) | ||
}) | ||
}), name && /*#__PURE__*/(0, _jsxRuntime.jsx)("input", { | ||
})) | ||
})), name && /*#__PURE__*/(0, _jsxRuntime.jsx)("input", { | ||
type: "hidden", | ||
@@ -208,0 +207,0 @@ name: name, |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -20,5 +22,5 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelFormat", "isRtl", "defaultValue", "slotProps", "slots"]; // @ts-ignore | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
// @ts-ignore | ||
function Identity(x) { | ||
@@ -65,34 +67,28 @@ return x; | ||
const { | ||
'aria-label': ariaLabel, | ||
'aria-valuetext': ariaValuetext, | ||
'aria-labelledby': ariaLabelledby, | ||
className, | ||
disableSwap = false, | ||
disabled = false, | ||
getAriaLabel, | ||
getAriaValueText, | ||
marks: marksProp = false, | ||
max = 100, | ||
min = 0, | ||
name, | ||
onChange, | ||
onChangeCommitted, | ||
orientation = 'horizontal', | ||
scale = Identity, | ||
step = 1, | ||
tabIndex, | ||
track = 'normal', | ||
value: valueProp, | ||
valueLabelFormat = Identity, | ||
isRtl = false, | ||
defaultValue, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
'aria-label': ariaLabel, | ||
'aria-valuetext': ariaValuetext, | ||
'aria-labelledby': ariaLabelledby, | ||
className, | ||
disableSwap = false, | ||
disabled = false, | ||
getAriaLabel, | ||
getAriaValueText, | ||
marks: marksProp = false, | ||
max = 100, | ||
min = 0, | ||
orientation = 'horizontal', | ||
scale = Identity, | ||
step = 1, | ||
track = 'normal', | ||
valueLabelFormat = Identity, | ||
isRtl = false, | ||
defaultValue, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
// all props with defaults | ||
// consider extracting to hook an reusing the lint rule for the variants | ||
const partialOwnerState = { | ||
...props, | ||
const partialOwnerState = (0, _extends2.default)({}, props, { | ||
marks: marksProp, | ||
@@ -109,3 +105,3 @@ disabled, | ||
valueLabelFormat | ||
}; | ||
}); | ||
const { | ||
@@ -125,12 +121,10 @@ axisProps, | ||
trackLeap | ||
} = (0, _useSlider.default)({ | ||
...partialOwnerState, | ||
} = (0, _useSlider.default)((0, _extends2.default)({}, partialOwnerState, { | ||
rootRef: forwardedRef | ||
}); | ||
const ownerState = { | ||
...partialOwnerState, | ||
})); | ||
const ownerState = (0, _extends2.default)({}, partialOwnerState, { | ||
marked: marks.length > 0 && marks.some(mark => mark.label), | ||
dragging, | ||
focusedThumbIndex | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -158,6 +152,3 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'span'; | ||
additionalProps: { | ||
style: { | ||
...axisProps[axis].offset(trackOffset), | ||
...axisProps[axis].leap(trackLeap) | ||
} | ||
style: (0, _extends2.default)({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap)) | ||
}, | ||
@@ -200,9 +191,4 @@ ownerState, | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Rail, { | ||
...railProps | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Track, { | ||
...trackProps | ||
}), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => { | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Rail, (0, _extends2.default)({}, railProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(Track, (0, _extends2.default)({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => { | ||
const percent = (0, _useSlider.valueToPercent)(mark.value, min, max); | ||
@@ -217,27 +203,19 @@ const style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Mark, { | ||
"data-index": index, | ||
...markProps, | ||
...(!(0, _isHostComponent.default)(Mark) && { | ||
markActive | ||
}), | ||
style: { | ||
...style, | ||
...markProps.style | ||
}, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Mark, (0, _extends2.default)({ | ||
"data-index": index | ||
}, markProps, !(0, _isHostComponent.default)(Mark) && { | ||
markActive | ||
}, { | ||
style: (0, _extends2.default)({}, style, markProps.style), | ||
className: (0, _clsx.default)(markProps.className, markActive && classes.markActive) | ||
}), mark.label != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkLabel, { | ||
})), mark.label != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkLabel, (0, _extends2.default)({ | ||
"aria-hidden": true, | ||
"data-index": index, | ||
...markLabelProps, | ||
...(!(0, _isHostComponent.default)(MarkLabel) && { | ||
markLabelActive: markActive | ||
}), | ||
style: { | ||
...style, | ||
...markLabelProps.style | ||
}, | ||
"data-index": index | ||
}, markLabelProps, !(0, _isHostComponent.default)(MarkLabel) && { | ||
markLabelActive: markActive | ||
}, { | ||
style: (0, _extends2.default)({}, style, markLabelProps.style), | ||
className: (0, _clsx.default)(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive), | ||
children: mark.label | ||
}) : null] | ||
})) : null] | ||
}, index); | ||
@@ -247,12 +225,10 @@ }), values.map((value, index) => { | ||
const style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Thumb, { | ||
"data-index": index, | ||
...thumbProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Thumb, (0, _extends2.default)({ | ||
"data-index": index | ||
}, thumbProps, { | ||
className: (0, _clsx.default)(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible), | ||
style: { | ||
...style, | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined, | ||
...thumbProps.style | ||
}, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Input, { | ||
style: (0, _extends2.default)({}, style, { | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined | ||
}, thumbProps.style), | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Input, (0, _extends2.default)({ | ||
"data-index": index, | ||
@@ -263,16 +239,13 @@ "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel, | ||
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext, | ||
value: values[index], | ||
...inputProps | ||
}), ValueLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ValueLabel, { | ||
...(!(0, _isHostComponent.default)(ValueLabel) && { | ||
valueLabelFormat, | ||
index, | ||
disabled | ||
}), | ||
...valueLabelProps, | ||
value: values[index] | ||
}, inputProps)), ValueLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ValueLabel, (0, _extends2.default)({}, !(0, _isHostComponent.default)(ValueLabel) && { | ||
valueLabelFormat, | ||
index, | ||
disabled | ||
}, valueLabelProps, { | ||
children: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat | ||
}) : null] | ||
}, index); | ||
})) : null] | ||
}), index); | ||
})] | ||
}); | ||
})); | ||
}); | ||
@@ -279,0 +252,0 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["autoHideDuration", "children", "disableWindowBlurListener", "exited", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -40,17 +43,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
autoHideDuration = null, | ||
children, | ||
disableWindowBlurListener = false, | ||
exited = true, | ||
onBlur, | ||
onClose, | ||
onFocus, | ||
onMouseEnter, | ||
onMouseLeave, | ||
open, | ||
resumeHideDuration, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
autoHideDuration = null, | ||
children, | ||
disableWindowBlurListener = false, | ||
exited = true, | ||
onClose, | ||
open, | ||
resumeHideDuration, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const classes = useUtilityClasses(); | ||
@@ -60,4 +59,3 @@ const { | ||
onClickAway | ||
} = (0, _useSnackbar.default)({ | ||
...props, | ||
} = (0, _useSnackbar.default)((0, _extends2.default)({}, props, { | ||
autoHideDuration, | ||
@@ -68,3 +66,3 @@ disableWindowBlurListener, | ||
resumeHideDuration | ||
}); | ||
})); | ||
const ownerState = props; | ||
@@ -99,9 +97,7 @@ const Root = slots.root || 'div'; | ||
} | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayListener.default, { | ||
...clickAwayListenerProps, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayListener.default, (0, _extends2.default)({}, clickAwayListenerProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: children | ||
}) | ||
}); | ||
})) | ||
})); | ||
}); | ||
@@ -108,0 +104,0 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -17,2 +19,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -50,15 +53,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
checked: checkedProp, | ||
defaultChecked, | ||
disabled: disabledProp, | ||
onBlur, | ||
onChange, | ||
onFocus, | ||
onFocusVisible, | ||
readOnly: readOnlyProp, | ||
required, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
checked: checkedProp, | ||
defaultChecked, | ||
disabled: disabledProp, | ||
onBlur, | ||
onChange, | ||
onFocus, | ||
onFocusVisible, | ||
readOnly: readOnlyProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const useSwitchProps = { | ||
@@ -81,4 +83,3 @@ checked: checkedProp, | ||
} = (0, _useSwitch.default)(useSwitchProps); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
checked, | ||
@@ -88,3 +89,3 @@ disabled, | ||
readOnly | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -124,12 +125,5 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'span'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Track, { | ||
...trackProps | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Thumb, { | ||
...thumbProps | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Input, { | ||
...inputProps | ||
})] | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Track, (0, _extends2.default)({}, trackProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(Thumb, (0, _extends2.default)({}, thumbProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(Input, (0, _extends2.default)({}, inputProps))] | ||
})); | ||
}); | ||
@@ -136,0 +130,0 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["action", "children", "value", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -44,13 +47,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
action, | ||
children, | ||
value: valueProp, | ||
disabled = false, | ||
onChange, | ||
onClick, | ||
onFocus, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const tabRef = React.useRef(); | ||
@@ -63,8 +61,6 @@ const handleRef = (0, _utils.unstable_useForkRef)(tabRef, forwardedRef); | ||
getRootProps | ||
} = (0, _useTab.default)({ | ||
...props, | ||
} = (0, _useTab.default)((0, _extends2.default)({}, props, { | ||
rootRef: handleRef | ||
}); | ||
const ownerState = { | ||
...props, | ||
})); | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
active, | ||
@@ -74,3 +70,3 @@ disabled, | ||
selected | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -89,6 +85,5 @@ const TabRoot = (_slots$root = slots.root) != null ? _slots$root : 'button'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabRoot, { | ||
...tabRootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabRoot, (0, _extends2.default)({}, tabRootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -95,0 +90,0 @@ process.env.NODE_ENV !== "production" ? Tab.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -19,2 +21,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["colSpan", "count", "getItemAriaLabel", "labelDisplayedRows", "labelId", "labelRowsPerPage", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "selectId", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -62,18 +65,18 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
colSpan: colSpanProp, | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
labelDisplayedRows = defaultLabelDisplayedRows, | ||
labelId: labelIdProp, | ||
labelRowsPerPage = 'Rows per page:', | ||
onPageChange, | ||
onRowsPerPageChange, | ||
page, | ||
rowsPerPage, | ||
rowsPerPageOptions = [10, 25, 50, 100], | ||
selectId: selectIdProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
colSpan: colSpanProp, | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
labelDisplayedRows = defaultLabelDisplayedRows, | ||
labelId: labelIdProp, | ||
labelRowsPerPage = 'Rows per page:', | ||
onPageChange, | ||
onRowsPerPageChange, | ||
page, | ||
rowsPerPage, | ||
rowsPerPageOptions = [10, 25, 50, 100], | ||
selectId: selectIdProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const ownerState = props; | ||
@@ -175,20 +178,12 @@ const classes = useUtilityClasses(); | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, { | ||
...rootProps, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Toolbar, { | ||
...toolbarProps, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Spacer, { | ||
...spacerProps | ||
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectLabel, { | ||
...selectLabelProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Toolbar, (0, _extends2.default)({}, toolbarProps, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Spacer, (0, _extends2.default)({}, spacerProps)), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectLabel, (0, _extends2.default)({}, selectLabelProps, { | ||
children: labelRowsPerPage | ||
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(Select, { | ||
...selectProps, | ||
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/(0, React.createElement)(MenuItem, { | ||
...menuItemProps, | ||
})), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(Select, (0, _extends2.default)({}, selectProps, { | ||
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/(0, React.createElement)(MenuItem, (0, _extends2.default)({}, menuItemProps, { | ||
key: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption, | ||
value: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption | ||
}, typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption)) | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DisplayedRows, { | ||
...displayedRowsProps, | ||
}), typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption)) | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(DisplayedRows, (0, _extends2.default)({}, displayedRowsProps, { | ||
children: labelDisplayedRows({ | ||
@@ -200,7 +195,5 @@ from: count === 0 ? 0 : page * rowsPerPage + 1, | ||
}) | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Actions, { | ||
...actionsProps | ||
})] | ||
}) | ||
}); | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(Actions, (0, _extends2.default)({}, actionsProps))] | ||
})) | ||
})); | ||
}); | ||
@@ -207,0 +200,0 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-proptypes */ = { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,5 +8,8 @@ value: true | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _utils = require("../utils"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["count", "getItemAriaLabel", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "direction", "ownerState", "slotProps", "slots"]; | ||
var _span, _span2, _span3, _span4; | ||
@@ -44,16 +48,17 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
const { | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
onPageChange, | ||
page, | ||
rowsPerPage, | ||
showFirstButton = false, | ||
showLastButton = false, | ||
direction, | ||
// @ts-ignore | ||
ownerState: ownerStateProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
onPageChange, | ||
page, | ||
rowsPerPage, | ||
showFirstButton = false, | ||
showLastButton = false, | ||
direction | ||
// @ts-ignore | ||
, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const ownerState = props; | ||
@@ -134,20 +139,15 @@ const handleFirstPageButtonClick = event => { | ||
const BackPageIcon = (_slots$backPageIcon = slots.backPageIcon) != null ? _slots$backPageIcon : BackPageIconDefault; | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, { | ||
...rootProps, | ||
children: [showFirstButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(FirstButton, { | ||
...firstButtonProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, { | ||
children: [showFirstButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(FirstButton, (0, _extends2.default)({}, firstButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(LastPageIcon, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(FirstPageIcon, {}) | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BackButton, { | ||
...backButtonProps, | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(BackButton, (0, _extends2.default)({}, backButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(NextPageIcon, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(BackPageIcon, {}) | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(NextButton, { | ||
...nextButtonProps, | ||
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(NextButton, (0, _extends2.default)({}, nextButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(BackPageIcon, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(NextPageIcon, {}) | ||
}), showLastButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(LastButton, { | ||
...lastButtonProps, | ||
})), showLastButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(LastButton, (0, _extends2.default)({}, lastButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(FirstPageIcon, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(LastPageIcon, {}) | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
var _default = TablePaginationActions; | ||
exports.default = _default; |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -17,2 +19,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["children", "value", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -42,8 +45,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
children, | ||
value, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -53,6 +55,5 @@ hidden, | ||
} = (0, _useTabPanel.default)(props); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
hidden | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -72,6 +73,5 @@ const TabPanelRoot = (_slots$root = slots.root) != null ? _slots$root : 'div'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabPanelRoot, { | ||
...tabPanelRootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabPanelRoot, (0, _extends2.default)({}, tabPanelRootProps, { | ||
children: !hidden && children | ||
}); | ||
})); | ||
}); | ||
@@ -78,0 +78,0 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["children", "value", "defaultValue", "orientation", "direction", "onChange", "selectionFollowsFocus", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -44,21 +47,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
children, | ||
value: valueProp, | ||
defaultValue, | ||
orientation = 'horizontal', | ||
direction = 'ltr', | ||
onChange, | ||
selectionFollowsFocus, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
orientation = 'horizontal', | ||
direction = 'ltr', | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
contextValue | ||
} = (0, _useTabs.default)(props); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
orientation, | ||
direction | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -76,4 +74,3 @@ const TabsRoot = (_slots$root = slots.root) != null ? _slots$root : 'div'; | ||
}); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabsRoot, { | ||
...tabsRootProps, | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabsRoot, (0, _extends2.default)({}, tabsRootProps, { | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TabsProvider.default, { | ||
@@ -83,3 +80,3 @@ value: contextValue, | ||
}) | ||
}); | ||
})); | ||
}); | ||
@@ -86,0 +83,0 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes /* remove-proptypes */ = { |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +20,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["children", "slotProps", "slots"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -44,7 +47,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
children, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -58,7 +61,6 @@ isRtl, | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = (0, _extends2.default)({}, props, { | ||
isRtl, | ||
orientation | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -76,6 +78,5 @@ const TabsListRoot = (_slots$root = slots.root) != null ? _slots$root : 'div'; | ||
value: contextValue, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TabsListRoot, { | ||
...tabsListRootProps, | ||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TabsListRoot, (0, _extends2.default)({}, tabsListRootProps, { | ||
children: children | ||
}) | ||
})) | ||
}); | ||
@@ -82,0 +83,0 @@ }); |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -14,2 +16,3 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
const _excluded = ["onChange", "maxRows", "minRows", "style", "value"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -52,9 +55,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const { | ||
onChange, | ||
maxRows, | ||
minRows = 1, | ||
style, | ||
value, | ||
...other | ||
} = props; | ||
onChange, | ||
maxRows, | ||
minRows = 1, | ||
style, | ||
value | ||
} = props, | ||
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded); | ||
const { | ||
@@ -208,3 +211,3 @@ current: isControlled | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", (0, _extends2.default)({ | ||
value: value, | ||
@@ -216,11 +219,9 @@ onChange: handleChange, | ||
rows: minRows, | ||
style: { | ||
style: (0, _extends2.default)({ | ||
height: state.outerHeightStyle, | ||
// Need a large enough difference to allow scrolling. | ||
// This prevents infinite rendering loop. | ||
overflow: state.overflow ? 'hidden' : undefined, | ||
...style | ||
}, | ||
...other | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", { | ||
overflow: state.overflow ? 'hidden' : undefined | ||
}, style) | ||
}, other)), /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", { | ||
"aria-hidden": true, | ||
@@ -231,7 +232,5 @@ className: props.className, | ||
tabIndex: -1, | ||
style: { | ||
...styles.shadow, | ||
...style, | ||
style: (0, _extends2.default)({}, styles.shadow, style, { | ||
padding: 0 | ||
} | ||
}) | ||
})] | ||
@@ -238,0 +237,0 @@ }); |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -8,2 +9,3 @@ value: true | ||
exports.default = useAutocomplete; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -897,5 +899,5 @@ var _utils = require("@mui/utils"); | ||
return { | ||
getRootProps: (other = {}) => ({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null, | ||
...other, | ||
getRootProps: (other = {}) => (0, _extends2.default)({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null | ||
}, other, { | ||
onKeyDown: handleKeyDown(other), | ||
@@ -941,9 +943,8 @@ onMouseDown: handleMouseDown, | ||
index | ||
}) => ({ | ||
}) => (0, _extends2.default)({ | ||
key: index, | ||
'data-tag-index': index, | ||
tabIndex: -1, | ||
...(!readOnly && { | ||
onDelete: handleTagDelete(index) | ||
}) | ||
tabIndex: -1 | ||
}, !readOnly && { | ||
onDelete: handleTagDelete(index) | ||
}), | ||
@@ -950,0 +951,0 @@ getListboxProps: () => ({ |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = useButton; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -162,6 +163,3 @@ var _utils = require("@mui/utils"); | ||
const propsEventHandlers = (0, _extractEventHandlers.default)(parameters); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...otherHandlers | ||
}; | ||
const externalEventHandlers = (0, _extends2.default)({}, propsEventHandlers, otherHandlers); | ||
@@ -171,6 +169,5 @@ // onFocusVisible can be present on the props, but since it's not a valid React event handler, | ||
delete externalEventHandlers.onFocusVisible; | ||
return { | ||
type, | ||
...externalEventHandlers, | ||
...buttonProps, | ||
return (0, _extends2.default)({ | ||
type | ||
}, externalEventHandlers, buttonProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -184,3 +181,3 @@ onClick: createHandleClick(externalEventHandlers), | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -187,0 +184,0 @@ return { |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = useInput; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _utils = require("@mui/utils"); | ||
@@ -135,11 +136,6 @@ var React = _interopRequireWildcard(require("react")); | ||
const propsEventHandlers = (0, _extractEventHandlers.default)(parameters, ['onBlur', 'onChange', 'onFocus']); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...(0, _extractEventHandlers.default)(externalProps) | ||
}; | ||
return { | ||
...externalProps, | ||
...externalEventHandlers, | ||
const externalEventHandlers = (0, _extends2.default)({}, propsEventHandlers, (0, _extractEventHandlers.default)(externalProps)); | ||
return (0, _extends2.default)({}, externalProps, externalEventHandlers, { | ||
onClick: handleClick(externalEventHandlers) | ||
}; | ||
}); | ||
}; | ||
@@ -152,15 +148,9 @@ const getInputProps = (externalProps = {}) => { | ||
}; | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...(0, _extractEventHandlers.default)(externalProps) | ||
}; | ||
const mergedEventHandlers = { | ||
...externalProps, | ||
...externalEventHandlers, | ||
const externalEventHandlers = (0, _extends2.default)({}, propsEventHandlers, (0, _extractEventHandlers.default)(externalProps)); | ||
const mergedEventHandlers = (0, _extends2.default)({}, externalProps, externalEventHandlers, { | ||
onBlur: handleBlur(externalEventHandlers), | ||
onChange: handleChange(externalEventHandlers), | ||
onFocus: handleFocus(externalEventHandlers) | ||
}; | ||
return { | ||
...mergedEventHandlers, | ||
}); | ||
return (0, _extends2.default)({}, mergedEventHandlers, { | ||
'aria-invalid': error || undefined, | ||
@@ -172,3 +162,3 @@ defaultValue: defaultValue, | ||
disabled | ||
}; | ||
}); | ||
}; | ||
@@ -175,0 +165,0 @@ return { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,2 +10,3 @@ value: true | ||
exports.toggleSelection = toggleSelection; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _listActions = require("./listActions.types"); | ||
@@ -173,7 +175,6 @@ /** | ||
const newSelectedValues = toggleSelection(item, selectedValues, selectionMode, itemComparer); | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
selectedValues: newSelectedValues, | ||
highlightedValue: item | ||
}; | ||
}); | ||
} | ||
@@ -188,21 +189,17 @@ function handleKeyDown(key, state, context) { | ||
case 'Home': | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'start', context) | ||
}; | ||
}); | ||
case 'End': | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'end', context) | ||
}; | ||
}); | ||
case 'PageUp': | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -pageSize, context) | ||
}; | ||
}); | ||
case 'PageDown': | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, pageSize, context) | ||
}; | ||
}); | ||
case 'ArrowUp': | ||
@@ -212,6 +209,5 @@ if (orientation !== 'vertical') { | ||
} | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -1, context) | ||
}; | ||
}); | ||
case 'ArrowDown': | ||
@@ -221,6 +217,5 @@ if (orientation !== 'vertical') { | ||
} | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 1, context) | ||
}; | ||
}); | ||
case 'ArrowLeft': | ||
@@ -232,6 +227,5 @@ { | ||
const offset = orientation === 'horizontal-ltr' ? -1 : 1; | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
}; | ||
}); | ||
} | ||
@@ -244,6 +238,5 @@ case 'ArrowRight': | ||
const offset = orientation === 'horizontal-ltr' ? 1 : -1; | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
}; | ||
}); | ||
} | ||
@@ -265,6 +258,5 @@ case 'Enter': | ||
} | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: null | ||
}; | ||
}); | ||
} | ||
@@ -296,6 +288,5 @@ function textCriteriaMatches(nextFocus, searchString, stringifyItem) { | ||
// The nextItem is the element to be highlighted | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: nextItem | ||
}; | ||
}); | ||
} | ||
@@ -326,7 +317,6 @@ // Move to the next element. | ||
const newSelectedValues = selectedValues.filter(selectedValue => items.some(item => itemComparer(item, selectedValue))); | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: newHighlightedValue, | ||
selectedValues: newSelectedValues | ||
}; | ||
}); | ||
} | ||
@@ -333,0 +323,0 @@ function listReducer(state, action) { |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -129,6 +130,3 @@ var _utils = require("@mui/utils"); | ||
const reducer = externalReducer != null ? externalReducer : _listReducer.default; | ||
const actionContext = React.useMemo(() => ({ | ||
...reducerActionContext, | ||
...listActionContext | ||
}), [reducerActionContext, listActionContext]); | ||
const actionContext = React.useMemo(() => (0, _extends2.default)({}, reducerActionContext, listActionContext), [reducerActionContext, listActionContext]); | ||
const [state, dispatch] = (0, _useControllableReducer.default)({ | ||
@@ -232,4 +230,3 @@ reducer, | ||
const getRootProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return (0, _extends2.default)({}, otherHandlers, { | ||
'aria-activedescendant': focusManagement === 'activeDescendant' && highlightedValue != null ? getItemId(highlightedValue) : undefined, | ||
@@ -240,3 +237,3 @@ onBlur: createHandleBlur(otherHandlers), | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -243,0 +240,0 @@ const getItemState = React.useCallback(item => { |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = useListItem; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -99,4 +100,3 @@ var _utils = require("@mui/utils"); | ||
} | ||
const getRootProps = (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
const getRootProps = (otherHandlers = {}) => (0, _extends2.default)({}, otherHandlers, { | ||
onClick: createHandleClick(otherHandlers), | ||
@@ -103,0 +103,0 @@ onPointerOver: handlePointerOverEvents ? createHandlePointerOver(otherHandlers) : undefined, |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = menuReducer; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _useList = require("../useList"); | ||
@@ -17,13 +19,11 @@ function menuReducer(state, action) { | ||
if (newState.highlightedValue === null && action.context.items.length > 0) { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
highlightedValue: action.context.items[0] | ||
}; | ||
}); | ||
} | ||
if (action.type === _useList.ListActionTypes.keyDown) { | ||
if (action.event.key === 'Escape') { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
@@ -34,7 +34,6 @@ } | ||
if (!((_action$context$listb = action.context.listboxRef.current) != null && _action$context$listb.contains(action.event.relatedTarget))) { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
open: false, | ||
highlightedValue: action.context.items[0] | ||
}; | ||
}); | ||
} | ||
@@ -41,0 +40,0 @@ } |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = useMenu; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -111,7 +112,5 @@ var _utils = require("@mui/utils"); | ||
const rootProps = getRootProps(otherHandlers); | ||
return { | ||
...otherHandlers, | ||
...rootProps, | ||
return (0, _extends2.default)({}, otherHandlers, rootProps, { | ||
role: 'menu' | ||
}; | ||
}); | ||
}; | ||
@@ -123,6 +122,3 @@ React.useDebugValue({ | ||
return { | ||
contextValue: { | ||
...compoundComponentContextValue, | ||
...listContextValue | ||
}, | ||
contextValue: (0, _extends2.default)({}, compoundComponentContextValue, listContextValue), | ||
dispatch, | ||
@@ -129,0 +125,0 @@ getListboxProps, |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = useMenuItem; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -72,5 +73,3 @@ var _utils = require("@mui/utils"); | ||
return { | ||
getRootProps: (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
...getButtonProps(otherHandlers), | ||
getRootProps: (otherHandlers = {}) => (0, _extends2.default)({}, otherHandlers, getButtonProps(otherHandlers), { | ||
role: 'menuitem' | ||
@@ -87,17 +86,8 @@ }), | ||
const getRootProps = (otherHandlers = {}) => { | ||
const resolvedButtonProps = { | ||
...otherHandlers, | ||
...getButtonProps(otherHandlers) | ||
}; | ||
const resolvedMenuItemProps = { | ||
...resolvedButtonProps, | ||
...getListRootProps(resolvedButtonProps) | ||
}; | ||
return { | ||
...otherHandlers, | ||
...resolvedButtonProps, | ||
...resolvedMenuItemProps, | ||
const resolvedButtonProps = (0, _extends2.default)({}, otherHandlers, getButtonProps(otherHandlers)); | ||
const resolvedMenuItemProps = (0, _extends2.default)({}, resolvedButtonProps, getListRootProps(resolvedButtonProps)); | ||
return (0, _extends2.default)({}, otherHandlers, resolvedButtonProps, resolvedMenuItemProps, { | ||
role: 'menuitem', | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -104,0 +94,0 @@ return { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = useOption; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -54,5 +56,3 @@ var _utils = require("@mui/utils"); | ||
return { | ||
getRootProps: (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
...getListItemProps(otherHandlers), | ||
getRootProps: (otherHandlers = {}) => (0, _extends2.default)({}, otherHandlers, getListItemProps(otherHandlers), { | ||
id, | ||
@@ -59,0 +59,0 @@ ref: handleRef, |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = selectReducer; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _useList = require("../useList"); | ||
@@ -22,7 +24,6 @@ var _useSelect = require("./useSelect.types"); | ||
const itemToHighlight = (_state$selectedValues = state.selectedValues[0]) != null ? _state$selectedValues : (0, _useList.moveHighlight)(null, 'start', action.context); | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
open: !open, | ||
highlightedValue: !open ? itemToHighlight : null | ||
}; | ||
}); | ||
} | ||
@@ -34,12 +35,10 @@ const newState = (0, _useList.listReducer)(state, action); | ||
if (action.event.key === 'Escape') { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
if (selectionMode === 'single' && (action.event.key === 'Enter' || action.event.key === ' ')) { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
@@ -49,15 +48,13 @@ } else { | ||
var _state$selectedValues2; | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
open: true, | ||
highlightedValue: (_state$selectedValues2 = state.selectedValues[0]) != null ? _state$selectedValues2 : (0, _useList.moveHighlight)(null, 'start', action.context) | ||
}; | ||
}); | ||
} | ||
if (action.event.key === 'ArrowUp') { | ||
var _state$selectedValues3; | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
open: true, | ||
highlightedValue: (_state$selectedValues3 = state.selectedValues[0]) != null ? _state$selectedValues3 : (0, _useList.moveHighlight)(null, 'end', action.context) | ||
}; | ||
}); | ||
} | ||
@@ -68,13 +65,11 @@ } | ||
if (selectionMode === 'single') { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
break; | ||
case _useList.ListActionTypes.blur: | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
default: | ||
@@ -81,0 +76,0 @@ return newState; |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -206,4 +207,3 @@ var _utils = require("@mui/utils"); | ||
const getSelectTriggerProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return (0, _extends2.default)({}, otherHandlers, { | ||
onClick: createHandleButtonClick(otherHandlers), | ||
@@ -214,3 +214,3 @@ ref: mergedListRootRef, | ||
'aria-controls': listboxId | ||
}; | ||
}); | ||
}; | ||
@@ -223,4 +223,3 @@ const getButtonProps = (otherHandlers = {}) => { | ||
const getListboxProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return (0, _extends2.default)({}, otherHandlers, { | ||
id: listboxId, | ||
@@ -231,3 +230,3 @@ role: 'listbox', | ||
onMouseDown: preventDefault // to prevent the button from losing focus when interacting with the listbox | ||
}; | ||
}); | ||
}; | ||
@@ -240,6 +239,3 @@ | ||
}); | ||
const contextValue = React.useMemo(() => ({ | ||
...listContextValue, | ||
...compoundComponentContextValue | ||
}), [listContextValue, compoundComponentContextValue]); | ||
const contextValue = React.useMemo(() => (0, _extends2.default)({}, listContextValue, compoundComponentContextValue), [listContextValue, compoundComponentContextValue]); | ||
let selectValue; | ||
@@ -246,0 +242,0 @@ if (props.multiple) { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,2 +10,3 @@ value: true | ||
exports.valueToPercent = valueToPercent; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -560,10 +562,6 @@ var _utils = require("@mui/utils"); | ||
}; | ||
const mergedEventHandlers = { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return { | ||
ref: handleRef, | ||
...mergedEventHandlers | ||
}; | ||
const mergedEventHandlers = (0, _extends2.default)({}, otherHandlers, ownEventHandlers); | ||
return (0, _extends2.default)({ | ||
ref: handleRef | ||
}, mergedEventHandlers); | ||
}; | ||
@@ -586,6 +584,3 @@ const createHandleMouseOver = otherHandlers => event => { | ||
}; | ||
return { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return (0, _extends2.default)({}, otherHandlers, ownEventHandlers); | ||
}; | ||
@@ -599,7 +594,4 @@ const getHiddenInputProps = (otherHandlers = {}) => { | ||
}; | ||
const mergedEventHandlers = { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return { | ||
const mergedEventHandlers = (0, _extends2.default)({}, otherHandlers, ownEventHandlers); | ||
return (0, _extends2.default)({ | ||
tabIndex, | ||
@@ -615,6 +607,5 @@ 'aria-labelledby': ariaLabelledby, | ||
step: (_parameters$step = parameters.step) != null ? _parameters$step : undefined, | ||
disabled, | ||
...mergedEventHandlers, | ||
style: { | ||
..._utils.visuallyHidden, | ||
disabled | ||
}, mergedEventHandlers, { | ||
style: (0, _extends2.default)({}, _utils.visuallyHidden, { | ||
direction: isRtl ? 'rtl' : 'ltr', | ||
@@ -624,4 +615,4 @@ // So that VoiceOver's focus indicator matches the thumb's dimensions | ||
height: '100%' | ||
} | ||
}; | ||
}) | ||
}); | ||
}; | ||
@@ -628,0 +619,0 @@ return { |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = useSnackbar; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -127,11 +128,8 @@ var _utils = require("@mui/utils"); | ||
const propsEventHandlers = (0, _extractEventHandlers.default)(parameters); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...otherHandlers | ||
}; | ||
return { | ||
const externalEventHandlers = (0, _extends2.default)({}, propsEventHandlers, otherHandlers); | ||
return (0, _extends2.default)({ | ||
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced. | ||
// See https://github.com/mui/material-ui/issues/29080 | ||
role: 'presentation', | ||
...externalEventHandlers, | ||
role: 'presentation' | ||
}, externalEventHandlers, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -141,3 +139,3 @@ onFocus: createHandleFocus(externalEventHandlers), | ||
onMouseLeave: createMouseLeave(externalEventHandlers) | ||
}; | ||
}); | ||
}; | ||
@@ -144,0 +142,0 @@ return { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = useSwitch; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -89,3 +91,3 @@ var _utils = require("@mui/utils"); | ||
const handleInputRef = (0, _utils.unstable_useForkRef)(focusVisibleRef, inputRef); | ||
const getInputProps = (otherProps = {}) => ({ | ||
const getInputProps = (otherProps = {}) => (0, _extends2.default)({ | ||
checked: checkedProp, | ||
@@ -97,4 +99,4 @@ defaultChecked, | ||
required, | ||
type: 'checkbox', | ||
...otherProps, | ||
type: 'checkbox' | ||
}, otherProps, { | ||
onChange: createHandleInputChange(otherProps), | ||
@@ -101,0 +103,0 @@ onFocus: createHandleFocus(otherProps), |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -77,12 +78,5 @@ var _utils = require("@mui/utils"); | ||
const getRootProps = (otherHandlers = {}) => { | ||
const resolvedTabProps = { | ||
...otherHandlers, | ||
...getTabProps(otherHandlers) | ||
}; | ||
const resolvedButtonProps = { | ||
...resolvedTabProps, | ||
...getButtonProps(resolvedTabProps) | ||
}; | ||
return { | ||
...resolvedButtonProps, | ||
const resolvedTabProps = (0, _extends2.default)({}, otherHandlers, getTabProps(otherHandlers)); | ||
const resolvedButtonProps = (0, _extends2.default)({}, resolvedTabProps, getButtonProps(resolvedTabProps)); | ||
return (0, _extends2.default)({}, resolvedButtonProps, { | ||
role: 'tab', | ||
@@ -93,3 +87,3 @@ 'aria-controls': tabPanelId, | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -96,0 +90,0 @@ return { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -57,3 +59,3 @@ var _utils = require("@mui/utils"); | ||
return { | ||
contextValue: { | ||
contextValue: (0, _extends2.default)({ | ||
direction, | ||
@@ -66,5 +68,4 @@ getTabId, | ||
selectionFollowsFocus, | ||
value, | ||
...compoundComponentContextValue | ||
} | ||
value | ||
}, compoundComponentContextValue) | ||
}; | ||
@@ -71,0 +72,0 @@ } |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = tabsListReducer; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _useList = require("../useList"); | ||
@@ -12,6 +14,5 @@ var _useTabsList = require("./useTabsList.types"); | ||
if (action.type === _useTabsList.TabsListActionTypes.valueChange) { | ||
return { | ||
...state, | ||
return (0, _extends2.default)({}, state, { | ||
highlightedValue: action.value | ||
}; | ||
}); | ||
} | ||
@@ -26,6 +27,5 @@ const newState = (0, _useList.listReducer)(state, action); | ||
if (newState.selectedValues.length > 0) { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
highlightedValue: newState.selectedValues[0] | ||
}; | ||
}); | ||
} | ||
@@ -35,8 +35,7 @@ (0, _useList.moveHighlight)(null, 'reset', action.context); | ||
if (selectionFollowsFocus && newState.highlightedValue != null) { | ||
return { | ||
...newState, | ||
return (0, _extends2.default)({}, newState, { | ||
selectedValues: [newState.highlightedValue] | ||
}; | ||
}); | ||
} | ||
return newState; | ||
} |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -121,14 +122,9 @@ var _Tabs = require("../Tabs"); | ||
const getRootProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
...getListboxRootProps(otherHandlers), | ||
return (0, _extends2.default)({}, otherHandlers, getListboxRootProps(otherHandlers), { | ||
'aria-orientation': orientation === 'vertical' ? 'vertical' : undefined, | ||
role: 'tablist' | ||
}; | ||
}); | ||
}; | ||
return { | ||
contextValue: { | ||
...compoundComponentContextValue, | ||
...listContextValue | ||
}, | ||
contextValue: (0, _extends2.default)({}, compoundComponentContextValue, listContextValue), | ||
dispatch, | ||
@@ -135,0 +131,0 @@ getRootProps, |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = appendOwnerState; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _isHostComponent = _interopRequireDefault(require("./isHostComponent")); | ||
@@ -27,9 +28,5 @@ /** | ||
} | ||
return { | ||
...otherProps, | ||
ownerState: { | ||
...otherProps.ownerState, | ||
...ownerState | ||
} | ||
}; | ||
return (0, _extends2.default)({}, otherProps, { | ||
ownerState: (0, _extends2.default)({}, otherProps.ownerState, ownerState) | ||
}); | ||
} |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = combineHooksSlotProps; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
/** | ||
@@ -24,12 +26,6 @@ * Combines the two get*Props functions from Base UI hooks into one. | ||
return external => { | ||
const firstResult = { | ||
...external, | ||
...getFirstProps(external) | ||
}; | ||
const result = { | ||
...firstResult, | ||
...getSecondProps(firstResult) | ||
}; | ||
const firstResult = (0, _extends2.default)({}, external, getFirstProps(external)); | ||
const result = (0, _extends2.default)({}, firstResult, getSecondProps(firstResult)); | ||
return result; | ||
}; | ||
} |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.default = mergeSlotProps; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
@@ -37,12 +38,4 @@ var _extractEventHandlers = _interopRequireDefault(require("./extractEventHandlers")); | ||
const joinedClasses = (0, _clsx.default)(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className); | ||
const mergedStyle = { | ||
...(additionalProps == null ? void 0 : additionalProps.style), | ||
...(externalForwardedProps == null ? void 0 : externalForwardedProps.style), | ||
...(externalSlotProps == null ? void 0 : externalSlotProps.style) | ||
}; | ||
const props = { | ||
...additionalProps, | ||
...externalForwardedProps, | ||
...externalSlotProps | ||
}; | ||
const mergedStyle = (0, _extends2.default)({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
const props = (0, _extends2.default)({}, additionalProps, externalForwardedProps, externalSlotProps); | ||
if (joinedClasses.length > 0) { | ||
@@ -63,6 +56,3 @@ props.className = joinedClasses; | ||
const eventHandlers = (0, _extractEventHandlers.default)({ | ||
...externalForwardedProps, | ||
...externalSlotProps | ||
}); | ||
const eventHandlers = (0, _extractEventHandlers.default)((0, _extends2.default)({}, externalForwardedProps, externalSlotProps)); | ||
const componentsPropsWithoutEventHandlers = (0, _omitEventHandlers.default)(externalSlotProps); | ||
@@ -77,14 +67,4 @@ const otherPropsWithoutEventHandlers = (0, _omitEventHandlers.default)(externalForwardedProps); | ||
const joinedClasses = (0, _clsx.default)(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className); | ||
const mergedStyle = { | ||
...(internalSlotProps == null ? void 0 : internalSlotProps.style), | ||
...(additionalProps == null ? void 0 : additionalProps.style), | ||
...(externalForwardedProps == null ? void 0 : externalForwardedProps.style), | ||
...(externalSlotProps == null ? void 0 : externalSlotProps.style) | ||
}; | ||
const props = { | ||
...internalSlotProps, | ||
...additionalProps, | ||
...otherPropsWithoutEventHandlers, | ||
...componentsPropsWithoutEventHandlers | ||
}; | ||
const mergedStyle = (0, _extends2.default)({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
const props = (0, _extends2.default)({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers); | ||
if (joinedClasses.length > 0) { | ||
@@ -91,0 +71,0 @@ props.className = joinedClasses; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -7,2 +8,3 @@ value: true | ||
exports.default = useControllableReducer; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -22,5 +24,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function getControlledState(internalState, controlledProps) { | ||
const augmentedState = { | ||
...internalState | ||
}; | ||
const augmentedState = (0, _extends2.default)({}, internalState); | ||
Object.keys(controlledProps).forEach(key => { | ||
@@ -115,6 +115,5 @@ if (controlledProps[key] !== undefined) { | ||
const dispatchWithContext = React.useCallback(action => { | ||
dispatch({ | ||
...action, | ||
dispatch((0, _extends2.default)({}, action, { | ||
context: actionContext | ||
}); | ||
})); | ||
}, [actionContext]); | ||
@@ -121,0 +120,0 @@ useStateChangeDetection({ |
@@ -8,2 +8,4 @@ "use strict"; | ||
exports.default = useSlotProps; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _utils = require("@mui/utils"); | ||
@@ -13,2 +15,3 @@ var _appendOwnerState = _interopRequireDefault(require("./appendOwnerState")); | ||
var _resolveComponentProps = _interopRequireDefault(require("./resolveComponentProps")); | ||
const _excluded = ["elementType", "externalSlotProps", "ownerState"]; | ||
/** | ||
@@ -25,7 +28,7 @@ * @ignore - do not document. | ||
const { | ||
elementType, | ||
externalSlotProps, | ||
ownerState, | ||
...rest | ||
} = parameters; | ||
elementType, | ||
externalSlotProps, | ||
ownerState | ||
} = parameters, | ||
rest = (0, _objectWithoutPropertiesLoose2.default)(parameters, _excluded); | ||
const resolvedComponentsProps = (0, _resolveComponentProps.default)(externalSlotProps, ownerState); | ||
@@ -35,12 +38,10 @@ const { | ||
internalRef | ||
} = (0, _mergeSlotProps.default)({ | ||
...rest, | ||
} = (0, _mergeSlotProps.default)((0, _extends2.default)({}, rest, { | ||
externalSlotProps: resolvedComponentsProps | ||
}); | ||
})); | ||
const ref = (0, _utils.unstable_useForkRef)(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref); | ||
const props = (0, _appendOwnerState.default)(elementType, { | ||
...mergedProps, | ||
const props = (0, _appendOwnerState.default)(elementType, (0, _extends2.default)({}, mergedProps, { | ||
ref | ||
}, ownerState); | ||
}), ownerState); | ||
return props; | ||
} |
export { default } from './NoSsr'; | ||
export * from './NoSsr.types'; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export { default } from './Option'; |
@@ -0,0 +0,0 @@ import { OptionType } from './Option.types'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "disabled", "label", "slotProps", "slots", "value"]; | ||
import * as React from 'react'; | ||
@@ -28,10 +31,10 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
disabled = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
value, | ||
...other | ||
} = props; | ||
children, | ||
disabled = false, | ||
label, | ||
slotProps = {}, | ||
slots = {}, | ||
value | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const Root = (_slots$root = slots.root) != null ? _slots$root : 'li'; | ||
@@ -55,4 +58,3 @@ const optionRef = React.useRef(null); | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
disabled, | ||
@@ -62,3 +64,3 @@ highlighted, | ||
selected | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -73,6 +75,5 @@ const rootProps = useSlotProps({ | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -79,0 +80,0 @@ process.env.NODE_ENV !== "production" ? Option.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface OptionClasses { |
@@ -0,0 +0,0 @@ export { default } from './OptionGroup'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["disabled", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -31,7 +34,7 @@ import PropTypes from 'prop-types'; | ||
const { | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const Root = (slots == null ? void 0 : slots.root) || 'li'; | ||
@@ -63,12 +66,9 @@ const Label = (slots == null ? void 0 : slots.label) || 'span'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/_jsx(Label, { | ||
...labelProps, | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Label, _extends({}, labelProps, { | ||
children: props.label | ||
}), /*#__PURE__*/_jsx(List, { | ||
...listProps, | ||
})), /*#__PURE__*/_jsx(List, _extends({}, listProps, { | ||
children: props.children | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
@@ -75,0 +75,0 @@ process.env.NODE_ENV !== "production" ? OptionGroup.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface OptionGroupClasses { |
{ | ||
"name": "@mui/base", | ||
"version": "5.0.0-beta.1", | ||
"version": "5.0.0-beta.2", | ||
"private": false, | ||
@@ -41,3 +41,3 @@ "author": "MUI Team", | ||
"@babel/runtime": "^7.21.0", | ||
"@emotion/is-prop-valid": "^1.2.0", | ||
"@emotion/is-prop-valid": "^1.2.1", | ||
"@mui/types": "^7.2.4", | ||
@@ -44,0 +44,0 @@ "@mui/utils": "^5.13.1", |
@@ -0,0 +0,0 @@ export { default } from './Popper'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils'; |
@@ -0,1 +1,5 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], | ||
_excluded2 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -47,19 +51,18 @@ import { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const { | ||
anchorEl, | ||
children, | ||
direction, | ||
disablePortal, | ||
modifiers, | ||
open, | ||
placement: initialPlacement, | ||
popperOptions, | ||
popperRef: popperRefProp, | ||
slotProps = {}, | ||
slots = {}, | ||
TransitionProps, | ||
// @ts-ignore internal logic | ||
ownerState: ownerStateProp, | ||
// prevent from spreading to DOM, it can come from the parent component e.g. Select. | ||
...other | ||
} = props; | ||
anchorEl, | ||
children, | ||
direction, | ||
disablePortal, | ||
modifiers, | ||
open, | ||
placement: initialPlacement, | ||
popperOptions, | ||
popperRef: popperRefProp, | ||
slotProps = {}, | ||
slots = {}, | ||
TransitionProps | ||
// @ts-ignore internal logic | ||
// prevent from spreading to DOM, it can come from the parent component e.g. Select. | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const tooltipRef = React.useRef(null); | ||
@@ -132,7 +135,7 @@ const ownRef = useForkRef(tooltipRef, forwardedRef); | ||
} | ||
const popper = createPopper(resolvedAnchorElement, tooltipRef.current, { | ||
placement: rtlPlacement, | ||
...popperOptions, | ||
const popper = createPopper(resolvedAnchorElement, tooltipRef.current, _extends({ | ||
placement: rtlPlacement | ||
}, popperOptions, { | ||
modifiers: popperModifiers | ||
}); | ||
})); | ||
handlePopperRefRef.current(popper); | ||
@@ -163,6 +166,5 @@ return () => { | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: typeof children === 'function' ? children(childProps) : children | ||
}); | ||
})); | ||
}); | ||
@@ -183,19 +185,19 @@ | ||
const { | ||
anchorEl, | ||
children, | ||
container: containerProp, | ||
direction = 'ltr', | ||
disablePortal = false, | ||
keepMounted = false, | ||
modifiers, | ||
open, | ||
placement = 'bottom', | ||
popperOptions = defaultPopperOptions, | ||
popperRef, | ||
style, | ||
transition = false, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
anchorEl, | ||
children, | ||
container: containerProp, | ||
direction = 'ltr', | ||
disablePortal = false, | ||
keepMounted = false, | ||
modifiers, | ||
open, | ||
placement = 'bottom', | ||
popperOptions = defaultPopperOptions, | ||
popperRef, | ||
style, | ||
transition = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded2); | ||
const [exited, setExited] = React.useState(true); | ||
@@ -231,3 +233,3 @@ const handleEnter = () => { | ||
container: container, | ||
children: /*#__PURE__*/_jsx(PopperTooltip, { | ||
children: /*#__PURE__*/_jsx(PopperTooltip, _extends({ | ||
anchorEl: anchorEl, | ||
@@ -243,5 +245,5 @@ direction: direction, | ||
slotProps: slotProps, | ||
slots: slots, | ||
...other, | ||
style: { | ||
slots: slots | ||
}, other, { | ||
style: _extends({ | ||
// Prevents scroll issue, waiting for Popper.js to add this style once initiated. | ||
@@ -252,8 +254,7 @@ position: 'fixed', | ||
left: 0, | ||
display, | ||
...style | ||
}, | ||
display | ||
}, style), | ||
TransitionProps: transitionProps, | ||
children: children | ||
}) | ||
})) | ||
}); | ||
@@ -260,0 +261,0 @@ }); |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface PopperClasses { |
export { default } from './Portal'; | ||
export * from './Portal.types'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export { default } from './Select'; |
@@ -0,0 +0,0 @@ import { SelectType } from './Select.types'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "slotProps", "slots", "value"]; | ||
import * as React from 'react'; | ||
@@ -70,21 +73,21 @@ import PropTypes from 'prop-types'; | ||
const { | ||
autoFocus, | ||
children, | ||
defaultValue, | ||
defaultListboxOpen = false, | ||
disabled: disabledProp, | ||
getSerializedValue = defaultFormValueProvider, | ||
listboxId, | ||
listboxOpen: listboxOpenProp, | ||
multiple = false, | ||
name, | ||
onChange, | ||
onListboxOpenChange, | ||
getOptionAsString = defaultOptionStringifier, | ||
renderValue: renderValueProp, | ||
slotProps = {}, | ||
slots = {}, | ||
value: valueProp, | ||
...other | ||
} = props; | ||
autoFocus, | ||
children, | ||
defaultValue, | ||
defaultListboxOpen = false, | ||
disabled: disabledProp, | ||
getSerializedValue = defaultFormValueProvider, | ||
listboxId, | ||
listboxOpen: listboxOpenProp, | ||
multiple = false, | ||
name, | ||
onChange, | ||
onListboxOpenChange, | ||
getOptionAsString = defaultOptionStringifier, | ||
renderValue: renderValueProp, | ||
slotProps = {}, | ||
slots = {}, | ||
value: valueProp | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const renderValue = renderValueProp != null ? renderValueProp : defaultRenderValue; | ||
@@ -129,4 +132,3 @@ const [buttonDefined, setButtonDefined] = React.useState(false); | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
active: buttonActive, | ||
@@ -140,3 +142,3 @@ defaultListboxOpen, | ||
value | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -182,9 +184,6 @@ const buttonProps = useSlotProps({ | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx(Button, { | ||
...buttonProps, | ||
children: [/*#__PURE__*/_jsx(Button, _extends({}, buttonProps, { | ||
children: renderValue(selectedOptionsMetadata) | ||
}), buttonDefined && /*#__PURE__*/_jsx(PopperComponent, { | ||
...popperProps, | ||
children: /*#__PURE__*/_jsx(ListboxRoot, { | ||
...listboxProps, | ||
})), buttonDefined && /*#__PURE__*/_jsx(PopperComponent, _extends({}, popperProps, { | ||
children: /*#__PURE__*/_jsx(ListboxRoot, _extends({}, listboxProps, { | ||
children: /*#__PURE__*/_jsx(SelectProvider, { | ||
@@ -194,4 +193,4 @@ value: contextValue, | ||
}) | ||
}) | ||
}), name && /*#__PURE__*/_jsx("input", { | ||
})) | ||
})), name && /*#__PURE__*/_jsx("input", { | ||
type: "hidden", | ||
@@ -198,0 +197,0 @@ name: name, |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface SelectClasses { |
@@ -0,0 +0,0 @@ export { default } from './Slider'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelFormat", "isRtl", "defaultValue", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -56,34 +59,28 @@ import PropTypes from 'prop-types'; | ||
const { | ||
'aria-label': ariaLabel, | ||
'aria-valuetext': ariaValuetext, | ||
'aria-labelledby': ariaLabelledby, | ||
className, | ||
disableSwap = false, | ||
disabled = false, | ||
getAriaLabel, | ||
getAriaValueText, | ||
marks: marksProp = false, | ||
max = 100, | ||
min = 0, | ||
name, | ||
onChange, | ||
onChangeCommitted, | ||
orientation = 'horizontal', | ||
scale = Identity, | ||
step = 1, | ||
tabIndex, | ||
track = 'normal', | ||
value: valueProp, | ||
valueLabelFormat = Identity, | ||
isRtl = false, | ||
defaultValue, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
'aria-label': ariaLabel, | ||
'aria-valuetext': ariaValuetext, | ||
'aria-labelledby': ariaLabelledby, | ||
className, | ||
disableSwap = false, | ||
disabled = false, | ||
getAriaLabel, | ||
getAriaValueText, | ||
marks: marksProp = false, | ||
max = 100, | ||
min = 0, | ||
orientation = 'horizontal', | ||
scale = Identity, | ||
step = 1, | ||
track = 'normal', | ||
valueLabelFormat = Identity, | ||
isRtl = false, | ||
defaultValue, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
// all props with defaults | ||
// consider extracting to hook an reusing the lint rule for the variants | ||
const partialOwnerState = { | ||
...props, | ||
const partialOwnerState = _extends({}, props, { | ||
marks: marksProp, | ||
@@ -100,3 +97,3 @@ disabled, | ||
valueLabelFormat | ||
}; | ||
}); | ||
const { | ||
@@ -116,12 +113,10 @@ axisProps, | ||
trackLeap | ||
} = useSlider({ | ||
...partialOwnerState, | ||
} = useSlider(_extends({}, partialOwnerState, { | ||
rootRef: forwardedRef | ||
}); | ||
const ownerState = { | ||
...partialOwnerState, | ||
})); | ||
const ownerState = _extends({}, partialOwnerState, { | ||
marked: marks.length > 0 && marks.some(mark => mark.label), | ||
dragging, | ||
focusedThumbIndex | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -149,6 +144,3 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'span'; | ||
additionalProps: { | ||
style: { | ||
...axisProps[axis].offset(trackOffset), | ||
...axisProps[axis].leap(trackLeap) | ||
} | ||
style: _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap)) | ||
}, | ||
@@ -191,9 +183,4 @@ ownerState, | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/_jsx(Rail, { | ||
...railProps | ||
}), /*#__PURE__*/_jsx(Track, { | ||
...trackProps | ||
}), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => { | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Rail, _extends({}, railProps)), /*#__PURE__*/_jsx(Track, _extends({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => { | ||
const percent = valueToPercent(mark.value, min, max); | ||
@@ -208,27 +195,19 @@ const style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx(Mark, { | ||
"data-index": index, | ||
...markProps, | ||
...(!isHostComponent(Mark) && { | ||
markActive | ||
}), | ||
style: { | ||
...style, | ||
...markProps.style | ||
}, | ||
children: [/*#__PURE__*/_jsx(Mark, _extends({ | ||
"data-index": index | ||
}, markProps, !isHostComponent(Mark) && { | ||
markActive | ||
}, { | ||
style: _extends({}, style, markProps.style), | ||
className: clsx(markProps.className, markActive && classes.markActive) | ||
}), mark.label != null ? /*#__PURE__*/_jsx(MarkLabel, { | ||
})), mark.label != null ? /*#__PURE__*/_jsx(MarkLabel, _extends({ | ||
"aria-hidden": true, | ||
"data-index": index, | ||
...markLabelProps, | ||
...(!isHostComponent(MarkLabel) && { | ||
markLabelActive: markActive | ||
}), | ||
style: { | ||
...style, | ||
...markLabelProps.style | ||
}, | ||
"data-index": index | ||
}, markLabelProps, !isHostComponent(MarkLabel) && { | ||
markLabelActive: markActive | ||
}, { | ||
style: _extends({}, style, markLabelProps.style), | ||
className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive), | ||
children: mark.label | ||
}) : null] | ||
})) : null] | ||
}, index); | ||
@@ -238,12 +217,10 @@ }), values.map((value, index) => { | ||
const style = axisProps[axis].offset(percent); | ||
return /*#__PURE__*/_jsxs(Thumb, { | ||
"data-index": index, | ||
...thumbProps, | ||
return /*#__PURE__*/_jsxs(Thumb, _extends({ | ||
"data-index": index | ||
}, thumbProps, { | ||
className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible), | ||
style: { | ||
...style, | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined, | ||
...thumbProps.style | ||
}, | ||
children: [/*#__PURE__*/_jsx(Input, { | ||
style: _extends({}, style, { | ||
pointerEvents: disableSwap && active !== index ? 'none' : undefined | ||
}, thumbProps.style), | ||
children: [/*#__PURE__*/_jsx(Input, _extends({ | ||
"data-index": index, | ||
@@ -254,16 +231,13 @@ "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel, | ||
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext, | ||
value: values[index], | ||
...inputProps | ||
}), ValueLabel ? /*#__PURE__*/_jsx(ValueLabel, { | ||
...(!isHostComponent(ValueLabel) && { | ||
valueLabelFormat, | ||
index, | ||
disabled | ||
}), | ||
...valueLabelProps, | ||
value: values[index] | ||
}, inputProps)), ValueLabel ? /*#__PURE__*/_jsx(ValueLabel, _extends({}, !isHostComponent(ValueLabel) && { | ||
valueLabelFormat, | ||
index, | ||
disabled | ||
}, valueLabelProps, { | ||
children: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat | ||
}) : null] | ||
}, index); | ||
})) : null] | ||
}), index); | ||
})] | ||
}); | ||
})); | ||
}); | ||
@@ -270,0 +244,0 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import { OverridableComponent, OverridableTypeMap, Simplify } from '@mui/types'; |
@@ -0,0 +0,0 @@ export interface SliderClasses { |
@@ -0,0 +0,0 @@ export { default } from './Snackbar'; |
@@ -0,0 +0,0 @@ import { SnackbarTypeMap } from './Snackbar.types'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["autoHideDuration", "children", "disableWindowBlurListener", "exited", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -29,17 +32,13 @@ import PropTypes from 'prop-types'; | ||
const { | ||
autoHideDuration = null, | ||
children, | ||
disableWindowBlurListener = false, | ||
exited = true, | ||
onBlur, | ||
onClose, | ||
onFocus, | ||
onMouseEnter, | ||
onMouseLeave, | ||
open, | ||
resumeHideDuration, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
autoHideDuration = null, | ||
children, | ||
disableWindowBlurListener = false, | ||
exited = true, | ||
onClose, | ||
open, | ||
resumeHideDuration, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const classes = useUtilityClasses(); | ||
@@ -49,4 +48,3 @@ const { | ||
onClickAway | ||
} = useSnackbar({ | ||
...props, | ||
} = useSnackbar(_extends({}, props, { | ||
autoHideDuration, | ||
@@ -57,3 +55,3 @@ disableWindowBlurListener, | ||
resumeHideDuration | ||
}); | ||
})); | ||
const ownerState = props; | ||
@@ -88,9 +86,7 @@ const Root = slots.root || 'div'; | ||
} | ||
return /*#__PURE__*/_jsx(ClickAwayListener, { | ||
...clickAwayListenerProps, | ||
children: /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
return /*#__PURE__*/_jsx(ClickAwayListener, _extends({}, clickAwayListenerProps, { | ||
children: /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: children | ||
}) | ||
}); | ||
})) | ||
})); | ||
}); | ||
@@ -97,0 +93,0 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface SnackbarClasses { |
@@ -0,0 +0,0 @@ export { default } from './Switch'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils/PolymorphicComponent'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -40,15 +43,14 @@ import PropTypes from 'prop-types'; | ||
const { | ||
checked: checkedProp, | ||
defaultChecked, | ||
disabled: disabledProp, | ||
onBlur, | ||
onChange, | ||
onFocus, | ||
onFocusVisible, | ||
readOnly: readOnlyProp, | ||
required, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
checked: checkedProp, | ||
defaultChecked, | ||
disabled: disabledProp, | ||
onBlur, | ||
onChange, | ||
onFocus, | ||
onFocusVisible, | ||
readOnly: readOnlyProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const useSwitchProps = { | ||
@@ -71,4 +73,3 @@ checked: checkedProp, | ||
} = useSwitch(useSwitchProps); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
checked, | ||
@@ -78,3 +79,3 @@ disabled, | ||
readOnly | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -114,12 +115,5 @@ const Root = (_slots$root = slots.root) != null ? _slots$root : 'span'; | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [/*#__PURE__*/_jsx(Track, { | ||
...trackProps | ||
}), /*#__PURE__*/_jsx(Thumb, { | ||
...thumbProps | ||
}), /*#__PURE__*/_jsx(Input, { | ||
...inputProps | ||
})] | ||
}); | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [/*#__PURE__*/_jsx(Track, _extends({}, trackProps)), /*#__PURE__*/_jsx(Thumb, _extends({}, thumbProps)), /*#__PURE__*/_jsx(Input, _extends({}, inputProps))] | ||
})); | ||
}); | ||
@@ -126,0 +120,0 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ export interface SwitchClasses { |
@@ -0,0 +0,0 @@ export { default } from './Tab'; |
@@ -0,0 +0,0 @@ import { TabTypeMap } from './Tab.types'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["action", "children", "value", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -33,13 +36,8 @@ import PropTypes from 'prop-types'; | ||
const { | ||
action, | ||
children, | ||
value: valueProp, | ||
disabled = false, | ||
onChange, | ||
onClick, | ||
onFocus, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
disabled = false, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const tabRef = React.useRef(); | ||
@@ -52,8 +50,6 @@ const handleRef = useForkRef(tabRef, forwardedRef); | ||
getRootProps | ||
} = useTab({ | ||
...props, | ||
} = useTab(_extends({}, props, { | ||
rootRef: handleRef | ||
}); | ||
const ownerState = { | ||
...props, | ||
})); | ||
const ownerState = _extends({}, props, { | ||
active, | ||
@@ -63,3 +59,3 @@ disabled, | ||
selected | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -78,6 +74,5 @@ const TabRoot = (_slots$root = slots.root) != null ? _slots$root : 'button'; | ||
}); | ||
return /*#__PURE__*/_jsx(TabRoot, { | ||
...tabRootProps, | ||
return /*#__PURE__*/_jsx(TabRoot, _extends({}, tabRootProps, { | ||
children: children | ||
}); | ||
})); | ||
}); | ||
@@ -84,0 +79,0 @@ process.env.NODE_ENV !== "production" ? Tab.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import { Simplify } from '@mui/types'; |
@@ -0,0 +0,0 @@ export interface TabClasses { |
export type ItemAriaLabelType = 'first' | 'last' | 'next' | 'previous'; |
@@ -0,0 +0,0 @@ export { default } from './TablePagination'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["colSpan", "count", "getItemAriaLabel", "labelDisplayedRows", "labelId", "labelRowsPerPage", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "selectId", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -53,18 +56,18 @@ import PropTypes from 'prop-types'; | ||
const { | ||
colSpan: colSpanProp, | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
labelDisplayedRows = defaultLabelDisplayedRows, | ||
labelId: labelIdProp, | ||
labelRowsPerPage = 'Rows per page:', | ||
onPageChange, | ||
onRowsPerPageChange, | ||
page, | ||
rowsPerPage, | ||
rowsPerPageOptions = [10, 25, 50, 100], | ||
selectId: selectIdProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
colSpan: colSpanProp, | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
labelDisplayedRows = defaultLabelDisplayedRows, | ||
labelId: labelIdProp, | ||
labelRowsPerPage = 'Rows per page:', | ||
onPageChange, | ||
onRowsPerPageChange, | ||
page, | ||
rowsPerPage, | ||
rowsPerPageOptions = [10, 25, 50, 100], | ||
selectId: selectIdProp, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const ownerState = props; | ||
@@ -166,20 +169,12 @@ const classes = useUtilityClasses(); | ||
}); | ||
return /*#__PURE__*/_jsx(Root, { | ||
...rootProps, | ||
children: /*#__PURE__*/_jsxs(Toolbar, { | ||
...toolbarProps, | ||
children: [/*#__PURE__*/_jsx(Spacer, { | ||
...spacerProps | ||
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabel, { | ||
...selectLabelProps, | ||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, { | ||
children: /*#__PURE__*/_jsxs(Toolbar, _extends({}, toolbarProps, { | ||
children: [/*#__PURE__*/_jsx(Spacer, _extends({}, spacerProps)), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabel, _extends({}, selectLabelProps, { | ||
children: labelRowsPerPage | ||
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(Select, { | ||
...selectProps, | ||
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/_createElement(MenuItem, { | ||
...menuItemProps, | ||
})), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(Select, _extends({}, selectProps, { | ||
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/_createElement(MenuItem, _extends({}, menuItemProps, { | ||
key: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption, | ||
value: typeof rowsPerPageOption !== 'number' && rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption | ||
}, typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption)) | ||
}), /*#__PURE__*/_jsx(DisplayedRows, { | ||
...displayedRowsProps, | ||
}), typeof rowsPerPageOption !== 'number' && rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption)) | ||
})), /*#__PURE__*/_jsx(DisplayedRows, _extends({}, displayedRowsProps, { | ||
children: labelDisplayedRows({ | ||
@@ -191,7 +186,5 @@ from: count === 0 ? 0 : page * rowsPerPage + 1, | ||
}) | ||
}), /*#__PURE__*/_jsx(Actions, { | ||
...actionsProps | ||
})] | ||
}) | ||
}); | ||
})), /*#__PURE__*/_jsx(Actions, _extends({}, actionsProps))] | ||
})) | ||
})); | ||
}); | ||
@@ -198,0 +191,0 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["count", "getItemAriaLabel", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "direction", "ownerState", "slotProps", "slots"]; | ||
var _span, _span2, _span3, _span4; | ||
@@ -36,16 +39,17 @@ import * as React from 'react'; | ||
const { | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
onPageChange, | ||
page, | ||
rowsPerPage, | ||
showFirstButton = false, | ||
showLastButton = false, | ||
direction, | ||
// @ts-ignore | ||
ownerState: ownerStateProp, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
count, | ||
getItemAriaLabel = defaultGetAriaLabel, | ||
onPageChange, | ||
page, | ||
rowsPerPage, | ||
showFirstButton = false, | ||
showLastButton = false, | ||
direction | ||
// @ts-ignore | ||
, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const ownerState = props; | ||
@@ -126,19 +130,14 @@ const handleFirstPageButtonClick = event => { | ||
const BackPageIcon = (_slots$backPageIcon = slots.backPageIcon) != null ? _slots$backPageIcon : BackPageIconDefault; | ||
return /*#__PURE__*/_jsxs(Root, { | ||
...rootProps, | ||
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButton, { | ||
...firstButtonProps, | ||
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, { | ||
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButton, _extends({}, firstButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(LastPageIcon, {}) : /*#__PURE__*/_jsx(FirstPageIcon, {}) | ||
}), /*#__PURE__*/_jsx(BackButton, { | ||
...backButtonProps, | ||
})), /*#__PURE__*/_jsx(BackButton, _extends({}, backButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(NextPageIcon, {}) : /*#__PURE__*/_jsx(BackPageIcon, {}) | ||
}), /*#__PURE__*/_jsx(NextButton, { | ||
...nextButtonProps, | ||
})), /*#__PURE__*/_jsx(NextButton, _extends({}, nextButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(BackPageIcon, {}) : /*#__PURE__*/_jsx(NextPageIcon, {}) | ||
}), showLastButton && /*#__PURE__*/_jsx(LastButton, { | ||
...lastButtonProps, | ||
})), showLastButton && /*#__PURE__*/_jsx(LastButton, _extends({}, lastButtonProps, { | ||
children: direction === 'rtl' ? /*#__PURE__*/_jsx(FirstPageIcon, {}) : /*#__PURE__*/_jsx(LastPageIcon, {}) | ||
})] | ||
}); | ||
}))] | ||
})); | ||
}); | ||
export default TablePaginationActions; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface TablePaginationClasses { |
@@ -0,0 +0,0 @@ export { default } from './TabPanel'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "value", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -31,8 +34,7 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
value, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -42,6 +44,5 @@ hidden, | ||
} = useTabPanel(props); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
hidden | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -61,6 +62,5 @@ const TabPanelRoot = (_slots$root = slots.root) != null ? _slots$root : 'div'; | ||
}); | ||
return /*#__PURE__*/_jsx(TabPanelRoot, { | ||
...tabPanelRootProps, | ||
return /*#__PURE__*/_jsx(TabPanelRoot, _extends({}, tabPanelRootProps, { | ||
children: !hidden && children | ||
}); | ||
})); | ||
}); | ||
@@ -67,0 +67,0 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface TabPanelClasses { |
@@ -0,0 +0,0 @@ export { default } from './Tabs'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "value", "defaultValue", "orientation", "direction", "onChange", "selectionFollowsFocus", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -33,21 +36,16 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
value: valueProp, | ||
defaultValue, | ||
orientation = 'horizontal', | ||
direction = 'ltr', | ||
onChange, | ||
selectionFollowsFocus, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
orientation = 'horizontal', | ||
direction = 'ltr', | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
contextValue | ||
} = useTabs(props); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
orientation, | ||
direction | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -65,4 +63,3 @@ const TabsRoot = (_slots$root = slots.root) != null ? _slots$root : 'div'; | ||
}); | ||
return /*#__PURE__*/_jsx(TabsRoot, { | ||
...tabsRootProps, | ||
return /*#__PURE__*/_jsx(TabsRoot, _extends({}, tabsRootProps, { | ||
children: /*#__PURE__*/_jsx(TabsProvider, { | ||
@@ -72,3 +69,3 @@ value: contextValue, | ||
}) | ||
}); | ||
})); | ||
}); | ||
@@ -75,0 +72,0 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes /* remove-proptypes */ = { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface TabsClasses { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export { default } from './TabsList'; |
@@ -0,0 +0,0 @@ import { PolymorphicComponent } from '../utils'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["children", "slotProps", "slots"]; | ||
import * as React from 'react'; | ||
@@ -33,7 +36,7 @@ import PropTypes from 'prop-types'; | ||
const { | ||
children, | ||
slotProps = {}, | ||
slots = {}, | ||
...other | ||
} = props; | ||
children, | ||
slotProps = {}, | ||
slots = {} | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -47,7 +50,6 @@ isRtl, | ||
}); | ||
const ownerState = { | ||
...props, | ||
const ownerState = _extends({}, props, { | ||
isRtl, | ||
orientation | ||
}; | ||
}); | ||
const classes = useUtilityClasses(ownerState); | ||
@@ -65,6 +67,5 @@ const TabsListRoot = (_slots$root = slots.root) != null ? _slots$root : 'div'; | ||
value: contextValue, | ||
children: /*#__PURE__*/_jsx(TabsListRoot, { | ||
...tabsListRootProps, | ||
children: /*#__PURE__*/_jsx(TabsListRoot, _extends({}, tabsListRootProps, { | ||
children: children | ||
}) | ||
})) | ||
}); | ||
@@ -71,0 +72,0 @@ }); |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface TabsListClasses { |
export { default } from './TextareaAutosize'; | ||
export * from './TextareaAutosize.types'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["onChange", "maxRows", "minRows", "style", "value"]; | ||
import * as React from 'react'; | ||
@@ -42,9 +45,9 @@ import PropTypes from 'prop-types'; | ||
const { | ||
onChange, | ||
maxRows, | ||
minRows = 1, | ||
style, | ||
value, | ||
...other | ||
} = props; | ||
onChange, | ||
maxRows, | ||
minRows = 1, | ||
style, | ||
value | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
const { | ||
@@ -198,3 +201,3 @@ current: isControlled | ||
return /*#__PURE__*/_jsxs(React.Fragment, { | ||
children: [/*#__PURE__*/_jsx("textarea", { | ||
children: [/*#__PURE__*/_jsx("textarea", _extends({ | ||
value: value, | ||
@@ -206,11 +209,9 @@ onChange: handleChange, | ||
rows: minRows, | ||
style: { | ||
style: _extends({ | ||
height: state.outerHeightStyle, | ||
// Need a large enough difference to allow scrolling. | ||
// This prevents infinite rendering loop. | ||
overflow: state.overflow ? 'hidden' : undefined, | ||
...style | ||
}, | ||
...other | ||
}), /*#__PURE__*/_jsx("textarea", { | ||
overflow: state.overflow ? 'hidden' : undefined | ||
}, style) | ||
}, other)), /*#__PURE__*/_jsx("textarea", { | ||
"aria-hidden": true, | ||
@@ -221,7 +222,5 @@ className: props.className, | ||
tabIndex: -1, | ||
style: { | ||
...styles.shadow, | ||
...style, | ||
style: _extends({}, styles.shadow, style, { | ||
padding: 0 | ||
} | ||
}) | ||
})] | ||
@@ -228,0 +227,0 @@ }); |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -415,3 +415,2 @@ import * as React from 'react'; | ||
* If `true`, the component input has some values. | ||
* @default false | ||
*/ | ||
@@ -421,3 +420,2 @@ dirty: boolean; | ||
* If `true`, the listbox is being displayed. | ||
* @default false | ||
*/ | ||
@@ -427,3 +425,2 @@ expanded: boolean; | ||
* If `true`, the popup is open on the component. | ||
* @default false | ||
*/ | ||
@@ -433,3 +430,2 @@ popupOpen: boolean; | ||
* If `true`, the component is focused. | ||
* @default false | ||
*/ | ||
@@ -448,3 +444,2 @@ focused: boolean; | ||
* Index of the focused tag for the component. | ||
* @default -1 | ||
*/ | ||
@@ -451,0 +446,0 @@ focusedTag: number; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
/* eslint-disable no-constant-condition */ | ||
@@ -887,5 +888,5 @@ import * as React from 'react'; | ||
return { | ||
getRootProps: (other = {}) => ({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null, | ||
...other, | ||
getRootProps: (other = {}) => _extends({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null | ||
}, other, { | ||
onKeyDown: handleKeyDown(other), | ||
@@ -931,9 +932,8 @@ onMouseDown: handleMouseDown, | ||
index | ||
}) => ({ | ||
}) => _extends({ | ||
key: index, | ||
'data-tag-index': index, | ||
tabIndex: -1, | ||
...(!readOnly && { | ||
onDelete: handleTagDelete(index) | ||
}) | ||
tabIndex: -1 | ||
}, !readOnly && { | ||
onDelete: handleTagDelete(index) | ||
}), | ||
@@ -940,0 +940,0 @@ getListboxProps: () => ({ |
export { default } from './useBadge'; | ||
export * from './useBadge.types'; |
@@ -0,0 +0,0 @@ import { UseBadgeParameters, UseBadgeReturnValue } from './useBadge.types'; |
@@ -30,3 +30,2 @@ /// <reference types="react" /> | ||
* If `true`, the component will not be visible. | ||
* @default false | ||
*/ | ||
@@ -36,3 +35,2 @@ invisible: boolean; | ||
* Maximum number to be displayed in the badge. | ||
* @default 99 | ||
*/ | ||
@@ -42,5 +40,4 @@ max: number; | ||
* Value to be displayed in the badge. If `badgeContent` is greater than `max`, it will return `max+`. | ||
* @default badgeContent | ||
*/ | ||
displayValue: React.ReactNode; | ||
} |
export { default } from './useButton'; | ||
export * from './useButton.types'; |
@@ -0,0 +0,0 @@ import { UseButtonParameters, UseButtonReturnValue } from './useButton.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -152,6 +153,3 @@ import { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; | ||
const propsEventHandlers = extractEventHandlers(parameters); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...otherHandlers | ||
}; | ||
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
@@ -161,6 +159,5 @@ // onFocusVisible can be present on the props, but since it's not a valid React event handler, | ||
delete externalEventHandlers.onFocusVisible; | ||
return { | ||
type, | ||
...externalEventHandlers, | ||
...buttonProps, | ||
return _extends({ | ||
type | ||
}, externalEventHandlers, buttonProps, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -174,3 +171,3 @@ onClick: createHandleClick(externalEventHandlers), | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -177,0 +174,0 @@ return { |
@@ -50,3 +50,2 @@ import * as React from 'react'; | ||
* If `true`, the component is being focused using keyboard. | ||
* @default false | ||
*/ | ||
@@ -60,3 +59,2 @@ focusVisible: boolean; | ||
* If `true`, the component is active (pressed). | ||
* @default false | ||
*/ | ||
@@ -63,0 +61,0 @@ active: boolean; |
export { default } from './useInput'; | ||
export * from './useInput.types'; |
@@ -0,0 +0,0 @@ import { UseInputParameters, UseInputReturnValue } from './useInput.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils"; | ||
@@ -126,11 +127,6 @@ import * as React from 'react'; | ||
const propsEventHandlers = extractEventHandlers(parameters, ['onBlur', 'onChange', 'onFocus']); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...extractEventHandlers(externalProps) | ||
}; | ||
return { | ||
...externalProps, | ||
...externalEventHandlers, | ||
const externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); | ||
return _extends({}, externalProps, externalEventHandlers, { | ||
onClick: handleClick(externalEventHandlers) | ||
}; | ||
}); | ||
}; | ||
@@ -143,15 +139,9 @@ const getInputProps = (externalProps = {}) => { | ||
}; | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...extractEventHandlers(externalProps) | ||
}; | ||
const mergedEventHandlers = { | ||
...externalProps, | ||
...externalEventHandlers, | ||
const externalEventHandlers = _extends({}, propsEventHandlers, extractEventHandlers(externalProps)); | ||
const mergedEventHandlers = _extends({}, externalProps, externalEventHandlers, { | ||
onBlur: handleBlur(externalEventHandlers), | ||
onChange: handleChange(externalEventHandlers), | ||
onFocus: handleFocus(externalEventHandlers) | ||
}; | ||
return { | ||
...mergedEventHandlers, | ||
}); | ||
return _extends({}, mergedEventHandlers, { | ||
'aria-invalid': error || undefined, | ||
@@ -163,3 +153,3 @@ defaultValue: defaultValue, | ||
disabled | ||
}; | ||
}); | ||
}; | ||
@@ -166,0 +156,0 @@ return { |
@@ -49,3 +49,2 @@ import * as React from 'react'; | ||
* If `true`, the component will be disabled. | ||
* @default false | ||
*/ | ||
@@ -55,3 +54,2 @@ disabled: boolean; | ||
* If `true`, the `input` will indicate an error by setting the `aria-invalid` attribute. | ||
* @default false | ||
*/ | ||
@@ -61,3 +59,2 @@ error: boolean; | ||
* If `true`, the `input` will be focused. | ||
* @default false | ||
*/ | ||
@@ -84,3 +81,2 @@ focused: boolean; | ||
* If `true`, the `input` will indicate that it's required. | ||
* @default false | ||
*/ | ||
@@ -87,0 +83,0 @@ required: boolean; |
@@ -0,0 +0,0 @@ export { default } from './useList'; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import { ListState, ListReducerAction, ListActionContext, SelectionMode } from './useList.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { ListActionTypes } from './listActions.types'; | ||
@@ -164,7 +165,6 @@ /** | ||
const newSelectedValues = toggleSelection(item, selectedValues, selectionMode, itemComparer); | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
selectedValues: newSelectedValues, | ||
highlightedValue: item | ||
}; | ||
}); | ||
} | ||
@@ -179,21 +179,17 @@ function handleKeyDown(key, state, context) { | ||
case 'Home': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'start', context) | ||
}; | ||
}); | ||
case 'End': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 'end', context) | ||
}; | ||
}); | ||
case 'PageUp': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -pageSize, context) | ||
}; | ||
}); | ||
case 'PageDown': | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, pageSize, context) | ||
}; | ||
}); | ||
case 'ArrowUp': | ||
@@ -203,6 +199,5 @@ if (orientation !== 'vertical') { | ||
} | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, -1, context) | ||
}; | ||
}); | ||
case 'ArrowDown': | ||
@@ -212,6 +207,5 @@ if (orientation !== 'vertical') { | ||
} | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, 1, context) | ||
}; | ||
}); | ||
case 'ArrowLeft': | ||
@@ -223,6 +217,5 @@ { | ||
const offset = orientation === 'horizontal-ltr' ? -1 : 1; | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
}; | ||
}); | ||
} | ||
@@ -235,6 +228,5 @@ case 'ArrowRight': | ||
const offset = orientation === 'horizontal-ltr' ? 1 : -1; | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: moveHighlight(previouslySelectedValue, offset, context) | ||
}; | ||
}); | ||
} | ||
@@ -256,6 +248,5 @@ case 'Enter': | ||
} | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: null | ||
}; | ||
}); | ||
} | ||
@@ -287,6 +278,5 @@ function textCriteriaMatches(nextFocus, searchString, stringifyItem) { | ||
// The nextItem is the element to be highlighted | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: nextItem | ||
}; | ||
}); | ||
} | ||
@@ -317,7 +307,6 @@ // Move to the next element. | ||
const newSelectedValues = selectedValues.filter(selectedValue => items.some(item => itemComparer(item, selectedValue))); | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: newHighlightedValue, | ||
selectedValues: newSelectedValues | ||
}; | ||
}); | ||
} | ||
@@ -324,0 +313,0 @@ export default function listReducer(state, action) { |
@@ -0,0 +0,0 @@ import { UseListParameters, ListState, UseListReturnValue } from './useList.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -119,6 +120,3 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const reducer = externalReducer != null ? externalReducer : defaultReducer; | ||
const actionContext = React.useMemo(() => ({ | ||
...reducerActionContext, | ||
...listActionContext | ||
}), [reducerActionContext, listActionContext]); | ||
const actionContext = React.useMemo(() => _extends({}, reducerActionContext, listActionContext), [reducerActionContext, listActionContext]); | ||
const [state, dispatch] = useControllableReducer({ | ||
@@ -222,4 +220,3 @@ reducer, | ||
const getRootProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return _extends({}, otherHandlers, { | ||
'aria-activedescendant': focusManagement === 'activeDescendant' && highlightedValue != null ? getItemId(highlightedValue) : undefined, | ||
@@ -230,3 +227,3 @@ onBlur: createHandleBlur(otherHandlers), | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -233,0 +230,0 @@ const getItemState = React.useCallback(item => { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface ListChangeNotifiers<ItemValue> { |
@@ -0,0 +0,0 @@ import { UseListItemParameters, UseListItemReturnValue } from './useListItem.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -90,4 +91,3 @@ import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; | ||
} | ||
const getRootProps = (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
const getRootProps = (otherHandlers = {}) => _extends({}, otherHandlers, { | ||
onClick: createHandleClick(otherHandlers), | ||
@@ -94,0 +94,0 @@ onPointerOver: handlePointerOverEvents ? createHandlePointerOver(otherHandlers) : undefined, |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ export { default } from './useMenu'; |
@@ -15,2 +15,2 @@ import * as React from 'react'; | ||
*/ | ||
export default function MenuProvider(props: MenuProviderProps): JSX.Element; | ||
export default function MenuProvider(props: MenuProviderProps): React.JSX.Element; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { ListActionTypes, listReducer } from '../useList'; | ||
@@ -10,13 +11,11 @@ export default function menuReducer(state, action) { | ||
if (newState.highlightedValue === null && action.context.items.length > 0) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
highlightedValue: action.context.items[0] | ||
}; | ||
}); | ||
} | ||
if (action.type === ListActionTypes.keyDown) { | ||
if (action.event.key === 'Escape') { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
@@ -27,7 +26,6 @@ } | ||
if (!((_action$context$listb = action.context.listboxRef.current) != null && _action$context$listb.contains(action.event.relatedTarget))) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false, | ||
highlightedValue: action.context.items[0] | ||
}; | ||
}); | ||
} | ||
@@ -34,0 +32,0 @@ } |
@@ -0,0 +0,0 @@ import { UseMenuParameters, UseMenuReturnValue } from './useMenu.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -102,7 +103,5 @@ import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const rootProps = getRootProps(otherHandlers); | ||
return { | ||
...otherHandlers, | ||
...rootProps, | ||
return _extends({}, otherHandlers, rootProps, { | ||
role: 'menu' | ||
}; | ||
}); | ||
}; | ||
@@ -114,6 +113,3 @@ React.useDebugValue({ | ||
return { | ||
contextValue: { | ||
...compoundComponentContextValue, | ||
...listContextValue | ||
}, | ||
contextValue: _extends({}, compoundComponentContextValue, listContextValue), | ||
dispatch, | ||
@@ -120,0 +116,0 @@ getListboxProps, |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
export { default } from './useMenuItem'; | ||
export * from './useMenuItem.types'; |
@@ -0,0 +0,0 @@ import { UseMenuItemParameters, UseMenuItemReturnValue } from './useMenuItem.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -63,5 +64,3 @@ import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
return { | ||
getRootProps: (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
...getButtonProps(otherHandlers), | ||
getRootProps: (otherHandlers = {}) => _extends({}, otherHandlers, getButtonProps(otherHandlers), { | ||
role: 'menuitem' | ||
@@ -78,17 +77,8 @@ }), | ||
const getRootProps = (otherHandlers = {}) => { | ||
const resolvedButtonProps = { | ||
...otherHandlers, | ||
...getButtonProps(otherHandlers) | ||
}; | ||
const resolvedMenuItemProps = { | ||
...resolvedButtonProps, | ||
...getListRootProps(resolvedButtonProps) | ||
}; | ||
return { | ||
...otherHandlers, | ||
...resolvedButtonProps, | ||
...resolvedMenuItemProps, | ||
const resolvedButtonProps = _extends({}, otherHandlers, getButtonProps(otherHandlers)); | ||
const resolvedMenuItemProps = _extends({}, resolvedButtonProps, getListRootProps(resolvedButtonProps)); | ||
return _extends({}, otherHandlers, resolvedButtonProps, resolvedMenuItemProps, { | ||
role: 'menuitem', | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -95,0 +85,0 @@ return { |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
export { default } from './useOption'; | ||
export * from './useOption.types'; |
@@ -0,0 +0,0 @@ import { UseOptionParameters, UseOptionReturnValue } from './useOption.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -46,5 +47,3 @@ import { unstable_useForkRef as useForkRef, unstable_useId as useId } from '@mui/utils'; | ||
return { | ||
getRootProps: (otherHandlers = {}) => ({ | ||
...otherHandlers, | ||
...getListItemProps(otherHandlers), | ||
getRootProps: (otherHandlers = {}) => _extends({}, otherHandlers, getListItemProps(otherHandlers), { | ||
id, | ||
@@ -51,0 +50,0 @@ ref: handleRef, |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
import { SelectOption } from '../useOption'; | ||
declare const defaultOptionStringifier: <OptionValue>(option: SelectOption<OptionValue>) => string; | ||
export default defaultOptionStringifier; |
@@ -0,0 +0,0 @@ export { default } from './useSelect'; |
@@ -15,2 +15,2 @@ import * as React from 'react'; | ||
*/ | ||
export default function SelectProvider<Value>(props: SelectProviderProps<Value>): JSX.Element; | ||
export default function SelectProvider<Value>(props: SelectProviderProps<Value>): React.JSX.Element; |
@@ -0,0 +0,0 @@ import { ListAction, ListActionContext } from '../useList'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { moveHighlight, listReducer, ListActionTypes } from '../useList'; | ||
@@ -15,7 +16,6 @@ import { SelectActionTypes } from './useSelect.types'; | ||
const itemToHighlight = (_state$selectedValues = state.selectedValues[0]) != null ? _state$selectedValues : moveHighlight(null, 'start', action.context); | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
open: !open, | ||
highlightedValue: !open ? itemToHighlight : null | ||
}; | ||
}); | ||
} | ||
@@ -27,12 +27,10 @@ const newState = listReducer(state, action); | ||
if (action.event.key === 'Escape') { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
if (selectionMode === 'single' && (action.event.key === 'Enter' || action.event.key === ' ')) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
@@ -42,15 +40,13 @@ } else { | ||
var _state$selectedValues2; | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
open: true, | ||
highlightedValue: (_state$selectedValues2 = state.selectedValues[0]) != null ? _state$selectedValues2 : moveHighlight(null, 'start', action.context) | ||
}; | ||
}); | ||
} | ||
if (action.event.key === 'ArrowUp') { | ||
var _state$selectedValues3; | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
open: true, | ||
highlightedValue: (_state$selectedValues3 = state.selectedValues[0]) != null ? _state$selectedValues3 : moveHighlight(null, 'end', action.context) | ||
}; | ||
}); | ||
} | ||
@@ -61,13 +57,11 @@ } | ||
if (selectionMode === 'single') { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
} | ||
break; | ||
case ListActionTypes.blur: | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
open: false | ||
}; | ||
}); | ||
default: | ||
@@ -74,0 +68,0 @@ return newState; |
@@ -0,0 +0,0 @@ import { UseSelectParameters, UseSelectReturnValue } from './useSelect.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -196,4 +197,3 @@ import { unstable_useForkRef as useForkRef, unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils'; | ||
const getSelectTriggerProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return _extends({}, otherHandlers, { | ||
onClick: createHandleButtonClick(otherHandlers), | ||
@@ -204,3 +204,3 @@ ref: mergedListRootRef, | ||
'aria-controls': listboxId | ||
}; | ||
}); | ||
}; | ||
@@ -213,4 +213,3 @@ const getButtonProps = (otherHandlers = {}) => { | ||
const getListboxProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
return _extends({}, otherHandlers, { | ||
id: listboxId, | ||
@@ -221,3 +220,3 @@ role: 'listbox', | ||
onMouseDown: preventDefault // to prevent the button from losing focus when interacting with the listbox | ||
}; | ||
}); | ||
}; | ||
@@ -230,6 +229,3 @@ | ||
}); | ||
const contextValue = React.useMemo(() => ({ | ||
...listContextValue, | ||
...compoundComponentContextValue | ||
}), [listContextValue, compoundComponentContextValue]); | ||
const contextValue = React.useMemo(() => _extends({}, listContextValue, compoundComponentContextValue), [listContextValue, compoundComponentContextValue]); | ||
let selectValue; | ||
@@ -236,0 +232,0 @@ if (props.multiple) { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
export { default } from './useSlider'; | ||
export * from './useSlider'; | ||
export * from './useSlider.types'; |
@@ -0,0 +0,0 @@ import { UseSliderParameters, UseSliderReturnValue } from './useSlider.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -548,10 +549,6 @@ import { unstable_ownerDocument as ownerDocument, unstable_useControlled as useControlled, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible, visuallyHidden } from '@mui/utils'; | ||
}; | ||
const mergedEventHandlers = { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return { | ||
ref: handleRef, | ||
...mergedEventHandlers | ||
}; | ||
const mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers); | ||
return _extends({ | ||
ref: handleRef | ||
}, mergedEventHandlers); | ||
}; | ||
@@ -574,6 +571,3 @@ const createHandleMouseOver = otherHandlers => event => { | ||
}; | ||
return { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return _extends({}, otherHandlers, ownEventHandlers); | ||
}; | ||
@@ -587,7 +581,4 @@ const getHiddenInputProps = (otherHandlers = {}) => { | ||
}; | ||
const mergedEventHandlers = { | ||
...otherHandlers, | ||
...ownEventHandlers | ||
}; | ||
return { | ||
const mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers); | ||
return _extends({ | ||
tabIndex, | ||
@@ -603,6 +594,5 @@ 'aria-labelledby': ariaLabelledby, | ||
step: (_parameters$step = parameters.step) != null ? _parameters$step : undefined, | ||
disabled, | ||
...mergedEventHandlers, | ||
style: { | ||
...visuallyHidden, | ||
disabled | ||
}, mergedEventHandlers, { | ||
style: _extends({}, visuallyHidden, { | ||
direction: isRtl ? 'rtl' : 'ltr', | ||
@@ -612,4 +602,4 @@ // So that VoiceOver's focus indicator matches the thumb's dimensions | ||
height: '100%' | ||
} | ||
}; | ||
}) | ||
}); | ||
}; | ||
@@ -616,0 +606,0 @@ return { |
@@ -152,3 +152,2 @@ import * as React from 'react'; | ||
* The active index of the slider. | ||
* @default -1 | ||
*/ | ||
@@ -158,3 +157,2 @@ active: number; | ||
* The orientation of the slider. | ||
* @default horizontal | ||
*/ | ||
@@ -170,3 +168,2 @@ axis: Axis; | ||
* If `true`, the slider is being dragged. | ||
* @default false | ||
*/ | ||
@@ -202,3 +199,2 @@ dragging: boolean; | ||
* The thumb index for the current value when in hover state. | ||
* @default -1 | ||
*/ | ||
@@ -205,0 +201,0 @@ open: number; |
export { default } from './useSnackbar'; | ||
export * from './useSnackbar.types'; |
@@ -0,0 +0,0 @@ import { UseSnackbarParameters, UseSnackbarReturnValue } from './useSnackbar.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -118,11 +119,8 @@ import { unstable_useEventCallback as useEventCallback } from '@mui/utils'; | ||
const propsEventHandlers = extractEventHandlers(parameters); | ||
const externalEventHandlers = { | ||
...propsEventHandlers, | ||
...otherHandlers | ||
}; | ||
return { | ||
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); | ||
return _extends({ | ||
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced. | ||
// See https://github.com/mui/material-ui/issues/29080 | ||
role: 'presentation', | ||
...externalEventHandlers, | ||
role: 'presentation' | ||
}, externalEventHandlers, { | ||
onBlur: createHandleBlur(externalEventHandlers), | ||
@@ -132,3 +130,3 @@ onFocus: createHandleFocus(externalEventHandlers), | ||
onMouseLeave: createMouseLeave(externalEventHandlers) | ||
}; | ||
}); | ||
}; | ||
@@ -135,0 +133,0 @@ return { |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
export { default } from './useSwitch'; | ||
export * from './useSwitch.types'; |
@@ -0,0 +0,0 @@ import { UseSwitchParameters, UseSwitchReturnValue } from './useSwitch.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -80,3 +81,3 @@ import { unstable_useControlled as useControlled, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils'; | ||
const handleInputRef = useForkRef(focusVisibleRef, inputRef); | ||
const getInputProps = (otherProps = {}) => ({ | ||
const getInputProps = (otherProps = {}) => _extends({ | ||
checked: checkedProp, | ||
@@ -88,4 +89,4 @@ defaultChecked, | ||
required, | ||
type: 'checkbox', | ||
...otherProps, | ||
type: 'checkbox' | ||
}, otherProps, { | ||
onChange: createHandleInputChange(otherProps), | ||
@@ -92,0 +93,0 @@ onFocus: createHandleFocus(otherProps), |
@@ -59,3 +59,2 @@ import * as React from 'react'; | ||
* If `true`, it indicates that the component is being focused using keyboard. | ||
* @default false | ||
*/ | ||
@@ -62,0 +61,0 @@ focusVisible: boolean; |
export { default } from './useTab'; | ||
export * from './useTab.types'; |
@@ -0,0 +0,0 @@ import { UseTabParameters, UseTabReturnValue } from './useTab.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -67,12 +68,5 @@ import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
const getRootProps = (otherHandlers = {}) => { | ||
const resolvedTabProps = { | ||
...otherHandlers, | ||
...getTabProps(otherHandlers) | ||
}; | ||
const resolvedButtonProps = { | ||
...resolvedTabProps, | ||
...getButtonProps(resolvedTabProps) | ||
}; | ||
return { | ||
...resolvedButtonProps, | ||
const resolvedTabProps = _extends({}, otherHandlers, getTabProps(otherHandlers)); | ||
const resolvedButtonProps = _extends({}, resolvedTabProps, getButtonProps(resolvedTabProps)); | ||
return _extends({}, resolvedButtonProps, { | ||
role: 'tab', | ||
@@ -83,3 +77,3 @@ 'aria-controls': tabPanelId, | ||
ref: handleRef | ||
}; | ||
}); | ||
}; | ||
@@ -86,0 +80,0 @@ return { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
export { default } from './useTabPanel'; | ||
export * from './useTabPanel.types'; |
@@ -0,0 +0,0 @@ import { UseTabPanelParameters, UseTabPanelReturnValue } from './useTabPanel.types'; |
@@ -19,3 +19,2 @@ export interface UseTabPanelParameters { | ||
* If `true`, it indicates that the tab panel will be hidden. | ||
* @default false | ||
*/ | ||
@@ -22,0 +21,0 @@ hidden: boolean; |
@@ -0,0 +0,0 @@ export { default } from './useTabs'; |
@@ -14,2 +14,2 @@ import * as React from 'react'; | ||
*/ | ||
export default function TabsProvider(props: TabsProviderProps): JSX.Element; | ||
export default function TabsProvider(props: TabsProviderProps): React.JSX.Element; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -48,3 +49,3 @@ import { unstable_useControlled as useControlled } from '@mui/utils'; | ||
return { | ||
contextValue: { | ||
contextValue: _extends({ | ||
direction, | ||
@@ -57,7 +58,6 @@ getTabId, | ||
selectionFollowsFocus, | ||
value, | ||
...compoundComponentContextValue | ||
} | ||
value | ||
}, compoundComponentContextValue) | ||
}; | ||
} | ||
export default useTabs; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ export { default } from './useTabsList'; |
@@ -15,2 +15,2 @@ import * as React from 'react'; | ||
*/ | ||
export default function TabsListProvider(props: TabsListProviderProps): JSX.Element; | ||
export default function TabsListProvider(props: TabsListProviderProps): React.JSX.Element; |
@@ -0,0 +0,0 @@ import { ListState, ListAction, ListActionContext } from '../useList'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import { listReducer, ListActionTypes, moveHighlight } from '../useList'; | ||
@@ -5,6 +6,5 @@ import { TabsListActionTypes } from './useTabsList.types'; | ||
if (action.type === TabsListActionTypes.valueChange) { | ||
return { | ||
...state, | ||
return _extends({}, state, { | ||
highlightedValue: action.value | ||
}; | ||
}); | ||
} | ||
@@ -19,6 +19,5 @@ const newState = listReducer(state, action); | ||
if (newState.selectedValues.length > 0) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
highlightedValue: newState.selectedValues[0] | ||
}; | ||
}); | ||
} | ||
@@ -28,8 +27,7 @@ moveHighlight(null, 'reset', action.context); | ||
if (selectionFollowsFocus && newState.highlightedValue != null) { | ||
return { | ||
...newState, | ||
return _extends({}, newState, { | ||
selectedValues: [newState.highlightedValue] | ||
}; | ||
}); | ||
} | ||
return newState; | ||
} |
@@ -0,0 +0,0 @@ import { UseTabsListParameters, UseTabsListReturnValue } from './useTabsList.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -112,14 +113,9 @@ import { useTabsContext } from '../Tabs'; | ||
const getRootProps = (otherHandlers = {}) => { | ||
return { | ||
...otherHandlers, | ||
...getListboxRootProps(otherHandlers), | ||
return _extends({}, otherHandlers, getListboxRootProps(otherHandlers), { | ||
'aria-orientation': orientation === 'vertical' ? 'vertical' : undefined, | ||
role: 'tablist' | ||
}; | ||
}); | ||
}; | ||
return { | ||
contextValue: { | ||
...compoundComponentContextValue, | ||
...listContextValue | ||
}, | ||
contextValue: _extends({}, compoundComponentContextValue, listContextValue), | ||
dispatch, | ||
@@ -126,0 +122,0 @@ getRootProps, |
@@ -40,3 +40,2 @@ import * as React from 'react'; | ||
* If `true`, it will indicate that the text's direction in right-to-left. | ||
* @default false | ||
*/ | ||
@@ -46,3 +45,2 @@ isRtl: boolean; | ||
* The component orientation (layout flow direction). | ||
* @default 'horizontal' | ||
*/ | ||
@@ -49,0 +47,0 @@ orientation: 'horizontal' | 'vertical'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import isHostComponent from './isHostComponent'; | ||
@@ -20,9 +21,5 @@ | ||
} | ||
return { | ||
...otherProps, | ||
ownerState: { | ||
...otherProps.ownerState, | ||
...ownerState | ||
} | ||
}; | ||
return _extends({}, otherProps, { | ||
ownerState: _extends({}, otherProps.ownerState, ownerState) | ||
}); | ||
} |
type ItemComparer<T> = (a: T, b: T) => boolean; | ||
export default function areArraysEqual<T>(array1: T[], array2: T[], itemComparer?: ItemComparer<T>): boolean; | ||
export {}; |
@@ -23,3 +23,3 @@ import * as React from 'react'; | ||
*/ | ||
export default function ClassNameConfigurator(props: ClassNameConfiguratorProps): JSX.Element; | ||
export default function ClassNameConfigurator(props: ClassNameConfiguratorProps): React.JSX.Element; | ||
export {}; |
@@ -0,0 +0,0 @@ import { EventHandlers } from './types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
/** | ||
@@ -17,12 +18,6 @@ * Combines the two get*Props functions from Base UI hooks into one. | ||
return external => { | ||
const firstResult = { | ||
...external, | ||
...getFirstProps(external) | ||
}; | ||
const result = { | ||
...firstResult, | ||
...getSecondProps(firstResult) | ||
}; | ||
const firstResult = _extends({}, external, getFirstProps(external)); | ||
const result = _extends({}, firstResult, getSecondProps(firstResult)); | ||
return result; | ||
}; | ||
} |
@@ -0,0 +0,0 @@ import { EventHandlers } from './types'; |
@@ -0,0 +0,0 @@ export { default as appendOwnerState } from './appendOwnerState'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import clsx from 'clsx'; | ||
@@ -29,12 +30,4 @@ import extractEventHandlers from './extractEventHandlers'; | ||
const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className); | ||
const mergedStyle = { | ||
...(additionalProps == null ? void 0 : additionalProps.style), | ||
...(externalForwardedProps == null ? void 0 : externalForwardedProps.style), | ||
...(externalSlotProps == null ? void 0 : externalSlotProps.style) | ||
}; | ||
const props = { | ||
...additionalProps, | ||
...externalForwardedProps, | ||
...externalSlotProps | ||
}; | ||
const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps); | ||
if (joinedClasses.length > 0) { | ||
@@ -55,6 +48,3 @@ props.className = joinedClasses; | ||
const eventHandlers = extractEventHandlers({ | ||
...externalForwardedProps, | ||
...externalSlotProps | ||
}); | ||
const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps)); | ||
const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps); | ||
@@ -69,14 +59,4 @@ const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps); | ||
const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className); | ||
const mergedStyle = { | ||
...(internalSlotProps == null ? void 0 : internalSlotProps.style), | ||
...(additionalProps == null ? void 0 : additionalProps.style), | ||
...(externalForwardedProps == null ? void 0 : externalForwardedProps.style), | ||
...(externalSlotProps == null ? void 0 : externalSlotProps.style) | ||
}; | ||
const props = { | ||
...internalSlotProps, | ||
...additionalProps, | ||
...otherPropsWithoutEventHandlers, | ||
...componentsPropsWithoutEventHandlers | ||
}; | ||
const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style); | ||
const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers); | ||
if (joinedClasses.length > 0) { | ||
@@ -83,0 +63,0 @@ props.className = joinedClasses; |
@@ -0,0 +0,0 @@ type MuiCancellableEvent = { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface UseCompoundItemReturnValue<Key> { |
@@ -0,0 +0,0 @@ import { ControllableReducerAction, ControllableReducerParameters } from './useControllableReducer.types'; |
@@ -0,1 +1,2 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
@@ -13,5 +14,3 @@ function areEqual(a, b) { | ||
function getControlledState(internalState, controlledProps) { | ||
const augmentedState = { | ||
...internalState | ||
}; | ||
const augmentedState = _extends({}, internalState); | ||
Object.keys(controlledProps).forEach(key => { | ||
@@ -106,6 +105,5 @@ if (controlledProps[key] !== undefined) { | ||
const dispatchWithContext = React.useCallback(action => { | ||
dispatch({ | ||
...action, | ||
dispatch(_extends({}, action, { | ||
context: actionContext | ||
}); | ||
})); | ||
}, [actionContext]); | ||
@@ -112,0 +110,0 @@ useStateChangeDetection({ |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export interface MessageBus { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
const _excluded = ["elementType", "externalSlotProps", "ownerState"]; | ||
import { unstable_useForkRef as useForkRef } from '@mui/utils'; | ||
@@ -16,7 +19,7 @@ import appendOwnerState from './appendOwnerState'; | ||
const { | ||
elementType, | ||
externalSlotProps, | ||
ownerState, | ||
...rest | ||
} = parameters; | ||
elementType, | ||
externalSlotProps, | ||
ownerState | ||
} = parameters, | ||
rest = _objectWithoutPropertiesLoose(parameters, _excluded); | ||
const resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState); | ||
@@ -26,12 +29,10 @@ const { | ||
internalRef | ||
} = mergeSlotProps({ | ||
...rest, | ||
} = mergeSlotProps(_extends({}, rest, { | ||
externalSlotProps: resolvedComponentsProps | ||
}); | ||
})); | ||
const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref); | ||
const props = appendOwnerState(elementType, { | ||
...mergedProps, | ||
const props = appendOwnerState(elementType, _extends({}, mergedProps, { | ||
ref | ||
}, ownerState); | ||
}), ownerState); | ||
return props; | ||
} |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
Sorry, the diff of this file is too big to display
2495044
49231
189
+ Added@mui/utils@5.15.20(transitive)
- Removed@mui/utils@5.16.0(transitive)