UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

92 lines (89 loc) 2.1 kB
'use client'; import 'react'; import 'react/jsx-runtime'; import '@mantine/hooks'; import 'clsx'; import '../../core/MantineProvider/Mantine.context.mjs'; import '../../core/MantineProvider/default-theme.mjs'; import '../../core/MantineProvider/MantineProvider.mjs'; import '../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.mjs'; import { useProps } from '../../core/MantineProvider/use-props/use-props.mjs'; import '../../core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs'; import { extractStyleProps } from '../../core/Box/style-props/extract-style-props/extract-style-props.mjs'; import '../../core/Box/Box.mjs'; import '../../core/DirectionProvider/DirectionProvider.mjs'; function useInputProps(component, defaultProps, _props) { const props = 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(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 } }; } export { useInputProps }; //# sourceMappingURL=use-input-props.mjs.map