{"version":3,"file":"UnorderedList.cjs","sources":["../../../../src/beta/components/UnorderedList.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport { TypographySpacing } from '../types';\nimport { getSpacingClasses } from '../utils/utils';\n\nimport './text.scss';\n\n/**\n * @beta Experimental component - may have breaking changes in future releases\n */\ntype UnorderedListBaseProps = {\n  /** Ekstra klassenavn */\n  className?: string;\n  /** Innholdet */\n  children: React.ReactNode;\n  /** Spacing around the component (same as Text and Heading components) */\n  spacing?: TypographySpacing;\n};\n\nexport type UnorderedListProps<C extends React.ElementType> =\n  PolymorphicComponentProps<C, UnorderedListBaseProps>;\n\n/**\n * @beta Experimental component - may have breaking changes in future releases\n */\nexport const UnorderedList = <C extends React.ElementType = 'ul'>({\n  className,\n  spacing,\n  as,\n  children,\n  ...rest\n}: UnorderedListProps<C>): JSX.Element => {\n  const ListElement: React.ElementType = as || 'ul';\n\n  return (\n    <ListElement\n      className={classNames(\n        'eds-text--unordered-list',\n        getSpacingClasses(spacing, 'eds-text--unordered-list'),\n        className,\n      )}\n      {...rest}\n    >\n      {children}\n    </ListElement>\n  );\n};\n"],"names":["jsx","getSpacingClasses"],"mappings":";;;;;;AA0BO,MAAM,gBAAgB,CAAqC;AAAA,EAChE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA0C;AACxC,QAAM,cAAiC,MAAM;AAE7C,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAC,MAAAA,kBAAkB,SAAS,0BAA0B;AAAA,QACrD;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;;"}