UNPKG

@ark-ui/react

Version:

A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.

19 lines (16 loc) 769 B
'use client'; import { jsx } from 'react/jsx-runtime'; import { mergeProps } from '@zag-js/react'; import { forwardRef } from 'react'; import { createSplitProps } from '../../utils/create-split-props.js'; import { ark } from '../factory.js'; import { useDatePickerContext } from './use-date-picker-context.js'; const splitInputProps = createSplitProps(); const DatePickerInput = forwardRef((props, ref) => { const [inputProps, localProps] = splitInputProps(props, ["index", "fixOnBlur"]); const datePicker = useDatePickerContext(); const mergedProps = mergeProps(datePicker.getInputProps(inputProps), localProps); return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref }); }); DatePickerInput.displayName = "DatePickerInput"; export { DatePickerInput };