UNPKG

@vx-oss/heroui-v2-date-input

Version:

A date input allows users to enter and edit date and time values using a keyboard.

31 lines (28 loc) 751 B
"use client"; import { DateInputSegment } from "./chunk-OVROFHXM.mjs"; // src/date-input-field.tsx import { forwardRef } from "react"; import { jsx, jsxs } from "react/jsx-runtime"; var DateInputField = forwardRef((props, ref) => { const { as, state, slots, inputProps, classNames, ...otherProps } = props; const Component = as || "div"; return /* @__PURE__ */ jsxs(Component, { ...otherProps, ref, children: [ state.segments.map((segment, i) => /* @__PURE__ */ jsx( DateInputSegment, { classNames, segment, slots, state }, i )), /* @__PURE__ */ jsx("input", { ...inputProps }) ] }); }); DateInputField.displayName = "HeroUI.DateInputField"; export { DateInputField };