@progress/kendo-react-dateinputs
Version:
React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package
9 lines (8 loc) • 1.6 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../utils.js"),e=require("@progress/kendo-react-common");class g{constructor(){this.itemHeight=0,this.timeListHeight=0,this.didCalculate=!1}ensureHeights(){this.timeListHeight===void 0&&this.calculateHeights()}calculateHeights(o,a){if(!e.canUseDOM)return;const t=a&&a.uTime,s=i.domContainerFactory("div"),l=i.domContainerFactory("span"),m=i.domContainerFactory("ul"),u=i.domContainerFactory("li"),p=()=>u("<span>02</span>",e.strippedClassNames(e.uTime.li({c:t}))),d=()=>m([p()],e.strippedClassNames(e.uTime.ul({c:t}))),h=()=>s([d()],e.strippedClassNames(e.uTime.containerSelector({c:t}),e.uTime.container({c:t,content:!0,scrollable:!0}))),C=s([l("minute",e.strippedClassNames(e.uTime.title({c:t}))),s([h()],e.strippedClassNames(e.uTime.list({c:t})))],e.strippedClassNames(e.uTime.listWrapper({c:t})),{left:"-10000px",position:"absolute"}),c=`.${e.strippedClassNames(e.uTime.containerSelector({c:t}))}`,n=o&&o.querySelector(c)||document.body,r=n.appendChild(C);this.timeListHeight=r.querySelector(c).offsetHeight,this.itemHeight=r.querySelector("li").offsetHeight,n.removeChild(r),this.didCalculate=!0}}exports.DOMService=g;