{"version":3,"file":"IconButton.mjs","names":[],"sources":["../../../src/icon-button/IconButton.tsx"],"sourcesContent":["/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { IconButtonBase, type IconButtonBaseProps } from '../icon-button-base';\n\ntype IconButtonButtonProps = Omit<IconButtonBaseProps, 'iconButtonVariant'>;\n\nexport const IconButton = <T extends React.ElementType = 'button'>({\n  children,\n  as,\n  isLoading = false,\n  isDisabled = false,\n  size = 'medium',\n  isFloating = false,\n  // Does not have a default value to avoid setting aria-pressed to true if not explicitly set\n  isActive,\n  variant = 'neutral',\n  description,\n  descriptionKbdProps,\n  tooltipProps,\n  className,\n  style,\n  htmlAttributes,\n  onClick,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, IconButtonButtonProps>) => {\n  return (\n    <IconButtonBase\n      as={as}\n      iconButtonVariant=\"default\"\n      isDisabled={isDisabled}\n      size={size}\n      isLoading={isLoading}\n      isActive={isActive}\n      isFloating={isFloating}\n      descriptionKbdProps={descriptionKbdProps}\n      description={description}\n      tooltipProps={tooltipProps}\n      className={className}\n      style={style}\n      variant={variant}\n      htmlAttributes={htmlAttributes}\n      onClick={onClick}\n      ref={ref}\n      {...restProps}\n    >\n      {children}\n    </IconButtonBase>\n  );\n};\n"],"mappings":";;;;;;CA4BE;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;;;;;;;;;;;;;;;;;;AAjBF,MAAa,cAAsD,SAmBX;CAnBW,IAAA,EACjE,UACA,IACA,YAAY,OACZ,aAAa,OACb,OAAO,UACP,aAAa,OAEb,UACA,UAAU,WACV,aACA,qBACA,cACA,WACA,OACA,gBACA,SACA,QAAA,MACG,YAAA,yBAAA,MAAA,SAAA;CAEH,OACE,oBAAC,gBAAA,eAAA,eAAA;EACK;EACJ,mBAAkB;EACN;EACN;EACK;EACD;EACE;EACS;EACR;EACC;EACH;EACJ;EACE;EACO;EACP;EACJ;CACD,GAAA,SAAA,GAAA,CAAA,GAAA,EAEH,SAAA,CACa,CAAA;AAEpB"}