@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
94 lines (90 loc) • 2.17 kB
JavaScript
'use client';
;
require('react');
require('react/jsx-runtime');
require('@mantine/hooks');
require('clsx');
require('../../core/MantineProvider/Mantine.context.cjs');
require('../../core/MantineProvider/default-theme.cjs');
require('../../core/MantineProvider/MantineProvider.cjs');
require('../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.cjs');
var useProps = require('../../core/MantineProvider/use-props/use-props.cjs');
require('../../core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs');
var extractStyleProps = require('../../core/Box/style-props/extract-style-props/extract-style-props.cjs');
require('../../core/Box/Box.cjs');
require('../../core/DirectionProvider/DirectionProvider.cjs');
function useInputProps(component, defaultProps, _props) {
const props = useProps.useProps(component, defaultProps, _props);
const {
label,
description,
error,
required,
classNames,
styles,
className,
unstyled,
__staticSelector,
__stylesApiProps,
errorProps,
labelProps,
descriptionProps,
wrapperProps: _wrapperProps,
id,
size,
style,
inputContainer,
inputWrapperOrder,
withAsterisk,
variant,
vars,
mod,
...others
} = props;
const { styleProps, rest } = extractStyleProps.extractStyleProps(others);
const wrapperProps = {
label,
description,
error,
required,
classNames,
className,
__staticSelector,
__stylesApiProps: __stylesApiProps || props,
errorProps,
labelProps,
descriptionProps,
unstyled,
styles,
size,
style,
inputContainer,
inputWrapperOrder,
withAsterisk,
variant,
id,
mod,
..._wrapperProps
};
return {
...rest,
classNames,
styles,
unstyled,
wrapperProps: { ...wrapperProps, ...styleProps },
inputProps: {
required,
classNames,
styles,
unstyled,
size,
__staticSelector,
__stylesApiProps: __stylesApiProps || props,
error,
variant,
id
}
};
}
exports.useInputProps = useInputProps;
//# sourceMappingURL=use-input-props.cjs.map