@progress/kendo-react-dateinputs 11.0.0-develop.3 → 11.0.0-develop.4

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 y=require("react"),r=require("@progress/kendo-react-layout"),x=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),h=require("@progress/kendo-react-common");function k(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const n=k(y),C=t=>{const{footer:e,windowWidth:a=0,mobileFilter:o,children:s,navigatable:d,navigatableElements:u,expand:b,animation:p,title:m,subTitle:f,onClose:c}=t,g=()=>n.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:x.xIcon,onClick:c}),l=h.useAdaptiveModeContext(),v={navigatable:d||!1,navigatableElements:u||[],expand:b,animation:p!==!1,suffixActions:g(),filter:o,onClose:c,animationStyles:l&&a<=l.small?{top:0,width:"100%",height:"100%"}:void 0,title:m,subTitle:f,className:"k-adaptive-actionsheet",position:l&&a<=l.small?"fullscreen":void 0};return n.createElement(r.ActionSheet,{...v},s,e&&n.createElement(r.ActionSheetFooter,{className:"k-actions k-actions-stretched"},n.createElement(i.Button,{size:"large",tabIndex:0,"aria-label":e.cancelText,"aria-disabled":"false",type:"button",onClick:e.onCancel},e.cancelText),n.createElement(i.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":e.applyText,"aria-disabled":"false",type:"button",onClick:e.onApply},e.applyText)))};exports.AdaptiveMode=C;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),c=require("@progress/kendo-react-layout"),h=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),k=require("@progress/kendo-react-common");function x(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const n=x(v),C=t=>{const{footer:e,windowWidth:a=0,mobileFilter:o,children:s,navigatable:d,navigatableElements:u,expand:b,animation:m,title:p,subTitle:f,onClose:r}=t,g=()=>n.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:h.checkIcon,onClick:r}),l=k.useAdaptiveModeContext(),y={navigatable:d||!1,navigatableElements:u||[],expand:b,animation:m!==!1,suffixActions:g(),filter:o,onClose:r,animationStyles:l&&a<=l.small?{top:0,width:"100%",height:"100%"}:void 0,title:p,subTitle:f,className:"k-adaptive-actionsheet",position:l&&a<=l.small?"fullscreen":void 0};return n.createElement(c.ActionSheet,{...y},s,e&&n.createElement(c.ActionSheetFooter,{className:"k-actions k-actions-stretched"},n.createElement(i.Button,{size:"large",tabIndex:0,"aria-label":e.cancelText,"aria-disabled":"false",type:"button",onClick:e.onCancel},e.cancelText),n.createElement(i.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":e.applyText,"aria-disabled":"false",type:"button",onClick:e.onApply},e.applyText)))};exports.AdaptiveMode=C;
@@ -7,13 +7,13 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import { ActionSheet as u, ActionSheetFooter as v } from "@progress/kendo-react-layout";
10
- import { xIcon as C } from "@progress/kendo-svg-icons";
10
+ import { checkIcon as C } from "@progress/kendo-svg-icons";
11
11
  import { Button as o } from "@progress/kendo-react-buttons";
12
12
  import { useAdaptiveModeContext as g } from "@progress/kendo-react-common";
