@progress/kendo-react-dateinputs 9.4.0-develop.8 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("react"),e=require("prop-types"),Ge=require("@progress/kendo-react-popup"),z=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),Je=require("@progress/kendo-svg-icons"),Qe=require("../package-metadata.js"),et=require("../dateinput/DateInput.js"),tt=require("../calendar/components/Calendar.js"),l=require("../utils.js"),K=require("../messages/index.js"),nt=require("@progress/kendo-react-intl"),at=require("./ToggleButton.js"),ot=require("../common/PickerWrap.js"),rt=require("../hooks/usePickerFloatingLabel.js"),lt=require("@progress/kendo-react-layout"),ut=require("../common/AdaptiveMode.js");function it(n){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const M=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(h,f,M.get?M:{enumerable:!0,get:()=>n[f]})}}return h.default=n,Object.freeze(h)}const a=it(Ze),L=a.forwardRef((n,h)=>{u.validatePackage(Qe.packageMetadata);const f=u.useId(n.id),M=nt.useLocalization(),v=u.useAdaptiveModeContext(),{defaultShow:ie=r.defaultShow,defaultValue:se=r.defaultValue,dateInput:ce=r.dateInput,calendar:de=r.calendar,toggleButton:fe=r.toggleButton,popup:me=r.popup,pickerWrap:st=r.pickerWrap,disabled:w=r.disabled,format:ge=r.format,max:S=r.max,min:E=r.min,popupSettings:y=r.popupSettings,tabIndex:pe=r.tabIndex,weekNumber:be=r.weekNumber,validityStyles:W=r.validityStyles,size:T=r.size,rounded:x=r.rounded,fillMode:_=r.fillMode,autoFocus:he=r.autoFocus,show:j,autoSwitchParts:ve,autoSwitchKeys:we,twoDigitYearMax:ye,ariaLabel:ke,adaptive:ct,adaptiveTitle:De,inputAttributes:Ce,validationMessage:H,_adaptiveMode:dt=v,valid:U,focusedDate:Pe,...Y}=u.usePropsContext(ue,n),B=()=>{if(u.canUseDOM)return D.current&&D.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&v&&b.windowWidth<=(v==null?void 0:v.medium)&&n.adaptive),m=()=>{const t=P.current!==void 0&&P.current!==null?P.current:n.value!==void 0?n.value:b.value;return t!==null?z.cloneDate(t):null},i=()=>q.current!==void 0?q.current:j!==void 0?j:b.show,Re=()=>ce||r.dateInput,Oe=()=>fe||r.toggleButton,Me=()=>de||r.calendar,qe=()=>me||r.popup,$=()=>n.required!==void 0?n.required:!1,A=()=>{const t=m()||n.value||null,o=E,s=S,I=l.isInDateRange(t,o,s),N=H!==void 0,F=(!$()||t!=null)&&I,V=U!==void 0?U:F;return{customError:N,rangeOverflow:t&&s.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<o.getTime()||!1,valid:V,valueMissing:t===null}},Ie=t=>{for(const o of t)O({windowWidth:o.target.clientWidth})},Se=()=>{d.current&&d.current.focus()},X=t=>{C.current=t},g=t=>{i()!==t&&(O({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:k.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:k.current}))},Ee=t=>{const o=m();return o&&t?l.setTime(t,o):t},Te=t=>{y!=null&&y.onMouseDownOutside&&y.onMouseDownOutside.call(void 0,t)},Z=(t,o)=>{O({value:z.cloneDate(t||void 0)}),P.current=t,q.current=!1,c()||(p.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:o.syntheticEvent,nativeEvent:o.nativeEvent,value:m(),show:i(),target:k.current}),P.current=void 0,q.current=void 0,g(!1)},xe=t=>{const o=Ee(t.value);Z(o,t)},G=()=>{const{popupClass:t,...o}=y,s=i(),I=m(),N=I&&z.getDate(I),F=u.classNames(t),V={popupClass:"k-datepicker-popup",show:s,anchor:D.current,className:F,id:te,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...o,onMouseDownOutside:Te},re={disabled:w,value:N,min:E,max:S,weekNumber:be,focusedDate:Pe,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:xe},le=Me(),Xe=qe();return c()?a.createElement(le,{_ref:X,...re}):a.createElement(Xe,{...V},a.createElement(le,{_ref:X,...re}))},J=()=>{O({focused:!1}),g(!1)},_e=()=>{const{windowWidth:t=0}=b,o={expand:i(),onClose:J,adaptiveTitle:De,windowWidth:t},s=G();return a.createElement(ut.AdaptiveMode,{...o},a.createElement(lt.ActionSheetContent,{overflowHidden:!0},s))},Be=t=>{Z(t.value,t)},Ae=()=>{O({focused:!0})},Ne=()=>{g(!i())},Q=()=>{w||(p.current=!0,g(!i()))},Fe=t=>{t.preventDefault()},Ve=t=>{const{altKey:o,keyCode:s}=t;if(s===u.Keys.esc&&i()){p.current=!0,g(!1);return}o&&(s===u.Keys.up||s===u.Keys.down)&&(t.preventDefault(),t.stopPropagation(),p.current=s===u.Keys.up,g(s===u.Keys.down))},k=a.useRef(null),D=a.useRef(null),d=a.useRef(null),C=a.useRef(null);a.useImperativeHandle(k,()=>({props:n,get element(){return D.current},get calendar(){return C.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return A()},get value(){return m()},get mobileMode(){return c()},togglePopup:Ne,focus:Se})),a.useImperativeHandle(h,()=>k.current);const P=a.useRef(null),q=a.useRef(void 0),ze=a.useRef(null),p=a.useRef(!1),ee=a.useRef(!1),R=a.useRef(null),[b,Ke]=a.useState({value:se,show:ie,focused:!1}),[,Le]=a.useReducer(t=>t,!0),O=t=>{Ke(o=>({...o,...t}))};a.useEffect(()=>{C.current&&C.current.element&&i()&&!ee.current&&C.current.element.focus({preventScroll:!0}),d.current&&d.current.element&&!i()&&p.current&&d.current.element.focus({preventScroll:!0}),ee.current=i(),p.current=!1}),a.useEffect(()=>{var t;return R.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(o=>Ie(o)),i()&&Le(),(t=B())!=null&&t.body&&R.current&&R.current.observe(B().body),()=>{var o;clearTimeout(ze.current),(o=B())!=null&&o.body&&R.current&&R.current.disconnect()}},[]);const te=f+"-popup-id",We=G(),je=Re(),He=m(),Ue=Oe(),Ye=_e(),ne=!W||A().valid,ae=M.toLanguageString(K.toggleCalendar,K.messages[K.toggleCalendar]),$e={disabled:w,format:ge,formatPlaceholder:n.formatPlaceholder,id:n.id,ariaLabelledBy:n.ariaLabelledBy,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:ke,max:S,min:E,name:n.name,onChange:Be,required:n.required,_ref:d,tabIndex:i()?-1:pe,title:n.title,valid:A().valid,validationMessage:H,validityStyles:W,value:He,label:void 0,placeholder:b.focused?null:n.placeholder,ariaExpanded:i(),size:null,fillMode:null,rounded:null,autoFill:n.autoFill,twoDigitYearMax:ye,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:ve,autoSwitchKeys:we,allowCaretMode:n.allowCaretMode,inputAttributes:Ce},oe=a.createElement(u.AsyncFocusBlur,{onFocus:Ae,onBlur:c()?void 0:J,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:Y,ref:D,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[T]||T}`]:T,[`k-rounded-${u.kendoThemeMaps.roundedMap[x]||x}`]:x,[`k-input-${_}`]:_,"k-invalid":!ne,"k-required":$(),"k-disabled":w},n.className),onKeyDown:Ve,style:{width:n.width},onFocus:t.onFocus,onBlur:t.onBlur,onClick:c()?Q:void 0},a.createElement(je,{_ref:d,ariaRole:"combobox",ariaExpanded:i(),ariaControls:te,autoFocus:he,...$e}),a.createElement(Ue,{type:"button",icon:"calendar",svgIcon:Je.calendarIcon,title:ae,className:"k-input-button",rounded:null,onClick:c()?void 0:Q,"aria-label":ae,fillMode:_,onMouseDown:Fe}),!c()&&We),c()&&Ye));return n.label?a.createElement(rt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ne,editorDisabled:w,children:oe,style:{width:n.width},...Y}):oe});L.propTypes={className:e.string,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,focusedDate:e.instanceOf(Date),format:e.oneOfType([e.string,e.shape({skeleton:l.nullable(e.string),pattern:l.nullable(e.string),date:l.nullable(e.oneOf(["short","medium","long","full"])),time:l.nullable(e.oneOf(["short","medium","long","full"])),datetime:l.nullable(e.oneOf(["short","medium","long","full"])),era:l.nullable(e.oneOf(["narrow","short","long"])),year:l.nullable(e.oneOf(["numeric","2-digit"])),month:l.nullable(e.oneOf(["numeric","2-digit","narrow","short","long"])),day:l.nullable(e.oneOf(["numeric","2-digit"])),weekday:l.nullable(e.oneOf(["narrow","short","long"])),hour:l.nullable(e.oneOf(["numeric","2-digit"])),hour12:l.nullable(e.bool),minute:l.nullable(e.oneOf(["numeric","2-digit"])),second:l.nullable(e.oneOf(["numeric","2-digit"])),timeZoneName:l.nullable(e.oneOf(["short","long"]))})]),formatPlaceholder:e.oneOfType([e.oneOf(["wide","narrow","short","formatPattern"]).isRequired,e.shape({year:e.string.isRequired,month:e.string.isRequired,day:e.string.isRequired,hour:e.string.isRequired,minute:e.string.isRequired,second:e.string.isRequired})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,min:e.instanceOf(Date),max:e.instanceOf(Date),name:e.string,popupSettings:e.shape({animate:e.bool.isRequired,appendTo:e.any.isRequired,popupClass:e.string.isRequired}),show:e.bool,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),weekNumber:e.bool,width:e.oneOfType([e.number,e.string]),validationMessage:e.string,required:e.bool,valid:e.bool,size:e.oneOf([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),adaptive:e.bool,adaptiveTitle:e.string,autoFocus:e.bool,inputAttributes:e.object};const r={defaultShow:!1,defaultValue:null,dateInput:et.DateInput,calendar:tt.Calendar,toggleButton:at.ToggleButton,popup:Ge.Popup,pickerWrap:ot.PickerWrap,disabled:!1,format:"d",max:l.MAX_DATE,min:l.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1},ue=u.createPropsContext();L.displayName="KendoReactDatePicker";exports.DatePicker=L;exports.DatePickerPropsContext=ue;exports.datePickerDefaultProps=r;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qe=require("react"),e=require("prop-types"),et=require("@progress/kendo-react-popup"),K=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),tt=require("@progress/kendo-svg-icons"),nt=require("../package-metadata.js"),at=require("../dateinput/DateInput.js"),ot=require("../calendar/components/Calendar.js"),o=require("../utils.js"),L=require("../messages/index.js"),rt=require("@progress/kendo-react-intl"),lt=require("./ToggleButton.js"),ut=require("../common/PickerWrap.js"),it=require("../hooks/usePickerFloatingLabel.js"),st=require("@progress/kendo-react-layout"),ct=require("../common/AdaptiveMode.js");function dt(n){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const R=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(h,f,R.get?R:{enumerable:!0,get:()=>n[f]})}}return h.default=n,Object.freeze(h)}const a=dt(Qe),W=a.forwardRef((n,h)=>{u.validatePackage(nt.packageMetadata);const f=u.useId(n.id),R=rt.useLocalization(),v=u.useAdaptiveModeContext(),{defaultShow:se=l.defaultShow,defaultValue:ce=l.defaultValue,dateInput:de=l.dateInput,calendar:fe=l.calendar,toggleButton:me=l.toggleButton,popup:ge=l.popup,pickerWrap:ft=l.pickerWrap,disabled:w=l.disabled,format:pe=l.format,max:_=l.max,min:E=l.min,popupSettings:y=l.popupSettings,tabIndex:be=l.tabIndex,weekNumber:he=l.weekNumber,validityStyles:j=l.validityStyles,size:T=l.size,rounded:q=l.rounded,fillMode:x=l.fillMode,autoFocus:ve=l.autoFocus,show:H,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:ke,ariaLabel:De,adaptive:mt,formatPlaceholder:Pe,adaptiveTitle:Ce,inputAttributes:Oe,validationMessage:U,visited:gt,value:B,touched:pt,modified:bt,_adaptiveMode:ht=v,valid:Y,focusedDate:Me,id:Re,...$}=u.usePropsContext(ie,n),A=()=>{if(u.canUseDOM)return D.current&&D.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&v&&b.windowWidth<=(v==null?void 0:v.medium)&&n.adaptive),m=()=>{const t=C.current!==void 0&&C.current!==null?C.current:B!==void 0?B:b.value;return t!==null?K.cloneDate(t):null},i=()=>I.current!==void 0?I.current:H!==void 0?H:b.show,Ie=()=>de||l.dateInput,Se=()=>me||l.toggleButton,_e=()=>fe||l.calendar,Ee=()=>ge||l.popup,X=()=>n.required!==void 0?n.required:!1,N=()=>{const t=m()||B||null,r=E,s=_,S=o.isInDateRange(t,r,s),F=U!==void 0,V=(!X()||t!=null)&&S,z=Y!==void 0?Y:V;return{customError:F,rangeOverflow:t&&s.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<r.getTime()||!1,valid:z,valueMissing:t===null}},Te=t=>{for(const r of t)M({windowWidth:r.target.clientWidth})},qe=()=>{d.current&&d.current.focus()},Z=t=>{P.current=t},g=t=>{i()!==t&&(M({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:k.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:k.current}))},xe=t=>{const r=m();return r&&t?o.setTime(t,r):t},Be=t=>{y!=null&&y.onMouseDownOutside&&y.onMouseDownOutside.call(void 0,t)},G=(t,r)=>{M({value:K.cloneDate(t||void 0)}),C.current=t,I.current=!1,c()||(p.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:r.syntheticEvent,nativeEvent:r.nativeEvent,value:m(),show:i(),target:k.current}),C.current=void 0,I.current=void 0,g(!1)},Ae=t=>{const r=xe(t.value);G(r,t)},J=()=>{const{popupClass:t,...r}=y,s=i(),S=m(),F=S&&K.getDate(S),V=u.classNames(t),z={popupClass:"k-datepicker-popup",show:s,anchor:D.current,className:V,id:ne,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...r,onMouseDownOutside:Be},le={disabled:w,value:F,min:E,max:_,weekNumber:he,focusedDate:Me,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:Ae},ue=_e(),Je=Ee();return c()?a.createElement(ue,{_ref:Z,...le}):a.createElement(Je,{...z},a.createElement(ue,{_ref:Z,...le}))},Q=()=>{M({focused:!1}),g(!1)},Ne=()=>{const{windowWidth:t=0}=b,r={expand:i(),onClose:Q,adaptiveTitle:Ce,windowWidth:t},s=J();return a.createElement(ct.AdaptiveMode,{...r},a.createElement(st.ActionSheetContent,{overflowHidden:!0},s))},Fe=t=>{G(t.value,t)},Ve=()=>{M({focused:!0})},ze=()=>{g(!i())},ee=()=>{w||(p.current=!0,g(!i()))},Ke=t=>{t.preventDefault()},Le=t=>{const{altKey:r,keyCode:s}=t;if(s===u.Keys.esc&&i()){p.current=!0,g(!1);return}r&&(s===u.Keys.up||s===u.Keys.down)&&(t.preventDefault(),t.stopPropagation(),p.current=s===u.Keys.up,g(s===u.Keys.down))},k=a.useRef(null),D=a.useRef(null),d=a.useRef(null),P=a.useRef(null);a.useImperativeHandle(k,()=>({props:n,get element(){return D.current},get calendar(){return P.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return N()},get value(){return m()},get mobileMode(){return c()},togglePopup:ze,focus:qe})),a.useImperativeHandle(h,()=>k.current);const C=a.useRef(null),I=a.useRef(void 0),We=a.useRef(null),p=a.useRef(!1),te=a.useRef(!1),O=a.useRef(null),[b,je]=a.useState({value:ce,show:se,focused:!1}),[,He]=a.useReducer(t=>t,!0),M=t=>{je(r=>({...r,...t}))};a.useEffect(()=>{P.current&&P.current.element&&i()&&!te.current&&P.current.element.focus({preventScroll:!0}),d.current&&d.current.element&&!i()&&p.current&&d.current.element.focus({preventScroll:!0}),te.current=i(),p.current=!1}),a.useEffect(()=>{var t;return O.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(r=>Te(r)),i()&&He(),(t=A())!=null&&t.body&&O.current&&O.current.observe(A().body),()=>{var r;clearTimeout(We.current),(r=A())!=null&&r.body&&O.current&&O.current.disconnect()}},[]);const ne=f+"-popup-id",Ue=J(),Ye=Ie(),$e=m(),Xe=Se(),Ze=Ne(),ae=!j||N().valid,oe=R.toLanguageString(L.toggleCalendar,L.messages[L.toggleCalendar]),Ge={disabled:w,format:pe,formatPlaceholder:Pe,id:Re,ariaLabelledBy:n.ariaLabelledBy,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:De,max:_,min:E,name:n.name,onChange:Fe,required:n.required,_ref:d,tabIndex:i()?-1:be,title:n.title,valid:N().valid,validationMessage:U,validityStyles:j,value:$e,label:void 0,placeholder:b.focused?null:n.placeholder,ariaExpanded:i(),size:null,fillMode:null,rounded:null,autoFill:n.autoFill,twoDigitYearMax:ke,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:we,autoSwitchKeys:ye,allowCaretMode:n.allowCaretMode,inputAttributes:Oe},re=a.createElement(u.AsyncFocusBlur,{onFocus:Ve,onBlur:c()?void 0:Q,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:$,ref:D,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[T]||T}`]:T,[`k-rounded-${u.kendoThemeMaps.roundedMap[q]||q}`]:q,[`k-input-${x}`]:x,"k-invalid":!ae,"k-required":X(),"k-disabled":w},n.className),onKeyDown:Le,style:{width:n.width},onFocus:t.onFocus,onBlur:t.onBlur,onClick:c()?ee:void 0},a.createElement(Ye,{_ref:d,ariaRole:"combobox",ariaExpanded:i(),ariaControls:ne,autoFocus:ve,...Ge}),a.createElement(Xe,{type:"button",icon:"calendar",svgIcon:tt.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:c()?void 0:ee,"aria-label":oe,fillMode:x,onMouseDown:Ke}),!c()&&Ue),c()&&Ze));return n.label?a.createElement(it.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ae,editorDisabled:w,children:re,style:{width:n.width},...$}):re});W.propTypes={className:e.string,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,focusedDate:e.instanceOf(Date),format:e.oneOfType([e.string,e.shape({skeleton:o.nullable(e.string),pattern:o.nullable(e.string),date:o.nullable(e.oneOf(["short","medium","long","full"])),time:o.nullable(e.oneOf(["short","medium","long","full"])),datetime:o.nullable(e.oneOf(["short","medium","long","full"])),era:o.nullable(e.oneOf(["narrow","short","long"])),year:o.nullable(e.oneOf(["numeric","2-digit"])),month:o.nullable(e.oneOf(["numeric","2-digit","narrow","short","long"])),day:o.nullable(e.oneOf(["numeric","2-digit"])),weekday:o.nullable(e.oneOf(["narrow","short","long"])),hour:o.nullable(e.oneOf(["numeric","2-digit"])),hour12:o.nullable(e.bool),minute:o.nullable(e.oneOf(["numeric","2-digit"])),second:o.nullable(e.oneOf(["numeric","2-digit"])),timeZoneName:o.nullable(e.oneOf(["short","long"]))})]),formatPlaceholder:e.oneOfType([o.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:o.nullable(e.string),month:o.nullable(e.string),day:o.nullable(e.string),hour:o.nullable(e.string),minute:o.nullable(e.string),second:o.nullable(e.string)})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,min:e.instanceOf(Date),max:e.instanceOf(Date),name:e.string,popupSettings:e.shape({animate:o.nullable(e.bool),appendTo:o.nullable(e.any),popupClass:o.nullable(e.string)}),show:e.bool,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),weekNumber:e.bool,width:e.oneOfType([e.number,e.string]),validationMessage:e.string,required:e.bool,valid:e.bool,size:e.oneOf([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),adaptive:e.bool,adaptiveTitle:e.string,autoFocus:e.bool,inputAttributes:e.object};const l={defaultShow:!1,defaultValue:null,dateInput:at.DateInput,calendar:ot.Calendar,toggleButton:lt.ToggleButton,popup:et.Popup,pickerWrap:ut.PickerWrap,disabled:!1,format:"d",max:o.MAX_DATE,min:o.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1},ie=u.createPropsContext();W.displayName="KendoReactDatePicker";exports.DatePicker=W;exports.DatePickerPropsContext=ie;exports.datePickerDefaultProps=l;
@@ -7,103 +7,109 @@
7
7
  */
