@progress/kendo-react-layout
Version:
React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package
9 lines (8 loc) • 2 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
*-------------------------------------------------------------------------------------------
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),n=require("prop-types"),u=require("@progress/kendo-react-common");function D(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(c,o,l.get?l:{enumerable:!0,get:()=>t[o]})}}return c.default=t,Object.freeze(c)}const e=D(w),b=e.forwardRef((t,c)=>{const o=e.useRef(null);e.useImperativeHandle(c,()=>({element:o.current}));const{className:l,style:k,selected:r,disabled:a,item:N,render:x,dataItem:C,icon:g,svgIcon:p,text:f,id:R,onSelect:i,onKeyDown:m,index:s,tabIndex:j=E.tabIndex}=t,O=e.useMemo(()=>u.classNames("k-bottom-nav-item",{"k-selected":r,"k-disabled":a},l),[r,a,l]),P=e.useCallback(d=>{i&&s!==void 0&&!a&&i(d,s)},[i,s,a]),S=e.useCallback(d=>{m&&s!==void 0&&!a&&m(d,s)},[m,s,a]),v=x,I=N,y=e.createElement("span",{ref:o,className:O,style:k,role:"link",id:R,tabIndex:j,onClick:P,onKeyDown:S,"aria-current":r,"aria-disabled":a},I?e.createElement(I,{itemIndex:s,item:C}):e.createElement(e.Fragment,null,(g||p)&&e.createElement(u.IconWrap,{className:"k-bottom-nav-item-icon",name:g,icon:p,size:"xlarge"}),f&&e.createElement("span",{className:"k-bottom-nav-item-text",style:{userSelect:"none"}},f)));return v!==void 0?v.call(void 0,y,t):y}),E={tabIndex:0};b.propTypes={className:n.string,style:n.object,id:n.string,disabled:n.bool,selected:n.bool,icon:n.string,svgIcon:u.svgIconPropType,text:n.string,tabIndex:n.number};b.displayName="KendoReactBottomNavigationItem";exports.BottomNavigationItem=b;