@progress/kendo-react-dateinputs 9.4.0-develop.18 → 9.4.0-develop.2

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.
Files changed (108) hide show
  1. package/NOTICE.txt +51 -40
  2. package/calendar/components/Calendar.js +1 -1
  3. package/calendar/components/Calendar.mjs +1 -0
  4. package/calendar/components/CalendarCell.js +1 -1
  5. package/calendar/components/CalendarCell.mjs +13 -12
  6. package/calendar/components/CalendarHeaderTitle.js +1 -1
  7. package/calendar/components/CalendarHeaderTitle.mjs +4 -3
  8. package/calendar/components/CalendarNavigationItem.js +1 -1
  9. package/calendar/components/CalendarNavigationItem.mjs +3 -2
  10. package/calendar/components/CalendarWeekCell.js +1 -1
  11. package/calendar/components/CalendarWeekCell.mjs +9 -8
  12. package/calendar/components/Header.js +1 -1
  13. package/calendar/components/Header.mjs +1 -0
  14. package/calendar/components/HorizontalViewList.js +1 -1
  15. package/calendar/components/HorizontalViewList.mjs +1 -0
  16. package/calendar/components/MultiViewCalendar.js +1 -1
  17. package/calendar/components/MultiViewCalendar.mjs +1 -0
  18. package/calendar/components/Navigation.js +1 -1
  19. package/calendar/components/Navigation.mjs +1 -0
  20. package/calendar/components/TodayCommand.js +1 -1
  21. package/calendar/components/TodayCommand.mjs +1 -0
  22. package/calendar/components/View.js +1 -1
  23. package/calendar/components/View.mjs +1 -0
  24. package/calendar/components/ViewList.js +1 -1
  25. package/calendar/components/ViewList.mjs +1 -0
  26. package/calendar/models/CalendarViewEnum.js +1 -1
  27. package/calendar/models/CalendarViewEnum.mjs +1 -0
  28. package/calendar/models/NavigationAction.js +1 -1
  29. package/calendar/models/NavigationAction.mjs +1 -0
  30. package/calendar/models/SelectionRange.js +1 -1
  31. package/calendar/models/SelectionRange.mjs +1 -0
  32. package/calendar/services/BusViewService.js +1 -1
  33. package/calendar/services/BusViewService.mjs +1 -0
  34. package/calendar/services/CenturyViewService.js +1 -1
  35. package/calendar/services/CenturyViewService.mjs +1 -0
  36. package/calendar/services/DOMService.js +1 -1
  37. package/calendar/services/DOMService.mjs +1 -0
  38. package/calendar/services/DecadeViewService.js +1 -1
  39. package/calendar/services/DecadeViewService.mjs +1 -0
  40. package/calendar/services/MonthViewService.js +1 -1
  41. package/calendar/services/MonthViewService.mjs +1 -0
  42. package/calendar/services/NavigationService.js +1 -1
  43. package/calendar/services/NavigationService.mjs +19 -18
  44. package/calendar/services/ScrollSyncService.js +1 -1
  45. package/calendar/services/ScrollSyncService.mjs +1 -0
  46. package/calendar/services/WeekNamesService.js +1 -1
  47. package/calendar/services/WeekNamesService.mjs +6 -5
  48. package/calendar/services/YearViewService.js +1 -1
  49. package/calendar/services/YearViewService.mjs +1 -0
  50. package/common/AdaptiveMode.js +1 -1
  51. package/common/AdaptiveMode.mjs +8 -7
  52. package/common/ClearButton.js +1 -1
  53. package/common/ClearButton.mjs +8 -7
  54. package/common/PickerWrap.js +1 -1
  55. package/common/PickerWrap.mjs +4 -3
  56. package/dateinput/DateInput.js +1 -1
  57. package/dateinput/DateInput.mjs +68 -69
  58. package/dateinput/dateInputIntl.js +1 -1
  59. package/dateinput/dateInputIntl.mjs +4 -3
  60. package/dateinput/utils.js +1 -1
  61. package/dateinput/utils.mjs +5 -4
  62. package/datepicker/DatePicker.js +1 -1
  63. package/datepicker/DatePicker.mjs +197 -203
  64. package/datepicker/ToggleButton.js +1 -1
  65. package/datepicker/ToggleButton.mjs +4 -3
  66. package/daterangepicker/DateRangePicker.js +1 -1
  67. package/daterangepicker/DateRangePicker.mjs +1 -0
  68. package/datetimepicker/DateTimePicker.js +1 -1
  69. package/datetimepicker/DateTimePicker.mjs +1 -0
  70. package/datetimepicker/DateTimeSelector.js +1 -1
  71. package/datetimepicker/DateTimeSelector.mjs +1 -0
  72. package/dist/cdn/js/kendo-react-dateinputs.js +1 -8
  73. package/hooks/usePickerFloatingLabel.js +1 -1
  74. package/hooks/usePickerFloatingLabel.mjs +6 -5
  75. package/index.js +1 -2
  76. package/messages/index.js +1 -1
  77. package/messages/index.mjs +6 -5
  78. package/package-metadata.js +1 -1
  79. package/package-metadata.mjs +3 -2
  80. package/package.json +8 -8
  81. package/timepicker/TimeList.js +1 -1
  82. package/timepicker/TimeList.mjs +17 -16
  83. package/timepicker/TimePart.js +1 -1
  84. package/timepicker/TimePart.mjs +1 -0
  85. package/timepicker/TimePicker.js +1 -1
  86. package/timepicker/TimePicker.mjs +1 -0
  87. package/timepicker/TimeSelector.js +1 -1
  88. package/timepicker/TimeSelector.mjs +1 -0
  89. package/timepicker/models/TimePart.js +1 -1
  90. package/timepicker/models/TimePart.mjs +3 -2
  91. package/timepicker/services/DOMService.js +1 -1
  92. package/timepicker/services/DOMService.mjs +1 -0
  93. package/timepicker/services/DayPeriodService.js +1 -1
  94. package/timepicker/services/DayPeriodService.mjs +4 -3
  95. package/timepicker/services/HoursService.js +1 -1
  96. package/timepicker/services/HoursService.mjs +4 -3
  97. package/timepicker/services/MinutesService.js +1 -1
  98. package/timepicker/services/MinutesService.mjs +6 -5
  99. package/timepicker/services/SecondsService.js +1 -1
  100. package/timepicker/services/SecondsService.mjs +1 -0
  101. package/timepicker/utils.js +1 -1
  102. package/timepicker/utils.mjs +1 -0
  103. package/utils.js +1 -1
  104. package/utils.mjs +19 -18
  105. package/virtualization/Virtualization.js +1 -1
  106. package/virtualization/Virtualization.mjs +1 -0
  107. package/virtualization/services/ScrollerService.js +1 -1
  108. package/virtualization/services/ScrollerService.mjs +1 -0
