@entur/typography 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +361 -0
- package/dist/styles.css +19 -1
- package/dist/typography.cjs.development.js +116 -77
- package/dist/typography.cjs.development.js.map +1 -1
- package/dist/typography.cjs.production.min.js.map +1 -1
- package/dist/typography.esm.js +116 -77
- package/dist/typography.esm.js.map +1 -1
- package/package.json +8 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.cjs.production.min.js","sources":["../src/BaseHeading.tsx","../src/StrongText.tsx","../src/index.tsx","../src/Blockquote.tsx","../src/CodeText.tsx","../src/EmphasizedText.tsx","../src/Heading1.tsx","../src/Heading2.tsx","../src/Heading3.tsx","../src/Heading4.tsx","../src/Heading5.tsx","../src/Heading6.tsx","../src/Label.tsx","../src/LeadParagraph.tsx","../src/Link.tsx","../src/ListItem.tsx","../src/NumberedList.tsx","../src/Paragraph.tsx","../src/PreformattedText.tsx","../src/SmallText.tsx","../src/SubLabel.tsx","../src/SubParagraph.tsx","../src/UnorderedList.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\ntype BaseHeadingOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres */\n as: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer */\n margin: 'top' | 'bottom' | 'both' | 'none';\n /** Nivået på overskriften */\n level: 1 | 2 | 3 | 4 | 5 | 6;\n};\nconst defaultElement = 'h1';\n\nexport type BaseHeadingProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<BaseHeadingOwnProps, T>;\n\nexport const BaseHeading = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n level,\n margin,\n as,\n ...rest\n}: BaseHeadingProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const baseClass = `eds-h${level}`;\n return (\n <Element\n className={classNames(\n baseClass,\n {\n [`${baseClass}--margin-top`]: margin === 'top',\n [`${baseClass}--margin-bottom`]: margin === 'bottom',\n [`${baseClass}--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type StrongTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"strong\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type StrongTextProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<StrongTextOwnProps, E>;\n\nconst defaultElement = 'strong';\n\nexport const StrongText = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin = 'both',\n as,\n ...rest\n}: StrongTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-strong-text',\n {\n [`eds-strong-text--margin-top`]: margin === 'top',\n [`eds-strong-text--margin-bottom`]: margin === 'bottom',\n [`eds-strong-text--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('typography');\n\nexport * from './Blockquote';\nexport * from './CodeText';\nexport * from './EmphasizedText';\nexport * from './Heading1';\nexport * from './Heading2';\nexport * from './Heading3';\nexport * from './Heading4';\nexport * from './Heading5';\nexport * from './Heading6';\nexport * from './Label';\nexport * from './LeadParagraph';\nexport * from './Link';\nexport * from './ListItem';\nexport * from './NumberedList';\nexport * from './Paragraph';\nexport * from './PreformattedText';\nexport * from './SmallText';\nexport * from './StrongText';\nexport * from './SubLabel';\nexport * from './SubParagraph';\nexport * from './UnorderedList';\n","import React from 'react';\nimport classNames from 'classnames';\n\ntype BlockquoteProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<\n React.BlockquoteHTMLAttributes<HTMLElement>,\n HTMLElement\n>;\n\nexport const Blockquote: React.FunctionComponent<BlockquoteProps> = ({\n className,\n ...rest\n}) => {\n return (\n <blockquote className={classNames('eds-blockquote', className)} {...rest} />\n );\n};\n\ntype BlockquoteFooterProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\nexport const BlockquoteFooter: React.FunctionComponent<BlockquoteFooterProps> =\n ({ className, ...rest }) => {\n return (\n <footer\n className={classNames('eds-blockquote__footer', className)}\n {...rest}\n />\n );\n };\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type CodeTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"code\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n};\n\nexport type CodeTextProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<CodeTextOwnProps, E>;\n\nconst defaultElement = 'code';\n\nexport const CodeText = <E extends React.ElementType = typeof defaultElement>({\n className,\n as,\n ...rest\n}: CodeTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element className={classNames('eds-code-text', className)} {...rest} />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type EmphasizedTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"em\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type EmphasizedTextProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<EmphasizedTextOwnProps, E>;\n\nconst defaultElement = 'em';\n\nexport const EmphasizedText = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin = 'both',\n as,\n ...rest\n}: EmphasizedTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-emphasized-text',\n {\n [`eds-emphasized-text--margin-top`]: margin === 'top',\n [`eds-emphasized-text--margin-bottom`]: margin === 'bottom',\n [`eds-emphasized-text--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading1OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h1\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nconst defaultElement = 'h1';\n\nexport type Heading1Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading1OwnProps, T>;\n\nexport const Heading1 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading1Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={1}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading2OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h2\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading2Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading2OwnProps, T>;\n\nconst defaultElement = 'h2';\n\nexport const Heading2 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading2Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={2}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading3OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h3\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading3Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading3OwnProps, T>;\n\nconst defaultElement = 'h3';\n\nexport const Heading3 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading3Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={3}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading4OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h4\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading4Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading4OwnProps, T>;\n\nconst defaultElement = 'h4';\nexport const Heading4 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading4Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={4}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading5OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h5\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading5Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading5OwnProps, T>;\n\nconst defaultElement = 'h5';\n\nexport const Heading5 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading5Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={5}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading6OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h6\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading6Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading6OwnProps, T>;\n\nconst defaultElement = 'h6';\n\nexport const Heading6 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading6Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={6}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type LabelOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"label\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type LabelProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<LabelOwnProps, E>;\n\nconst defaultElement = 'label';\n\nexport const Label = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: LabelProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-label',\n {\n [`eds-label--margin-top`]: margin === 'top',\n [`eds-label--margin-bottom`]: margin === 'bottom',\n [`eds-label--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type LeadParagraphOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"p\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type LeadParagraphProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<LeadParagraphOwnProps, E>;\n\nconst defaultElement = 'p';\n\nexport const LeadParagraph = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin = 'both',\n as,\n ...rest\n}: LeadParagraphProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-lead-paragraph',\n {\n [`eds-lead-paragraph--margin-top`]: margin === 'top',\n [`eds-lead-paragraph--margin-bottom`]: margin === 'bottom',\n [`eds-lead-paragraph--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type LinkOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"a\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type LinkProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<LinkOwnProps, E>;\n\nconst defaultElement = 'a';\n\nexport const Link = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: LinkProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-link',\n {\n [`eds-link--margin-top`]: margin === 'top',\n [`eds-link--margin-bottom`]: margin === 'bottom',\n [`eds-link--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { StrongText } from './StrongText';\n\nexport type ListItemProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Tittel */\n title?: React.ReactNode;\n [key: string]: any;\n};\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n className,\n title,\n ...rest\n}) => (\n <li className={classNames('eds-list-item', className)} {...rest}>\n {title && <StrongText className=\"eds-list-item__title\">{title}</StrongText>}\n {children}\n </li>\n);\n","import React from 'react';\nimport classNames from 'classnames';\n\nexport type NumberedListProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n} & React.OlHTMLAttributes<HTMLOListElement>;\n\nexport const NumberedList: React.FC<NumberedListProps> = ({\n className,\n type = '1',\n ...rest\n}) => (\n <ol\n className={classNames(\n 'eds-numbered-list',\n { [`eds-numbered-list--type-${type}`]: type },\n className,\n )}\n type={type}\n {...rest}\n />\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type ParagraphOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"p\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"bottom\"\n */\n margin?: 'bottom' | 'none';\n};\n\nexport type ParagraphProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<ParagraphOwnProps, E>;\n\nconst defaultElement = 'p';\n\nexport const Paragraph = <E extends React.ElementType = typeof defaultElement>({\n margin = 'bottom',\n className,\n as,\n ...rest\n}: ParagraphProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-paragraph',\n {\n 'eds-paragraph--margin-bottom': margin === 'bottom',\n 'eds-paragraph--margin-none': margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type PreformattedTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"pre\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n};\n\nexport type PreformattedTextProps<E extends React.ElementType> =\n PolymorphicPropsWithoutRef<PreformattedTextOwnProps, E>;\n\nconst defaultElement = 'pre';\n\nexport const PreformattedText = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n as,\n ...rest\n}: PreformattedTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames('eds-preformatted-text', className)}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type SmallTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"span\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type SmallTextProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<SmallTextOwnProps, T>;\nconst defaultElement = 'span';\n\nexport const SmallText = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: SmallTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-small-text',\n {\n [`eds-small-text--margin-top`]: margin === 'top',\n [`eds-small-text--margin-bottom`]: margin === 'bottom',\n [`eds-small-text--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type SubLabelOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"span\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type SubLabelProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<SubLabelOwnProps, E>;\n\nconst defaultElement = 'span';\n\nexport const SubLabel = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: SubLabelProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-sub-label',\n {\n [`eds-sub-label--margin-top`]: margin === 'top',\n [`eds-sub-label--margin-bottom`]: margin === 'bottom',\n [`eds-sub-label--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type SubParagraphOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"p\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type SubParagraphProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<SubParagraphOwnProps, E>;\n\nconst defaultElement = 'p';\n\nexport const SubParagraph = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin,\n as,\n ...rest\n}: SubParagraphProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-sub-paragraph',\n {\n [`eds-sub-paragraph--margin-top`]: margin === 'top',\n [`eds-sub-paragraph--margin-bottom`]: margin === 'bottom',\n [`eds-sub-paragraph--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\n\nexport type UnorderedListProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n} & React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLUListElement>,\n HTMLUListElement\n>;\n\nexport const UnorderedList: React.FC<UnorderedListProps> = ({\n className,\n ...rest\n}) => <ul className={classNames('eds-unordered-list', className)} {...rest} />;\n"],"names":["BaseHeading","className","level","margin","as","rest","baseClass","React","classNames","StrongText","_ref$margin","warnAboutMissingStyles","children","title","_ref$type","type"],"mappings":"wrBA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,UAASa,IACTC,KAAAA,aAAO,MACJV,SAAI,OAEPE,gCACEN,UAAWO,UACT,uDAC8BO,GAASA,KACvCd,GAEFc,KAAMA,GACFV,uBCGiB,oBACvBF,OAAAA,aAAS,WACTF,IAAAA,UACAG,IAAAA,GACGC,SAGH,OACEE,wBAFiCH,GARd,OAWjBH,UAAWO,UACT,gBACA,CACE,+BAA2C,WAAXL,EAChC,6BAAyC,SAAXA,GAEhCF,IAEEI,8BCtBsB,gBAG9BJ,IAAAA,UACAG,IAAAA,GACGC,SAGH,OACEE,wBAFiCH,GATd,SAYjBH,UAAWO,UAAW,wBAAyBP,IAC3CI,uBCPe,kBACvBJ,IAAAA,UAASS,IACTP,OAAAA,aAAS,SACTC,IAAAA,GACGC,SAGH,OACEE,wBAFiCH,GARd,UAWjBH,UAAWO,UACT,uDAE6C,QAAXL,qCACc,WAAXA,mCACS,SAAXA,KAEnCF,IAEEI,2CClBc,kBACtBJ,IAAAA,UAASS,IACTP,OAAAA,aAAS,SACTC,IAAAA,GACGC,SAGH,OACEE,wBAFiCH,GARd,UAWjBH,UAAWO,UACT,qDAE4C,QAAXL,oCACc,WAAXA,kCACS,SAAXA,KAElCF,IAEEI,0BCjBkB,kBAG1BJ,IAAAA,UACAE,IAAAA,OACAC,IAAAA,GACGC,SAGH,OACEE,wBAFiCH,GAVd,OAajBH,UAAWO,UACT,6DAEgD,QAAXL,wCACc,WAAXA,sCACS,SAAXA,KAEtCF,IAEEI,2BChCiD,YAAjC,IACxBJ,IAAAA,UACGI,SAAI,OACHE,gCAAIN,UAAWO,UAAW,qBAAsBP,IAAgBI"}
|
|
1
|
+
{"version":3,"file":"typography.cjs.production.min.js","sources":["../src/BaseHeading.tsx","../src/StrongText.tsx","../src/index.tsx","../src/Blockquote.tsx","../src/CodeText.tsx","../src/EmphasizedText.tsx","../src/Heading1.tsx","../src/Heading2.tsx","../src/Heading3.tsx","../src/Heading4.tsx","../src/Heading5.tsx","../src/Heading6.tsx","../src/Label.tsx","../src/LeadParagraph.tsx","../src/Link.tsx","../src/ListItem.tsx","../src/NumberedList.tsx","../src/Paragraph.tsx","../src/PreformattedText.tsx","../src/SmallText.tsx","../src/SubLabel.tsx","../src/SubParagraph.tsx","../src/UnorderedList.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\ntype BaseHeadingOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres */\n as: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer */\n margin: 'top' | 'bottom' | 'both' | 'none';\n /** Nivået på overskriften */\n level: 1 | 2 | 3 | 4 | 5 | 6;\n};\nconst defaultElement = 'h1';\n\nexport type BaseHeadingProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<BaseHeadingOwnProps, T>;\n\nexport const BaseHeading = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n level,\n margin,\n as,\n ...rest\n}: BaseHeadingProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const baseClass = `eds-h${level}`;\n return (\n <Element\n className={classNames(\n baseClass,\n {\n [`${baseClass}--margin-top`]: margin === 'top',\n [`${baseClass}--margin-bottom`]: margin === 'bottom',\n [`${baseClass}--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type StrongTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"strong\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type StrongTextProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<StrongTextOwnProps, E>;\n\nconst defaultElement = 'strong';\n\nexport const StrongText = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin = 'both',\n as,\n ...rest\n}: StrongTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-strong-text',\n {\n [`eds-strong-text--margin-top`]: margin === 'top',\n [`eds-strong-text--margin-bottom`]: margin === 'bottom',\n [`eds-strong-text--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('typography');\n\nexport * from './Blockquote';\nexport * from './CodeText';\nexport * from './EmphasizedText';\nexport * from './Heading1';\nexport * from './Heading2';\nexport * from './Heading3';\nexport * from './Heading4';\nexport * from './Heading5';\nexport * from './Heading6';\nexport * from './Label';\nexport * from './LeadParagraph';\nexport * from './Link';\nexport * from './ListItem';\nexport * from './NumberedList';\nexport * from './Paragraph';\nexport * from './PreformattedText';\nexport * from './SmallText';\nexport * from './StrongText';\nexport * from './SubLabel';\nexport * from './SubParagraph';\nexport * from './UnorderedList';\n","import React from 'react';\nimport classNames from 'classnames';\n\ntype BlockquoteProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<\n React.BlockquoteHTMLAttributes<HTMLElement>,\n HTMLElement\n>;\n\nexport const Blockquote: React.FunctionComponent<BlockquoteProps> = ({\n className,\n ...rest\n}) => {\n return (\n <blockquote className={classNames('eds-blockquote', className)} {...rest} />\n );\n};\n\ntype BlockquoteFooterProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\nexport const BlockquoteFooter: React.FunctionComponent<BlockquoteFooterProps> =\n ({ className, ...rest }) => {\n return (\n <footer\n className={classNames('eds-blockquote__footer', className)}\n {...rest}\n />\n );\n };\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type CodeTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"code\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n};\n\nexport type CodeTextProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<CodeTextOwnProps, E>;\n\nconst defaultElement = 'code';\n\nexport const CodeText = <E extends React.ElementType = typeof defaultElement>({\n className,\n as,\n ...rest\n}: CodeTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element className={classNames('eds-code-text', className)} {...rest} />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type EmphasizedTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"em\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type EmphasizedTextProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<EmphasizedTextOwnProps, E>;\n\nconst defaultElement = 'em';\n\nexport const EmphasizedText = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin = 'both',\n as,\n ...rest\n}: EmphasizedTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-emphasized-text',\n {\n [`eds-emphasized-text--margin-top`]: margin === 'top',\n [`eds-emphasized-text--margin-bottom`]: margin === 'bottom',\n [`eds-emphasized-text--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading1OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h1\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nconst defaultElement = 'h1';\n\nexport type Heading1Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading1OwnProps, T>;\n\nexport const Heading1 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading1Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={1}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading2OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h2\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading2Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading2OwnProps, T>;\n\nconst defaultElement = 'h2';\n\nexport const Heading2 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading2Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={2}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading3OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h3\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading3Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading3OwnProps, T>;\n\nconst defaultElement = 'h3';\n\nexport const Heading3 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading3Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={3}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading4OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h4\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading4Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading4OwnProps, T>;\n\nconst defaultElement = 'h4';\nexport const Heading4 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading4Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={4}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading5OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h5\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading5Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading5OwnProps, T>;\n\nconst defaultElement = 'h5';\n\nexport const Heading5 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading5Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={5}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport { BaseHeading } from './BaseHeading';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type Heading6OwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"h6\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type Heading6Props<T extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<Heading6OwnProps, T>;\n\nconst defaultElement = 'h6';\n\nexport const Heading6 = <E extends React.ElementType = typeof defaultElement>({\n margin = 'both',\n children,\n as,\n ...rest\n}: Heading6Props<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseHeading as={Element} margin={margin} {...rest} level={6}>\n {children}\n </BaseHeading>\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type LabelOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"label\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type LabelProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<LabelOwnProps, E>;\n\nconst defaultElement = 'label';\n\nexport const Label = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: LabelProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-label',\n {\n [`eds-label--margin-top`]: margin === 'top',\n [`eds-label--margin-bottom`]: margin === 'bottom',\n [`eds-label--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type LeadParagraphOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"p\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type LeadParagraphProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<LeadParagraphOwnProps, E>;\n\nconst defaultElement = 'p';\n\nexport const LeadParagraph = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin = 'both',\n as,\n ...rest\n}: LeadParagraphProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-lead-paragraph',\n {\n [`eds-lead-paragraph--margin-top`]: margin === 'top',\n [`eds-lead-paragraph--margin-bottom`]: margin === 'bottom',\n [`eds-lead-paragraph--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type LinkOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"a\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type LinkProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<LinkOwnProps, E>;\n\nconst defaultElement = 'a';\n\nexport const Link = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: LinkProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-link',\n {\n [`eds-link--margin-top`]: margin === 'top',\n [`eds-link--margin-bottom`]: margin === 'bottom',\n [`eds-link--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { StrongText } from './StrongText';\n\nexport type ListItemProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Tittel */\n title?: React.ReactNode;\n [key: string]: any;\n};\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n className,\n title,\n ...rest\n}) => (\n <li className={classNames('eds-list-item', className)} {...rest}>\n {title && <StrongText className=\"eds-list-item__title\">{title}</StrongText>}\n {children}\n </li>\n);\n","import React from 'react';\nimport classNames from 'classnames';\n\nexport type NumberedListProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n} & React.OlHTMLAttributes<HTMLOListElement>;\n\nexport const NumberedList: React.FC<NumberedListProps> = ({\n className,\n type = '1',\n ...rest\n}) => (\n <ol\n className={classNames(\n 'eds-numbered-list',\n { [`eds-numbered-list--type-${type}`]: type },\n className,\n )}\n type={type}\n {...rest}\n />\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type ParagraphOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"p\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"bottom\"\n */\n margin?: 'bottom' | 'none';\n};\n\nexport type ParagraphProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<ParagraphOwnProps, E>;\n\nconst defaultElement = 'p';\n\nexport const Paragraph = <E extends React.ElementType = typeof defaultElement>({\n margin = 'bottom',\n className,\n as,\n ...rest\n}: ParagraphProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-paragraph',\n {\n 'eds-paragraph--margin-bottom': margin === 'bottom',\n 'eds-paragraph--margin-none': margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type PreformattedTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"pre\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n};\n\nexport type PreformattedTextProps<E extends React.ElementType> =\n PolymorphicPropsWithoutRef<PreformattedTextOwnProps, E>;\n\nconst defaultElement = 'pre';\n\nexport const PreformattedText = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n as,\n ...rest\n}: PreformattedTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames('eds-preformatted-text', className)}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type SmallTextOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"span\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type SmallTextProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<SmallTextOwnProps, T>;\nconst defaultElement = 'span';\n\nexport const SmallText = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: SmallTextProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-small-text',\n {\n [`eds-small-text--margin-top`]: margin === 'top',\n [`eds-small-text--margin-bottom`]: margin === 'bottom',\n [`eds-small-text--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type SubLabelOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"span\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type SubLabelProps<E extends React.ElementType = typeof defaultElement> =\n PolymorphicPropsWithoutRef<SubLabelOwnProps, E>;\n\nconst defaultElement = 'span';\n\nexport const SubLabel = <E extends React.ElementType = typeof defaultElement>({\n className,\n margin = 'both',\n as,\n ...rest\n}: SubLabelProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-sub-label',\n {\n [`eds-sub-label--margin-top`]: margin === 'top',\n [`eds-sub-label--margin-bottom`]: margin === 'bottom',\n [`eds-sub-label--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicPropsWithoutRef } from '@entur/utils';\n\nexport type SubParagraphOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default \"p\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n /** Hvor du vil ha marginer\n * @default \"both\"\n */\n margin?: 'top' | 'bottom' | 'both' | 'none';\n};\n\nexport type SubParagraphProps<\n E extends React.ElementType = typeof defaultElement,\n> = PolymorphicPropsWithoutRef<SubParagraphOwnProps, E>;\n\nconst defaultElement = 'p';\n\nexport const SubParagraph = <\n E extends React.ElementType = typeof defaultElement,\n>({\n className,\n margin,\n as,\n ...rest\n}: SubParagraphProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-sub-paragraph',\n {\n [`eds-sub-paragraph--margin-top`]: margin === 'top',\n [`eds-sub-paragraph--margin-bottom`]: margin === 'bottom',\n [`eds-sub-paragraph--margin-none`]: margin === 'none',\n },\n className,\n )}\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\n\nexport type UnorderedListProps = {\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet */\n children: React.ReactNode;\n} & React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLUListElement>,\n HTMLUListElement\n>;\n\nexport const UnorderedList: React.FC<UnorderedListProps> = ({\n className,\n ...rest\n}) => <ul className={classNames('eds-unordered-list', className)} {...rest} />;\n"],"names":["BaseHeading","className","level","margin","as","rest","baseClass","React","classNames","StrongText","warnAboutMissingStyles","children","title","type"],"mappings":"wrBAsBaA,EAAc,kBAGzBC,IAAAA,UACAC,IAAAA,MACAC,IAAAA,OACAC,IAAAA,GACGC,SAGGC,UAAoBJ,SAExBK,wBAHiCH,GAfd,QAmBjBH,UAAWO,UACTF,UAEMA,kBAAqC,QAAXH,IAC1BG,qBAAwC,WAAXH,IAC7BG,mBAAsC,SAAXH,KAEjCF,IAEEI,2SCnBGI,EAAa,kBAGxBR,IAAAA,cACAE,OAAAA,aAAS,SACTC,IAAAA,GACGC,gBAIDE,wBAFiCH,GAVd,YAajBH,UAAWO,UACT,yDAE8C,QAAXL,sCACc,WAAXA,oCACS,SAAXA,KAEpCF,IAEEI,4NC1CVK,yBAAuB,iCCQ6C,gBAClET,IAAAA,UACGI,gBAGDE,wCAAYN,UAAWO,UAAW,iBAAkBP,IAAgBI,8BAUtE,gBAAGJ,IAAAA,UAAcI,gBAEbE,oCACEN,UAAWO,UAAW,yBAA0BP,IAC5C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ACS,SAAXA,KAElCF,IAEEI,0BCjBkB,kBAG1BJ,IAAAA,UACAE,IAAAA,OACAC,IAAAA,GACGC,gBAIDE,wBAFiCH,GAVd,OAajBH,UAAWO,UACT,6DAEgD,QAAXL,wCACc,WAAXA,sCACS,SAAXA,KAEtCF,IAEEI,2BChCiD,gBACzDJ,IAAAA,UACGI,gBACCE,gCAAIN,UAAWO,UAAW,qBAAsBP,IAAgBI"}
|
package/dist/typography.esm.js
CHANGED
|
@@ -6,41 +6,49 @@ function _extends() {
|
|
|
6
6
|
_extends = Object.assign || function (target) {
|
|
7
7
|
for (var i = 1; i < arguments.length; i++) {
|
|
8
8
|
var source = arguments[i];
|
|
9
|
+
|
|
9
10
|
for (var key in source) {
|
|
10
11
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
12
|
target[key] = source[key];
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
return target;
|
|
16
18
|
};
|
|
19
|
+
|
|
17
20
|
return _extends.apply(this, arguments);
|
|
18
21
|
}
|
|
22
|
+
|
|
19
23
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
20
24
|
if (source == null) return {};
|
|
21
25
|
var target = {};
|
|
22
26
|
var sourceKeys = Object.keys(source);
|
|
23
27
|
var key, i;
|
|
28
|
+
|
|
24
29
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
25
30
|
key = sourceKeys[i];
|
|
26
31
|
if (excluded.indexOf(key) >= 0) continue;
|
|
27
32
|
target[key] = source[key];
|
|
28
33
|
}
|
|
34
|
+
|
|
29
35
|
return target;
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
var _excluded$l = ["className"],
|
|
33
|
-
|
|
39
|
+
_excluded2 = ["className"];
|
|
34
40
|
var Blockquote = function Blockquote(_ref) {
|
|
35
41
|
var className = _ref.className,
|
|
36
|
-
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
43
|
+
|
|
37
44
|
return React.createElement("blockquote", _extends({
|
|
38
45
|
className: classNames('eds-blockquote', className)
|
|
39
46
|
}, rest));
|
|
40
47
|
};
|
|
41
48
|
var BlockquoteFooter = function BlockquoteFooter(_ref2) {
|
|
42
49
|
var className = _ref2.className,
|
|
43
|
-
|
|
50
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
51
|
+
|
|
44
52
|
return React.createElement("footer", _extends({
|
|
45
53
|
className: classNames('eds-blockquote__footer', className)
|
|
46
54
|
}, rest));
|
|
@@ -50,8 +58,9 @@ var _excluded$k = ["className", "as"];
|
|
|
50
58
|
var defaultElement$h = 'code';
|
|
51
59
|
var CodeText = function CodeText(_ref) {
|
|
52
60
|
var className = _ref.className,
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
as = _ref.as,
|
|
62
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
63
|
+
|
|
55
64
|
var Element = as || defaultElement$h;
|
|
56
65
|
return React.createElement(Element, _extends({
|
|
57
66
|
className: classNames('eds-code-text', className)
|
|
@@ -62,11 +71,13 @@ var _excluded$j = ["className", "margin", "as"];
|
|
|
62
71
|
var defaultElement$g = 'em';
|
|
63
72
|
var EmphasizedText = function EmphasizedText(_ref) {
|
|
64
73
|
var _classNames;
|
|
74
|
+
|
|
65
75
|
var className = _ref.className,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
_ref$margin = _ref.margin,
|
|
77
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
78
|
+
as = _ref.as,
|
|
79
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
80
|
+
|
|
70
81
|
var Element = as || defaultElement$g;
|
|
71
82
|
return React.createElement(Element, _extends({
|
|
72
83
|
className: classNames('eds-emphasized-text', (_classNames = {}, _classNames["eds-emphasized-text--margin-top"] = margin === 'top', _classNames["eds-emphasized-text--margin-bottom"] = margin === 'bottom', _classNames["eds-emphasized-text--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -77,11 +88,13 @@ var _excluded$i = ["className", "level", "margin", "as"];
|
|
|
77
88
|
var defaultElement$f = 'h1';
|
|
78
89
|
var BaseHeading = function BaseHeading(_ref) {
|
|
79
90
|
var _classNames;
|
|
91
|
+
|
|
80
92
|
var className = _ref.className,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
93
|
+
level = _ref.level,
|
|
94
|
+
margin = _ref.margin,
|
|
95
|
+
as = _ref.as,
|
|
96
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
97
|
+
|
|
85
98
|
var Element = as || defaultElement$f;
|
|
86
99
|
var baseClass = "eds-h" + level;
|
|
87
100
|
return React.createElement(Element, _extends({
|
|
@@ -93,10 +106,11 @@ var _excluded$h = ["margin", "children", "as"];
|
|
|
93
106
|
var defaultElement$e = 'h1';
|
|
94
107
|
var Heading1 = function Heading1(_ref) {
|
|
95
108
|
var _ref$margin = _ref.margin,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
109
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
110
|
+
children = _ref.children,
|
|
111
|
+
as = _ref.as,
|
|
112
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
113
|
+
|
|
100
114
|
var Element = as || defaultElement$e;
|
|
101
115
|
return React.createElement(BaseHeading, _extends({
|
|
102
116
|
as: Element,
|
|
@@ -110,10 +124,11 @@ var _excluded$g = ["margin", "children", "as"];
|
|
|
110
124
|
var defaultElement$d = 'h2';
|
|
111
125
|
var Heading2 = function Heading2(_ref) {
|
|
112
126
|
var _ref$margin = _ref.margin,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
127
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
128
|
+
children = _ref.children,
|
|
129
|
+
as = _ref.as,
|
|
130
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
131
|
+
|
|
117
132
|
var Element = as || defaultElement$d;
|
|
118
133
|
return React.createElement(BaseHeading, _extends({
|
|
119
134
|
as: Element,
|
|
@@ -127,10 +142,11 @@ var _excluded$f = ["margin", "children", "as"];
|
|
|
127
142
|
var defaultElement$c = 'h3';
|
|
128
143
|
var Heading3 = function Heading3(_ref) {
|
|
129
144
|
var _ref$margin = _ref.margin,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
146
|
+
children = _ref.children,
|
|
147
|
+
as = _ref.as,
|
|
148
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
149
|
+
|
|
134
150
|
var Element = as || defaultElement$c;
|
|
135
151
|
return React.createElement(BaseHeading, _extends({
|
|
136
152
|
as: Element,
|
|
@@ -144,10 +160,11 @@ var _excluded$e = ["margin", "children", "as"];
|
|
|
144
160
|
var defaultElement$b = 'h4';
|
|
145
161
|
var Heading4 = function Heading4(_ref) {
|
|
146
162
|
var _ref$margin = _ref.margin,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
163
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
164
|
+
children = _ref.children,
|
|
165
|
+
as = _ref.as,
|
|
166
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
167
|
+
|
|
151
168
|
var Element = as || defaultElement$b;
|
|
152
169
|
return React.createElement(BaseHeading, _extends({
|
|
153
170
|
as: Element,
|
|
@@ -161,10 +178,11 @@ var _excluded$d = ["margin", "children", "as"];
|
|
|
161
178
|
var defaultElement$a = 'h5';
|
|
162
179
|
var Heading5 = function Heading5(_ref) {
|
|
163
180
|
var _ref$margin = _ref.margin,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
181
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
182
|
+
children = _ref.children,
|
|
183
|
+
as = _ref.as,
|
|
184
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
185
|
+
|
|
168
186
|
var Element = as || defaultElement$a;
|
|
169
187
|
return React.createElement(BaseHeading, _extends({
|
|
170
188
|
as: Element,
|
|
@@ -178,10 +196,11 @@ var _excluded$c = ["margin", "children", "as"];
|
|
|
178
196
|
var defaultElement$9 = 'h6';
|
|
179
197
|
var Heading6 = function Heading6(_ref) {
|
|
180
198
|
var _ref$margin = _ref.margin,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
199
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
200
|
+
children = _ref.children,
|
|
201
|
+
as = _ref.as,
|
|
202
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
203
|
+
|
|
185
204
|
var Element = as || defaultElement$9;
|
|
186
205
|
return React.createElement(BaseHeading, _extends({
|
|
187
206
|
as: Element,
|
|
@@ -195,11 +214,13 @@ var _excluded$b = ["className", "margin", "as"];
|
|
|
195
214
|
var defaultElement$8 = 'label';
|
|
196
215
|
var Label = function Label(_ref) {
|
|
197
216
|
var _classNames;
|
|
217
|
+
|
|
198
218
|
var className = _ref.className,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
219
|
+
_ref$margin = _ref.margin,
|
|
220
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
221
|
+
as = _ref.as,
|
|
222
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
223
|
+
|
|
203
224
|
var Element = as || defaultElement$8;
|
|
204
225
|
return React.createElement(Element, _extends({
|
|
205
226
|
className: classNames('eds-label', (_classNames = {}, _classNames["eds-label--margin-top"] = margin === 'top', _classNames["eds-label--margin-bottom"] = margin === 'bottom', _classNames["eds-label--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -210,11 +231,13 @@ var _excluded$a = ["className", "margin", "as"];
|
|
|
210
231
|
var defaultElement$7 = 'p';
|
|
211
232
|
var LeadParagraph = function LeadParagraph(_ref) {
|
|
212
233
|
var _classNames;
|
|
234
|
+
|
|
213
235
|
var className = _ref.className,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
236
|
+
_ref$margin = _ref.margin,
|
|
237
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
238
|
+
as = _ref.as,
|
|
239
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
240
|
+
|
|
218
241
|
var Element = as || defaultElement$7;
|
|
219
242
|
return React.createElement(Element, _extends({
|
|
220
243
|
className: classNames('eds-lead-paragraph', (_classNames = {}, _classNames["eds-lead-paragraph--margin-top"] = margin === 'top', _classNames["eds-lead-paragraph--margin-bottom"] = margin === 'bottom', _classNames["eds-lead-paragraph--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -225,11 +248,13 @@ var _excluded$9 = ["className", "margin", "as"];
|
|
|
225
248
|
var defaultElement$6 = 'a';
|
|
226
249
|
var Link = function Link(_ref) {
|
|
227
250
|
var _classNames;
|
|
251
|
+
|
|
228
252
|
var className = _ref.className,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
253
|
+
_ref$margin = _ref.margin,
|
|
254
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
255
|
+
as = _ref.as,
|
|
256
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
257
|
+
|
|
233
258
|
var Element = as || defaultElement$6;
|
|
234
259
|
return React.createElement(Element, _extends({
|
|
235
260
|
className: classNames('eds-link', (_classNames = {}, _classNames["eds-link--margin-top"] = margin === 'top', _classNames["eds-link--margin-bottom"] = margin === 'bottom', _classNames["eds-link--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -240,11 +265,13 @@ var _excluded$8 = ["className", "margin", "as"];
|
|
|
240
265
|
var defaultElement$5 = 'strong';
|
|
241
266
|
var StrongText = function StrongText(_ref) {
|
|
242
267
|
var _classNames;
|
|
268
|
+
|
|
243
269
|
var className = _ref.className,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
270
|
+
_ref$margin = _ref.margin,
|
|
271
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
272
|
+
as = _ref.as,
|
|
273
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
274
|
+
|
|
248
275
|
var Element = as || defaultElement$5;
|
|
249
276
|
return React.createElement(Element, _extends({
|
|
250
277
|
className: classNames('eds-strong-text', (_classNames = {}, _classNames["eds-strong-text--margin-top"] = margin === 'top', _classNames["eds-strong-text--margin-bottom"] = margin === 'bottom', _classNames["eds-strong-text--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -254,9 +281,10 @@ var StrongText = function StrongText(_ref) {
|
|
|
254
281
|
var _excluded$7 = ["children", "className", "title"];
|
|
255
282
|
var ListItem = function ListItem(_ref) {
|
|
256
283
|
var children = _ref.children,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
284
|
+
className = _ref.className,
|
|
285
|
+
title = _ref.title,
|
|
286
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
287
|
+
|
|
260
288
|
return React.createElement("li", _extends({
|
|
261
289
|
className: classNames('eds-list-item', className)
|
|
262
290
|
}, rest), title && React.createElement(StrongText, {
|
|
@@ -267,10 +295,12 @@ var ListItem = function ListItem(_ref) {
|
|
|
267
295
|
var _excluded$6 = ["className", "type"];
|
|
268
296
|
var NumberedList = function NumberedList(_ref) {
|
|
269
297
|
var _classNames;
|
|
298
|
+
|
|
270
299
|
var className = _ref.className,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
300
|
+
_ref$type = _ref.type,
|
|
301
|
+
type = _ref$type === void 0 ? '1' : _ref$type,
|
|
302
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
303
|
+
|
|
274
304
|
return React.createElement("ol", _extends({
|
|
275
305
|
className: classNames('eds-numbered-list', (_classNames = {}, _classNames["eds-numbered-list--type-" + type] = type, _classNames), className),
|
|
276
306
|
type: type
|
|
@@ -281,10 +311,11 @@ var _excluded$5 = ["margin", "className", "as"];
|
|
|
281
311
|
var defaultElement$4 = 'p';
|
|
282
312
|
var Paragraph = function Paragraph(_ref) {
|
|
283
313
|
var _ref$margin = _ref.margin,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
314
|
+
margin = _ref$margin === void 0 ? 'bottom' : _ref$margin,
|
|
315
|
+
className = _ref.className,
|
|
316
|
+
as = _ref.as,
|
|
317
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
318
|
+
|
|
288
319
|
var Element = as || defaultElement$4;
|
|
289
320
|
return React.createElement(Element, _extends({
|
|
290
321
|
className: classNames('eds-paragraph', {
|
|
@@ -298,8 +329,9 @@ var _excluded$4 = ["className", "as"];
|
|
|
298
329
|
var defaultElement$3 = 'pre';
|
|
299
330
|
var PreformattedText = function PreformattedText(_ref) {
|
|
300
331
|
var className = _ref.className,
|
|
301
|
-
|
|
302
|
-
|
|
332
|
+
as = _ref.as,
|
|
333
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
334
|
+
|
|
303
335
|
var Element = as || defaultElement$3;
|
|
304
336
|
return React.createElement(Element, _extends({
|
|
305
337
|
className: classNames('eds-preformatted-text', className)
|
|
@@ -310,11 +342,13 @@ var _excluded$3 = ["className", "margin", "as"];
|
|
|
310
342
|
var defaultElement$2 = 'span';
|
|
311
343
|
var SmallText = function SmallText(_ref) {
|
|
312
344
|
var _classNames;
|
|
345
|
+
|
|
313
346
|
var className = _ref.className,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
347
|
+
_ref$margin = _ref.margin,
|
|
348
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
349
|
+
as = _ref.as,
|
|
350
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
351
|
+
|
|
318
352
|
var Element = as || defaultElement$2;
|
|
319
353
|
return React.createElement(Element, _extends({
|
|
320
354
|
className: classNames('eds-small-text', (_classNames = {}, _classNames["eds-small-text--margin-top"] = margin === 'top', _classNames["eds-small-text--margin-bottom"] = margin === 'bottom', _classNames["eds-small-text--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -325,11 +359,13 @@ var _excluded$2 = ["className", "margin", "as"];
|
|
|
325
359
|
var defaultElement$1 = 'span';
|
|
326
360
|
var SubLabel = function SubLabel(_ref) {
|
|
327
361
|
var _classNames;
|
|
362
|
+
|
|
328
363
|
var className = _ref.className,
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
364
|
+
_ref$margin = _ref.margin,
|
|
365
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
366
|
+
as = _ref.as,
|
|
367
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
368
|
+
|
|
333
369
|
var Element = as || defaultElement$1;
|
|
334
370
|
return React.createElement(Element, _extends({
|
|
335
371
|
className: classNames('eds-sub-label', (_classNames = {}, _classNames["eds-sub-label--margin-top"] = margin === 'top', _classNames["eds-sub-label--margin-bottom"] = margin === 'bottom', _classNames["eds-sub-label--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -340,10 +376,12 @@ var _excluded$1 = ["className", "margin", "as"];
|
|
|
340
376
|
var defaultElement = 'p';
|
|
341
377
|
var SubParagraph = function SubParagraph(_ref) {
|
|
342
378
|
var _classNames;
|
|
379
|
+
|
|
343
380
|
var className = _ref.className,
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
381
|
+
margin = _ref.margin,
|
|
382
|
+
as = _ref.as,
|
|
383
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
384
|
+
|
|
347
385
|
var Element = as || defaultElement;
|
|
348
386
|
return React.createElement(Element, _extends({
|
|
349
387
|
className: classNames('eds-sub-paragraph', (_classNames = {}, _classNames["eds-sub-paragraph--margin-top"] = margin === 'top', _classNames["eds-sub-paragraph--margin-bottom"] = margin === 'bottom', _classNames["eds-sub-paragraph--margin-none"] = margin === 'none', _classNames), className)
|
|
@@ -353,7 +391,8 @@ var SubParagraph = function SubParagraph(_ref) {
|
|
|
353
391
|
var _excluded = ["className"];
|
|
354
392
|
var UnorderedList = function UnorderedList(_ref) {
|
|
355
393
|
var className = _ref.className,
|
|
356
|
-
|
|
394
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
395
|
+
|
|
357
396
|
return React.createElement("ul", _extends({
|
|
358
397
|
className: classNames('eds-unordered-list', className)
|
|
359
398
|
}, rest));
|