{"version":3,"file":"LoadingBar.mjs","names":[],"sources":["../../../src/loading-bar/LoadingBar.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 classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n  /** Visually hidden message for screen readers, for example \"Loading search results\". */\n  loadingMessage?: string;\n  /** Whether the loading bar has a background rail */\n  hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n  as,\n  hasRail = false,\n  loadingMessage = 'Loading',\n  className,\n  htmlAttributes,\n  style,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n  const Component: React.ElementType = as ?? 'div';\n  const classes = classNames('ndl-loading-bar', className, {\n    'ndl-loading-bar-rail': hasRail,\n  });\n\n  return (\n    <Component\n      className={classes}\n      ref={ref}\n      role=\"status\"\n      style={style}\n      {...restProps}\n      {...htmlAttributes}\n    >\n      <span className=\"ndl-loading-bar-text\">{loadingMessage}</span>\n    </Component>\n  );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;CAiCE;CACA;CACA;CACA;CACA;CACA;CACA;;AAPF,MAAa,cAAmD,SASd;CATc,IAAA,EAC9D,IACA,UAAU,OACV,iBAAiB,WACjB,WACA,gBACA,OACA,QAAA,MACG,YAAA,yBAAA,MAAA,SAAA;CAEH,MAAM,YAA+B,OAAA,QAAA,OAAA,KAAA,IAAA,KAAM;CAC3C,MAAM,UAAU,WAAW,mBAAmB,WAAW,EACvD,wBAAwB,QAC1B,CAAC;CAED,OACE,oBAAC,WAAA,eAAA,eAAA,eAAA;EACC,WAAW;EACN;EACL,MAAK;EACE;CACH,GAAA,SAAA,GACA,cAAA,GAAA,CAAA,GAAA,EAAA,UAEJ,oBAAC,QAAD;EAAM,WAAU;EAAwB,UAAA;CAAqB,CAAA,EAAA,CACpD,CAAA;AAEf"}