@@ -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 Ve=require("react"),e=require("prop-types"),I=require("@progress/kendo-date-math"),$=require("@progress/kendo-react-buttons"),G=require("@progress/kendo-svg-icons"),Z=require("@progress/kendo-react-intl"),u=require("@progress/kendo-react-common"),pe=require("@progress/kendo-react-labels"),Le=require("@progress/kendo-dateinputs-common"),q=require("./utils.js"),Ne=require("../package-metadata.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ae=require("../timepicker/utils.js"),_e=require("../common/ClearButton.js"),Be=require("./dateInputIntl.js");function je(t){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const m in t)if(m!=="default"){const O=Object.getOwnPropertyDescriptor(t,m);Object.defineProperty(b,m,O.get?O:{enumerable:!0,get:()=>t[m]})}}return b.default=t,Object.freeze(b)}const a=je(Ve),Fe="Please enter a valid value!",p=a.forwardRef((t,b)=>{var J;u.validatePackage(Ne.packageMetadata);const m=u.useId(t.id),O=Z.useInternationalization(),E=Z.useLocalization(),Q=u.useUnstyled(),L=u.usePropsContext(V,t).unstyled||Q,{format:P=r.format,size:ee=r.size,rounded:te=r.rounded,fillMode:ne=r.fillMode,formatPlaceholder:ae=r.formatPlaceholder,spinners:re=r.spinners,disabled:C=r.disabled,min:le=r.min,max:ue=r.max,minTime:ie=r.minTime,maxTime:oe=r.maxTime,validityStyles:se=r.validityStyles,validationMessage:N=r.validationMessage,placeholder:y=r.placeholder,enableMouseWheel:ce=r.enableMouseWheel,autoCorrectParts:de=r.autoCorrectParts,autoSwitchParts:fe=r.autoSwitchParts,allowCaretMode:me=r.allowCaretMode,twoDigitYearMax:ge=r.twoDigitYearMax,ariaHasPopup:ve=r.ariaHasPopup,autoFocus:be=r.autoFocus}=u.usePropsContext(V,t),g=()=>w.current!==void 0?w.current:o.current&&o.current.value,A=()=>{const n=o.current&&o.current.currentText||"",l=g();return y!=null&&!Pe.focused&&!l?y:n},_=()=>t.required!==void 0?t.required:!1,R=()=>{const n=g()||t.value,l=le,X=ue,Te=q.isInRange(n,l,X)&&Ae.isInTimeRange(n,ie,oe),Se=N!==void 0,ke=(!_()||n!=null)&&Te,qe=t.valid!==void 0?t.valid:ke;return{customError:Se,rangeOverflow:n&&X.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<l.getTime()||!1,valid:qe,valueMissing:n===null}},ye=()=>{s.current&&s.current.focus()},B=()=>new Be.DateInputIntl(O),x=()=>{const n=g();return{format:P,steps:t.steps,formatPlaceholder:ae,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:t.value||n,intlService:B(),autoFill:t.autoFill!==void 0?t.autoFill:!1,enableMouseWheel:ce,autoCorrectParts:de,autoSwitchParts:fe,autoSwitchKeys:t.autoSwitchKeys||[],twoDigitYearMax:ge,allowCaretMode:me}},he=n=>{d.current&&d.current.classList.add("k-focus"),U({focused:!0})},De=n=>{d.current&&d.current.classList.remove("k-focus"),U({focused:!1})},Ie=(n,l)=>typeof n!=typeof l?!0:typeof n=="string"&&typeof l=="string"?n!==l:typeof n=="object"&&typeof l=="object"?JSON.stringify(n)!==JSON.stringify(l):!1,Oe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},j=n=>{w.current=g(),Re(),v.current=n,w.current=void 0},F=n=>{t.onChange&&t.onChange(n)},H=n=>{u.getActiveElement(document)===s.current&&n.preventDefault()},Ee=()=>new Le.DateInput(s.current,{...x(),format:Oe(x().format),events:{focus:he,blur:De,valueChange:j,click:F}}),z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(R().valid?"":N||r.validationMessage)},Ce=n=>{!s.current||!o.current||j(n)},xe=n=>{n.preventDefault();const l=u.getActiveElement(document);s.current&&l!==s.current&&s.current.focus({preventScroll:!0})},f=n=>{const l=g();v.current&&t.onChange&&!I.isEqual(v.current.oldValue,l)&&t.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:M.current}),v.current=null},Me=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(1),f(n)},we=n=>{var l;(l=o.current)==null||l.modifyDateSegmentValue(-1),f(n)},M=a.useRef(null),s=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(M,()=>({props:t,get options(){return x()},get text(){return A()},get element(){return s.current},get name(){return t.name},get value(){return g()},get validity(){return R()},focus:ye,updateOnPaste:Ce})),a.useImperativeHandle(b,()=>M.current);const o=a.useRef(null),T=a.useRef(null),S=a.useRef(!1),w=a.useRef(null),v=a.useRef(null),h=a.useRef(t),[Pe,U]=a.useState({focused:!1}),[,Re]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{S.current||(o.current=Ee(),T.current=o.current.dateObject,S.current=!0)},[]),a.useEffect(()=>(z(),S.current||d.current&&d.current.addEventListener("wheel",H,{passive:!1}),()=>{d.current&&d.current.removeEventListener("wheel",H)}),[]),a.useEffect(()=>{z(),o.current&&((Ie(h.current.format,P)||h.current.readonly!==t.readonly||h.current.steps!==t.steps||B().locale!==o.current.options.intlService.locale)&&o.current.setOptions(x(),!0),h.current.value!==t.value&&(T.current.getValue()!==null||t.value!==null)&&T.current.setValue(t.value),t.ariaExpanded!==void 0&&t.ariaExpanded&&(o.current.options.placeholder=null),t.ariaExpanded!==void 0&&!t.ariaExpanded&&(o.current.options.placeholder=y),o.current.refreshElementValue(),h.current={format:P,readonly:t.readonly,ariaExpanded:t.ariaExpanded,steps:t.steps,value:t.value})});const W=t.id||m+"-accessibility-id",D=L&&L.uDateInput,K=A(),k=!se||R().valid;a.useImperativeHandle(t._ref,()=>M.current);const Y=a.createElement("span",{ref:n=>d.current=n,style:t.label?void 0:{width:t.width},dir:t.dir,className:u.classNames(u.uDateInput.wrapper({c:D,size:ee,fillMode:ne,rounded:te,disabled:C,required:_(),invalid:!k}),t.className)},a.createElement("input",{ref:n=>s.current=n,role:t.ariaRole||"textbox",readOnly:t.readonly,tabIndex:t.tabIndex||0,disabled:C,title:t.title!==void 0?t.title:K,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:be,className:u.classNames(u.uDateInput.inputInner({c:D})),id:W,value:K,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,"aria-haspopup":ve,"aria-disabled":C,"aria-expanded":t.ariaExpanded,"aria-controls":t.ariaControls,"aria-required":t.required,"aria-invalid":!k,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:t.name,...t.inputAttributes}),t.children,t.clearButton&&t.value&&a.createElement(_e,{onClick:F,key:"clearbutton"}),re&&a.createElement("span",{className:u.classNames(u.uDateInput.inputSpinner({c:D})),onMouseDown:xe},a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:u.classNames(u.uDateInput.spinnerIncrease({c:D})),icon:"caret-alt-up",svgIcon:G.caretAltUpIcon,"aria-label":E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:E.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Me}),a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:u.classNames(u.uDateInput.spinnerDecrease({c:D})),icon:"caret-alt-down",svgIcon:G.caretAltDownIcon,"aria-label":E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:E.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:we})));return t.label?a.createElement(pe.FloatingLabel,{label:t.label,editorId:W,editorValue:(J=s.current)==null?void 0:J.value,editorValid:k,editorDisabled:C,children:Y,style:{width:t.width}}):Y});p.propTypes={value:e.instanceOf(Date),format:e.oneOfType([i.nullable(e.string),e.shape({skeleton:e.string,pattern:e.string,date:e.oneOf(["short","medium","long","full"]),time:e.oneOf(["short","medium","long","full"]),datetime:e.oneOf(["short","medium","long","full"]),era:e.oneOf(["narrow","short","long"]),year:e.oneOf(["numeric","2-digit"]),month:e.oneOf(["numeric","2-digit","narrow","short","long"]),day:e.oneOf(["numeric","2-digit"]),weekday:e.oneOf(["narrow","short","long"]),hour:e.oneOf(["numeric","2-digit"]),hour12:e.bool,minute:e.oneOf(["numeric","2-digit"]),second:e.oneOf(["numeric","2-digit"]),timeZoneName:e.oneOf(["short","long"])})]),formatPlaceholder:e.oneOfType([i.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:i.nullable(e.string),month:i.nullable(e.string),day:i.nullable(e.string),hour:i.nullable(e.string),minute:i.nullable(e.string),second:i.nullable(e.string)})]),width:e.oneOfType([e.string,e.number]),tabIndex:e.number,title:e.string,steps:e.shape({year:i.nullable(e.number),month:i.nullable(e.number),day:i.nullable(e.number),hour:i.nullable(e.number),minute:i.nullable(e.number),second:i.nullable(e.number)}),min:e.instanceOf(Date),max:e.instanceOf(Date),disabled:e.bool,spinners:e.bool,name:e.string,dir:e.string,label:e.string,id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,ariaRole:e.string,ariaHasPopup:e.oneOfType([e.bool,e.oneOf(["grid","dialog"])]),ariaExpanded:e.oneOfType([e.bool]),onChange:e.func,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"]),autoFocus:e.bool,inputAttributes:e.object};const r={format:q.DEFAULT_FORMAT,size:"medium",rounded:"medium",fillMode:"solid",formatPlaceholder:q.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:I.cloneDate(i.MAX_DATE),min:I.cloneDate(i.MIN_DATE),minTime:I.cloneDate(i.MIN_TIME),maxTime:I.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Fe,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},V=u.createPropsContext();p.displayName="KendoReactDateInput";exports.DateInput=p;exports.DateInputPropsContext=V;exports.dateInputDefaultProps=r;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ve=require("react"),e=require("prop-types"),I=require("@progress/kendo-date-math"),$=require("@progress/kendo-react-buttons"),G=require("@progress/kendo-svg-icons"),Z=require("@progress/kendo-react-intl"),l=require("@progress/kendo-react-common"),pe=require("@progress/kendo-react-labels"),Le=require("@progress/kendo-dateinputs-common"),k=require("./utils.js"),Ne=require("../package-metadata.js"),c=require("../utils.js"),s=require("../messages/index.js"),Ae=require("../timepicker/utils.js"),_e=require("../common/ClearButton.js"),Be=require("./dateInputIntl.js");function je(t){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const m in t)if(m!=="default"){const O=Object.getOwnPropertyDescriptor(t,m);Object.defineProperty(b,m,O.get?O:{enumerable:!0,get:()=>t[m]})}}return b.default=t,Object.freeze(b)}const a=je(Ve),Fe="Please enter a valid value!",p=a.forwardRef((t,b)=>{var J;l.validatePackage(Ne.packageMetadata);const m=l.useId(t.id),O=Z.useInternationalization(),E=Z.useLocalization(),Q=l.useUnstyled(),L=l.usePropsContext(V,t).unstyled||Q,{format:w=r.format,size:ee=r.size,rounded:te=r.rounded,fillMode:ne=r.fillMode,formatPlaceholder:ae=r.formatPlaceholder,spinners:re=r.spinners,disabled:C=r.disabled,min:ie=r.min,max:le=r.max,minTime:ue=r.minTime,maxTime:oe=r.maxTime,validityStyles:se=r.validityStyles,validationMessage:N=r.validationMessage,placeholder:y=r.placeholder,enableMouseWheel:ce=r.enableMouseWheel,autoCorrectParts:de=r.autoCorrectParts,autoSwitchParts:fe=r.autoSwitchParts,allowCaretMode:me=r.allowCaretMode,twoDigitYearMax:ge=r.twoDigitYearMax,ariaHasPopup:ve=r.ariaHasPopup,autoFocus:be=r.autoFocus}=l.usePropsContext(V,t),g=()=>M.current!==void 0?M.current:u.current&&u.current.value,A=()=>{const n=u.current&&u.current.currentText||"",i=g();return y!=null&&!we.focused&&!i?y:n},_=()=>t.required!==void 0?t.required:!1,P=()=>{const n=g()||t.value,i=ie,X=le,Te=k.isInRange(n,i,X)&&Ae.isInTimeRange(n,ue,oe),qe=N!==void 0,Se=(!_()||n!=null)&&Te,ke=t.valid!==void 0?t.valid:Se;return{customError:qe,rangeOverflow:n&&X.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<i.getTime()||!1,valid:ke,valueMissing:n===null}},ye=()=>{o.current&&o.current.focus()},B=()=>new Be.DateInputIntl(O),R=()=>{const n=g();return{format:w,steps:t.steps,formatPlaceholder:ae,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:t.value||n,intlService:B(),autoFill:t.autoFill!==void 0?t.autoFill:!1,enableMouseWheel:ce,autoCorrectParts:de,autoSwitchParts:fe,autoSwitchKeys:t.autoSwitchKeys||[],twoDigitYearMax:ge,allowCaretMode:me}},he=n=>{d.current&&d.current.classList.add("k-focus"),U({focused:!0})},De=n=>{d.current&&d.current.classList.remove("k-focus"),U({focused:!1})},Ie=(n,i)=>typeof n!=typeof i?!0:typeof n=="string"&&typeof i=="string"?n!==i:typeof n=="object"&&typeof i=="object"?JSON.stringify(n)!==JSON.stringify(i):!1,Oe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},j=n=>{M.current=g(),Pe(),v.current=n,M.current=void 0},F=n=>{t.onChange&&t.onChange(n)},H=n=>{l.getActiveElement(document)===o.current&&n.preventDefault()},Ee=()=>new Le.DateInput(o.current,{...R(),format:Oe(R().format),events:{focus:he,blur:De,valueChange:j,click:F}}),z=()=>{o.current&&o.current.setCustomValidity&&o.current.setCustomValidity(P().valid?"":N||r.validationMessage)},Ce=n=>{!o.current||!u.current||j(n)},Re=n=>{n.preventDefault();const i=l.getActiveElement(document);o.current&&i!==o.current&&o.current.focus({preventScroll:!0})},f=n=>{const i=g();v.current&&t.onChange&&!I.isEqual(v.current.oldValue,i)&&t.onChange.call(void 0,{syntheticEvent:n,nativeEvent:v.current.event,value:v.current.value,target:x.current}),v.current=null},xe=n=>{var i;(i=u.current)==null||i.modifyDateSegmentValue(1),f(n)},Me=n=>{var i;(i=u.current)==null||i.modifyDateSegmentValue(-1),f(n)},x=a.useRef(null),o=a.useRef(null),d=a.useRef(null);a.useImperativeHandle(x,()=>({props:t,get options(){return R()},get text(){return A()},get element(){return o.current},get name(){return t.name},get value(){return g()},get validity(){return P()},focus:ye,updateOnPaste:Ce})),a.useImperativeHandle(b,()=>x.current);const u=a.useRef(null),T=a.useRef(null),q=a.useRef(!1),M=a.useRef(null),v=a.useRef(null),h=a.useRef(t),[we,U]=a.useState({focused:!1}),[,Pe]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{q.current||(u.current=Ee(),T.current=u.current.dateObject,q.current=!0)},[]),a.useEffect(()=>(z(),q.current||d.current&&d.current.addEventListener("wheel",H,{passive:!1}),()=>{d.current&&d.current.removeEventListener("wheel",H)}),[]),a.useEffect(()=>{z(),u.current&&((Ie(h.current.format,w)||h.current.readonly!==t.readonly||h.current.steps!==t.steps||B().locale!==u.current.options.intlService.locale)&&u.current.setOptions(R(),!0),h.current.value!==t.value&&(T.current.getValue()!==null||t.value!==null)&&T.current.setValue(t.value),t.ariaExpanded!==void 0&&t.ariaExpanded&&(u.current.options.placeholder=null),t.ariaExpanded!==void 0&&!t.ariaExpanded&&(u.current.options.placeholder=y),u.current.refreshElementValue(),h.current={format:w,readonly:t.readonly,ariaExpanded:t.ariaExpanded,steps:t.steps,value:t.value})});const W=t.id||m+"-accessibility-id",D=L&&L.uDateInput,K=A(),S=!se||P().valid;a.useImperativeHandle(t._ref,()=>x.current);const Y=a.createElement("span",{ref:n=>d.current=n,style:t.label?void 0:{width:t.width},dir:t.dir,className:l.classNames(l.uDateInput.wrapper({c:D,size:ee,fillMode:ne,rounded:te,disabled:C,required:_(),invalid:!S}),t.className)},a.createElement("input",{ref:n=>o.current=n,role:t.ariaRole||"textbox",readOnly:t.readonly,tabIndex:t.tabIndex||0,disabled:C,title:t.title!==void 0?t.title:K,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:be,className:l.classNames(l.uDateInput.inputInner({c:D})),id:W,value:K,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,"aria-haspopup":ve,"aria-disabled":C,"aria-expanded":t.ariaExpanded,"aria-controls":t.ariaControls,"aria-required":t.required,"aria-invalid":!S,onKeyDown:f,onChange:f,onWheel:f,onInput:f,onClick:f,name:t.name,...t.inputAttributes}),t.children,t.clearButton&&t.value&&a.createElement(_e,{onClick:F,key:"clearbutton"}),re&&a.createElement("span",{className:l.classNames(l.uDateInput.inputSpinner({c:D})),onMouseDown:Re},a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:l.classNames(l.uDateInput.spinnerIncrease({c:D})),icon:"caret-alt-up",svgIcon:G.caretAltUpIcon,"aria-label":E.toLanguageString(s.increaseValue,s.messages[s.increaseValue]),title:E.toLanguageString(s.increaseValue,s.messages[s.increaseValue]),onClick:xe}),a.createElement($.Button,{tabIndex:-1,type:"button",rounded:null,className:l.classNames(l.uDateInput.spinnerDecrease({c:D})),icon:"caret-alt-down",svgIcon:G.caretAltDownIcon,"aria-label":E.toLanguageString(s.decreaseValue,s.messages[s.decreaseValue]),title:E.toLanguageString(s.decreaseValue,s.messages[s.decreaseValue]),onClick:Me})));return t.label?a.createElement(pe.FloatingLabel,{label:t.label,editorId:W,editorValue:(J=o.current)==null?void 0:J.value,editorValid:S,editorDisabled:C,children:Y,style:{width:t.width}}):Y});p.propTypes={value:e.instanceOf(Date),format:e.oneOfType([c.nullable(e.string),e.shape({skeleton:e.string,pattern:e.string,date:e.oneOf(["short","medium","long","full"]),time:e.oneOf(["short","medium","long","full"]),datetime:e.oneOf(["short","medium","long","full"]),era:e.oneOf(["narrow","short","long"]),year:e.oneOf(["numeric","2-digit"]),month:e.oneOf(["numeric","2-digit","narrow","short","long"]),day:e.oneOf(["numeric","2-digit"]),weekday:e.oneOf(["narrow","short","long"]),hour:e.oneOf(["numeric","2-digit"]),hour12:e.bool,minute:e.oneOf(["numeric","2-digit"]),second:e.oneOf(["numeric","2-digit"]),timeZoneName:e.oneOf(["short","long"])})]),formatPlaceholder:e.oneOfType([e.oneOf(["wide","narrow","short","formatPattern"]).isRequired,e.shape({year:e.string.isRequired,month:e.string.isRequired,day:e.string.isRequired,hour:e.string.isRequired,minute:e.string.isRequired,second:e.string.isRequired})]),width:e.oneOfType([e.string,e.number]),tabIndex:e.number,title:e.string,steps:e.shape({year:c.nullable(e.number),month:c.nullable(e.number),day:c.nullable(e.number),hour:c.nullable(e.number),minute:c.nullable(e.number),second:c.nullable(e.number)}),min:e.instanceOf(Date),max:e.instanceOf(Date),disabled:e.bool,spinners:e.bool,name:e.string,dir:e.string,label:e.string,id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,ariaRole:e.string,ariaHasPopup:e.oneOfType([e.bool,e.oneOf(["grid","dialog"])]),ariaExpanded:e.oneOfType([e.bool]),onChange:e.func,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"]),autoFocus:e.bool,inputAttributes:e.object};const r={format:k.DEFAULT_FORMAT,size:"medium",rounded:"medium",fillMode:"solid",formatPlaceholder:k.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:I.cloneDate(c.MAX_DATE),min:I.cloneDate(c.MIN_DATE),minTime:I.cloneDate(c.MIN_TIME),maxTime:I.cloneDate(c.MAX_TIME),validityStyles:!0,validationMessage:Fe,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},V=l.createPropsContext();p.displayName="KendoReactDateInput";exports.DateInput=p;exports.DateInputPropsContext=V;exports.dateInputDefaultProps=r;
@@ -5,27 +5,28 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
+ "use client";
8
9
  import * as a from "react";
9
10
  import e from "prop-types";
10
11
  import { cloneDate as x, isEqual as Ve } from "@progress/kendo-date-math";
11
12
  import { Button as Y } from "@progress/kendo-react-buttons";
12
- import { caretAltUpIcon as Ne, caretAltDownIcon as _e } from "@progress/kendo-svg-icons";
13
- import { useInternationalization as Fe, useLocalization as He } from "@progress/kendo-react-intl";
14
- import { validatePackage as Be, useId as qe, useUnstyled as ze, usePropsContext as J, classNames as y, uDateInput as b, createPropsContext as Ue, getActiveElement as X } from "@progress/kendo-react-common";
13
+ import { caretAltUpIcon as qe, caretAltDownIcon as Ne } from "@progress/kendo-svg-icons";
14
+ import { useInternationalization as _e, useLocalization as Fe } from "@progress/kendo-react-intl";
15
+ import { validatePackage as He, useId as Be, useUnstyled as ze, usePropsContext as J, classNames as y, uDateInput as b, createPropsContext as Ue, getActiveElement as X } from "@progress/kendo-react-common";
15
16
  import { FloatingLabel as We } from "@progress/kendo-react-labels";
16
17
  import { DateInput as je } from "@progress/kendo-dateinputs-common";
17
18
  import { DEFAULT_FORMAT as Ke, DEFAULT_FORMAT_PLACEHOLDER as Ye, isInRange as Je } from "./utils.mjs";
18
19
  import { packageMetadata as Xe } from "../package-metadata.mjs";
19
- import { nullable as u, MAX_DATE as Ge, MIN_DATE as Ze, MIN_TIME as $e, MAX_TIME as Qe } from "../utils.mjs";
20
- import { increaseValue as C, messages as w, decreaseValue as M } from "../messages/index.mjs";
20
+ import { nullable as c, MAX_DATE as Ge, MIN_DATE as Ze, MIN_TIME as $e, MAX_TIME as Qe } from "../utils.mjs";
21
+ import { increaseValue as C, messages as R, decreaseValue as w } from "../messages/index.mjs";
21
22
  import { isInTimeRange as et } from "../timepicker/utils.mjs";
22
23
  import tt from "../common/ClearButton.mjs";
23
24
  import { DateInputIntl as nt } from "./dateInputIntl.mjs";
24
25
  const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
25
26
  var j;
26
- Be(Xe);
27
- const Q = qe(t.id), ee = Fe(), h = He(), te = ze(), p = J(G, t).unstyled || te, {
28
- format: T = r.format,
27
+ He(Xe);
28
+ const Q = Be(t.id), ee = _e(), h = Fe(), te = ze(), p = J(G, t).unstyled || te, {
29
+ format: M = r.format,
29
30
  size: ne = r.size,
30
31
  rounded: ae = r.rounded,
31
32
  fillMode: re = r.fillMode,
@@ -49,7 +50,7 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
49
50
  } = J(G, t), d = () => D.current !== void 0 ? D.current : l.current && l.current.value, A = () => {
50
51
  const n = l.current && l.current.currentText || "", i = d();
51
52
  return f != null && !Pe.focused && !i ? f : n;
52
- }, V = () => t.required !== void 0 ? t.required : !1, R = () => {
53
+ }, V = () => t.required !== void 0 ? t.required : !1, T = () => {
53
54
  const n = d() || t.value, i = oe, K = ue, ke = Je(n, i, K) && et(n, se, ce), pe = L !== void 0, Le = (!V() || n != null) && ke, Ae = t.valid !== void 0 ? t.valid : Le;
54
55
  return {
55
56
  customError: pe,
@@ -60,16 +61,16 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
60
61
  };
61
62
  }, Ee = () => {
62
63
  o.current && o.current.focus();
63
- }, N = () => new nt(ee), I = () => {
64
+ }, q = () => new nt(ee), I = () => {
64
65
  const n = d();
65
66
  return {
66
- format: T,
67
+ format: M,
67
68
  steps: t.steps,
68
69
  formatPlaceholder: ie,
69
70
  placeholder: f,
70
71
  selectPreviousSegmentOnBackspace: !0,
71
72
  value: t.value || n,
72
- intlService: N(),
73
+ intlService: q(),
73
74
  autoFill: t.autoFill !== void 0 ? t.autoFill : !1,
74
75
  enableMouseWheel: me,
75
76
  autoCorrectParts: fe,
@@ -79,17 +80,17 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
79
80
  allowCaretMode: ve
80
81
  };
81
82
  }, Ie = (n) => {
82
- s.current && s.current.classList.add("k-focus"), q({ focused: !0 });
83
+ u.current && u.current.classList.add("k-focus"), B({ focused: !0 });
83
84
  }, Oe = (n) => {
84
- s.current && s.current.classList.remove("k-focus"), q({ focused: !1 });
85
+ u.current && u.current.classList.remove("k-focus"), B({ focused: !1 });
85
86
  }, De = (n, i) => typeof n != typeof i ? !0 : typeof n == "string" && typeof i == "string" ? n !== i : typeof n == "object" && typeof i == "object" ? JSON.stringify(n) !== JSON.stringify(i) : !1, xe = (n) => typeof n == "string" ? n : {
86
87
  inputFormat: n,
87
88
  displayFormat: n
88
- }, _ = (n) => {
89
+ }, N = (n) => {
89
90
  D.current = d(), Se(), m.current = n, D.current = void 0;
90
- }, F = (n) => {
91
+ }, _ = (n) => {
91
92
  t.onChange && t.onChange(n);
92
- }, H = (n) => {
93
+ }, F = (n) => {
93
94
  X(document) === o.current && n.preventDefault();
94
95
  }, Ce = () => new je(o.current, {
95
96
  ...I(),
@@ -97,20 +98,20 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
97
98
  events: {
98
99
  focus: Ie,
99
100
  blur: Oe,
100
- valueChange: _,
101
- click: F
101
+ valueChange: N,
102
+ click: _
102
103
  }
103
- }), B = () => {
104
+ }), H = () => {
104
105
  o.current && o.current.setCustomValidity && o.current.setCustomValidity(
105
- R().valid ? "" : L || r.validationMessage
106
+ T().valid ? "" : L || r.validationMessage
106
107
  );
108
+ }, Re = (n) => {
109
+ !o.current || !l.current || N(n);
107
110
  }, we = (n) => {
108
- !o.current || !l.current || _(n);
109
- }, Me = (n) => {
110
111
  n.preventDefault();
111
112
  const i = X(document);
112
113
  o.current && i !== o.current && o.current.focus({ preventScroll: !0 });
113
- }, c = (n) => {
114
+ }, s = (n) => {
114
115
  const i = d();
115
116
  m.current && t.onChange && !Ve(m.current.oldValue, i) && t.onChange.call(void 0, {
116
117
  syntheticEvent: n,
@@ -118,13 +119,13 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
118
119
  value: m.current.value,
119
120
  target: O.current
120
121
  }), m.current = null;
121
- }, Te = (n) => {
122
+ }, Me = (n) => {
122
123
  var i;
123
- (i = l.current) == null || i.modifyDateSegmentValue(1), c(n);
124
- }, Re = (n) => {
124
+ (i = l.current) == null || i.modifyDateSegmentValue(1), s(n);
125
+ }, Te = (n) => {
125
126
  var i;
126
- (i = l.current) == null || i.modifyDateSegmentValue(-1), c(n);
127
- }, O = a.useRef(null), o = a.useRef(null), s = a.useRef(null);
127
+ (i = l.current) == null || i.modifyDateSegmentValue(-1), s(n);
128
+ }, O = a.useRef(null), o = a.useRef(null), u = a.useRef(null);
128
129
  a.useImperativeHandle(
129
130
  O,
130
131
  () => ({
@@ -145,33 +146,33 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
145
146
  return d();
146
147
  },
147
148
  get validity() {
148
- return R();
149
+ return T();
149
150
  },
150
151
  // hidden methods
151
152
  focus: Ee,
152
- updateOnPaste: we
153
+ updateOnPaste: Re
153
154
  })
