@progress/kendo-react-dateinputs 14.5.0-develop.14 → 14.5.0-develop.16

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.
@@ -187,6 +187,16 @@ export interface DateInputProps<T extends DateInputHandle = any> extends FormCom
187
187
  * Obtaining the `ref` returns an object of type [DateInputHandle](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/dateinputhandle).
188
188
  */
189
189
  export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps<any> & React.RefAttributes<DateInputHandle>>;
190
+ /**
191
+ * @hidden
192
+ *
193
+ * Internal renderer that emits only the bare `<input class="k-input-inner">` element — no
194
+ * `.k-dateinput k-input` wrapper. Used by composite pickers (DatePicker, TimePicker,
195
+ * DateTimePicker) so the picker itself provides the wrapper, matching the theme spec markup.
196
+ *
197
+ * Not part of the public API; consume `DateInput` from outside the package.
198
+ */
199
+ export declare const DateInputInner: React.ForwardRefExoticComponent<DateInputProps<any> & React.RefAttributes<DateInputHandle>>;
190
200
  /**
191
201
  * @hidden
192
202
  */
@@ -211,7 +221,7 @@ export declare const dateInputDefaultProps: {
211
221
  autoSwitchParts: boolean;
212
222
  allowCaretMode: boolean;
213
223
  twoDigitYearMax: number;
214
- ariaHasPopup: string;
224
+ ariaHasPopup: undefined;
215
225
  autoFocus: boolean;
216
226
  };
