UNPKG

@progress/kendo-react-dropdowns

Version:

React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package

9 lines (8 loc) 990 B
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./utils.js"),n=require("@progress/kendo-react-common");class m{navigate(e){const t=e.keyCode;if(t===n.Keys.up||t===n.Keys.left)return this.next({current:e.current,min:e.min,max:e.max,step:e.skipItems?e.skipItems:-1});if(t===n.Keys.down||t===n.Keys.right)return this.next({current:e.current,min:e.min,max:e.max,step:e.skipItems?e.skipItems:1});if(t===n.Keys.home)return 0;if(t===n.Keys.end)return e.max}next(e){return i.isPresent(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min}}exports.Navigation=m;