154
155
  ), a.useImperativeHandle($, () => O.current);
155
- const l = a.useRef(null), P = a.useRef(null), S = a.useRef(!1), D = a.useRef(null), m = a.useRef(null), g = a.useRef(t), [Pe, q] = a.useState({ focused: !1 }), [, Se] = a.useReducer((n) => n + 1, 0);
156
+ const l = a.useRef(null), P = a.useRef(null), S = a.useRef(!1), D = a.useRef(null), m = a.useRef(null), g = a.useRef(t), [Pe, B] = a.useState({ focused: !1 }), [, Se] = a.useReducer((n) => n + 1, 0);
156
157
  a.useLayoutEffect(() => {
157
158
  S.current || (l.current = Ce(), P.current = l.current.dateObject, S.current = !0);
158
- }, []), a.useEffect(() => (B(), S.current || s.current && s.current.addEventListener("wheel", H, { passive: !1 }), () => {
159
- s.current && s.current.removeEventListener("wheel", H);
159
+ }, []), a.useEffect(() => (H(), S.current || u.current && u.current.addEventListener("wheel", F, { passive: !1 }), () => {
160
+ u.current && u.current.removeEventListener("wheel", F);
160
161
  }), []), a.useEffect(() => {
161
- B(), l.current && ((De(g.current.format, T) || g.current.readonly !== t.readonly || g.current.steps !== t.steps || N().locale !== l.current.options.intlService.locale) && l.current.setOptions(I(), !0), g.current.value !== t.value && (P.current.getValue() !== null || t.value !== null) && P.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (l.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (l.current.options.placeholder = f), l.current.refreshElementValue(), g.current = {
162
- format: T,
162
+ H(), l.current && ((De(g.current.format, M) || g.current.readonly !== t.readonly || g.current.steps !== t.steps || q().locale !== l.current.options.intlService.locale) && l.current.setOptions(I(), !0), g.current.value !== t.value && (P.current.getValue() !== null || t.value !== null) && P.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (l.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (l.current.options.placeholder = f), l.current.refreshElementValue(), g.current = {
163
+ format: M,
163
164
  readonly: t.readonly,
164
165
  ariaExpanded: t.ariaExpanded,
165
166
  steps: t.steps,
166
167
  value: t.value
167
168
  });
168
169
  });
169
- const z = t.id || Q + "-accessibility-id", v = p && p.uDateInput, U = A(), k = !de || R().valid;
170
+ const z = t.id || Q + "-accessibility-id", v = p && p.uDateInput, U = A(), k = !de || T().valid;
170
171
  a.useImperativeHandle(t._ref, () => O.current);
171
172
  const W = /* @__PURE__ */ a.createElement(
172
173
  "span",
173
174
  {
174
- ref: (n) => s.current = n,
175
+ ref: (n) => u.current = n,
175
176
  style: t.label ? void 0 : { width: t.width },
176
177
  dir: t.dir,
177
178
  className: y(
@@ -213,18 +214,18 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
213
214
  "aria-controls": t.ariaControls,
214
215
  "aria-required": t.required,
215
216
  "aria-invalid": !k,
216
- onKeyDown: c,
217
- onChange: c,
218
- onWheel: c,
219
- onInput: c,
220
- onClick: c,
217
+ onKeyDown: s,
218
+ onChange: s,
219
+ onWheel: s,
220
+ onInput: s,
221
+ onClick: s,
221
222
  name: t.name,
222
223
  ...t.inputAttributes
223
224
  }
224
225
  ),
225
226
  t.children,
226
- t.clearButton && t.value && /* @__PURE__ */ a.createElement(tt, { onClick: F, key: "clearbutton" }),
227
- le && /* @__PURE__ */ a.createElement("span", { className: y(b.inputSpinner({ c: v })), onMouseDown: Me }, /* @__PURE__ */ a.createElement(
227
+ t.clearButton && t.value && /* @__PURE__ */ a.createElement(tt, { onClick: _, key: "clearbutton" }),
228
+ le && /* @__PURE__ */ a.createElement("span", { className: y(b.inputSpinner({ c: v })), onMouseDown: we }, /* @__PURE__ */ a.createElement(
228
229
  Y,
229
230
  {
230
231
  tabIndex: -1,
@@ -232,10 +233,10 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
232
233
  rounded: null,
233
234
  className: y(b.spinnerIncrease({ c: v })),
234
235
  icon: "caret-alt-up",
235
- svgIcon: Ne,
236
- "aria-label": h.toLanguageString(C, w[C]),
237
- title: h.toLanguageString(C, w[C]),
238
- onClick: Te
236
+ svgIcon: qe,
237
+ "aria-label": h.toLanguageString(C, R[C]),
238
+ title: h.toLanguageString(C, R[C]),
239
+ onClick: Me
239
240
  }
240
241
  ), /* @__PURE__ */ a.createElement(
241
242
  Y,
@@ -245,10 +246,10 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
245
246
  rounded: null,
246
247
  className: y(b.spinnerDecrease({ c: v })),
247
248
  icon: "caret-alt-down",
248
- svgIcon: _e,
249
- "aria-label": h.toLanguageString(M, w[M]),
250
- title: h.toLanguageString(M, w[M]),
251
- onClick: Re
249
+ svgIcon: Ne,
250
+ "aria-label": h.toLanguageString(w, R[w]),
251
+ title: h.toLanguageString(w, R[w]),
252
+ onClick: Te
252
253
  }
253
254
  ))
254
255
  );
@@ -268,7 +269,7 @@ const at = "Please enter a valid value!", Z = a.forwardRef((t, $) => {
268
269
  Z.propTypes = {
269
270
  value: e.instanceOf(Date),
270
271
  format: e.oneOfType([
271
- u(e.string),
272
+ c(e.string),
272
273
  e.shape({
273
274
  skeleton: e.string,
274
275
  pattern: e.string,
@@ -288,28 +289,26 @@ Z.propTypes = {
288
289
  })
289
290
  ]),
290
291
  formatPlaceholder: e.oneOfType([
291
- u(
292
- e.oneOf(["wide", "narrow", "short", "formatPattern"])
293
- ),
292
+ e.oneOf(["wide", "narrow", "short", "formatPattern"]).isRequired,
294
293
  e.shape({
295
- year: u(e.string),
296
- month: u(e.string),
297
- day: u(e.string),
298
- hour: u(e.string),
299
- minute: u(e.string),
300
- second: u(e.string)
294
+ year: e.string.isRequired,
295
+ month: e.string.isRequired,
296
+ day: e.string.isRequired,
297
+ hour: e.string.isRequired,
298
+ minute: e.string.isRequired,
299
+ second: e.string.isRequired
301
300
  })
302
301
  ]),
303
302
  width: e.oneOfType([e.string, e.number]),
304
303
  tabIndex: e.number,
305
304
  title: e.string,
306
305
  steps: e.shape({
307
- year: u(e.number),
308
- month: u(e.number),
309
- day: u(e.number),
310
- hour: u(e.number),
311
- minute: u(e.number),
312
- second: u(e.number)
306
+ year: c(e.number),
307
+ month: c(e.number),
308
+ day: c(e.number),
309
+ hour: c(e.number),
310
+ minute: c(e.number),
311
+ second: c(e.number)
313
312
  }),
314
313
  min: e.instanceOf(Date),
315
314
  max: e.instanceOf(Date),
@@ -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 l=require("@progress/kendo-intl");class s{constructor(t){this.service=t,this.cldr={},this.locale=t.locale,this.format=t.format,this.toString=t.toString,this.formatDate=t.formatDate,this.parseDate=t.parseDate,this.parseNumber=t.parseNumber,this.formatNumber=t.formatNumber,this.splitDateFormat=t.splitDateFormat,this.numberSymbols=t.numberSymbols,this.firstDay=t.firstDay,this.dateFieldName=t.dateFieldName,this.dateFormatNames=(e,o)=>this.service.dateFormatNames(o),this.weekendRange=e=>{};const a=l.localeInfo(this.locale);this.cldr[a.name]=a}}exports.DateInputIntl=s;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-intl");class s{constructor(t){this.service=t,this.cldr={},this.locale=t.locale,this.format=t.format,this.toString=t.toString,this.formatDate=t.formatDate,this.parseDate=t.parseDate,this.parseNumber=t.parseNumber,this.formatNumber=t.formatNumber,this.splitDateFormat=t.splitDateFormat,this.numberSymbols=t.numberSymbols,this.firstDay=t.firstDay,this.dateFieldName=t.dateFieldName,this.dateFormatNames=(e,o)=>this.service.dateFormatNames(o),this.weekendRange=e=>{};const a=l.localeInfo(this.locale);this.cldr[a.name]=a}}exports.DateInputIntl=s;
@@ -5,12 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { localeInfo as s } from "@progress/kendo-intl";
8
+ "use client";
9
+ import { localeInfo as l } from "@progress/kendo-intl";
9
10
  class r {
10
11
  constructor(t) {
11
- this.service = t, this.cldr = {}, this.locale = t.locale, this.format = t.format, this.toString = t.toString, this.formatDate = t.formatDate, this.parseDate = t.parseDate, this.parseNumber = t.parseNumber, this.formatNumber = t.formatNumber, this.splitDateFormat = t.splitDateFormat, this.numberSymbols = t.numberSymbols, this.firstDay = t.firstDay, this.dateFieldName = t.dateFieldName, this.dateFormatNames = (o, m) => this.service.dateFormatNames(m), this.weekendRange = (o) => {
12
+ this.service = t, this.cldr = {}, this.locale = t.locale, this.format = t.format, this.toString = t.toString, this.formatDate = t.formatDate, this.parseDate = t.parseDate, this.parseNumber = t.parseNumber, this.formatNumber = t.formatNumber, this.splitDateFormat = t.splitDateFormat, this.numberSymbols = t.numberSymbols, this.firstDay = t.firstDay, this.dateFieldName = t.dateFieldName, this.dateFormatNames = (o, s) => this.service.dateFormatNames(s), this.weekendRange = (o) => {
12
13
  };
13
- const a = s(this.locale);
14
+ const a = l(this.locale);
14
15
  this.cldr[a.name] = a;
15
16
  }
16
17
  }
@@ -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 E="d",F="wide",L=(A,T,e)=>A===null||!(T&&T>A||e&&e<A);exports.DEFAULT_FORMAT=E;exports.DEFAULT_FORMAT_PLACEHOLDER=F;exports.isInRange=L;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n="d",s="wide",t=(e,A,T)=>e===null||!(A&&A>e||T&&T<e);exports.DEFAULT_FORMAT=n;exports.DEFAULT_FORMAT_PLACEHOLDER=s;exports.isInRange=t;
@@ -5,9 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- const E = "d", F = "wide", L = (A, o, s) => A === null || !(o && o > A || s && s < A);
8
+ "use client";
9
+ const o = "d", E = "wide", F = (s, A, n) => s === null || !(A && A > s || n && n < s);
9
10
  export {
10
- E as DEFAULT_FORMAT,
11
- F as DEFAULT_FORMAT_PLACEHOLDER,
12
- L as isInRange
11
+ o as DEFAULT_FORMAT,
12
+ E as DEFAULT_FORMAT_PLACEHOLDER,
13
+ F as isInRange
13
14
  };
@@ -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 Je=require("react"),e=require("prop-types"),Qe=require("@progress/kendo-react-popup"),K=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),et=require("@progress/kendo-svg-icons"),tt=require("../package-metadata.js"),nt=require("../dateinput/DateInput.js"),at=require("../calendar/components/Calendar.js"),o=require("../utils.js"),L=require("../messages/index.js"),ot=require("@progress/kendo-react-intl"),rt=require("./ToggleButton.js"),lt=require("../common/PickerWrap.js"),ut=require("../hooks/usePickerFloatingLabel.js"),it=require("@progress/kendo-react-layout"),st=require("../common/AdaptiveMode.js");function ct(n){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const R=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(h,f,R.get?R:{enumerable:!0,get:()=>n[f]})}}return h.default=n,Object.freeze(h)}const a=ct(Je),W=a.forwardRef((n,h)=>{u.validatePackage(tt.packageMetadata);const f=u.useId(n.id),R=ot.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:dt=l.pickerWrap,disabled:w=l.disabled,format:pe=l.format,max:_=l.max,min:E=l.min,popupSettings:y=l.popupSettings,tabIndex:be=l.tabIndex,weekNumber:he=l.weekNumber,validityStyles:j=l.validityStyles,size:T=l.size,rounded:q=l.rounded,fillMode:x=l.fillMode,autoFocus:ve=l.autoFocus,show:H,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:ke,ariaLabel:De,adaptive:ft,adaptiveTitle:Ce,inputAttributes:Pe,validationMessage:U,visited:mt,value:B,touched:gt,modified:pt,_adaptiveMode:bt=v,valid:Y,focusedDate:Oe,id:Me,...$}=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=P.current!==void 0&&P.current!==null?P.current:B!==void 0?B:b.value;return t!==null?K.cloneDate(t):null},i=()=>I.current!==void 0?I.current:H!==void 0?H:b.show,Re=()=>de||l.dateInput,Ie=()=>me||l.toggleButton,Se=()=>fe||l.calendar,_e=()=>ge||l.popup,X=()=>n.required!==void 0?n.required:!1,N=()=>{const t=m()||B||null,r=E,s=_,S=o.isInDateRange(t,r,s),F=U!==void 0,V=(!X()||t!=null)&&S,z=Y!==void 0?Y:V;return{customError:F,rangeOverflow:t&&s.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<r.getTime()||!1,valid:z,valueMissing:t===null}},Ee=t=>{for(const r of t)M({windowWidth:r.target.clientWidth})},Te=()=>{d.current&&d.current.focus()},Z=t=>{C.current=t},g=t=>{i()!==t&&(M({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:k.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:k.current}))},qe=t=>{const r=m();return r&&t?o.setTime(t,r):t},xe=t=>{y!=null&&y.onMouseDownOutside&&y.onMouseDownOutside.call(void 0,t)},G=(t,r)=>{M({value:K.cloneDate(t||void 0)}),P.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}),P.current=void 0,I.current=void 0,g(!1)},Be=t=>{const r=qe(t.value);G(r,t)},J=()=>{const{popupClass:t,...r}=y,s=i(),S=m(),F=S&&K.getDate(S),V=u.classNames(t),z={popupClass:"k-datepicker-popup",show:s,anchor:D.current,className:V,id:ne,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...r,onMouseDownOutside:xe},le={disabled:w,value:F,min:E,max:_,weekNumber:he,focusedDate:Oe,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:Be},ue=Se(),Ge=_e();return c()?a.createElement(ue,{_ref:Z,...le}):a.createElement(Ge,{...z},a.createElement(ue,{_ref:Z,...le}))},Q=()=>{M({focused:!1}),g(!1)},Ae=()=>{const{windowWidth:t=0}=b,r={expand:i(),onClose:Q,adaptiveTitle:Ce,windowWidth:t},s=J();return a.createElement(st.AdaptiveMode,{...r},a.createElement(it.ActionSheetContent,{overflowHidden:!0},s))},Ne=t=>{G(t.value,t)},Fe=()=>{M({focused:!0})},Ve=()=>{g(!i())},ee=()=>{w||(p.current=!0,g(!i()))},ze=t=>{t.preventDefault()},Ke=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:Ve,focus:Te})),a.useImperativeHandle(h,()=>k.current);const P=a.useRef(null),I=a.useRef(void 0),Le=a.useRef(null),p=a.useRef(!1),te=a.useRef(!1),O=a.useRef(null),[b,We]=a.useState({value:ce,show:se,focused:!1}),[,je]=a.useReducer(t=>t,!0),M=t=>{We(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 O.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(r=>Ee(r)),i()&&je(),(t=A())!=null&&t.body&&O.current&&O.current.observe(A().body),()=>{var r;clearTimeout(Le.current),(r=A())!=null&&r.body&&O.current&&O.current.disconnect()}},[]);const ne=f+"-popup-id",He=J(),Ue=Re(),Ye=m(),$e=Ie(),Xe=Ae(),ae=!j||N().valid,oe=R.toLanguageString(L.toggleCalendar,L.messages[L.toggleCalendar]),Ze={disabled:w,format:pe,formatPlaceholder:n.formatPlaceholder,id:Me,ariaLabelledBy:n.ariaLabelledBy,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:De,max:_,min:E,name:n.name,onChange:Ne,required:n.required,_ref:d,tabIndex:i()?-1:be,title:n.title,valid:N().valid,validationMessage:U,validityStyles:j,value:Ye,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:Pe},re=a.createElement(u.AsyncFocusBlur,{onFocus:Fe,onBlur:c()?void 0:Q,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:$,ref:D,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[T]||T}`]:T,[`k-rounded-${u.kendoThemeMaps.roundedMap[q]||q}`]:q,[`k-input-${x}`]:x,"k-invalid":!ae,"k-required":X(),"k-disabled":w},n.className),onKeyDown:Ke,style:{width:n.width},onFocus:t.onFocus,onBlur:t.onBlur,onClick:c()?ee:void 0},a.createElement(Ue,{_ref:d,ariaRole:"combobox",ariaExpanded:i(),ariaControls:ne,autoFocus:ve,...Ze}),a.createElement($e,{type:"button",icon:"calendar",svgIcon:et.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:c()?void 0:ee,"aria-label":oe,fillMode:x,onMouseDown:ze}),!c()&&He),c()&&Xe));return n.label?a.createElement(ut.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:nt.DateInput,calendar:at.Calendar,toggleButton:rt.ToggleButton,popup:Qe.Popup,pickerWrap:lt.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("react"),e=require("prop-types"),Ge=require("@progress/kendo-react-popup"),z=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),Je=require("@progress/kendo-svg-icons"),Qe=require("../package-metadata.js"),et=require("../dateinput/DateInput.js"),tt=require("../calendar/components/Calendar.js"),l=require("../utils.js"),K=require("../messages/index.js"),nt=require("@progress/kendo-react-intl"),at=require("./ToggleButton.js"),ot=require("../common/PickerWrap.js"),rt=require("../hooks/usePickerFloatingLabel.js"),lt=require("@progress/kendo-react-layout"),ut=require("../common/AdaptiveMode.js");function it(n){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const M=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(h,f,M.get?M:{enumerable:!0,get:()=>n[f]})}}return h.default=n,Object.freeze(h)}const a=it(Ze),L=a.forwardRef((n,h)=>{u.validatePackage(Qe.packageMetadata);const f=u.useId(n.id),M=nt.useLocalization(),v=u.useAdaptiveModeContext(),{defaultShow:ie=r.defaultShow,defaultValue:se=r.defaultValue,dateInput:ce=r.dateInput,calendar:de=r.calendar,toggleButton:fe=r.toggleButton,popup:me=r.popup,pickerWrap:st=r.pickerWrap,disabled:w=r.disabled,format:ge=r.format,max:S=r.max,min:E=r.min,popupSettings:y=r.popupSettings,tabIndex:pe=r.tabIndex,weekNumber:be=r.weekNumber,validityStyles:W=r.validityStyles,size:T=r.size,rounded:x=r.rounded,fillMode:_=r.fillMode,autoFocus:he=r.autoFocus,show:j,autoSwitchParts:ve,autoSwitchKeys:we,twoDigitYearMax:ye,ariaLabel:ke,adaptive:ct,adaptiveTitle:De,inputAttributes:Ce,validationMessage:H,_adaptiveMode:dt=v,valid:U,focusedDate:Pe,...Y}=u.usePropsContext(ue,n),B=()=>{if(u.canUseDOM)return D.current&&D.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&v&&b.windowWidth<=(v==null?void 0:v.medium)&&n.adaptive),m=()=>{const t=P.current!==void 0&&P.current!==null?P.current:n.value!==void 0?n.value:b.value;return t!==null?z.cloneDate(t):null},i=()=>q.current!==void 0?q.current:j!==void 0?j:b.show,Re=()=>ce||r.dateInput,Oe=()=>fe||r.toggleButton,Me=()=>de||r.calendar,qe=()=>me||r.popup,$=()=>n.required!==void 0?n.required:!1,A=()=>{const t=m()||n.value||null,o=E,s=S,I=l.isInDateRange(t,o,s),N=H!==void 0,F=(!$()||t!=null)&&I,V=U!==void 0?U:F;return{customError:N,rangeOverflow:t&&s.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<o.getTime()||!1,valid:V,valueMissing:t===null}},Ie=t=>{for(const o of t)O({windowWidth:o.target.clientWidth})},Se=()=>{d.current&&d.current.focus()},X=t=>{C.current=t},g=t=>{i()!==t&&(O({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:k.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:k.current}))},Ee=t=>{const o=m();return o&&t?l.setTime(t,o):t},Te=t=>{y!=null&&y.onMouseDownOutside&&y.onMouseDownOutside.call(void 0,t)},Z=(t,o)=>{O({value:z.cloneDate(t||void 0)}),P.current=t,q.current=!1,c()||(p.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:o.syntheticEvent,nativeEvent:o.nativeEvent,value:m(),show:i(),target:k.current}),P.current=void 0,q.current=void 0,g(!1)},xe=t=>{const o=Ee(t.value);Z(o,t)},G=()=>{const{popupClass:t,...o}=y,s=i(),I=m(),N=I&&z.getDate(I),F=u.classNames(t),V={popupClass:"k-datepicker-popup",show:s,anchor:D.current,className:F,id:te,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...o,onMouseDownOutside:Te},re={disabled:w,value:N,min:E,max:S,weekNumber:be,focusedDate:Pe,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:xe},le=Me(),Xe=qe();return c()?a.createElement(le,{_ref:X,...re}):a.createElement(Xe,{...V},a.createElement(le,{_ref:X,...re}))},J=()=>{O({focused:!1}),g(!1)},_e=()=>{const{windowWidth:t=0}=b,o={expand:i(),onClose:J,adaptiveTitle:De,windowWidth:t},s=G();return a.createElement(ut.AdaptiveMode,{...o},a.createElement(lt.ActionSheetContent,{overflowHidden:!0},s))},Be=t=>{Z(t.value,t)},Ae=()=>{O({focused:!0})},Ne=()=>{g(!i())},Q=()=>{w||(p.current=!0,g(!i()))},Fe=t=>{t.preventDefault()},Ve=t=>{const{altKey:o,keyCode:s}=t;if(s===u.Keys.esc&&i()){p.current=!0,g(!1);return}o&&(s===u.Keys.up||s===u.Keys.down)&&(t.preventDefault(),t.stopPropagation(),p.current=s===u.Keys.up,g(s===u.Keys.down))},k=a.useRef(null),D=a.useRef(null),d=a.useRef(null),C=a.useRef(null);a.useImperativeHandle(k,()=>({props:n,get element(){return D.current},get calendar(){return C.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return A()},get value(){return m()},get mobileMode(){return c()},togglePopup:Ne,focus:Se})),a.useImperativeHandle(h,()=>k.current);const P=a.useRef(null),q=a.useRef(void 0),ze=a.useRef(null),p=a.useRef(!1),ee=a.useRef(!1),R=a.useRef(null),[b,Ke]=a.useState({value:se,show:ie,focused:!1}),[,Le]=a.useReducer(t=>t,!0),O=t=>{Ke(o=>({...o,...t}))};a.useEffect(()=>{C.current&&C.current.element&&i()&&!ee.current&&C.current.element.focus({preventScroll:!0}),d.current&&d.current.element&&!i()&&p.current&&d.current.element.focus({preventScroll:!0}),ee.current=i(),p.current=!1}),a.useEffect(()=>{var t;return R.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(o=>Ie(o)),i()&&Le(),(t=B())!=null&&t.body&&R.current&&R.current.observe(B().body),()=>{var o;clearTimeout(ze.current),(o=B())!=null&&o.body&&R.current&&R.current.disconnect()}},[]);const te=f+"-popup-id",We=G(),je=Re(),He=m(),Ue=Oe(),Ye=_e(),ne=!W||A().valid,ae=M.toLanguageString(K.toggleCalendar,K.messages[K.toggleCalendar]),$e={disabled:w,format:ge,formatPlaceholder:n.formatPlaceholder,id:n.id,ariaLabelledBy:n.ariaLabelledBy,ariaDescribedBy:n.ariaDescribedBy,ariaLabel:ke,max:S,min:E,name:n.name,onChange:Be,required:n.required,_ref:d,tabIndex:i()?-1:pe,title:n.title,valid:A().valid,validationMessage:H,validityStyles:W,value:He,label:void 0,placeholder:b.focused?null:n.placeholder,ariaExpanded:i(),size:null,fillMode:null,rounded:null,autoFill:n.autoFill,twoDigitYearMax:ye,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:ve,autoSwitchKeys:we,allowCaretMode:n.allowCaretMode,inputAttributes:Ce},oe=a.createElement(u.AsyncFocusBlur,{onFocus:Ae,onBlur:c()?void 0:J,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:Y,ref:D,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[T]||T}`]:T,[`k-rounded-${u.kendoThemeMaps.roundedMap[x]||x}`]:x,[`k-input-${_}`]:_,"k-invalid":!ne,"k-required":$(),"k-disabled":w},n.className),onKeyDown:Ve,style:{width:n.width},onFocus:t.onFocus,onBlur:t.onBlur,onClick:c()?Q:void 0},a.createElement(je,{_ref:d,ariaRole:"combobox",ariaExpanded:i(),ariaControls:te,autoFocus:he,...$e}),a.createElement(Ue,{type:"button",icon:"calendar",svgIcon:Je.calendarIcon,title:ae,className:"k-input-button",rounded:null,onClick:c()?void 0:Q,"aria-label":ae,fillMode:_,onMouseDown:Fe}),!c()&&We),c()&&Ye));return n.label?a.createElement(rt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ne,editorDisabled:w,children:oe,style:{width:n.width},...Y}):oe});L.propTypes={className:e.string,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,focusedDate:e.instanceOf(Date),format:e.oneOfType([e.string,e.shape({skeleton:l.nullable(e.string),pattern:l.nullable(e.string),date:l.nullable(e.oneOf(["short","medium","long","full"])),time:l.nullable(e.oneOf(["short","medium","long","full"])),datetime:l.nullable(e.oneOf(["short","medium","long","full"])),era:l.nullable(e.oneOf(["narrow","short","long"])),year:l.nullable(e.oneOf(["numeric","2-digit"])),month:l.nullable(e.oneOf(["numeric","2-digit","narrow","short","long"])),day:l.nullable(e.oneOf(["numeric","2-digit"])),weekday:l.nullable(e.oneOf(["narrow","short","long"])),hour:l.nullable(e.oneOf(["numeric","2-digit"])),hour12:l.nullable(e.bool),minute:l.nullable(e.oneOf(["numeric","2-digit"])),second:l.nullable(e.oneOf(["numeric","2-digit"])),timeZoneName:l.nullable(e.oneOf(["short","long"]))})]),formatPlaceholder:e.oneOfType([e.oneOf(["wide","narrow","short","formatPattern"]).isRequired,e.shape({year:e.string.isRequired,month:e.string.isRequired,day:e.string.isRequired,hour:e.string.isRequired,minute:e.string.isRequired,second:e.string.isRequired})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,min:e.instanceOf(Date),max:e.instanceOf(Date),name:e.string,popupSettings:e.shape({animate:e.bool.isRequired,appendTo:e.any.isRequired,popupClass:e.string.isRequired}),show:e.bool,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),weekNumber:e.bool,width:e.oneOfType([e.number,e.string]),validationMessage:e.string,required:e.bool,valid:e.bool,size:e.oneOf([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),adaptive:e.bool,adaptiveTitle:e.string,autoFocus:e.bool,inputAttributes:e.object};const r={defaultShow:!1,defaultValue:null,dateInput:et.DateInput,calendar:tt.Calendar,toggleButton:at.ToggleButton,popup:Ge.Popup,pickerWrap:ot.PickerWrap,disabled:!1,format:"d",max:l.MAX_DATE,min:l.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1},ue=u.createPropsContext();L.displayName="KendoReactDatePicker";exports.DatePicker=L;exports.DatePickerPropsContext=ue;exports.datePickerDefaultProps=r;