@entur/typography 1.7.6 → 1.7.7
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/dist/BaseHeading.d.ts +2 -2
- package/dist/Blockquote.d.ts +2 -2
- package/dist/CodeText.d.ts +2 -2
- package/dist/EmphasizedText.d.ts +2 -2
- package/dist/Heading1.d.ts +2 -2
- package/dist/Heading2.d.ts +2 -2
- package/dist/Heading3.d.ts +2 -2
- package/dist/Heading4.d.ts +2 -2
- package/dist/Heading5.d.ts +2 -2
- package/dist/Heading6.d.ts +2 -2
- package/dist/Label.d.ts +2 -2
- package/dist/LeadParagraph.d.ts +2 -2
- package/dist/Link.d.ts +2 -2
- package/dist/ListItem.d.ts +1 -1
- package/dist/NumberedList.d.ts +1 -1
- package/dist/Paragraph.d.ts +2 -2
- package/dist/PreformattedText.d.ts +2 -2
- package/dist/SmallText.d.ts +2 -2
- package/dist/StrongText.d.ts +2 -2
- package/dist/SubLabel.d.ts +2 -2
- package/dist/SubParagraph.d.ts +2 -2
- package/dist/UnorderedList.d.ts +1 -1
- package/dist/styles.css +1 -22
- package/dist/typography.cjs.development.js +78 -117
- package/dist/typography.cjs.development.js.map +1 -1
- package/dist/typography.cjs.production.min.js +1 -1
- package/dist/typography.cjs.production.min.js.map +1 -1
- package/dist/typography.esm.js +78 -117
- package/dist/typography.esm.js.map +1 -1
- package/package.json +4 -4
- package/CHANGELOG.md +0 -375
|
@@ -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 { PolymorphicComponentProps } 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> = PolymorphicComponentProps<T, BaseHeadingOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, StrongTextOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, CodeTextOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, EmphasizedTextOwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading1OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading2OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading3OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading4OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading5OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading6OwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, LabelOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, LeadParagraphOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, LinkOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, ParagraphOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType> =\n PolymorphicComponentProps<T, PreformattedTextOwnProps>;\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 { PolymorphicComponentProps } 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> = PolymorphicComponentProps<T, SmallTextOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, SubLabelOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, SubParagraphOwnProps>;\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,IAC5CI,sBCVY,gBACtBJ,IAAAA,UACAG,IAAAA,GACGC,gBAIDE,wBAFiCH,GAPd,UASVH,UAAWO,UAAW,gBAAiBP,IAAgBI,4BCFtC,kBAG5BJ,IAAAA,cACAE,OAAAA,aAAS,SACTC,IAAAA,GACGC,gBAIDE,wBAFiCH,GAVd,QAajBH,UAAWO,UACT,iEAEkD,QAAXL,0CACc,WAAXA,wCACS,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AsBP,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 { PolymorphicComponentProps } 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> = PolymorphicComponentProps<T, BaseHeadingOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, StrongTextOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, CodeTextOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, EmphasizedTextOwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading1OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading2OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading3OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading4OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading5OwnProps>;\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 { PolymorphicComponentProps } 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 PolymorphicComponentProps<T, Heading6OwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, LabelOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, LeadParagraphOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, LinkOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, ParagraphOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType> =\n PolymorphicComponentProps<T, PreformattedTextOwnProps>;\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 { PolymorphicComponentProps } 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> = PolymorphicComponentProps<T, SmallTextOwnProps>;\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 { PolymorphicComponentProps } 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<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, SubLabelOwnProps>;\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 { PolymorphicComponentProps } 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 T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, SubParagraphOwnProps>;\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","_ref","_classNames","className","level","margin","as","rest","_objectWithoutPropertiesLoose","_excluded","baseClass","React","_extends","classNames","StrongText","_ref$margin","warnAboutMissingStyles","createElement","_ref2","_excluded2","children","title","_ref$type","type"],"mappings":"4sBAsBaA,EAAc,SAQYC,GAAA,IAAAC,EALrCC,IAAAA,UACAC,IAAAA,MACAC,IAAAA,OACAC,IAAAA,GACGC,EAAIC,EAAAP,EAAAQ,GAGDC,UAAoBN,EAC1B,OACEO,wBAHiCL,GAfd,KAkBXM,EAAA,CACNT,UAAWU,EAAU,QACnBH,UAEMA,EAAS,gBAA4B,QAAXL,EAAgBH,EAC1CQ,EAA6BL,mBAAW,WAAXA,EAC7BK,EAAAA,mBAAsC,SAAXL,EAAiBH,GAElDC,IAEEI,2SCnBGO,EAAa,SAOYb,GAAA,IAAAC,EAJpCC,IAAAA,UAASY,EAAAd,EACTI,OAAAA,aAAS,OAAMU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EE,wBAFiCL,GAVd,IAYXM,EAAA,CACNT,UAAWU,EAAAA,QACT,qBAAmBX,EAAA,GAAAA,EAAA,iCAE6B,QAAXG,EACGA,EAAAA,oCAAW,WAAXA,EAAmBH,EAAA,kCACV,SAAXG,KAEtCF,IAEEI,2BChCiD,SAAjCN,GAAA,IACxBE,IAAAA,UACGI,EAAIC,EAAAP,EAAAQ,GAAA,OACHE,UAAIM,cAAA,KAAAL,EAAA,CAAAT,UAAWU,EAAAA,QAAW,qBAAsBV,IAAgBI"}
|
package/dist/typography.esm.js
CHANGED
|
@@ -3,52 +3,44 @@ import React from 'react';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign
|
|
6
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
7
7
|
for (var i = 1; i < arguments.length; i++) {
|
|
8
8
|
var source = arguments[i];
|
|
9
|
-
|
|
10
9
|
for (var key in source) {
|
|
11
10
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12
11
|
target[key] = source[key];
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
|
-
|
|
17
15
|
return target;
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
return _extends.apply(this, arguments);
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
24
20
|
if (source == null) return {};
|
|
25
21
|
var target = {};
|
|
26
22
|
var sourceKeys = Object.keys(source);
|
|
27
23
|
var key, i;
|
|
28
|
-
|
|
29
24
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
30
25
|
key = sourceKeys[i];
|
|
31
26
|
if (excluded.indexOf(key) >= 0) continue;
|
|
32
27
|
target[key] = source[key];
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
return target;
|
|
36
30
|
}
|
|
37
31
|
|
|
38
32
|
var _excluded$l = ["className"],
|
|
39
|
-
|
|
33
|
+
_excluded2 = ["className"];
|
|
40
34
|
var Blockquote = function Blockquote(_ref) {
|
|
41
35
|
var className = _ref.className,
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
44
37
|
return React.createElement("blockquote", _extends({
|
|
45
38
|
className: classNames('eds-blockquote', className)
|
|
46
39
|
}, rest));
|
|
47
40
|
};
|
|
48
41
|
var BlockquoteFooter = function BlockquoteFooter(_ref2) {
|
|
49
42
|
var className = _ref2.className,
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
52
44
|
return React.createElement("footer", _extends({
|
|
53
45
|
className: classNames('eds-blockquote__footer', className)
|
|
54
46
|
}, rest));
|
|
@@ -58,9 +50,8 @@ var _excluded$k = ["className", "as"];
|
|
|
58
50
|
var defaultElement$h = 'code';
|
|
59
51
|
var CodeText = function CodeText(_ref) {
|
|
60
52
|
var className = _ref.className,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
as = _ref.as,
|
|
54
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
64
55
|
var Element = as || defaultElement$h;
|
|
65
56
|
return React.createElement(Element, _extends({
|
|
66
57
|
className: classNames('eds-code-text', className)
|
|
@@ -71,13 +62,11 @@ var _excluded$j = ["className", "margin", "as"];
|
|
|
71
62
|
var defaultElement$g = 'em';
|
|
72
63
|
var EmphasizedText = function EmphasizedText(_ref) {
|
|
73
64
|
var _classNames;
|
|
74
|
-
|
|
75
65
|
var className = _ref.className,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
_ref$margin = _ref.margin,
|
|
67
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
68
|
+
as = _ref.as,
|
|
69
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
81
70
|
var Element = as || defaultElement$g;
|
|
82
71
|
return React.createElement(Element, _extends({
|
|
83
72
|
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)
|
|
@@ -88,13 +77,11 @@ var _excluded$i = ["className", "level", "margin", "as"];
|
|
|
88
77
|
var defaultElement$f = 'h1';
|
|
89
78
|
var BaseHeading = function BaseHeading(_ref) {
|
|
90
79
|
var _classNames;
|
|
91
|
-
|
|
92
80
|
var className = _ref.className,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
81
|
+
level = _ref.level,
|
|
82
|
+
margin = _ref.margin,
|
|
83
|
+
as = _ref.as,
|
|
84
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
98
85
|
var Element = as || defaultElement$f;
|
|
99
86
|
var baseClass = "eds-h" + level;
|
|
100
87
|
return React.createElement(Element, _extends({
|
|
@@ -106,11 +93,10 @@ var _excluded$h = ["margin", "children", "as"];
|
|
|
106
93
|
var defaultElement$e = 'h1';
|
|
107
94
|
var Heading1 = function Heading1(_ref) {
|
|
108
95
|
var _ref$margin = _ref.margin,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
96
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
97
|
+
children = _ref.children,
|
|
98
|
+
as = _ref.as,
|
|
99
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
114
100
|
var Element = as || defaultElement$e;
|
|
115
101
|
return React.createElement(BaseHeading, _extends({
|
|
116
102
|
as: Element,
|
|
@@ -124,11 +110,10 @@ var _excluded$g = ["margin", "children", "as"];
|
|
|
124
110
|
var defaultElement$d = 'h2';
|
|
125
111
|
var Heading2 = function Heading2(_ref) {
|
|
126
112
|
var _ref$margin = _ref.margin,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
113
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
114
|
+
children = _ref.children,
|
|
115
|
+
as = _ref.as,
|
|
116
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
132
117
|
var Element = as || defaultElement$d;
|
|
133
118
|
return React.createElement(BaseHeading, _extends({
|
|
134
119
|
as: Element,
|
|
@@ -142,11 +127,10 @@ var _excluded$f = ["margin", "children", "as"];
|
|
|
142
127
|
var defaultElement$c = 'h3';
|
|
143
128
|
var Heading3 = function Heading3(_ref) {
|
|
144
129
|
var _ref$margin = _ref.margin,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
130
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
131
|
+
children = _ref.children,
|
|
132
|
+
as = _ref.as,
|
|
133
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
150
134
|
var Element = as || defaultElement$c;
|
|
151
135
|
return React.createElement(BaseHeading, _extends({
|
|
152
136
|
as: Element,
|
|
@@ -160,11 +144,10 @@ var _excluded$e = ["margin", "children", "as"];
|
|
|
160
144
|
var defaultElement$b = 'h4';
|
|
161
145
|
var Heading4 = function Heading4(_ref) {
|
|
162
146
|
var _ref$margin = _ref.margin,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
147
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
148
|
+
children = _ref.children,
|
|
149
|
+
as = _ref.as,
|
|
150
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
168
151
|
var Element = as || defaultElement$b;
|
|
169
152
|
return React.createElement(BaseHeading, _extends({
|
|
170
153
|
as: Element,
|
|
@@ -178,11 +161,10 @@ var _excluded$d = ["margin", "children", "as"];
|
|
|
178
161
|
var defaultElement$a = 'h5';
|
|
179
162
|
var Heading5 = function Heading5(_ref) {
|
|
180
163
|
var _ref$margin = _ref.margin,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
164
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
165
|
+
children = _ref.children,
|
|
166
|
+
as = _ref.as,
|
|
167
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
186
168
|
var Element = as || defaultElement$a;
|
|
187
169
|
return React.createElement(BaseHeading, _extends({
|
|
188
170
|
as: Element,
|
|
@@ -196,11 +178,10 @@ var _excluded$c = ["margin", "children", "as"];
|
|
|
196
178
|
var defaultElement$9 = 'h6';
|
|
197
179
|
var Heading6 = function Heading6(_ref) {
|
|
198
180
|
var _ref$margin = _ref.margin,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
181
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
182
|
+
children = _ref.children,
|
|
183
|
+
as = _ref.as,
|
|
184
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
204
185
|
var Element = as || defaultElement$9;
|
|
205
186
|
return React.createElement(BaseHeading, _extends({
|
|
206
187
|
as: Element,
|
|
@@ -214,13 +195,11 @@ var _excluded$b = ["className", "margin", "as"];
|
|
|
214
195
|
var defaultElement$8 = 'label';
|
|
215
196
|
var Label = function Label(_ref) {
|
|
216
197
|
var _classNames;
|
|
217
|
-
|
|
218
198
|
var className = _ref.className,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
199
|
+
_ref$margin = _ref.margin,
|
|
200
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
201
|
+
as = _ref.as,
|
|
202
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
224
203
|
var Element = as || defaultElement$8;
|
|
225
204
|
return React.createElement(Element, _extends({
|
|
226
205
|
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)
|
|
@@ -231,13 +210,11 @@ var _excluded$a = ["className", "margin", "as"];
|
|
|
231
210
|
var defaultElement$7 = 'p';
|
|
232
211
|
var LeadParagraph = function LeadParagraph(_ref) {
|
|
233
212
|
var _classNames;
|
|
234
|
-
|
|
235
213
|
var className = _ref.className,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
214
|
+
_ref$margin = _ref.margin,
|
|
215
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
216
|
+
as = _ref.as,
|
|
217
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
241
218
|
var Element = as || defaultElement$7;
|
|
242
219
|
return React.createElement(Element, _extends({
|
|
243
220
|
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)
|
|
@@ -248,13 +225,11 @@ var _excluded$9 = ["className", "margin", "as"];
|
|
|
248
225
|
var defaultElement$6 = 'a';
|
|
249
226
|
var Link = function Link(_ref) {
|
|
250
227
|
var _classNames;
|
|
251
|
-
|
|
252
228
|
var className = _ref.className,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
229
|
+
_ref$margin = _ref.margin,
|
|
230
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
231
|
+
as = _ref.as,
|
|
232
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
258
233
|
var Element = as || defaultElement$6;
|
|
259
234
|
return React.createElement(Element, _extends({
|
|
260
235
|
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)
|
|
@@ -265,13 +240,11 @@ var _excluded$8 = ["className", "margin", "as"];
|
|
|
265
240
|
var defaultElement$5 = 'strong';
|
|
266
241
|
var StrongText = function StrongText(_ref) {
|
|
267
242
|
var _classNames;
|
|
268
|
-
|
|
269
243
|
var className = _ref.className,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
244
|
+
_ref$margin = _ref.margin,
|
|
245
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
246
|
+
as = _ref.as,
|
|
247
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
275
248
|
var Element = as || defaultElement$5;
|
|
276
249
|
return React.createElement(Element, _extends({
|
|
277
250
|
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)
|
|
@@ -281,10 +254,9 @@ var StrongText = function StrongText(_ref) {
|
|
|
281
254
|
var _excluded$7 = ["children", "className", "title"];
|
|
282
255
|
var ListItem = function ListItem(_ref) {
|
|
283
256
|
var children = _ref.children,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
257
|
+
className = _ref.className,
|
|
258
|
+
title = _ref.title,
|
|
259
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
288
260
|
return React.createElement("li", _extends({
|
|
289
261
|
className: classNames('eds-list-item', className)
|
|
290
262
|
}, rest), title && React.createElement(StrongText, {
|
|
@@ -295,12 +267,10 @@ var ListItem = function ListItem(_ref) {
|
|
|
295
267
|
var _excluded$6 = ["className", "type"];
|
|
296
268
|
var NumberedList = function NumberedList(_ref) {
|
|
297
269
|
var _classNames;
|
|
298
|
-
|
|
299
270
|
var className = _ref.className,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
271
|
+
_ref$type = _ref.type,
|
|
272
|
+
type = _ref$type === void 0 ? '1' : _ref$type,
|
|
273
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
304
274
|
return React.createElement("ol", _extends({
|
|
305
275
|
className: classNames('eds-numbered-list', (_classNames = {}, _classNames["eds-numbered-list--type-" + type] = type, _classNames), className),
|
|
306
276
|
type: type
|
|
@@ -311,11 +281,10 @@ var _excluded$5 = ["margin", "className", "as"];
|
|
|
311
281
|
var defaultElement$4 = 'p';
|
|
312
282
|
var Paragraph = function Paragraph(_ref) {
|
|
313
283
|
var _ref$margin = _ref.margin,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
284
|
+
margin = _ref$margin === void 0 ? 'bottom' : _ref$margin,
|
|
285
|
+
className = _ref.className,
|
|
286
|
+
as = _ref.as,
|
|
287
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
319
288
|
var Element = as || defaultElement$4;
|
|
320
289
|
return React.createElement(Element, _extends({
|
|
321
290
|
className: classNames('eds-paragraph', {
|
|
@@ -329,9 +298,8 @@ var _excluded$4 = ["className", "as"];
|
|
|
329
298
|
var defaultElement$3 = 'pre';
|
|
330
299
|
var PreformattedText = function PreformattedText(_ref) {
|
|
331
300
|
var className = _ref.className,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
301
|
+
as = _ref.as,
|
|
302
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
335
303
|
var Element = as || defaultElement$3;
|
|
336
304
|
return React.createElement(Element, _extends({
|
|
337
305
|
className: classNames('eds-preformatted-text', className)
|
|
@@ -342,13 +310,11 @@ var _excluded$3 = ["className", "margin", "as"];
|
|
|
342
310
|
var defaultElement$2 = 'span';
|
|
343
311
|
var SmallText = function SmallText(_ref) {
|
|
344
312
|
var _classNames;
|
|
345
|
-
|
|
346
313
|
var className = _ref.className,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
314
|
+
_ref$margin = _ref.margin,
|
|
315
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
316
|
+
as = _ref.as,
|
|
317
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
352
318
|
var Element = as || defaultElement$2;
|
|
353
319
|
return React.createElement(Element, _extends({
|
|
354
320
|
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)
|
|
@@ -359,13 +325,11 @@ var _excluded$2 = ["className", "margin", "as"];
|
|
|
359
325
|
var defaultElement$1 = 'span';
|
|
360
326
|
var SubLabel = function SubLabel(_ref) {
|
|
361
327
|
var _classNames;
|
|
362
|
-
|
|
363
328
|
var className = _ref.className,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
329
|
+
_ref$margin = _ref.margin,
|
|
330
|
+
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
331
|
+
as = _ref.as,
|
|
332
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
369
333
|
var Element = as || defaultElement$1;
|
|
370
334
|
return React.createElement(Element, _extends({
|
|
371
335
|
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)
|
|
@@ -376,12 +340,10 @@ var _excluded$1 = ["className", "margin", "as"];
|
|
|
376
340
|
var defaultElement = 'p';
|
|
377
341
|
var SubParagraph = function SubParagraph(_ref) {
|
|
378
342
|
var _classNames;
|
|
379
|
-
|
|
380
343
|
var className = _ref.className,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
344
|
+
margin = _ref.margin,
|
|
345
|
+
as = _ref.as,
|
|
346
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
385
347
|
var Element = as || defaultElement;
|
|
386
348
|
return React.createElement(Element, _extends({
|
|
387
349
|
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)
|
|
@@ -391,8 +353,7 @@ var SubParagraph = function SubParagraph(_ref) {
|
|
|
391
353
|
var _excluded = ["className"];
|
|
392
354
|
var UnorderedList = function UnorderedList(_ref) {
|
|
393
355
|
var className = _ref.className,
|
|
394
|
-
|
|
395
|
-
|
|
356
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
396
357
|
return React.createElement("ul", _extends({
|
|
397
358
|
className: classNames('eds-unordered-list', className)
|
|
398
359
|
}, rest));
|