217
227
  /**
@@ -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 pe=require("react"),t=require("prop-types"),x=require("@progress/kendo-date-math"),ne=require("@progress/kendo-react-buttons"),ae=require("@progress/kendo-svg-icons"),re=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),Ae=require("@progress/kendo-react-labels"),_e=require("@progress/kendo-dateinputs-common"),j=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),je=require("../timepicker/utils.js"),Be=require("../common/ClearButton.js"),Fe=require("./dateInputIntl.js");function He(e){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const m in e)if(m!=="default"){const C=Object.getOwnPropertyDescriptor(e,m);Object.defineProperty(b,m,C.get?C:{enumerable:!0,get:()=>e[m]})}}return b.default=e,Object.freeze(b)}const r=He(pe),ze="Please enter a valid value!",F=r.forwardRef((e,b)=>{var te;const m=o.useId(e.id),C=re.useInternationalization(),E=re.useLocalization(),le=o.useUnstyled(),H=o.usePropsContext(B,e).unstyled||le,{format:V=u.format,defaultValue:ue=u.defaultValue,size:ie=u.size,rounded:oe=u.rounded,fillMode:se=u.fillMode,formatPlaceholder:ce=u.formatPlaceholder,spinners:de=u.spinners,disabled:w=u.disabled,min:fe=u.min,max:me=u.max,minTime:ge=u.minTime,maxTime:ve=u.maxTime,validityStyles:be=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:ye=u.enableMouseWheel,autoCorrectParts:he=u.autoCorrectParts,autoSwitchParts:Ie=u.autoSwitchParts,allowCaretMode:Oe=u.allowCaretMode,twoDigitYearMax:De=u.twoDigitYearMax,ariaHasPopup:xe=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(B,e),S=n=>{Le(a=>({...a,...n}))},g=()=>N.value?N.value:R.current!==void 0?R.current:l.current&&l.current.value,U=()=>{const n=l.current&&l.current.currentText||"",a=g();return y!=null&&!N.focused&&!a?y:n},W=()=>e.required!==void 0?e.required:!1,q=()=>{const n=g()||e.value,a=fe,D=me,p=j.isInRange(n,a,D)&&je.isInTimeRange(n,ge,ve),A=z!==void 0,_=(!W()||n!=null)&&p,ke=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&D.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<a.getTime()||!1,valid:ke,valueMissing:n===null}},Ce=()=>{s.current&&s.current.focus()},K=()=>new Fe.DateInputIntl(C),T=()=>{const n=g();return{format:V,steps:e.steps,formatPlaceholder:ce,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:K(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:ye,autoCorrectParts:he,autoSwitchParts:Ie,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:De,allowCaretMode:Oe}},Ee=n=>{d.current&&d.current.classList.add("k-focus"),S({focused:!0}),h&&$(!0)},we=n=>{d.current&&d.current.classList.remove("k-focus"),S({focused:!1})},Se=(n,a)=>typeof n!=typeof a?!0:typeof n=="string"&&typeof a=="string"?n!==a:typeof n=="object"&&typeof a=="object"?JSON.stringify(n)!==JSON.stringify(a):!1,Te=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{R.current=g(),e.value===void 0&&S({value:n.value!==void 0?n.value:null}),Ne(),v.current=n,R.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Me=()=>new _e.DateInput(s.current,{...T(),format:Te(T().format),events:{focus:Ee,blur:we,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(q().valid?"":z||u.validationMessage)},$=r.useCallback(n=>{var a;if(s.current&&h&&n){const D=(l==null?void 0:l.current).currentText,p=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=D[p],_=D.split(A)[0].length;d.current&&d.current.classList.add("k-focus"),(a=l==null?void 0:l.current)==null||a.selectNearestSegment(_)}},[h]),Pe=n=>{!s.current||!l.current||J(n)},Re=n=>{n.preventDefault();const a=o.getActiveElement(document);s.current&&a!==s.current&&s.current.focus({preventScroll:!0})},f=n=>{const a=g();v.current&&e.onChange&&!x.isEqual(v.current.oldValue,a)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:M.current}),v.current=null},Ve=n=>{var a;(a=l.current)==null||a.modifyDateSegmentValue(1),f(n)},qe=n=>{var a;(a=l.current)==null||a.modifyDateSegmentValue(-1),f(n)},M=r.useRef(null),s=r.useRef(null),d=r.useRef(null);r.useImperativeHandle(M,()=>({props:e,get options(){return T()},get text(){return U()},get element(){return s.current},get name(){return e.name},get value(){return g()},get validity(){return q()},focus:Ce,updateOnPaste:Pe})),r.useImperativeHandle(b,()=>M.current);const l=r.useRef(null),P=r.useRef(null),L=r.useRef(!1),R=r.useRef(null),v=r.useRef(null),I=r.useRef(e),[N,Le]=r.useState({value:e.value===void 0?ue:null,focused:!1}),[,Ne]=r.useReducer(n=>n+1,0);r.useLayoutEffect(()=>{L.current||(l.current=Me(),P.current=l.current.dateObject,L.current=!0)},[]),r.useEffect(()=>(Z(),L.current||d.current&&d.current.addEventListener("wheel",X,{passive:!1}),h&&(S({focused:!0}),$(!0)),()=>{d.current&&d.current.removeEventListener("wheel",X)}),[]),r.useEffect(()=>{Z(),l.current&&(P.current=l.current.dateObject,(Se(I.current.format,V)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||K().locale!==l.current.options.intlService.locale)&&l.current.setOptions(T(),!0),I.current.value!==e.value&&(P.current.getValue()!==null||e.value!==null)&&P.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:V,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||m+"-accessibility-id",O=H&&H.uDateInput,Q=U(),k=!be||q().valid;r.useImperativeHandle(e._ref,()=>M.current);const ee=r.createElement("span",{ref:n=>{d.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:O,size:ie,fillMode:se,rounded:oe,disabled:w,required:W(),invalid:!k}),e.className)},r.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||"textbox",readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:w,title:e.title!==void 0?e.title:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:O})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":xe,"aria-disabled":w,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!k,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:e.name,...e.inputAttributes}),e.children,e.clearButton&&e.value&&r.createElement(Be,{onClick:Y,key:"clearbutton"}),de&&r.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:O})),onMouseDown:Re},r.createElement(ne.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:O})),icon:"chevron-up",svgIcon:ae.chevronUpIcon,"aria-label":E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Ve}),r.createElement(ne.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:O})),icon:"chevron-down",svgIcon:ae.chevronDownIcon,"aria-label":E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:qe})));return e.label?r.createElement(Ae.FloatingLabel,{label:e.label,editorId:G,editorValue:(te=s.current)==null?void 0:te.value,editorValid:k,editorDisabled:w,children:ee,style:{width:e.width}}):ee});F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(t.string),t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:j.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:j.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:x.cloneDate(i.MAX_DATE),min:x.cloneDate(i.MIN_DATE),minTime:x.cloneDate(i.MIN_TIME),maxTime:x.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:ze,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},B=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputPropsContext=B;exports.dateInputDefaultProps=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("react"),t=require("prop-types"),E=require("@progress/kendo-date-math"),re=require("@progress/kendo-react-buttons"),le=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),He=require("@progress/kendo-react-labels"),ze=require("@progress/kendo-dateinputs-common"),B=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ke=require("../timepicker/utils.js"),Ue=require("../common/ClearButton.js"),We=require("./dateInputIntl.js");function Je(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const g in e)if(g!=="default"){const C=Object.getOwnPropertyDescriptor(e,g);Object.defineProperty(d,g,C.get?C:{enumerable:!0,get:()=>e[g]})}}return d.default=e,Object.freeze(d)}const a=Je(Fe),Ye="Please enter a valid value!";function ie(e,d){var ne,ae;const g=o.useId(e.id),C=ue.useInternationalization(),x=ue.useLocalization(),se=o.useUnstyled(),H=o.usePropsContext(j,e).unstyled||se,{format:p=u.format,defaultValue:ce=u.defaultValue,size:de=u.size,rounded:fe=u.rounded,fillMode:me=u.fillMode,formatPlaceholder:ge=u.formatPlaceholder,spinners:ve=u.spinners,disabled:w=u.disabled,min:be=u.min,max:ye=u.max,minTime:he=u.minTime,maxTime:Ie=u.maxTime,validityStyles:De=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:Oe=u.enableMouseWheel,autoCorrectParts:Ee=u.autoCorrectParts,autoSwitchParts:Ce=u.autoSwitchParts,allowCaretMode:xe=u.allowCaretMode,twoDigitYearMax:we=u.twoDigitYearMax,ariaHasPopup:Te=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(j,e),T=n=>{Ae(r=>({...r,...n}))},v=()=>q.value?q.value:R.current!==void 0?R.current:l.current&&l.current.value,K=()=>{const n=l.current&&l.current.currentText||"",r=v();return y!=null&&!q.focused&&!r?y:n},U=()=>e.required!==void 0?e.required:!1,V=()=>{const n=v()||e.value,r=be,O=ye,k=B.isInRange(n,r,O)&&Ke.isInTimeRange(n,he,Ie),A=z!==void 0,_=(!U()||n!=null)&&k,je=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&O.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<r.getTime()||!1,valid:je,valueMissing:n===null}},Se=()=>{s.current&&s.current.focus()},W=()=>new We.DateInputIntl(C),S=()=>{const n=v();return{format:p,steps:e.steps,formatPlaceholder:ge,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:W(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:Oe,autoCorrectParts:Ee,autoSwitchParts:Ce,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:we,allowCaretMode:xe}},Me=n=>{f.current&&f.current.classList.add("k-focus"),T({focused:!0}),h&&$(!0)},Pe=n=>{f.current&&f.current.classList.remove("k-focus"),T({focused:!1})},Re=(n,r)=>typeof n!=typeof r?!0:typeof n=="string"&&typeof r=="string"?n!==r:typeof n=="object"&&typeof r=="object"?JSON.stringify(n)!==JSON.stringify(r):!1,pe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{R.current=v(),e.value===void 0&&T({value:n.value!==void 0?n.value:null}),_e(),b.current=n,R.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Ve=()=>new ze.DateInput(s.current,{...S(),format:pe(S().format),events:{focus:Me,blur:Pe,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(V().valid?"":z||u.validationMessage)},$=a.useCallback(n=>{var r;if(s.current&&h&&n){const O=(l==null?void 0:l.current).currentText,k=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=O[k],_=O.split(A)[0].length;f.current&&f.current.classList.add("k-focus"),(r=l==null?void 0:l.current)==null||r.selectNearestSegment(_)}},[h]),Ne=n=>{!s.current||!l.current||J(n)},qe=n=>{n.preventDefault();const r=o.getActiveElement(document);s.current&&r!==s.current&&s.current.focus({preventScroll:!0})},m=n=>{const r=v();b.current&&e.onChange&&!E.isEqual(b.current.oldValue,r)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:b.current.event,value:b.current.value,target:M.current}),b.current=null},Le=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(1),m(n)},ke=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(-1),m(n)},M=a.useRef(null),s=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(M,()=>({props:e,get options(){return S()},get text(){return K()},get element(){return s.current},get name(){return e.name},get value(){return v()},get validity(){return V()},focus:Se,updateOnPaste:Ne})),a.useImperativeHandle(d,()=>M.current);const l=a.useRef(null),P=a.useRef(null),N=a.useRef(!1),R=a.useRef(null),b=a.useRef(null),I=a.useRef(e),[q,Ae]=a.useState({value:e.value===void 0?ce:null,focused:!1}),[,_e]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{N.current||(l.current=Ve(),P.current=l.current.dateObject,N.current=!0)},[]),a.useEffect(()=>{Z();const n=f.current||s.current;return N.current||n&&n.addEventListener("wheel",X,{passive:!1}),h&&(T({focused:!0}),$(!0)),()=>{n&&n.removeEventListener("wheel",X)}},[]),a.useEffect(()=>{Z(),l.current&&(P.current=l.current.dateObject,(Re(I.current.format,p)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||W().locale!==l.current.options.intlService.locale)&&l.current.setOptions(S(),!0),I.current.value!==e.value&&(P.current.getValue()!==null||e.value!==null)&&P.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:p,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||g+"-accessibility-id",D=H&&H.uDateInput,Q=K(),L=!De||V().valid;a.useImperativeHandle(e._ref,()=>M.current);const ee=a.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||void 0,readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:w,title:(ne=e.title)!=null?ne:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:D})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":Te,"aria-disabled":w||void 0,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!L||void 0,onKeyDown:m,onChange:m,onWheel:m,onInput:m,onClick:m,name:e.name,...e.inputAttributes}),te=a.createElement("span",{ref:n=>{f.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:D,size:de,fillMode:me,rounded:fe,disabled:w,required:U(),invalid:!L}),e.className)},ee,e.children,e.clearButton&&e.value&&a.createElement(Ue,{onClick:Y,key:"clearbutton"}),ve&&a.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:D})),onMouseDown:qe},a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:D})),icon:"chevron-up",svgIcon:le.chevronUpIcon,"aria-label":x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Le}),a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:D})),icon:"chevron-down",svgIcon:le.chevronDownIcon,"aria-label":x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:ke}))),Be=e.label?a.createElement(He.FloatingLabel,{label:e.label,editorId:G,editorValue:(ae=s.current)==null?void 0:ae.value,editorValid:L,editorDisabled:w,children:te,style:{width:e.width}}):te;return{inputElement:ee,wrappedElement:Be}}const F=a.forwardRef((e,d)=>ie(e,d).wrappedElement),oe=a.forwardRef((e,d)=>ie(e,d).inputElement);oe.displayName="KendoReactDateInputInner";F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(t.string),t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:B.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:B.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:E.cloneDate(i.MAX_DATE),min:E.cloneDate(i.MIN_DATE),minTime:E.cloneDate(i.MIN_TIME),maxTime:E.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Ye,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:void 0,autoFocus:!1},j=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputInner=oe;exports.DateInputPropsContext=j;exports.dateInputDefaultProps=u;
@@ -5,145 +5,146 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as r from "react";
8
+ import * as a from "react";
9
9
  import e from "prop-types";
10
- import { cloneDate as M, isEqual as Fe } from "@progress/kendo-date-math";
11
- import { Button as Q } from "@progress/kendo-react-buttons";
12
- import { chevronUpIcon as He, chevronDownIcon as Be } from "@progress/kendo-svg-icons";
13
- import { useInternationalization as qe, useLocalization as ze } from "@progress/kendo-react-intl";
14
- import { useId as je, useUnstyled as Ue, usePropsContext as ee, classNames as b, uDateInput as O, createPropsContext as We, getActiveElement as te } from "@progress/kendo-react-common";
15
- import { FloatingLabel as Ke } from "@progress/kendo-react-labels";
16
- import { DateInput as Je } from "@progress/kendo-dateinputs-common";
17
- import { DEFAULT_FORMAT_PLACEHOLDER as Ye, DEFAULT_FORMAT as Xe, isInRange as Ze } from "./utils.mjs";
18
- import { MAX_TIME as Ge, MIN_TIME as $e, MIN_DATE as Qe, MAX_DATE as et, nullable as u } from "../utils.mjs";
19
- import { increaseValue as S, messages as P, decreaseValue as R } from "../messages/index.mjs";
20
- import { isInTimeRange as tt } from "../timepicker/utils.mjs";
21
- import nt from "../common/ClearButton.mjs";
22
- import { DateInputIntl as at } from "./dateInputIntl.mjs";
23
- const rt = "Please enter a valid value!", ae = r.forwardRef((t, re) => {
24
- var $;
25
- const ie = je(t.id), le = qe(), E = ze(), oe = Ue(), H = ee(ne, t).unstyled || oe, {
10
+ import { cloneDate as S, isEqual as ze } from "@progress/kendo-date-math";
11
+ import { Button as ne } from "@progress/kendo-react-buttons";
12
+ import { chevronUpIcon as je, chevronDownIcon as Ke } from "@progress/kendo-svg-icons";
13
+ import { useInternationalization as Ue, useLocalization as We } from "@progress/kendo-react-intl";
14
+ import { createPropsContext as Je, useId as Ye, useUnstyled as Xe, usePropsContext as ae, classNames as I, uDateInput as E, getActiveElement as re } from "@progress/kendo-react-common";
15
+ import { FloatingLabel as Ze } from "@progress/kendo-react-labels";
16
+ import { DateInput as Ge } from "@progress/kendo-dateinputs-common";
17
+ import { DEFAULT_FORMAT_PLACEHOLDER as $e, DEFAULT_FORMAT as Qe, isInRange as et } from "./utils.mjs";
18
+ import { MAX_TIME as tt, MIN_TIME as nt, MIN_DATE as at, MAX_DATE as rt, nullable as u } from "../utils.mjs";
19
+ import { increaseValue as p, messages as P, decreaseValue as R } from "../messages/index.mjs";
20
+ import { isInTimeRange as it } from "../timepicker/utils.mjs";
21
+ import lt from "../common/ClearButton.mjs";
22
+ import { DateInputIntl as ot } from "./dateInputIntl.mjs";
23
+ const ut = "Please enter a valid value!";
24
+ function le(t, m) {
25
+ var ee, te;
26
+ const ue = Ye(t.id), se = Ue(), O = We(), ce = Xe(), H = ae(ie, t).unstyled || ce, {
26
27
  format: L = l.format,
27
- defaultValue: ue = l.defaultValue,
28
- size: se = l.size,
29
- rounded: ce = l.rounded,
30
- fillMode: de = l.fillMode,
31
- formatPlaceholder: fe = l.formatPlaceholder,
32
- spinners: me = l.spinners,
33
- disabled: I = l.disabled,
34
- min: ge = l.min,
35
- max: ve = l.max,
36
- minTime: he = l.minTime,
37
- maxTime: ye = l.maxTime,
38
- validityStyles: be = l.validityStyles,
39
- validationMessage: B = l.validationMessage,
40
- placeholder: m = l.placeholder,
41
- enableMouseWheel: Oe = l.enableMouseWheel,
42
- autoCorrectParts: Ee = l.autoCorrectParts,
43
- autoSwitchParts: Ie = l.autoSwitchParts,
44
- allowCaretMode: xe = l.allowCaretMode,
45
- twoDigitYearMax: Ce = l.twoDigitYearMax,
46
- ariaHasPopup: we = l.ariaHasPopup,
47
- autoFocus: g = l.autoFocus
48
- } = ee(ne, t), x = (n) => {
49
- pe((a) => ({ ...a, ...n }));
50
- }, d = () => A.value ? A.value : T.current !== void 0 ? T.current : i.current && i.current.value, q = () => {
51
- const n = i.current && i.current.currentText || "", a = d();
52
- return m != null && !A.focused && !a ? m : n;
53
- }, z = () => t.required !== void 0 ? t.required : !1, V = () => {
54
- const n = d() || t.value, a = ge, y = ve, k = Ze(n, a, y) && tt(n, he, ye), _ = B !== void 0, F = (!z() || n != null) && k, _e = t.valid !== void 0 ? t.valid : F;
28
+ defaultValue: de = l.defaultValue,
29
+ size: fe = l.size,
30
+ rounded: me = l.rounded,
31
+ fillMode: ge = l.fillMode,
32
+ formatPlaceholder: ve = l.formatPlaceholder,
33
+ spinners: he = l.spinners,
34
+ disabled: w = l.disabled,
35
+ min: ye = l.min,
36
+ max: be = l.max,
37
+ minTime: Ie = l.minTime,
38
+ maxTime: Ee = l.maxTime,
39
+ validityStyles: Oe = l.validityStyles,
40
+ validationMessage: q = l.validationMessage,
41
+ placeholder: g = l.placeholder,
42
+ enableMouseWheel: we = l.enableMouseWheel,
43
+ autoCorrectParts: xe = l.autoCorrectParts,
44
+ autoSwitchParts: Ce = l.autoSwitchParts,
45
+ allowCaretMode: De = l.allowCaretMode,
46
+ twoDigitYearMax: Te = l.twoDigitYearMax,
47
+ ariaHasPopup: Me = l.ariaHasPopup,
48
+ autoFocus: v = l.autoFocus
49
+ } = ae(ie, t), x = (n) => {
50
+ Fe((r) => ({ ...r, ...n }));
51
+ }, d = () => A.value ? A.value : M.current !== void 0 ? M.current : i.current && i.current.value, z = () => {
52
+ const n = i.current && i.current.currentText || "", r = d();
53
+ return g != null && !A.focused && !r ? g : n;
54
+ }, j = () => t.required !== void 0 ? t.required : !1, V = () => {
55
+ const n = d() || t.value, r = ye, b = be, _ = et(n, r, b) && it(n, Ie, Ee), F = q !== void 0, B = (!j() || n != null) && _, qe = t.valid !== void 0 ? t.valid : B;
55
56
  return {
56
- customError: _,
57
- rangeOverflow: n && y.getTime() < n.getTime() || !1,
58
- rangeUnderflow: n && n.getTime() < a.getTime() || !1,
59
- valid: _e,
57
+ customError: F,
58
+ rangeOverflow: n && b.getTime() < n.getTime() || !1,
59
+ rangeUnderflow: n && n.getTime() < r.getTime() || !1,
60
+ valid: qe,
60
61
  valueMissing: n === null
61
62
  };
62
- }, De = () => {
63
+ }, Se = () => {
63
64
  o.current && o.current.focus();
64
- }, j = () => new at(le), C = () => {
65
+ }, K = () => new ot(se), C = () => {
65
66
  const n = d();
66
67
  return {
67
68
  format: L,
68
69
  steps: t.steps,
69
- formatPlaceholder: fe,
70
- placeholder: m,
70
+ formatPlaceholder: ve,
71
+ placeholder: g,
71
72
  selectPreviousSegmentOnBackspace: !0,
72
73
  value: t.value !== void 0 ? t.value : n,
73
- intlService: j(),
74
+ intlService: K(),
74
75
  autoFill: t.autoFill !== void 0 ? t.autoFill : !1,
75
- enableMouseWheel: Oe,
76
- autoCorrectParts: Ee,
77
- autoSwitchParts: Ie,
76
+ enableMouseWheel: we,
77
+ autoCorrectParts: xe,
78
+ autoSwitchParts: Ce,
78
79
  autoSwitchKeys: t.autoSwitchKeys || [],
79
- twoDigitYearMax: Ce,
80
- allowCaretMode: xe
80
+ twoDigitYearMax: Te,
81
+ allowCaretMode: De
81
82
  };
82
- }, Te = (n) => {
83
- s.current && s.current.classList.add("k-focus"), x({ focused: !0 }), g && Y(!0);
84
- }, Me = (n) => {
83
+ }, pe = (n) => {
84
+ s.current && s.current.classList.add("k-focus"), x({ focused: !0 }), v && X(!0);
85
+ }, Pe = (n) => {
85
86
  s.current && s.current.classList.remove("k-focus"), x({ focused: !1 });
86
- }, Se = (n, a) => typeof n != typeof a ? !0 : typeof n == "string" && typeof a == "string" ? n !== a : typeof n == "object" && typeof a == "object" ? JSON.stringify(n) !== JSON.stringify(a) : !1, Pe = (n) => typeof n == "string" ? n : {
87
+ }, Re = (n, r) => typeof n != typeof r ? !0 : typeof n == "string" && typeof r == "string" ? n !== r : typeof n == "object" && typeof r == "object" ? JSON.stringify(n) !== JSON.stringify(r) : !1, Le = (n) => typeof n == "string" ? n : {
87
88
  inputFormat: n,
88
89
  displayFormat: n
89
90
  }, U = (n) => {
90
- T.current = d(), t.value === void 0 && x({ value: n.value !== void 0 ? n.value : null }), ke(), f.current = n, T.current = void 0;
91
+ M.current = d(), t.value === void 0 && x({ value: n.value !== void 0 ? n.value : null }), Be(), f.current = n, M.current = void 0;
91
92
  }, W = (n) => {
92
93
  t.onChange && t.onChange(n);
93
- }, K = (n) => {
94
- te(document) === o.current && n.preventDefault();
95
- }, Re = () => new Je(o.current, {
94
+ }, J = (n) => {
95
+ re(document) === o.current && n.preventDefault();
96
+ }, Ve = () => new Ge(o.current, {
96
97
  ...C(),
97
- format: Pe(C().format),
98
+ format: Le(C().format),
98
99
  events: {
99
- focus: Te,
100
- blur: Me,
100
+ focus: pe,
101
+ blur: Pe,
101
102
  valueChange: U,
102
103
  click: W
103
104
  }
104
- }), J = () => {
105
+ }), Y = () => {
105
106
  o.current && o.current.setCustomValidity && o.current.setCustomValidity(
106
- V().valid ? "" : B || l.validationMessage
107
+ V().valid ? "" : q || l.validationMessage
107
108
  );
108
- }, Y = r.useCallback(
109
+ }, X = a.useCallback(
109
110
  (n) => {
110
- var a;
111
- if (o.current && g && n) {
112
- const y = (i == null ? void 0 : i.current).currentText, k = (i == null ? void 0 : i.current).currentText.search(/[^a-zA-Z]/), _ = y[k], F = y.split(_)[0].length;
113
- s.current && s.current.classList.add("k-focus"), (a = i == null ? void 0 : i.current) == null || a.selectNearestSegment(F);
111
+ var r;
112
+ if (o.current && v && n) {
113
+ const b = (i == null ? void 0 : i.current).currentText, _ = (i == null ? void 0 : i.current).currentText.search(/[^a-zA-Z]/), F = b[_], B = b.split(F)[0].length;
114
+ s.current && s.current.classList.add("k-focus"), (r = i == null ? void 0 : i.current) == null || r.selectNearestSegment(B);
114
115
  }
115
116
  },
116
- [g]
117
- ), Le = (n) => {
117
+ [v]
118
+ ), Ne = (n) => {
118
119
  !o.current || !i.current || U(n);
119
- }, Ve = (n) => {
120
+ }, Ae = (n) => {
120
121
  n.preventDefault();
121
- const a = te(document);
122
- o.current && a !== o.current && o.current.focus({ preventScroll: !0 });
122
+ const r = re(document);
123
+ o.current && r !== o.current && o.current.focus({ preventScroll: !0 });
123
124
  }, c = (n) => {
124
- const a = d();
125
- f.current && t.onChange && !Fe(f.current.oldValue, a) && t.onChange.call(void 0, {
125
+ const r = d();
126
+ f.current && t.onChange && !ze(f.current.oldValue, r) && t.onChange.call(void 0, {
126
127
  syntheticEvent: n,
127
128
  nativeEvent: f.current.event,
128
129
  value: f.current.value,
129
- target: w.current
130
+ target: D.current
130
131
  }), f.current = null;
131
- }, Ne = (n) => {
132
- var a;
133
- (a = i.current) == null || a.modifyDateSegmentValue(1), c(n);
134
- }, Ae = (n) => {
135
- var a;
136
- (a = i.current) == null || a.modifyDateSegmentValue(-1), c(n);
137
- }, w = r.useRef(null), o = r.useRef(null), s = r.useRef(null);
138
- r.useImperativeHandle(
139
- w,
132
+ }, ke = (n) => {
133
+ var r;
134
+ (r = i.current) == null || r.modifyDateSegmentValue(1), c(n);
135
+ }, _e = (n) => {
136
+ var r;
137
+ (r = i.current) == null || r.modifyDateSegmentValue(-1), c(n);
138
+ }, D = a.useRef(null), o = a.useRef(null), s = a.useRef(null);
139
+ a.useImperativeHandle(
140
+ D,
140
141
  () => ({
141
142
  props: t,
142
143
  get options() {
143
144
  return C();
144
145
  },
145
146
  get text() {
146
- return q();
147
+ return z();
147
148
  },
148
149
  get element() {
149
150
  return o.current;
@@ -158,20 +159,24 @@ const rt = "Please enter a valid value!", ae = r.forwardRef((t, re) => {
158
159
  return V();
159
160
  },
160
161
  // hidden methods
161
- focus: De,
162
- updateOnPaste: Le
162
+ focus: Se,
163
+ updateOnPaste: Ne
163
164
  })
164
- ), r.useImperativeHandle(re, () => w.current);
165
- const i = r.useRef(null), D = r.useRef(null), N = r.useRef(!1), T = r.useRef(null), f = r.useRef(null), v = r.useRef(t), [A, pe] = r.useState({
166
- value: t.value === void 0 ? ue : null,
165
+ ), a.useImperativeHandle(m, () => D.current);
166
+ const i = a.useRef(null), T = a.useRef(null), N = a.useRef(!1), M = a.useRef(null), f = a.useRef(null), h = a.useRef(t), [A, Fe] = a.useState({
167
+ value: t.value === void 0 ? de : null,
167
168
  focused: !1
168
- }), [, ke] = r.useReducer((n) => n + 1, 0);
169
- r.useLayoutEffect(() => {
170
- N.current || (i.current = Re(), D.current = i.current.dateObject, N.current = !0);
171
- }, []), r.useEffect(() => (J(), N.current || s.current && s.current.addEventListener("wheel", K, { passive: !1 }), g && (x({ focused: !0 }), Y(!0)), () => {
172
- s.current && s.current.removeEventListener("wheel", K);
173
- }), []), r.useEffect(() => {
174
- J(), i.current && (D.current = i.current.dateObject, (Se(v.current.format, L) || v.current.readonly !== t.readonly || JSON.stringify(v.current.steps) !== JSON.stringify(t.steps) || j().locale !== i.current.options.intlService.locale) && i.current.setOptions(C(), !0), v.current.value !== t.value && (D.current.getValue() !== null || t.value !== null) && D.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (i.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (i.current.options.placeholder = m), i.current.refreshElementValue(), v.current = {
169
+ }), [, Be] = a.useReducer((n) => n + 1, 0);
170
+ a.useLayoutEffect(() => {
171
+ N.current || (i.current = Ve(), T.current = i.current.dateObject, N.current = !0);
172
+ }, []), a.useEffect(() => {
173
+ Y();
174
+ const n = s.current || o.current;
175
+ return N.current || n && n.addEventListener("wheel", J, { passive: !1 }), v && (x({ focused: !0 }), X(!0)), () => {
176
+ n && n.removeEventListener("wheel", J);
177
+ };
178
+ }, []), a.useEffect(() => {
179
+ Y(), i.current && (T.current = i.current.dateObject, (Re(h.current.format, L) || h.current.readonly !== t.readonly || JSON.stringify(h.current.steps) !== JSON.stringify(t.steps) || K().locale !== i.current.options.intlService.locale) && i.current.setOptions(C(), !0), h.current.value !== t.value && (T.current.getValue() !== null || t.value !== null) && T.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (i.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (i.current.options.placeholder = g), i.current.refreshElementValue(), h.current = {
175
180
  format: L,
176
181
  readonly: t.readonly,
177
182
  ariaExpanded: t.ariaExpanded,
@@ -179,9 +184,45 @@ const rt = "Please enter a valid value!", ae = r.forwardRef((t, re) => {
179
184
  value: t.value
180
185
  });
181
186
  });
182
- const X = t.id || ie + "-accessibility-id", h = H && H.uDateInput, Z = q(), p = !be || V().valid;
183
- r.useImperativeHandle(t._ref, () => w.current);
184
- const G = /* @__PURE__ */ r.createElement(
187
+ const Z = t.id || ue + "-accessibility-id", y = H && H.uDateInput, G = z(), k = !Oe || V().valid;
188
+ a.useImperativeHandle(t._ref, () => D.current);
189
+ const $ = /* @__PURE__ */ a.createElement(
190
+ "input",
191
+ {
192
+ ref: (n) => {
193
+ o.current = n;
194
+ },
195
+ role: t.ariaRole || void 0,
196
+ readOnly: t.readonly,
197
+ tabIndex: t.tabIndex || 0,
198
+ disabled: w,
199
+ title: (ee = t.title) != null ? ee : G,
200
+ type: "text",
201
+ spellCheck: !1,
202
+ autoComplete: "off",
203
+ autoCorrect: "off",
204
+ autoFocus: v,
205
+ className: I(E.inputInner({ c: y })),
206
+ id: Z,
207
+ value: G,
208
+ "aria-label": t.ariaLabel,
209
+ "aria-labelledby": t.ariaLabelledBy,
210
+ "aria-describedby": t.ariaDescribedBy,
211
+ "aria-haspopup": Me,
212
+ "aria-disabled": w || void 0,
213
+ "aria-expanded": t.ariaExpanded,
214
+ "aria-controls": t.ariaControls,
215
+ "aria-required": t.required,
216
+ "aria-invalid": !k || void 0,
217
+ onKeyDown: c,
218
+ onChange: c,
219
+ onWheel: c,
220
+ onInput: c,
221
+ onClick: c,
222
+ name: t.name,
223
+ ...t.inputAttributes
224
+ }
225
+ ), Q = /* @__PURE__ */ a.createElement(
185
226
  "span",
186
227
  {
187
228
  ref: (n) => {
@@ -189,98 +230,64 @@ const rt = "Please enter a valid value!", ae = r.forwardRef((t, re) => {
189
230
  },
190
231
  style: t.label ? void 0 : { width: t.width },
191
232
  dir: t.dir,
192
- className: b(
193
- O.wrapper({
194
- c: h,
195
- size: se,
196
- fillMode: de,
197
- rounded: ce,
198
- disabled: I,
199
- required: z(),
200
- invalid: !p
233
+ className: I(
234
+ E.wrapper({
235
+ c: y,
236
+ size: fe,
237
+ fillMode: ge,
238
+ rounded: me,
239
+ disabled: w,
240
+ required: j(),
241
+ invalid: !k
201
242
  }),
202
243
  t.className
203
244
  )
204
245
  },
205
- /* @__PURE__ */ r.createElement(
206
- "input",
207
- {
208
- ref: (n) => {
209
- o.current = n;
210
- },
211
- role: t.ariaRole || "textbox",
212
- readOnly: t.readonly,
213
- tabIndex: t.tabIndex || 0,
214
- disabled: I,
215
- title: t.title !== void 0 ? t.title : Z,
216
- type: "text",
217
- spellCheck: !1,
218
- autoComplete: "off",
219
- autoCorrect: "off",
220
- autoFocus: g,
221
- className: b(O.inputInner({ c: h })),
222
- id: X,
223
- value: Z,
224
- "aria-label": t.ariaLabel,
225
- "aria-labelledby": t.ariaLabelledBy,
226
- "aria-describedby": t.ariaDescribedBy,
227
- "aria-haspopup": we,
228
- "aria-disabled": I,
229
- "aria-expanded": t.ariaExpanded,
230
- "aria-controls": t.ariaControls,
231
- "aria-required": t.required,
232
- "aria-invalid": !p,
233
- onKeyDown: c,
234
- onChange: c,
235
- onWheel: c,
236
- onInput: c,
237
- onClick: c,
238
- name: t.name,
239
- ...t.inputAttributes
240
- }
241
- ),
246
+ $,
242
247
  t.children,
243
- t.clearButton && t.value && /* @__PURE__ */ r.createElement(nt, { onClick: W, key: "clearbutton" }),
244
- me && /* @__PURE__ */ r.createElement("span", { className: b(O.inputSpinner({ c: h })), onMouseDown: Ve }, /* @__PURE__ */ r.createElement(
245
- Q,
248
+ t.clearButton && t.value && /* @__PURE__ */ a.createElement(lt, { onClick: W, key: "clearbutton" }),
249
+ he && /* @__PURE__ */ a.createElement("span", { className: I(E.inputSpinner({ c: y })), onMouseDown: Ae }, /* @__PURE__ */ a.createElement(
250
+ ne,
246
251
  {
247
252
  tabIndex: -1,
248
253
  type: "button",
249
- className: b(O.spinnerIncrease({ c: h })),
254
+ className: I(E.spinnerIncrease({ c: y })),
250
255
  icon: "chevron-up",
251
- svgIcon: He,
252
- "aria-label": E.toLanguageString(S, P[S]),
253
- title: E.toLanguageString(S, P[S]),
254
- onClick: Ne
256
+ svgIcon: je,
257
+ "aria-label": O.toLanguageString(p, P[p]),
258
+ title: O.toLanguageString(p, P[p]),
259
+ onClick: ke
255
260
  }
256
- ), /* @__PURE__ */ r.createElement(
257
- Q,
261
+ ), /* @__PURE__ */ a.createElement(
262
+ ne,
258
263
  {
259
264
  tabIndex: -1,
260
265
  type: "button",
261
- className: b(O.spinnerDecrease({ c: h })),
266
+ className: I(E.spinnerDecrease({ c: y })),
262
267
  icon: "chevron-down",
263
- svgIcon: Be,
264
- "aria-label": E.toLanguageString(R, P[R]),
265
- title: E.toLanguageString(R, P[R]),
266
- onClick: Ae
268
+ svgIcon: Ke,
269
+ "aria-label": O.toLanguageString(R, P[R]),
270
+ title: O.toLanguageString(R, P[R]),
271
+ onClick: _e
267
272
  }
268
273
  ))
269
- );
270
- return t.label ? /* @__PURE__ */ r.createElement(
271
- Ke,
274
+ ), He = t.label ? /* @__PURE__ */ a.createElement(
275
+ Ze,
272
276
  {
273
277
  label: t.label,
274
- editorId: X,
275
- editorValue: ($ = o.current) == null ? void 0 : $.value,
276
- editorValid: p,
277
- editorDisabled: I,
278
- children: G,
278
+ editorId: Z,
279
+ editorValue: (te = o.current) == null ? void 0 : te.value,
280
+ editorValid: k,
281
+ editorDisabled: w,
282
+ children: Q,
279
283
  style: { width: t.width }
280
284
  }
281
- ) : G;
282
- });
283
- ae.propTypes = {
285
+ ) : Q;
286
+ return { inputElement: $, wrappedElement: He };
287
+ }
288
+ const oe = a.forwardRef((t, m) => le(t, m).wrappedElement), st = a.forwardRef((t, m) => le(t, m).inputElement);
289
+ st.displayName = "KendoReactDateInputInner";
290
+ oe.propTypes = {
284
291
  value: e.instanceOf(Date),
285
292
  format: e.oneOfType([
286
293
  u(e.string),
@@ -354,32 +361,33 @@ ae.propTypes = {
354
361
  inputAttributes: e.object
355
362
  };
356
363
  const l = {
357
- format: Xe,
364
+ format: Qe,
358
365
  defaultValue: null,
359
366
  size: void 0,
360
367
  rounded: void 0,
361
368
  fillMode: void 0,
362
- formatPlaceholder: Ye,
369
+ formatPlaceholder: $e,
363
370
  spinners: !1,
364
371
  disabled: !1,
365
- max: M(et),
366
- min: M(Qe),
367
- minTime: M($e),
368
- maxTime: M(Ge),
372
+ max: S(rt),
373
+ min: S(at),
374
+ minTime: S(nt),
375
+ maxTime: S(tt),
369
376
  validityStyles: !0,
370
- validationMessage: rt,
377
+ validationMessage: ut,
371
378
  placeholder: null,
372
379
  enableMouseWheel: !0,
373
380
  autoCorrectParts: !0,
374
381
  autoSwitchParts: !0,
375
382
  allowCaretMode: !1,
376
383
  twoDigitYearMax: 68,
377
- ariaHasPopup: "grid",
384
+ ariaHasPopup: void 0,
378
385
  autoFocus: !1
379
- }, ne = We();
380
- ae.displayName = "KendoReactDateInput";
386
+ }, ie = Je();
387
+ oe.displayName = "KendoReactDateInput";
381
388
  export {
382
- ae as DateInput,
383
- ne as DateInputPropsContext,
389
+ oe as DateInput,
390
+ st as DateInputInner,
391
+ ie as DateInputPropsContext,
384
392
  l as dateInputDefaultProps
385
393
  };