13
- const I = (i) => {
13
+ const I = (n) => {
14
14
  const {
15
15
  footer: e,
16
- windowWidth: n = 0,
16
+ windowWidth: l = 0,
17
17
  mobileFilter: r,
18
18
  children: s,
19
19
  navigatable: c,
@@ -22,8 +22,8 @@ const I = (i) => {
22
22
  animation: p,
23
23
  title: b,
24
24
  subTitle: f,
25
- onClose: l
26
- } = i, x = () => /* @__PURE__ */ t.createElement(
25
+ onClose: i
26
+ } = n, h = () => /* @__PURE__ */ t.createElement(
27
27
  o,
28
28
  {
29
29
  tabIndex: 0,
@@ -31,25 +31,26 @@ const I = (i) => {
31
31
  "aria-disabled": "false",
32
32
  type: "button",
33
33
  fillMode: "flat",
34
- icon: "x",
34
+ size: "large",
35
+ themeColor: "primary",
35
36
  svgIcon: C,
36
- onClick: l
37
+ onClick: i
37
38
  }
38
- ), a = g(), h = {
39
+ ), a = g(), x = {
39
40
  navigatable: c || !1,
40
41
  navigatableElements: m || [],
41
42
  expand: d,
42
43
  animation: p !== !1,
43
- suffixActions: x(),
44
+ suffixActions: h(),
44
45
  filter: r,
45
- onClose: l,
46
- animationStyles: a && n <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
46
+ onClose: i,
47
+ animationStyles: a && l <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
47
48
  title: b,
48
49
  subTitle: f,
49
50
  className: "k-adaptive-actionsheet",
50
- position: a && n <= a.small ? "fullscreen" : void 0
51
+ position: a && l <= a.small ? "fullscreen" : void 0
51
52
  };
52
- return /* @__PURE__ */ t.createElement(u, { ...h }, s, e && /* @__PURE__ */ t.createElement(v, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
53
+ return /* @__PURE__ */ t.createElement(u, { ...x }, s, e && /* @__PURE__ */ t.createElement(v, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
53
54
  o,
54
55
  {
55
56
  size: "large",
@@ -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 et=require("react"),e=require("prop-types"),tt=require("@progress/kendo-react-popup"),L=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),nt=require("@progress/kendo-svg-icons"),at=require("../dateinput/DateInput.js"),ot=require("../calendar/components/Calendar.js"),o=require("../utils.js"),K=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 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=dt(et),W=a.forwardRef((n,h)=>{const f=u.useId(n.id),M=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:x=l.rounded,fillMode:B=l.fillMode,autoFocus:ve=l.autoFocus,show:U,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:ke,ariaLabel:De,adaptive:mt,formatPlaceholder:Ce,adaptiveTitle:Pe,inputAttributes:Oe,validationMessage:H,visited:gt,value:q,touched:pt,modified:bt,_adaptiveMode:ht=v,valid:Y,focusedDate:Me,id:Re,ariaLabelledBy:Ie,...$}=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=R.current!==void 0?R.current:q!==void 0?q:b.value;return t!==null?L.cloneDate(t):null},i=()=>I.current!==void 0?I.current:U!==void 0?U:b.show,Se=()=>de||l.dateInput,_e=()=>me||l.toggleButton,Ee=()=>fe||l.calendar,Te=()=>ge||l.popup,X=()=>n.required!==void 0?n.required:!1,N=()=>{const t=m()||q||null,r=E,s=_,S=o.isInDateRange(t,r,s),F=H!==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}},xe=t=>{for(const r of t)O({windowWidth:r.target.clientWidth})},Be=()=>{d.current&&d.current.focus()},Z=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}))},qe=t=>{const r=m();return r&&t?o.setTime(t,r):t},Ae=t=>{y!=null&&y.onMouseDownOutside&&y.onMouseDownOutside.call(void 0,t)},G=(t,r)=>{O({value:L.cloneDate(t||void 0)}),R.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}),R.current=void 0,I.current=void 0,g(!1)},Ne=t=>{const r=qe(t.value);G(r,t)},J=()=>{const{popupClass:t,...r}=y,s=i(),S=m(),F=S&&L.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:Ae},le={disabled:w,value:F,min:E,max:_,weekNumber:he,focusedDate:Me,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:Ne},ue=Ee(),Qe=Te();return c()?a.createElement(ue,{_ref:Z,...le}):a.createElement(Qe,{...z},a.createElement(ue,{_ref:Z,...le}))},Q=()=>{O({focused:!1}),g(!1)},Fe=()=>{const{windowWidth:t=0}=b,r={expand:i(),onClose:Q,adaptiveTitle:Pe,windowWidth:t},s=J();return a.createElement(ct.AdaptiveMode,{...r},a.createElement(st.ActionSheetContent,null,s))},Ve=t=>{G(t.value,t)},ze=()=>{O({focused:!0})},Le=()=>{g(!i())},ee=()=>{w||(p.current=!0,g(!i()))},Ke=t=>{t.preventDefault()},We=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),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 N()},get value(){return m()},get mobileMode(){return c()},togglePopup:Le,focus:Be})),a.useImperativeHandle(h,()=>k.current);const R=a.useRef(void 0),I=a.useRef(void 0),je=a.useRef(null),p=a.useRef(!1),te=a.useRef(!1),P=a.useRef(null),[b,Ue]=a.useState({value:ce,show:se,focused:!1}),[,He]=a.useReducer(t=>t,!0),O=t=>{Ue(r=>({...r,...t}))};a.useEffect(()=>{C.current&&C.current.element&&i()&&!te.current&&C.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 P.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(r=>xe(r)),i()&&He(),(t=A())!=null&&t.body&&P.current&&P.current.observe(A().body),()=>{var r;clearTimeout(je.current),(r=A())!=null&&r.body&&P.current&&P.current.disconnect()}},[]);const ne=f+"-popup-id",Ye=J(),$e=Se(),Xe=m(),Ze=_e(),Ge=Fe(),ae=!j||N().valid,oe=M.toLanguageString(K.toggleCalendar,K.messages[K.toggleCalendar]),Je={disabled:w,format:pe,formatPlaceholder:Ce,id:Re,ariaLabelledBy:Ie,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:De,max:_,min:E,name:n.name,onChange:Ve,required:n.required,_ref:d,tabIndex:i()?-1:be,title:n.title,valid:N().valid,validationMessage:H,validityStyles:j,value:Xe,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:ze,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[x]||x}`]:x,[`k-input-${B}`]:B,"k-invalid":!ae,"k-required":X(),"k-disabled":w},n.className),onKeyDown:We,style:{width:n.width},onFocus:t.onFocus,onBlur:t.onBlur,onClick:c()?ee:void 0},a.createElement($e,{_ref:d,ariaRole:"combobox",ariaExpanded:i(),ariaControls:ne,autoFocus:ve,...Je}),a.createElement(Ze,{type:"button",icon:"calendar",svgIcon:nt.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:c()?void 0:ee,"aria-label":oe,fillMode:B,onMouseDown:Ke}),!c()&&Ye),c()&&Ge));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:tt.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;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("react"),e=require("prop-types"),nt=require("@progress/kendo-react-popup"),W=require("@progress/kendo-date-math"),i=require("@progress/kendo-react-common"),at=require("@progress/kendo-svg-icons"),ot=require("../dateinput/DateInput.js"),rt=require("../calendar/components/Calendar.js"),o=require("../utils.js"),j=require("../messages/index.js"),lt=require("@progress/kendo-react-intl"),ut=require("./ToggleButton.js"),it=require("../common/PickerWrap.js"),st=require("../hooks/usePickerFloatingLabel.js"),ct=require("@progress/kendo-react-layout"),dt=require("../common/AdaptiveMode.js");function ft(n){const v=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const m in n)if(m!=="default"){const M=Object.getOwnPropertyDescriptor(n,m);Object.defineProperty(v,m,M.get?M:{enumerable:!0,get:()=>n[m]})}}return v.default=n,Object.freeze(v)}const a=ft(tt),U=a.forwardRef((n,v)=>{const m=i.useId(n.id),M=lt.useLocalization(),w=i.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:mt=l.pickerWrap,disabled:y=l.disabled,format:pe=l.format,max:_=l.max,min:T=l.min,popupSettings:k=l.popupSettings,tabIndex:be=l.tabIndex,weekNumber:he=l.weekNumber,validityStyles:H=l.validityStyles,size:E=l.size,rounded:x=l.rounded,fillMode:B=l.fillMode,autoFocus:ve=l.autoFocus,show:Y,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:ke,ariaLabel:De,adaptive:gt,adaptiveTitle:Ce=n.label||void 0,adaptiveSubtitle:Pe,formatPlaceholder:Oe,inputAttributes:Me,validationMessage:$,visited:pt,value:q,touched:bt,modified:ht,_adaptiveMode:vt=w,valid:X,focusedDate:Re,id:Se,ariaLabelledBy:Ie,...Z}=i.usePropsContext(ie,n),A=()=>{if(i.canUseDOM)return C.current&&C.current.ownerDocument||window.document},s=()=>!!(h.windowWidth&&w&&h.windowWidth<=(w==null?void 0:w.medium)&&n.adaptive),g=()=>{const t=R.current!==void 0?R.current:q!==void 0?q:h.value;return t!==null?W.cloneDate(t):null},u=()=>S.current!==void 0?S.current:Y!==void 0?Y:h.show,_e=()=>de||l.dateInput,Te=()=>me||l.toggleButton,Ee=()=>fe||l.calendar,xe=()=>ge||l.popup,G=()=>n.required!==void 0?n.required:!1,N=()=>{const t=g()||q||null,r=T,c=_,I=o.isInDateRange(t,r,c),z=$!==void 0,L=(!G()||t!=null)&&I,K=X!==void 0?X:L;return{customError:z,rangeOverflow:t&&c.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<r.getTime()||!1,valid:K,valueMissing:t===null}},Be=t=>{for(const r of t)O({windowWidth:r.target.clientWidth})},qe=()=>{d.current&&d.current.focus()},J=t=>{f.current=t},p=t=>{u()!==t&&(O({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:D.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:D.current}))},Ae=t=>{const r=g();return r&&t?o.setTime(t,r):t},Ne=t=>{k!=null&&k.onMouseDownOutside&&k.onMouseDownOutside.call(void 0,t)},Q=(t,r)=>{O({value:W.cloneDate(t||void 0)}),R.current=t,S.current=!1,s()||(b.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:r.syntheticEvent,nativeEvent:r.nativeEvent,value:g(),show:u(),target:D.current}),R.current=void 0,S.current=void 0,p(!1)},Fe=t=>{const r=Ae(t.value);Q(r,t)},ee=()=>{const{popupClass:t,...r}=k,c=u(),I=g(),z=I&&W.getDate(I),L=i.classNames(t),K={popupClass:"k-datepicker-popup",show:c,anchor:C.current,className:L,id:ne,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...r,onMouseDownOutside:Ne},le={disabled:y,value:z,min:T,max:_,weekNumber:he,focusedDate:Re,className:s()?"k-calendar-lg":"",navigation:!s(),onChange:Fe},ue=Ee(),et=xe();return s()?a.createElement(ue,{_ref:J,...le}):a.createElement(et,{...K},a.createElement(ue,{_ref:J,...le}))},te=()=>{O({focused:!1}),p(!1)},Ve=()=>{const{windowWidth:t=0}=h,r={expand:u(),onClose:te,title:Ce,subTitle:Pe,windowWidth:t};return a.createElement(dt.AdaptiveMode,{...r},a.createElement(ct.ActionSheetContent,null,ee()))},ze=t=>{Q(t.value,t)},Le=()=>{O({focused:!0})},Ke=()=>{p(!u())},F=()=>{y||(b.current=!0,p(!u()))},We=t=>{t.preventDefault()},je=t=>{const{altKey:r,keyCode:c}=t;if(c===i.Keys.esc&&u()){b.current=!0,p(!1);return}r&&(c===i.Keys.up||c===i.Keys.down)&&(t.preventDefault(),t.stopPropagation(),b.current=c===i.Keys.up,p(c===i.Keys.down))},D=a.useRef(null),C=a.useRef(null),d=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(D,()=>({props:n,get element(){return C.current},get calendar(){return f.current},get dateInput(){return d.current},get name(){return n.name},get show(){return u()},get validity(){return N()},get value(){return g()},get mobileMode(){return s()},togglePopup:Ke,focus:qe})),a.useImperativeHandle(v,()=>D.current);const R=a.useRef(void 0),S=a.useRef(void 0),Ue=a.useRef(null),b=a.useRef(!1),V=a.useRef(!1),P=a.useRef(null),[h,He]=a.useState({value:ce,show:se,focused:!1}),[,Ye]=a.useReducer(t=>t,!0),O=t=>{He(r=>({...r,...t}))};a.useEffect(()=>{f.current&&f.current.element&&u()&&!V.current&&f.current.element.focus({preventScroll:!0}),s()&&u()&&!V.current&&setTimeout(()=>{f.current&&f.current.element&&f.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!u()&&b.current&&d.current.element.focus({preventScroll:!0}),V.current=u(),b.current=!1}),a.useEffect(()=>{var t;return P.current=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(r=>Be(r)),u()&&Ye(),(t=A())!=null&&t.body&&P.current&&P.current.observe(A().body),()=>{var r;clearTimeout(Ue.current),(r=A())!=null&&r.body&&P.current&&P.current.disconnect()}},[]);const ne=m+"-popup-id",$e=ee(),Xe=_e(),Ze=g(),Ge=Te(),Je=Ve(),ae=!H||N().valid,oe=M.toLanguageString(j.toggleCalendar,j.messages[j.toggleCalendar]),Qe={disabled:y,format:pe,formatPlaceholder:Oe,id:Se,ariaLabelledBy:Ie,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:De,max:_,min:T,name:n.name,onChange:ze,required:n.required,_ref:d,tabIndex:u()?-1:be,title:n.title,valid:N().valid,validationMessage:$,validityStyles:H,value:Ze,label:void 0,placeholder:h.focused?null:n.placeholder,ariaExpanded:u(),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:Me},re=a.createElement(i.AsyncFocusBlur,{onFocus:Le,onBlur:s()?void 0:te,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:Z,ref:C,className:i.classNames("k-input","k-datepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[E]||E}`]:E,[`k-rounded-${i.kendoThemeMaps.roundedMap[x]||x}`]:x,[`k-input-${B}`]:B,"k-invalid":!ae,"k-required":G(),"k-disabled":y},n.className),onKeyDown:je,style:{width:n.width},onFocus:s()?F:t.onFocus,onBlur:t.onBlur,onClick:s()?F:void 0},a.createElement(Xe,{_ref:d,ariaRole:"combobox",ariaExpanded:u(),ariaControls:ne,autoFocus:ve,...Qe}),a.createElement(Ge,{type:"button",icon:"calendar",svgIcon:at.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:s()?void 0:F,"aria-label":oe,fillMode:B,onMouseDown:We}),!s()&&$e),s()&&Je));return n.label?a.createElement(st.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:m,editorValid:ae,editorDisabled:y,children:re,style:{width:n.width},...Z}):re});U.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,adaptiveSubtitle:e.string,autoFocus:e.bool,inputAttributes:e.object};const l={defaultShow:!1,defaultValue:null,dateInput:ot.DateInput,calendar:rt.Calendar,toggleButton:ut.ToggleButton,popup:nt.Popup,pickerWrap:it.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=i.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=ie;exports.datePickerDefaultProps=l;
@@ -7,107 +7,108 @@
7
7
  */
8
8
  import * as o from "react";
9
9
  import e from "prop-types";
10
- import { Popup as nt } from "@progress/kendo-react-popup";
11
- import { cloneDate as oe, getDate as ot } from "@progress/kendo-date-math";
12
- import { 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 k } from "@progress/kendo-react-common";
13
- import { calendarIcon as st } from "@progress/kendo-svg-icons";
14
- import { DateInput as ct } from "../dateinput/DateInput.mjs";
15
- import { Calendar as dt } from "../calendar/components/Calendar.mjs";
16
- import { nullable as a, MAX_DATE as ft, MIN_DATE as mt, isInDateRange as pt, setTime as gt } from "../utils.mjs";
17
- import { toggleCalendar as ie, messages as ht } from "../messages/index.mjs";
18
- import { useLocalization as vt } from "@progress/kendo-react-intl";
10
+ import { Popup as ot } from "@progress/kendo-react-popup";
11
+ import { cloneDate as oe, getDate as rt } from "@progress/kendo-date-math";
12
+ import { useId as at, useAdaptiveModeContext as lt, usePropsContext as it, canUseDOM as re, AsyncFocusBlur as ut, classNames as ae, kendoThemeMaps as le, createPropsContext as st, Keys as k } from "@progress/kendo-react-common";
13
+ import { calendarIcon as ct } from "@progress/kendo-svg-icons";
14
+ import { DateInput as dt } from "../dateinput/DateInput.mjs";
15
+ import { Calendar as ft } from "../calendar/components/Calendar.mjs";
16
+ import { nullable as a, MAX_DATE as mt, MIN_DATE as pt, isInDateRange as gt, setTime as ht } from "../utils.mjs";
17
+ import { toggleCalendar as ie, messages as vt } from "../messages/index.mjs";
18
+ import { useLocalization as bt } from "@progress/kendo-react-intl";
19
19
  import { ToggleButton as wt } from "./ToggleButton.mjs";
20
- import { PickerWrap as bt } from "../common/PickerWrap.mjs";
21
- import { PickerFloatingLabel as yt } from "../hooks/usePickerFloatingLabel.mjs";
22
- import { ActionSheetContent as Ct } from "@progress/kendo-react-layout";
23
- import { AdaptiveMode as Dt } from "../common/AdaptiveMode.mjs";
20
+ import { PickerWrap as yt } from "../common/PickerWrap.mjs";
21
+ import { PickerFloatingLabel as Ct } from "../hooks/usePickerFloatingLabel.mjs";
22
+ import { ActionSheetContent as Dt } from "@progress/kendo-react-layout";
23
+ import { AdaptiveMode as kt } from "../common/AdaptiveMode.mjs";
24
24
  const ue = o.forwardRef((n, se) => {
25
- const N = rt(n.id), ce = vt(), g = at(), {
25
+ const L = at(n.id), ce = bt(), h = lt(), {
26
26
  defaultShow: de = l.defaultShow,
27
27
  defaultValue: fe = l.defaultValue,
28
28
  dateInput: me = l.dateInput,
29
29
  calendar: pe = l.calendar,
30
30
  toggleButton: ge = l.toggleButton,
31
31
  popup: he = l.popup,
32
- pickerWrap: Ot = l.pickerWrap,
33
- disabled: h = l.disabled,
32
+ pickerWrap: Mt = l.pickerWrap,
33
+ disabled: v = l.disabled,
34
34
  format: ve = l.format,
35
35
  max: R = l.max,
36
36
  min: I = l.min,
37
- popupSettings: v = l.popupSettings,
38
- tabIndex: we = l.tabIndex,
39
- weekNumber: be = l.weekNumber,
40
- validityStyles: z = l.validityStyles,
37
+ popupSettings: b = l.popupSettings,
38
+ tabIndex: be = l.tabIndex,
39
+ weekNumber: we = l.weekNumber,
40
+ validityStyles: W = l.validityStyles,
41
41
  size: S = l.size,
42
42
  rounded: E = l.rounded,
43
43
  fillMode: _ = l.fillMode,
44
44
  autoFocus: ye = l.autoFocus,
45
- show: L,
45
+ show: K,
46
46
  autoSwitchParts: Ce,
47
47
  autoSwitchKeys: De,
48
48
  twoDigitYearMax: ke,
49
49
  ariaLabel: Oe,
50
50
  adaptive: Pt,
51
- formatPlaceholder: Pe,
52
- adaptiveTitle: Me,
53
- inputAttributes: Re,
54
- validationMessage: W,
55
- visited: Mt,
51
+ adaptiveTitle: Me = n.label || void 0,
52
+ adaptiveSubtitle: Pe,
53
+ formatPlaceholder: Re,
54
+ inputAttributes: Ie,
55
+ validationMessage: q,
56
+ visited: Rt,
56
57
  value: x,
57
- touched: Rt,
58
- modified: It,
59
- _adaptiveMode: St = g,
60
- valid: K,
61
- focusedDate: Ie,
62
- id: Se,
63
- ariaLabelledBy: Ee,
64
- ...q
65
- } = lt(kt, n), B = () => {
58
+ touched: It,
59
+ modified: St,
60
+ _adaptiveMode: Et = h,
61
+ valid: H,
62
+ focusedDate: Se,
63
+ id: Ee,
64
+ ariaLabelledBy: _e,
65
+ ...U
66
+ } = it(Ot, n), B = () => {
66
67
  if (re)
67
- return b.current && b.current.ownerDocument || window.document;
68
- }, s = () => !!(p.windowWidth && g && p.windowWidth <= (g == null ? void 0 : g.medium) && n.adaptive), d = () => {
69
- const t = O.current !== void 0 ? O.current : x !== void 0 ? x : p.value;
68
+ return y.current && y.current.ownerDocument || window.document;
69
+ }, u = () => !!(g.windowWidth && h && g.windowWidth <= (h == null ? void 0 : h.medium) && n.adaptive), f = () => {
70
+ const t = O.current !== void 0 ? O.current : x !== void 0 ? x : g.value;
70
71
  return t !== null ? oe(t) : null;
71
- }, i = () => P.current !== void 0 ? P.current : L !== void 0 ? L : p.show, _e = () => me || l.dateInput, xe = () => ge || l.toggleButton, Be = () => pe || l.calendar, Te = () => he || l.popup, H = () => n.required !== void 0 ? n.required : !1, T = () => {
72
- const t = d() || x || null, r = I, u = R, M = pt(t, r, u), A = W !== void 0, V = (!H() || t != null) && M, F = K !== void 0 ? K : V;
72
+ }, i = () => M.current !== void 0 ? M.current : K !== void 0 ? K : g.show, xe = () => me || l.dateInput, Be = () => ge || l.toggleButton, Te = () => pe || l.calendar, Ae = () => he || l.popup, Y = () => n.required !== void 0 ? n.required : !1, T = () => {
73
+ const t = f() || x || null, r = I, s = R, P = gt(t, r, s), F = q !== void 0, N = (!Y() || t != null) && P, z = H !== void 0 ? H : N;
73
74
  return {
74
- customError: A,
75
- rangeOverflow: t && u.getTime() < t.getTime() || !1,
75
+ customError: F,
76
+ rangeOverflow: t && s.getTime() < t.getTime() || !1,
76
77
  rangeUnderflow: t && t.getTime() < r.getTime() || !1,
77
- valid: F,
78
+ valid: z,
78
79
  valueMissing: t === null
79
80
  };
80
- }, Ae = (t) => {
81
+ }, Ve = (t) => {
81
82
  for (const r of t)
82
83
  D({ windowWidth: r.target.clientWidth });
83
- }, Ve = () => {
84
+ }, Fe = () => {
84
85
  c.current && c.current.focus();
85
- }, U = (t) => {
86
- y.current = t;
87
- }, f = (t) => {
86
+ }, $ = (t) => {
87
+ d.current = t;
88
+ }, m = (t) => {
88
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 }));
89
- }, Fe = (t) => {
90
- const r = d();
91
- return r && t ? gt(t, r) : t;
92
90
  }, Ne = (t) => {
93
- v != null && v.onMouseDownOutside && v.onMouseDownOutside.call(void 0, t);
94
- }, Y = (t, r) => {
95
- D({ value: oe(t || void 0) }), O.current = t, P.current = !1, s() || (m.current = !0), n.onChange && n.onChange.call(void 0, {
91
+ const r = f();
92
+ return r && t ? ht(t, r) : t;
93
+ }, ze = (t) => {
94
+ b != null && b.onMouseDownOutside && b.onMouseDownOutside.call(void 0, t);
95
+ }, j = (t, r) => {
96
+ D({ value: oe(t || void 0) }), O.current = t, M.current = !1, u() || (p.current = !0), n.onChange && n.onChange.call(void 0, {
96
97
  syntheticEvent: r.syntheticEvent,
97
98
  nativeEvent: r.nativeEvent,
98
- value: d(),
99
+ value: f(),
99
100
  show: i(),
100
101
  target: w.current
101
- }), O.current = void 0, P.current = void 0, f(!1);
102
- }, ze = (t) => {
103
- const r = Fe(t.value);
104
- Y(r, t);
105
- }, $ = () => {
106
- const { popupClass: t, ...r } = v, u = i(), M = d(), A = M && ot(M), V = ae(t), F = {
102
+ }), O.current = void 0, M.current = void 0, m(!1);
103
+ }, Le = (t) => {
104
+ const r = Ne(t.value);
105
+ j(r, t);
106
+ }, X = () => {
107
+ const { popupClass: t, ...r } = b, s = i(), P = f(), F = P && rt(P), N = ae(t), z = {
107
108
  popupClass: "k-datepicker-popup",
108
- show: u,
109
- anchor: b.current,
110
- className: V,
109
+ show: s,
110
+ anchor: y.current,
111
+ className: N,
111
112
  id: G,
112
113
  anchorAlign: {
113
114
  horizontal: "left",
@@ -118,56 +119,57 @@ const ue = o.forwardRef((n, se) => {
118
119
  vertical: "top"
119
120
  },
120
121
  ...r,
121
- onMouseDownOutside: Ne
122
+ onMouseDownOutside: ze
122
123
  }, te = {
123
- disabled: h,
124
- value: A,
124
+ disabled: v,
125
+ value: F,
125
126
  min: I,
126
127
  max: R,
127
- weekNumber: be,
128
- focusedDate: Ie,
129
- className: s() ? "k-calendar-lg" : "",
130
- navigation: !s(),
131
- onChange: ze
132
- }, ne = Be(), tt = Te();
133
- return s() ? /* @__PURE__ */ o.createElement(ne, { _ref: U, ...te }) : /* @__PURE__ */ o.createElement(tt, { ...F }, /* @__PURE__ */ o.createElement(ne, { _ref: U, ...te }));
134
- }, j = () => {
135
- D({ focused: !1 }), f(!1);
136
- }, Le = () => {
137
- const { windowWidth: t = 0 } = p, r = {
128
+ weekNumber: we,
129
+ focusedDate: Se,
130
+ className: u() ? "k-calendar-lg" : "",
131
+ navigation: !u(),
132
+ onChange: Le
133
+ }, ne = Te(), nt = Ae();
134
+ return u() ? /* @__PURE__ */ o.createElement(ne, { _ref: $, ...te }) : /* @__PURE__ */ o.createElement(nt, { ...z }, /* @__PURE__ */ o.createElement(ne, { _ref: $, ...te }));
135
+ }, Z = () => {
136
+ D({ focused: !1 }), m(!1);
137
+ }, We = () => {
138
+ const { windowWidth: t = 0 } = g, r = {
138
139
  expand: i(),
139
- onClose: j,
140
- adaptiveTitle: Me,
140
+ onClose: Z,
141
+ title: Me,
142
+ subTitle: Pe,
141
143
  windowWidth: t
142
- }, u = $();
143
- return /* @__PURE__ */ o.createElement(Dt, { ...r }, /* @__PURE__ */ o.createElement(Ct, null, u));
144
- }, We = (t) => {
145
- Y(t.value, t);
146
- }, Ke = () => {
147
- D({ focused: !0 });
144
+ };
145
+ return /* @__PURE__ */ o.createElement(kt, { ...r }, /* @__PURE__ */ o.createElement(Dt, null, X()));
146
+ }, Ke = (t) => {
147
+ j(t.value, t);
148
148
  }, qe = () => {
149
- f(!i());
150
- }, X = () => {
151
- h || (m.current = !0, f(!i()));
152
- }, He = (t) => {
153
- t.preventDefault();
149
+ D({ focused: !0 });
150
+ }, He = () => {
151
+ m(!i());
152
+ }, A = () => {
153
+ v || (p.current = !0, m(!i()));
154
154
  }, Ue = (t) => {
155
- const { altKey: r, keyCode: u } = t;
156
- if (u === k.esc && i()) {
157
- m.current = !0, f(!1);
155
+ t.preventDefault();
156
+ }, Ye = (t) => {
157
+ const { altKey: r, keyCode: s } = t;
158
+ if (s === k.esc && i()) {
159
+ p.current = !0, m(!1);
158
160
  return;
159
161
  }
160
- r && (u === k.up || u === k.down) && (t.preventDefault(), t.stopPropagation(), m.current = u === k.up, f(u === k.down));
161
- }, w = o.useRef(null), b = o.useRef(null), c = o.useRef(null), y = o.useRef(null);
162
+ r && (s === k.up || s === k.down) && (t.preventDefault(), t.stopPropagation(), p.current = s === k.up, m(s === k.down));
163
+ }, w = o.useRef(null), y = o.useRef(null), c = o.useRef(null), d = o.useRef(null);
162
164
  o.useImperativeHandle(
163
165
  w,
164
166
  () => ({
165
167
  props: n,
166
168
  get element() {
167
- return b.current;
169
+ return y.current;
168
170
  },
169
171
  get calendar() {
170
- return y.current;
172
+ return d.current;
171
173
  },
172
174
  get dateInput() {
173
175
  return c.current;
@@ -182,54 +184,56 @@ const ue = o.forwardRef((n, se) => {
182
184
  return T();
183
185
  },
184
186
  get value() {
185
- return d();
187
+ return f();
186
188
  },
187
189
  get mobileMode() {
188
- return s();
190
+ return u();
189
191
  },
190
- togglePopup: qe,
192
+ togglePopup: He,
191
193
  // Hidden Methods but still accessible
192
- focus: Ve
194
+ focus: Fe
193
195
  })
194
196
  ), o.useImperativeHandle(se, () => w.current);
195
- const O = o.useRef(void 0), P = o.useRef(void 0), Ye = o.useRef(null), m = o.useRef(!1), Z = o.useRef(!1), C = o.useRef(null), [p, $e] = o.useState({
197
+ const O = o.useRef(void 0), M = o.useRef(void 0), $e = o.useRef(null), p = o.useRef(!1), V = o.useRef(!1), C = o.useRef(null), [g, je] = o.useState({
196
198
  value: fe,
197
199
  show: de,
198
200
  focused: !1
199
- }), [, je] = o.useReducer((t) => t, !0), D = (t) => {
200
- $e((r) => ({ ...r, ...t }));
201
+ }), [, Xe] = o.useReducer((t) => t, !0), D = (t) => {
202
+ je((r) => ({ ...r, ...t }));
201
203
  };
202
204
  o.useEffect(() => {
203
- 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;
205
+ d.current && d.current.element && i() && !V.current && d.current.element.focus({ preventScroll: !0 }), u() && i() && !V.current && setTimeout(() => {
206
+ d.current && d.current.element && d.current.element.focus({ preventScroll: !0 });
207
+ }, 300), c.current && c.current.element && !i() && p.current && c.current.element.focus({ preventScroll: !0 }), V.current = i(), p.current = !1;
204
208
  }), o.useEffect(() => {
205
209
  var t;
206
- return C.current = re && window.ResizeObserver && new window.ResizeObserver((r) => Ae(r)), i() && je(), (t = B()) != null && t.body && C.current && C.current.observe(B().body), () => {
210
+ return C.current = re && window.ResizeObserver && new window.ResizeObserver((r) => Ve(r)), i() && Xe(), (t = B()) != null && t.body && C.current && C.current.observe(B().body), () => {
207
211
  var r;
208
- clearTimeout(Ye.current), (r = B()) != null && r.body && C.current && C.current.disconnect();
212
+ clearTimeout($e.current), (r = B()) != null && r.body && C.current && C.current.disconnect();
209
213
  };
210
214
  }, []);
211
- const G = N + "-popup-id", Xe = $(), Ze = _e(), Ge = d(), Je = xe(), Qe = Le(), J = !z || T().valid, Q = ce.toLanguageString(ie, ht[ie]), et = {
212
- disabled: h,
215
+ const G = L + "-popup-id", Ze = X(), Ge = xe(), Je = f(), Qe = Be(), et = We(), J = !W || T().valid, Q = ce.toLanguageString(ie, vt[ie]), tt = {
216
+ disabled: v,
213
217
  format: ve,
214
- formatPlaceholder: Pe,
215
- id: Se,
216
- ariaLabelledBy: Ee,
218
+ formatPlaceholder: Re,
219
+ id: Ee,
220
+ ariaLabelledBy: _e,
217
221
  ariaDescribedBy: n.ariaDescribedBy,
218
222
  ariaLabel: Oe,
219
223
  max: R,
220
224
  min: I,
221
225
  name: n.name,
222
- onChange: We,
226
+ onChange: Ke,
223
227
  required: n.required,
224
228
  _ref: c,
225
- tabIndex: i() ? -1 : we,
229
+ tabIndex: i() ? -1 : be,
226
230
  title: n.title,
227
231
  valid: T().valid,
228
- validationMessage: W,
229
- validityStyles: z,
230
- value: Ge,
232
+ validationMessage: q,
233
+ validityStyles: W,
234
+ value: Je,
231
235
  label: void 0,
232
- placeholder: p.focused ? null : n.placeholder,
236
+ placeholder: g.focused ? null : n.placeholder,
233
237
  ariaExpanded: i(),
234
238
  size: null,
235
239
  fillMode: null,
@@ -241,20 +245,20 @@ const ue = o.forwardRef((n, se) => {
241
245
  autoSwitchParts: Ce,
242
246
  autoSwitchKeys: De,
243
247
  allowCaretMode: n.allowCaretMode,
244
- inputAttributes: Re
248
+ inputAttributes: Ie
245
249
  }, ee = /* @__PURE__ */ o.createElement(
246
- it,
250
+ ut,
247
251
  {
248
- onFocus: Ke,
249
- onBlur: s() ? void 0 : j,
252
+ onFocus: qe,
253
+ onBlur: u() ? void 0 : Z,
250
254
  onSyncBlur: n.onBlur,
251
255
  onSyncFocus: n.onFocus
252
256
  },
253
257
  (t) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
254
258
  "span",
255
259
  {
256
- ...n.label ? {} : q,
257
- ref: b,
260
+ ...n.label ? {} : U,
261
+ ref: y,
258
262
  className: ae(
259
263
  "k-input",
260
264
  "k-datepicker",
@@ -263,57 +267,57 @@ const ue = o.forwardRef((n, se) => {
263
267
  [`k-rounded-${le.roundedMap[E] || E}`]: E,
264
268
  [`k-input-${_}`]: _,
265
269
  "k-invalid": !J,
266
- "k-required": H(),
267
- "k-disabled": h
270
+ "k-required": Y(),
271
+ "k-disabled": v
268
272
  },
269
273
  n.className
270
274
  ),
271
- onKeyDown: Ue,
275
+ onKeyDown: Ye,
272
276
  style: { width: n.width },
273
- onFocus: t.onFocus,
277
+ onFocus: u() ? A : t.onFocus,
274
278
  onBlur: t.onBlur,
275
- onClick: s() ? X : void 0
279
+ onClick: u() ? A : void 0
276
280
  },
277
281
  /* @__PURE__ */ o.createElement(
278
- Ze,
282
+ Ge,
279
283
  {
280
284
  _ref: c,
281
285
  ariaRole: "combobox",
282
286
  ariaExpanded: i(),
283
287
  ariaControls: G,
284
288
  autoFocus: ye,
285
- ...et
289
+ ...tt
286
290
  }
287
291
  ),
288
292
  /* @__PURE__ */ o.createElement(
289
- Je,
293
+ Qe,
290
294
  {
291
295
  type: "button",
292
296
  icon: "calendar",
293
- svgIcon: st,
297
+ svgIcon: ct,
294
298
  title: Q,
295
299
  className: "k-input-button",
296
300
  rounded: null,
297
- onClick: s() ? void 0 : X,
301
+ onClick: u() ? void 0 : A,
298
302
  "aria-label": Q,
299
303
  fillMode: _,
300
- onMouseDown: He
304
+ onMouseDown: Ue
301
305
  }
302
306
  ),
303
- !s() && Xe
304
- ), s() && Qe)
307
+ !u() && Ze
308
+ ), u() && et)
305
309
  );
306
310
  return n.label ? /* @__PURE__ */ o.createElement(
307
- yt,
311
+ Ct,
308
312
  {
309
313
  dateInput: c,
310
314
  label: n.label,
311
- editorId: N,
315
+ editorId: L,
312
316
  editorValid: J,
313
- editorDisabled: h,
317
+ editorDisabled: v,
314
318
  children: ee,
315
319
  style: { width: n.width },
316
- ...q
320
+ ...U
317
321
  }
318
322
  ) : ee;
319
323
  });
@@ -382,21 +386,22 @@ ue.propTypes = {
382
386
  fillMode: e.oneOf([null, "solid", "flat", "outline"]),
383
387
  adaptive: e.bool,
384
388
  adaptiveTitle: e.string,
389
+ adaptiveSubtitle: e.string,
385
390
  autoFocus: e.bool,
386
391
  inputAttributes: e.object
387
392
  };
388
393
  const l = {
389
394
  defaultShow: !1,
390
395
  defaultValue: null,
391
- dateInput: ct,
392
- calendar: dt,
396
+ dateInput: dt,
397
+ calendar: ft,
393
398
  toggleButton: wt,
394
- popup: nt,
395
- pickerWrap: bt,
399
+ popup: ot,
400
+ pickerWrap: yt,
396
401
  disabled: !1,
397
402
  format: "d",
398
- max: ft,
399
- min: mt,
403
+ max: mt,
404
+ min: pt,
400
405
  popupSettings: {},
401
406
  tabIndex: 0,
402
407
  weekNumber: !1,
@@ -405,10 +410,10 @@ const l = {
405
410
  rounded: "medium",
406
411
  fillMode: "solid",
407
412
  autoFocus: !1
408
- }, kt = ut();
413
+ }, Ot = st();
409
414
  ue.displayName = "KendoReactDatePicker";
410
415
  export {
411
416
  ue as DatePicker,
412
- kt as DatePickerPropsContext,
417
+ Ot as DatePickerPropsContext,
413
418
  l as datePickerDefaultProps
414
419
  };