@progress/kendo-react-dateinputs 11.0.0-develop.1 → 11.0.0-develop.10

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