Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 1.78 kB
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/utils/esm/useSlotProps/useSlotProps.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js
-
curl -L -o useSlotProps.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/utils/esm/useSlotProps/useSlotProps.js
1.78 kB
| 'use client'; | |
| import _extends from "@babel/runtime/helpers/esm/extends"; | |
| import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | |
| const _excluded = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"]; | |
| import useForkRef from '../useForkRef'; | |
| import appendOwnerState from '../appendOwnerState'; | |
| import mergeSlotProps from '../mergeSlotProps'; | |
| import resolveComponentProps from '../resolveComponentProps'; | |
| /** | |
| * @ignore - do not document. | |
| * Builds the props to be passed into the slot of an unstyled component. | |
| * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior. | |
| * If the slot component is not a host component, it also merges in the `ownerState`. | |
| * | |
| * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component. | |
| */ | |
| function useSlotProps(parameters) { | |
| var _parameters$additiona; | |
| const { | |
| elementType, | |
| externalSlotProps, | |
| ownerState, | |
| skipResolvingSlotProps = false | |
| } = parameters, | |
| rest = _objectWithoutPropertiesLoose(parameters, _excluded); | |
| const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState); | |
| const { | |
| props: mergedProps, | |
| internalRef | |
| } = 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, _extends({}, mergedProps, { | |
| ref | |
| }), ownerState); | |
| return props; | |
| } | |
| export default useSlotProps; |