8
8
  import * as o from "react";
9
9
  import e from "prop-types";
10
- import { Popup as Je } from "@progress/kendo-react-popup";
11
- import { cloneDate as ne, getDate as Qe } from "@progress/kendo-date-math";
12
- import { validatePackage as et, useId as tt, useAdaptiveModeContext as nt, usePropsContext as ot, canUseDOM as oe, AsyncFocusBlur as rt, classNames as re, kendoThemeMaps as ae, createPropsContext as at, Keys as D } from "@progress/kendo-react-common";
13
- import { calendarIcon as it } from "@progress/kendo-svg-icons";
14
- import { packageMetadata as lt } from "../package-metadata.mjs";
15
- import { DateInput as ut } from "../dateinput/DateInput.mjs";
16
- import { Calendar as st } from "../calendar/components/Calendar.mjs";
17
- import { nullable as l, MAX_DATE as ct, MIN_DATE as dt, isInDateRange as ft, setTime as mt } from "../utils.mjs";
18
- import { toggleCalendar as ie, messages as pt } from "../messages/index.mjs";
19
- import { useLocalization as gt } from "@progress/kendo-react-intl";
20
- import { ToggleButton as ht } from "./ToggleButton.mjs";
21
- import { PickerWrap as vt } from "../common/PickerWrap.mjs";
22
- import { PickerFloatingLabel as wt } from "../hooks/usePickerFloatingLabel.mjs";
23
- import { ActionSheetContent as bt } from "@progress/kendo-react-layout";
24
- import { AdaptiveMode as yt } from "../common/AdaptiveMode.mjs";
25
- const le = o.forwardRef((n, ue) => {
26
- et(lt);
27
- const V = tt(n.id), se = gt(), g = nt(), {
28
- defaultShow: ce = a.defaultShow,
29
- defaultValue: de = a.defaultValue,
30
- dateInput: fe = a.dateInput,
31
- calendar: me = a.calendar,
32
- toggleButton: pe = a.toggleButton,
33
- popup: ge = a.popup,
34
- pickerWrap: Rt = a.pickerWrap,
35
- disabled: h = a.disabled,
36
- format: he = a.format,
37
- max: P = a.max,
38
- min: I = a.min,
39
- popupSettings: v = a.popupSettings,
40
- tabIndex: ve = a.tabIndex,
41
- weekNumber: we = a.weekNumber,
42
- validityStyles: F = a.validityStyles,
43
- size: S = a.size,
44
- rounded: E = a.rounded,
45
- fillMode: x = a.fillMode,
46
- autoFocus: be = a.autoFocus,
47
- show: N,
48
- autoSwitchParts: ye,
49
- autoSwitchKeys: Ce,
50
- twoDigitYearMax: Re,
51
- ariaLabel: ke,
52
- adaptive: kt,
53
- adaptiveTitle: De,
54
- inputAttributes: Oe,
55
- validationMessage: z,
56
- _adaptiveMode: Dt = g,
57
- valid: W,
58
- focusedDate: Me,
59
- ...L
60
- } = ot(Ct, n), B = () => {
61
- if (oe)
10
+ import { Popup as tt } from "@progress/kendo-react-popup";
11
+ import { cloneDate as oe, getDate as nt } from "@progress/kendo-date-math";
12
+ import { validatePackage as ot, useId as rt, useAdaptiveModeContext as at, usePropsContext as lt, canUseDOM as re, AsyncFocusBlur as it, classNames as ae, kendoThemeMaps as le, createPropsContext as ut, Keys as O } from "@progress/kendo-react-common";
13
+ import { calendarIcon as st } from "@progress/kendo-svg-icons";
14
+ import { packageMetadata as ct } from "../package-metadata.mjs";
15
+ import { DateInput as dt } from "../dateinput/DateInput.mjs";
16
+ import { Calendar as ft } from "../calendar/components/Calendar.mjs";
17
+ import { nullable as a, MAX_DATE as mt, MIN_DATE as pt, isInDateRange as gt, setTime as ht } from "../utils.mjs";
18
+ import { toggleCalendar as ie, messages as vt } from "../messages/index.mjs";
19
+ import { useLocalization as wt } from "@progress/kendo-react-intl";
20
+ import { ToggleButton as bt } from "./ToggleButton.mjs";
21
+ import { PickerWrap as yt } from "../common/PickerWrap.mjs";
22
+ import { PickerFloatingLabel as Ct } from "../hooks/usePickerFloatingLabel.mjs";
23
+ import { ActionSheetContent as kt } from "@progress/kendo-react-layout";
24
+ import { AdaptiveMode as Dt } from "../common/AdaptiveMode.mjs";
25
+ const ue = o.forwardRef((n, se) => {
26
+ ot(ct);
27
+ const N = rt(n.id), ce = wt(), g = at(), {
28
+ defaultShow: de = l.defaultShow,
29
+ defaultValue: fe = l.defaultValue,
30
+ dateInput: me = l.dateInput,
31
+ calendar: pe = l.calendar,
32
+ toggleButton: ge = l.toggleButton,
33
+ popup: he = l.popup,
34
+ pickerWrap: Pt = l.pickerWrap,
35
+ disabled: h = l.disabled,
36
+ format: ve = l.format,
37
+ max: R = l.max,
38
+ min: I = l.min,
39
+ popupSettings: v = l.popupSettings,
40
+ tabIndex: we = l.tabIndex,
41
+ weekNumber: be = l.weekNumber,
42
+ validityStyles: z = l.validityStyles,
43
+ size: S = l.size,
44
+ rounded: E = l.rounded,
45
+ fillMode: _ = l.fillMode,
46
+ autoFocus: ye = l.autoFocus,
47
+ show: W,
48
+ autoSwitchParts: Ce,
49
+ autoSwitchKeys: ke,
50
+ twoDigitYearMax: De,
51
+ ariaLabel: Oe,
52
+ adaptive: Mt,
53
+ formatPlaceholder: Pe,
54
+ adaptiveTitle: Me,
55
+ inputAttributes: Re,
56
+ validationMessage: L,
57
+ visited: Rt,
58
+ value: x,
59
+ touched: It,
60
+ modified: St,
61
+ _adaptiveMode: Et = g,
62
+ valid: K,
63
+ focusedDate: Ie,
64
+ id: Se,
65
+ ...q
66
+ } = lt(Ot, n), B = () => {
67
+ if (re)
62
68
  return b.current && b.current.ownerDocument || window.document;
63
69
  }, s = () => !!(p.windowWidth && g && p.windowWidth <= (g == null ? void 0 : g.medium) && n.adaptive), d = () => {
64
- const t = C.current !== void 0 && C.current !== null ? C.current : n.value !== void 0 ? n.value : p.value;
65
- return t !== null ? ne(t) : null;
66
- }, i = () => O.current !== void 0 ? O.current : N !== void 0 ? N : p.show, Pe = () => fe || a.dateInput, Ie = () => pe || a.toggleButton, Se = () => me || a.calendar, Ee = () => ge || a.popup, K = () => n.required !== void 0 ? n.required : !1, T = () => {
67
- const t = d() || n.value || null, r = I, u = P, M = ft(t, r, u), _ = z !== void 0, q = (!K() || t != null) && M, A = W !== void 0 ? W : q;
70
+ const t = C.current !== void 0 && C.current !== null ? C.current : x !== void 0 ? x : p.value;
71
+ return t !== null ? oe(t) : null;
72
+ }, i = () => P.current !== void 0 ? P.current : W !== void 0 ? W : p.show, Ee = () => me || l.dateInput, _e = () => ge || l.toggleButton, xe = () => pe || l.calendar, Be = () => he || l.popup, H = () => n.required !== void 0 ? n.required : !1, T = () => {
73
+ const t = d() || x || null, r = I, u = R, M = gt(t, r, u), A = L !== void 0, V = (!H() || t != null) && M, F = K !== void 0 ? K : V;
68
74
  return {
69
- customError: _,
75
+ customError: A,
70
76
  rangeOverflow: t && u.getTime() < t.getTime() || !1,
71
77
  rangeUnderflow: t && t.getTime() < r.getTime() || !1,
72
- valid: A,
78
+ valid: F,
73
79
  valueMissing: t === null
74
80
  };
75
- }, xe = (t) => {
81
+ }, Te = (t) => {
76
82
  for (const r of t)
77
- k({ windowWidth: r.target.clientWidth });
78
- }, Be = () => {
83
+ D({ windowWidth: r.target.clientWidth });
84
+ }, Ae = () => {
79
85
  c.current && c.current.focus();
80
- }, H = (t) => {
86
+ }, U = (t) => {
81
87
  y.current = t;
82
88
  }, f = (t) => {
83
- i() !== t && (k({ show: t }), t && n.onOpen && n.onOpen.call(void 0, { target: w.current }), !t && n.onClose && n.onClose.call(void 0, { target: w.current }));
84
- }, Te = (t) => {
89
+ i() !== t && (D({ show: t }), t && n.onOpen && n.onOpen.call(void 0, { target: w.current }), !t && n.onClose && n.onClose.call(void 0, { target: w.current }));
90
+ }, Ve = (t) => {
85
91
  const r = d();
86
- return r && t ? mt(t, r) : t;
87
- }, _e = (t) => {
92
+ return r && t ? ht(t, r) : t;
93
+ }, Fe = (t) => {
88
94
  v != null && v.onMouseDownOutside && v.onMouseDownOutside.call(void 0, t);
89
- }, U = (t, r) => {
90
- k({ value: ne(t || void 0) }), C.current = t, O.current = !1, s() || (m.current = !0), n.onChange && n.onChange.call(void 0, {
95
+ }, Y = (t, r) => {
96
+ D({ value: oe(t || void 0) }), C.current = t, P.current = !1, s() || (m.current = !0), n.onChange && n.onChange.call(void 0, {
91
97
  syntheticEvent: r.syntheticEvent,
92
98
  nativeEvent: r.nativeEvent,
93
99
  value: d(),
94
100
  show: i(),
95
101
  target: w.current
96
- }), C.current = void 0, O.current = void 0, f(!1);
97
- }, qe = (t) => {
98
- const r = Te(t.value);
99
- U(r, t);
100
- }, Y = () => {
101
- const { popupClass: t, ...r } = v, u = i(), M = d(), _ = M && Qe(M), q = re(t), A = {
102
+ }), C.current = void 0, P.current = void 0, f(!1);
103
+ }, Ne = (t) => {
104
+ const r = Ve(t.value);
105
+ Y(r, t);
106
+ }, $ = () => {
107
+ const { popupClass: t, ...r } = v, u = i(), M = d(), A = M && nt(M), V = ae(t), F = {
102
108
  popupClass: "k-datepicker-popup",
103
109
  show: u,
104
110
  anchor: b.current,
105
- className: q,
106
- id: Z,
111
+ className: V,
112
+ id: G,
107
113
  anchorAlign: {
108
114
  horizontal: "left",
109
115
  vertical: "bottom"
@@ -113,46 +119,46 @@ const le = o.forwardRef((n, ue) => {
113
119
  vertical: "top"
114
120
  },
115
121
  ...r,
116
- onMouseDownOutside: _e
117
- }, ee = {
122
+ onMouseDownOutside: Fe
123
+ }, te = {
118
124
  disabled: h,
119
- value: _,
125
+ value: A,
120
126
  min: I,
121
- max: P,
122
- weekNumber: we,
123
- focusedDate: Me,
127
+ max: R,
128
+ weekNumber: be,
129
+ focusedDate: Ie,
124
130
  className: s() ? "k-calendar-lg" : "",
125
131
  navigation: !s(),
126
- onChange: qe
127
- }, te = Se(), Ge = Ee();
128
- return s() ? /* @__PURE__ */ o.createElement(te, { _ref: H, ...ee }) : /* @__PURE__ */ o.createElement(Ge, { ...A }, /* @__PURE__ */ o.createElement(te, { _ref: H, ...ee }));
129
- }, $ = () => {
130
- k({ focused: !1 }), f(!1);
131
- }, Ae = () => {
132
+ onChange: Ne
133
+ }, ne = xe(), et = Be();
134
+ return s() ? /* @__PURE__ */ o.createElement(ne, { _ref: U, ...te }) : /* @__PURE__ */ o.createElement(et, { ...F }, /* @__PURE__ */ o.createElement(ne, { _ref: U, ...te }));
135
+ }, j = () => {
136
+ D({ focused: !1 }), f(!1);
137
+ }, ze = () => {
132
138
  const { windowWidth: t = 0 } = p, r = {
133
139
  expand: i(),
134
- onClose: $,
135
- adaptiveTitle: De,
140
+ onClose: j,
141
+ adaptiveTitle: Me,
136
142
  windowWidth: t
137
- }, u = Y();
138
- return /* @__PURE__ */ o.createElement(yt, { ...r }, /* @__PURE__ */ o.createElement(bt, { overflowHidden: !0 }, u));
139
- }, Ve = (t) => {
140
- U(t.value, t);
141
- }, Fe = () => {
142
- k({ focused: !0 });
143
- }, Ne = () => {
143
+ }, u = $();
144
+ return /* @__PURE__ */ o.createElement(Dt, { ...r }, /* @__PURE__ */ o.createElement(kt, { overflowHidden: !0 }, u));
145
+ }, We = (t) => {
146
+ Y(t.value, t);
147
+ }, Le = () => {
148
+ D({ focused: !0 });
149
+ }, Ke = () => {
144
150
  f(!i());
145
- }, j = () => {
151
+ }, X = () => {
146
152
  h || (m.current = !0, f(!i()));
147
- }, ze = (t) => {
153
+ }, qe = (t) => {
148
154
  t.preventDefault();
149
- }, We = (t) => {
155
+ }, He = (t) => {
150
156
  const { altKey: r, keyCode: u } = t;
151
- if (u === D.esc && i()) {
157
+ if (u === O.esc && i()) {
152
158
  m.current = !0, f(!1);
153
159
  return;
154
160
  }
155
- r && (u === D.up || u === D.down) && (t.preventDefault(), t.stopPropagation(), m.current = u === D.up, f(u === D.down));
161
+ r && (u === O.up || u === O.down) && (t.preventDefault(), t.stopPropagation(), m.current = u === O.up, f(u === O.down));
156
162
  }, w = o.useRef(null), b = o.useRef(null), c = o.useRef(null), y = o.useRef(null);
157
163
  o.useImperativeHandle(
158
164
  w,
@@ -182,47 +188,47 @@ const le = o.forwardRef((n, ue) => {
182
188
  get mobileMode() {
183
189
  return s();
184
190
  },
185
- togglePopup: Ne,
191
+ togglePopup: Ke,
186
192
  // Hidden Methods but still accessible
187
- focus: Be
193
+ focus: Ae
188
194
  })
189
- ), o.useImperativeHandle(ue, () => w.current);
190
- const C = o.useRef(null), O = o.useRef(void 0), Le = o.useRef(null), m = o.useRef(!1), X = o.useRef(!1), R = o.useRef(null), [p, Ke] = o.useState({
191
- value: de,
192
- show: ce,
195
+ ), o.useImperativeHandle(se, () => w.current);
196
+ const C = o.useRef(null), P = o.useRef(void 0), Ue = o.useRef(null), m = o.useRef(!1), Z = o.useRef(!1), k = o.useRef(null), [p, Ye] = o.useState({
197
+ value: fe,
198
+ show: de,
193
199
  focused: !1
194
- }), [, He] = o.useReducer((t) => t, !0), k = (t) => {
195
- Ke((r) => ({ ...r, ...t }));
200
+ }), [, $e] = o.useReducer((t) => t, !0), D = (t) => {
201
+ Ye((r) => ({ ...r, ...t }));
196
202
  };
197
203
  o.useEffect(() => {
198
- y.current && y.current.element && i() && !X.current && y.current.element.focus({ preventScroll: !0 }), c.current && c.current.element && !i() && m.current && c.current.element.focus({ preventScroll: !0 }), X.current = i(), m.current = !1;
204
+ y.current && y.current.element && i() && !Z.current && y.current.element.focus({ preventScroll: !0 }), c.current && c.current.element && !i() && m.current && c.current.element.focus({ preventScroll: !0 }), Z.current = i(), m.current = !1;
199
205
  }), o.useEffect(() => {
200
206
  var t;
201
- return R.current = oe && window.ResizeObserver && new window.ResizeObserver((r) => xe(r)), i() && He(), (t = B()) != null && t.body && R.current && R.current.observe(B().body), () => {
207
+ return k.current = re && window.ResizeObserver && new window.ResizeObserver((r) => Te(r)), i() && $e(), (t = B()) != null && t.body && k.current && k.current.observe(B().body), () => {
202
208
  var r;
203
- clearTimeout(Le.current), (r = B()) != null && r.body && R.current && R.current.disconnect();
209
+ clearTimeout(Ue.current), (r = B()) != null && r.body && k.current && k.current.disconnect();
204
210
  };
205
211
  }, []);
206
- const Z = V + "-popup-id", Ue = Y(), Ye = Pe(), $e = d(), je = Ie(), Xe = Ae(), G = !F || T().valid, J = se.toLanguageString(ie, pt[ie]), Ze = {
212
+ const G = N + "-popup-id", je = $(), Xe = Ee(), Ze = d(), Ge = _e(), Je = ze(), J = !z || T().valid, Q = ce.toLanguageString(ie, vt[ie]), Qe = {
207
213
  disabled: h,
208
- format: he,
209
- formatPlaceholder: n.formatPlaceholder,
210
- id: n.id,
214
+ format: ve,
215
+ formatPlaceholder: Pe,
216
+ id: Se,
211
217
  ariaLabelledBy: n.ariaLabelledBy,
212
218
  ariaDescribedBy: n.ariaDescribedBy,
213
- ariaLabel: ke,
214
- max: P,
219
+ ariaLabel: Oe,
220
+ max: R,
215
221
  min: I,
216
222
  name: n.name,
217
- onChange: Ve,
223
+ onChange: We,
218
224
  required: n.required,
219
225
  _ref: c,
220
- tabIndex: i() ? -1 : ve,
226
+ tabIndex: i() ? -1 : we,
221
227
  title: n.title,
222
228
  valid: T().valid,
223
- validationMessage: z,
224
- validityStyles: F,
225
- value: $e,
229
+ validationMessage: L,
230
+ validityStyles: z,
231
+ value: Ze,
226
232
  label: void 0,
227
233
  placeholder: p.focused ? null : n.placeholder,
228
234
  ariaExpanded: i(),
@@ -230,89 +236,89 @@ const le = o.forwardRef((n, ue) => {
230
236
  fillMode: null,
231
237
  rounded: null,
232
238
  autoFill: n.autoFill,
233
- twoDigitYearMax: Re,
239
+ twoDigitYearMax: De,
234
240
  enableMouseWheel: n.enableMouseWheel,
235
241
  autoCorrectParts: n.autoCorrectParts,
236
- autoSwitchParts: ye,
237
- autoSwitchKeys: Ce,
242
+ autoSwitchParts: Ce,
243
+ autoSwitchKeys: ke,
238
244
  allowCaretMode: n.allowCaretMode,
239
- inputAttributes: Oe
240
- }, Q = /* @__PURE__ */ o.createElement(
241
- rt,
245
+ inputAttributes: Re
246
+ }, ee = /* @__PURE__ */ o.createElement(
247
+ it,
242
248
  {
243
- onFocus: Fe,
244
- onBlur: s() ? void 0 : $,
249
+ onFocus: Le,
250
+ onBlur: s() ? void 0 : j,
245
251
  onSyncBlur: n.onBlur,
246
252
  onSyncFocus: n.onFocus
247
253
  },
248
254
  (t) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
249
255
  "span",
250
256
  {
251
- ...n.label ? {} : L,
257
+ ...n.label ? {} : q,
252
258
  ref: b,
253
- className: re(
259
+ className: ae(
254
260
  "k-input",
255
261
  "k-datepicker",
256
262
  {
257
- [`k-input-${ae.sizeMap[S] || S}`]: S,
258
- [`k-rounded-${ae.roundedMap[E] || E}`]: E,
259
- [`k-input-${x}`]: x,
260
- "k-invalid": !G,
261
- "k-required": K(),
263
+ [`k-input-${le.sizeMap[S] || S}`]: S,
264
+ [`k-rounded-${le.roundedMap[E] || E}`]: E,
265
+ [`k-input-${_}`]: _,
266
+ "k-invalid": !J,
267
+ "k-required": H(),
262
268
  "k-disabled": h
263
269
  },
264
270
  n.className
265
271
  ),
266
- onKeyDown: We,
272
+ onKeyDown: He,
267
273
  style: { width: n.width },
268
274
  onFocus: t.onFocus,
269
275
  onBlur: t.onBlur,
270
- onClick: s() ? j : void 0
276
+ onClick: s() ? X : void 0
271
277
  },
272
278
  /* @__PURE__ */ o.createElement(
273
- Ye,
279
+ Xe,
274
280
  {
275
281
  _ref: c,
276
282
  ariaRole: "combobox",
277
283
  ariaExpanded: i(),
278
- ariaControls: Z,
279
- autoFocus: be,
280
- ...Ze
284
+ ariaControls: G,
285
+ autoFocus: ye,
286
+ ...Qe
281
287
  }
282
288
  ),
283
289
  /* @__PURE__ */ o.createElement(
284
- je,
290
+ Ge,
285
291
  {
286
292
  type: "button",
287
293
  icon: "calendar",
288
- svgIcon: it,
289
- title: J,
294
+ svgIcon: st,
295
+ title: Q,
290
296
  className: "k-input-button",
291
297
  rounded: null,
292
- onClick: s() ? void 0 : j,
293
- "aria-label": J,
294
- fillMode: x,
295
- onMouseDown: ze
298
+ onClick: s() ? void 0 : X,
299
+ "aria-label": Q,
300
+ fillMode: _,
301
+ onMouseDown: qe
296
302
  }
297
303
  ),
298
- !s() && Ue
299
- ), s() && Xe)
304
+ !s() && je
305
+ ), s() && Je)
300
306
  );
301
307
  return n.label ? /* @__PURE__ */ o.createElement(
302
- wt,
308
+ Ct,
303
309
  {
304
310
  dateInput: c,
305
311
  label: n.label,
306
- editorId: V,
307
- editorValid: G,
312
+ editorId: N,
313
+ editorValid: J,
308
314
  editorDisabled: h,
309
- children: Q,
315
+ children: ee,
310
316
  style: { width: n.width },
311
- ...L
317
+ ...q
312
318
  }
313
- ) : Q;
319
+ ) : ee;
314
320
  });
315
- le.propTypes = {
321
+ ue.propTypes = {
316
322
  className: e.string,
317
323
  defaultShow: e.bool,
318
324
  defaultValue: e.instanceOf(Date),
@@ -321,32 +327,34 @@ le.propTypes = {
321
327
  format: e.oneOfType([
322
328
  e.string,
323
329
  e.shape({
324
- skeleton: l(e.string),
325
- pattern: l(e.string),
326
- date: l(e.oneOf(["short", "medium", "long", "full"])),
327
- time: l(e.oneOf(["short", "medium", "long", "full"])),
328
- datetime: l(e.oneOf(["short", "medium", "long", "full"])),
329
- era: l(e.oneOf(["narrow", "short", "long"])),
330
- year: l(e.oneOf(["numeric", "2-digit"])),
331
- month: l(e.oneOf(["numeric", "2-digit", "narrow", "short", "long"])),
332
- day: l(e.oneOf(["numeric", "2-digit"])),
333
- weekday: l(e.oneOf(["narrow", "short", "long"])),
334
- hour: l(e.oneOf(["numeric", "2-digit"])),
335
- hour12: l(e.bool),
336
- minute: l(e.oneOf(["numeric", "2-digit"])),
337
- second: l(e.oneOf(["numeric", "2-digit"])),
338
- timeZoneName: l(e.oneOf(["short", "long"]))
330
+ skeleton: a(e.string),
331
+ pattern: a(e.string),
332
+ date: a(e.oneOf(["short", "medium", "long", "full"])),
333
+ time: a(e.oneOf(["short", "medium", "long", "full"])),
334
+ datetime: a(e.oneOf(["short", "medium", "long", "full"])),
335
+ era: a(e.oneOf(["narrow", "short", "long"])),
336
+ year: a(e.oneOf(["numeric", "2-digit"])),
337
+ month: a(e.oneOf(["numeric", "2-digit", "narrow", "short", "long"])),
338
+ day: a(e.oneOf(["numeric", "2-digit"])),
339
+ weekday: a(e.oneOf(["narrow", "short", "long"])),
340
+ hour: a(e.oneOf(["numeric", "2-digit"])),
341
+ hour12: a(e.bool),
342
+ minute: a(e.oneOf(["numeric", "2-digit"])),
343
+ second: a(e.oneOf(["numeric", "2-digit"])),
344
+ timeZoneName: a(e.oneOf(["short", "long"]))
339
345
  })
340
346
  ]),
341
347
  formatPlaceholder: e.oneOfType([
342
- e.oneOf(["wide", "narrow", "short", "formatPattern"]).isRequired,
348
+ a(
349
+ e.oneOf(["wide", "narrow", "short", "formatPattern"])
350
+ ),
343
351
  e.shape({
344
- year: e.string.isRequired,
345
- month: e.string.isRequired,
346
- day: e.string.isRequired,
347
- hour: e.string.isRequired,
348
- minute: e.string.isRequired,
349
- second: e.string.isRequired
352
+ year: a(e.string),
353
+ month: a(e.string),
354
+ day: a(e.string),
355
+ hour: a(e.string),
356
+ minute: a(e.string),
357
+ second: a(e.string)
350
358
  })
351
359
  ]),
352
360
  id: e.string,
@@ -357,9 +365,9 @@ le.propTypes = {
357
365
  max: e.instanceOf(Date),
358
366
  name: e.string,
359
367
  popupSettings: e.shape({
360
- animate: e.bool.isRequired,
361
- appendTo: e.any.isRequired,
362
- popupClass: e.string.isRequired
368
+ animate: a(e.bool),
369
+ appendTo: a(e.any),
370
+ popupClass: a(e.string)
363
371
  }),
364
372
  show: e.bool,
365
373
  tabIndex: e.number,
@@ -378,18 +386,18 @@ le.propTypes = {
378
386
  autoFocus: e.bool,
379
387
  inputAttributes: e.object
380
388
  };
381
- const a = {
389
+ const l = {
382
390
  defaultShow: !1,
383
391
  defaultValue: null,
384
- dateInput: ut,
385
- calendar: st,
386
- toggleButton: ht,
387
- popup: Je,
388
- pickerWrap: vt,
392
+ dateInput: dt,
393
+ calendar: ft,
394
+ toggleButton: bt,
395
+ popup: tt,
396
+ pickerWrap: yt,
389
397
  disabled: !1,
390
398
  format: "d",
391
- max: ct,
392
- min: dt,
399
+ max: mt,
400
+ min: pt,
393
401
  popupSettings: {},
394
402
  tabIndex: 0,
395
403
  weekNumber: !1,
@@ -398,10 +406,10 @@ const a = {
398
406
  rounded: "medium",
399
407
  fillMode: "solid",
400
408
  autoFocus: !1
401
- }, Ct = at();
402
- le.displayName = "KendoReactDatePicker";
409
+ }, Ot = ut();
410
+ ue.displayName = "KendoReactDatePicker";
403
411
  export {
404
- le as DatePicker,
405
- Ct as DatePickerPropsContext,
406
- a as datePickerDefaultProps
412
+ ue as DatePicker,
413
+ Ot as DatePickerPropsContext,
414
+ l as datePickerDefaultProps
407
415
  };