UNPKG

react-calendar-kit

Version:

React Calendar Kit is a powerful and flexible library for building accessible and highly customizable calendar and date/time picker components in your React applications. React Calendar Kit provides a solid foundation for creating inclusive user experienc

3 lines (2 loc) 1.24 kB
'use client'; import{a as i}from"./chunk-YCQF46KQ.mjs";import{a as n}from"./chunk-SO6NUY46.mjs";import{c as a}from"./chunk-RBKSHWF4.mjs";import m,{forwardRef as G,useRef as L}from"react";import{useTimeField as M}from"@react-aria/datepicker";import{useLocale as k}from"@react-aria/i18n";import{filterDOMProps as A,mergeProps as s}from"@react-aria/utils";import{useTimeFieldState as H}from"@react-stately/datepicker";var u=(e,P)=>{let{groupProps:d={},labelProps:f={},inputProps:T={},fieldProps:c={},className:y,classNames:r={},styles:o={},style:I,shouldForceLeadingZeros:p=!0,minValue:g,maxValue:S,segmentProps:C,formatSegment:D,startContent:N,endContent:R,children:V,...b}=e,{locale:x}=k(),t=H({...e,locale:x,minValue:g,maxValue:S,shouldForceLeadingZeros:p}),l=L(null),F=a(l,P),{labelProps:E,fieldProps:h,inputProps:v}=M({...e,shouldForceLeadingZeros:p},t,l);return m.createElement(i,{"data-disabled":t.isDisabled,"data-invalid":t.isInvalid,className:y,classNames:r,styles:o,style:I,ref:F,labelProps:s(E,f),startContent:N,endContent:R,label:e.label,...s(d,A(b))},m.createElement(n,{fieldProps:s(h,c),inputProps:s(v,T),state:t,classNames:r,segmentProps:C,formatSegment:D,styles:o}),V)};u.displayName="TimeInput";var K=G(u);export{K as a};