@entur/typography 3.0.0-beta.0 → 3.0.0-next.0
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/Blockquote.d.ts +1 -1
- package/dist/ListItem.d.ts +1 -1
- package/dist/NumberedList.d.ts +1 -1
- package/dist/UnorderedList.d.ts +1 -1
- package/dist/beta/cjs/components/Text.cjs.map +1 -1
- package/dist/beta/cjs/utils/utils.cjs.map +1 -1
- package/dist/beta/esm/components/Text.mjs +1 -1
- package/dist/beta/esm/components/Text.mjs.map +1 -1
- package/dist/beta/esm/utils/utils.mjs.map +1 -1
- package/dist/beta/styles/index.css +1 -38
- package/dist/beta/types/components/Blockquote.d.ts +2 -2
- package/dist/beta/types/components/Heading.d.ts +1 -1
- package/dist/beta/types/components/Text.d.ts +2 -2
- package/dist/beta/types/utils/utils.d.ts +1 -1
- package/dist/styles.css +31 -23
- package/dist/typography.cjs.js +1 -4
- package/dist/typography.cjs.js.map +1 -1
- package/dist/typography.esm.js +1 -4
- package/dist/typography.esm.js.map +1 -1
- package/package.json +10 -12
- package/scripts/migrate-typography.mjs +1 -89
package/dist/Blockquote.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type BlockquoteProps = {
|
|
|
3
3
|
/** Ekstra klassenavn */
|
|
4
4
|
className?: string;
|
|
5
5
|
} & React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLElement>, HTMLQuoteElement>;
|
|
6
|
-
export declare const Blockquote: ({ className, ref, ...rest }: BlockquoteProps) =>
|
|
6
|
+
export declare const Blockquote: ({ className, ref, ...rest }: BlockquoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export type BlockquoteFooterProps = {
|
|
8
8
|
/** Ekstra klassenavn */
|
|
9
9
|
className?: string;
|
package/dist/ListItem.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export type ListItemProps = {
|
|
|
8
8
|
title?: React.ReactNode;
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
};
|
|
11
|
-
export declare const ListItem:
|
|
11
|
+
export declare const ListItem: ({ children, className, title, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/NumberedList.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export type NumberedListProps = {
|
|
|
5
5
|
/** Innholdet */
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
} & React.OlHTMLAttributes<HTMLOListElement>;
|
|
8
|
-
export declare const NumberedList:
|
|
8
|
+
export declare const NumberedList: ({ className, type, ...rest }: NumberedListProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/UnorderedList.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export type UnorderedListProps = {
|
|
|
5
5
|
/** Innholdet */
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
|
|
8
|
-
export declare const UnorderedList:
|
|
8
|
+
export declare const UnorderedList: ({ className, ...rest }: UnorderedListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.cjs","sources":["../../../../src/beta/components/Text.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nimport {\n
|
|
1
|
+
{"version":3,"file":"Text.cjs","sources":["../../../../src/beta/components/Text.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nimport {\n getSemanticTypeFromTextVariant,\n getSpacingClasses,\n} from '../utils/utils';\n\nimport {\n TypographySize,\n TypographySpacing,\n TypographyTextVariant,\n TypographyWeight,\n} from '../types';\n\nimport './text.scss';\n\ntype TextBaseProps = {\n /** Visuell tekststørrelse (typografi-token) */\n size?: TypographySize;\n /** Fontvekt */\n weight?: TypographyWeight;\n /** Variant (kan brukes til spesielle typer tekst som for eksempel caption) */\n variant?: TypographyTextVariant;\n /** Innhold */\n children: React.ReactNode;\n /** Spacing around the component */\n spacing?: TypographySpacing;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type TextProps<C extends React.ElementType> = PolymorphicComponentProps<\n C,\n TextBaseProps\n>;\n\nconst TypographyText = <C extends React.ElementType = 'p'>({\n children,\n as,\n size,\n variant,\n weight,\n spacing,\n className,\n ...rest\n}: TextProps<C>) => {\n const BodyElement = as || getSemanticTypeFromTextVariant(variant);\n\n return (\n <BodyElement\n className={classNames(\n 'eds-text',\n variant && `eds-text--${variant}`,\n size && `eds-text--${size}`,\n weight && `eds-text--weight-${weight}`,\n getSpacingClasses(spacing, 'eds-text'),\n className,\n )}\n {...rest}\n >\n {children}\n </BodyElement>\n );\n};\n\n// Export as Text to avoid DOM conflicts\nexport const Text = TypographyText;\n"],"names":["getSemanticTypeFromTextVariant","jsx","getSpacingClasses"],"mappings":";;;;;;AAwCA,MAAM,iBAAiB,CAAoC;AAAA,EACzD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAoB;AAClB,QAAM,cAAc,MAAMA,MAAAA,+BAA+B,OAAO;AAEhE,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,WAAW,aAAa,OAAO;AAAA,QAC/B,QAAQ,aAAa,IAAI;AAAA,QACzB,UAAU,oBAAoB,MAAM;AAAA,QACpCC,MAAAA,kBAAkB,SAAS,UAAU;AAAA,QACrC;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;AAGO,MAAM,OAAO;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","sources":["../../../../src/beta/utils/utils.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../../../../src/beta/utils/utils.ts"],"sourcesContent":["import {\n TypographyHeadingVariant,\n TypographySpacing,\n TypographyTextVariant,\n} from '../types';\n\n/**\n * Get spacing classes for a component\n */\nexport function getSpacingClasses(\n spacing: TypographySpacing | undefined,\n baseClass: string,\n): string {\n if (!spacing) return '';\n\n const spacingMap: Record<string, string> = {\n none: `${baseClass}--spacing-none`,\n xs2: `${baseClass}--spacing-xs2`,\n 'xs2-top': `${baseClass}--spacing-xs2-top`,\n 'xs2-bottom': `${baseClass}--spacing-xs2-bottom`,\n xs: `${baseClass}--spacing-xs`,\n 'xs-top': `${baseClass}--spacing-xs-top`,\n 'xs-bottom': `${baseClass}--spacing-xs-bottom`,\n sm: `${baseClass}--spacing-sm`,\n 'sm-top': `${baseClass}--spacing-sm-top`,\n 'sm-bottom': `${baseClass}--spacing-sm-bottom`,\n md: `${baseClass}--spacing-md`,\n 'md-top': `${baseClass}--spacing-md-top`,\n 'md-bottom': `${baseClass}--spacing-md-bottom`,\n lg: `${baseClass}--spacing-lg`,\n 'lg-top': `${baseClass}--spacing-lg-top`,\n 'lg-bottom': `${baseClass}--spacing-lg-bottom`,\n xl: `${baseClass}--spacing-xl`,\n 'xl-top': `${baseClass}--spacing-xl-top`,\n 'xl-bottom': `${baseClass}--spacing-xl-bottom`,\n };\n\n return spacingMap[spacing] || '';\n}\n\n/**\n * Get heading variant based on semantic HTML element\n */\nexport function getHeadingVariantFromSemanticType(\n element: string | React.ElementType,\n): TypographyHeadingVariant {\n const elementStr = typeof element === 'string' ? element : element.toString();\n\n switch (elementStr.toLowerCase()) {\n case 'h1':\n return 'title-1';\n case 'h2':\n return 'title-2';\n case 'h3':\n return 'subtitle-1';\n case 'h4':\n return 'subtitle-2';\n case 'h5':\n return 'section-1';\n case 'h6':\n return 'section-2';\n default:\n return 'title-1';\n }\n}\n\n/**\n * Get semantic HTML element from text variant\n */\nexport function getSemanticTypeFromTextVariant(\n variant: TypographyTextVariant | undefined,\n): string {\n if (!variant) return 'p';\n\n switch (variant) {\n case 'label':\n return 'label';\n case 'sublabel':\n return 'span';\n case 'caption':\n return 'span';\n case 'overline':\n return 'span';\n case 'link':\n return 'a';\n case 'code-text':\n return 'code';\n case 'preformatted-text':\n return 'pre';\n case 'quote':\n return 'blockquote';\n case 'leading':\n case 'paragraph':\n case 'subparagraph':\n case 'emphasized':\n default:\n return 'p';\n }\n}\n"],"names":[],"mappings":";;AASO,SAAS,kBACd,SACA,WACQ;AACR,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM,aAAqC;AAAA,IACzC,MAAM,GAAG,SAAS;AAAA,IAClB,KAAK,GAAG,SAAS;AAAA,IACjB,WAAW,GAAG,SAAS;AAAA,IACvB,cAAc,GAAG,SAAS;AAAA,IAC1B,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,EAAA;AAG3B,SAAO,WAAW,OAAO,KAAK;AAChC;AAKO,SAAS,kCACd,SAC0B;AAC1B,QAAM,aAAa,OAAO,YAAY,WAAW,UAAU,QAAQ,SAAA;AAEnE,UAAQ,WAAW,eAAY;AAAA,IAC7B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EAAA;AAEb;AAKO,SAAS,+BACd,SACQ;AACR,MAAI,CAAC,QAAS,QAAO;AAErB,UAAQ,SAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL;AACE,aAAO;AAAA,EAAA;AAEb;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import { getSpacingClasses, getSemanticTypeFromTextVariant } from "../utils/utils.mjs";
|
|
4
4
|
/* empty css */
|
|
5
5
|
const TypographyText = ({
|
|
6
6
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.mjs","sources":["../../../../src/beta/components/Text.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nimport {\n
|
|
1
|
+
{"version":3,"file":"Text.mjs","sources":["../../../../src/beta/components/Text.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nimport {\n getSemanticTypeFromTextVariant,\n getSpacingClasses,\n} from '../utils/utils';\n\nimport {\n TypographySize,\n TypographySpacing,\n TypographyTextVariant,\n TypographyWeight,\n} from '../types';\n\nimport './text.scss';\n\ntype TextBaseProps = {\n /** Visuell tekststørrelse (typografi-token) */\n size?: TypographySize;\n /** Fontvekt */\n weight?: TypographyWeight;\n /** Variant (kan brukes til spesielle typer tekst som for eksempel caption) */\n variant?: TypographyTextVariant;\n /** Innhold */\n children: React.ReactNode;\n /** Spacing around the component */\n spacing?: TypographySpacing;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type TextProps<C extends React.ElementType> = PolymorphicComponentProps<\n C,\n TextBaseProps\n>;\n\nconst TypographyText = <C extends React.ElementType = 'p'>({\n children,\n as,\n size,\n variant,\n weight,\n spacing,\n className,\n ...rest\n}: TextProps<C>) => {\n const BodyElement = as || getSemanticTypeFromTextVariant(variant);\n\n return (\n <BodyElement\n className={classNames(\n 'eds-text',\n variant && `eds-text--${variant}`,\n size && `eds-text--${size}`,\n weight && `eds-text--weight-${weight}`,\n getSpacingClasses(spacing, 'eds-text'),\n className,\n )}\n {...rest}\n >\n {children}\n </BodyElement>\n );\n};\n\n// Export as Text to avoid DOM conflicts\nexport const Text = TypographyText;\n"],"names":[],"mappings":";;;;AAwCA,MAAM,iBAAiB,CAAoC;AAAA,EACzD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAoB;AAClB,QAAM,cAAc,MAAM,+BAA+B,OAAO;AAEhE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,WAAW,aAAa,OAAO;AAAA,QAC/B,QAAQ,aAAa,IAAI;AAAA,QACzB,UAAU,oBAAoB,MAAM;AAAA,QACpC,kBAAkB,SAAS,UAAU;AAAA,QACrC;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;AAGO,MAAM,OAAO;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../../../src/beta/utils/utils.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../../src/beta/utils/utils.ts"],"sourcesContent":["import {\n TypographyHeadingVariant,\n TypographySpacing,\n TypographyTextVariant,\n} from '../types';\n\n/**\n * Get spacing classes for a component\n */\nexport function getSpacingClasses(\n spacing: TypographySpacing | undefined,\n baseClass: string,\n): string {\n if (!spacing) return '';\n\n const spacingMap: Record<string, string> = {\n none: `${baseClass}--spacing-none`,\n xs2: `${baseClass}--spacing-xs2`,\n 'xs2-top': `${baseClass}--spacing-xs2-top`,\n 'xs2-bottom': `${baseClass}--spacing-xs2-bottom`,\n xs: `${baseClass}--spacing-xs`,\n 'xs-top': `${baseClass}--spacing-xs-top`,\n 'xs-bottom': `${baseClass}--spacing-xs-bottom`,\n sm: `${baseClass}--spacing-sm`,\n 'sm-top': `${baseClass}--spacing-sm-top`,\n 'sm-bottom': `${baseClass}--spacing-sm-bottom`,\n md: `${baseClass}--spacing-md`,\n 'md-top': `${baseClass}--spacing-md-top`,\n 'md-bottom': `${baseClass}--spacing-md-bottom`,\n lg: `${baseClass}--spacing-lg`,\n 'lg-top': `${baseClass}--spacing-lg-top`,\n 'lg-bottom': `${baseClass}--spacing-lg-bottom`,\n xl: `${baseClass}--spacing-xl`,\n 'xl-top': `${baseClass}--spacing-xl-top`,\n 'xl-bottom': `${baseClass}--spacing-xl-bottom`,\n };\n\n return spacingMap[spacing] || '';\n}\n\n/**\n * Get heading variant based on semantic HTML element\n */\nexport function getHeadingVariantFromSemanticType(\n element: string | React.ElementType,\n): TypographyHeadingVariant {\n const elementStr = typeof element === 'string' ? element : element.toString();\n\n switch (elementStr.toLowerCase()) {\n case 'h1':\n return 'title-1';\n case 'h2':\n return 'title-2';\n case 'h3':\n return 'subtitle-1';\n case 'h4':\n return 'subtitle-2';\n case 'h5':\n return 'section-1';\n case 'h6':\n return 'section-2';\n default:\n return 'title-1';\n }\n}\n\n/**\n * Get semantic HTML element from text variant\n */\nexport function getSemanticTypeFromTextVariant(\n variant: TypographyTextVariant | undefined,\n): string {\n if (!variant) return 'p';\n\n switch (variant) {\n case 'label':\n return 'label';\n case 'sublabel':\n return 'span';\n case 'caption':\n return 'span';\n case 'overline':\n return 'span';\n case 'link':\n return 'a';\n case 'code-text':\n return 'code';\n case 'preformatted-text':\n return 'pre';\n case 'quote':\n return 'blockquote';\n case 'leading':\n case 'paragraph':\n case 'subparagraph':\n case 'emphasized':\n default:\n return 'p';\n }\n}\n"],"names":[],"mappings":"AASO,SAAS,kBACd,SACA,WACQ;AACR,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM,aAAqC;AAAA,IACzC,MAAM,GAAG,SAAS;AAAA,IAClB,KAAK,GAAG,SAAS;AAAA,IACjB,WAAW,GAAG,SAAS;AAAA,IACvB,cAAc,GAAG,SAAS;AAAA,IAC1B,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,IACzB,IAAI,GAAG,SAAS;AAAA,IAChB,UAAU,GAAG,SAAS;AAAA,IACtB,aAAa,GAAG,SAAS;AAAA,EAAA;AAG3B,SAAO,WAAW,OAAO,KAAK;AAChC;AAKO,SAAS,kCACd,SAC0B;AAC1B,QAAM,aAAa,OAAO,YAAY,WAAW,UAAU,QAAQ,SAAA;AAEnE,UAAQ,WAAW,eAAY;AAAA,IAC7B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EAAA;AAEb;AAKO,SAAS,+BACd,SACQ;AACR,MAAI,CAAC,QAAS,QAAO;AAErB,UAAQ,SAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL;AACE,aAAO;AAAA,EAAA;AAEb;"}
|
|
@@ -132,43 +132,6 @@
|
|
|
132
132
|
*
|
|
133
133
|
* The system automatically handles responsive behavior within each mode.
|
|
134
134
|
*/
|
|
135
|
-
/* Primitive size */
|
|
136
|
-
:root{
|
|
137
|
-
/* number */
|
|
138
|
-
--size-0:0rem;
|
|
139
|
-
--size-1:0.0625rem;
|
|
140
|
-
--size-2:0.125rem;
|
|
141
|
-
--size-3:0.25rem;
|
|
142
|
-
--size-4:0.375rem;
|
|
143
|
-
--size-5:0.5rem;
|
|
144
|
-
--size-6:0.75rem;
|
|
145
|
-
--size-7:0.875rem;
|
|
146
|
-
--size-8:1rem;
|
|
147
|
-
--size-9:1.25rem;
|
|
148
|
-
--size-10:1.5rem;
|
|
149
|
-
--size-11:1.75rem;
|
|
150
|
-
--size-12:2rem;
|
|
151
|
-
--size-13:2.25rem;
|
|
152
|
-
--size-14:2.5rem;
|
|
153
|
-
--size-15:2.75rem;
|
|
154
|
-
--size-16:3rem;
|
|
155
|
-
--size-17:3.25rem;
|
|
156
|
-
--size-18:3.5rem;
|
|
157
|
-
--size-19:4rem;
|
|
158
|
-
--size-20:4.5rem;
|
|
159
|
-
--size-21:5rem;
|
|
160
|
-
--size-22:5.5rem;
|
|
161
|
-
--size-23:6rem;
|
|
162
|
-
--size-24:6.5rem;
|
|
163
|
-
--size-25:7rem;
|
|
164
|
-
--size-26:7.5rem;
|
|
165
|
-
--size-27:8rem;
|
|
166
|
-
--size-28:8.5rem;
|
|
167
|
-
--size-29:9rem;
|
|
168
|
-
--size-30:9.5rem;
|
|
169
|
-
--size-31:10rem;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
135
|
:root,
|
|
173
136
|
[data-view-mode=standard]{
|
|
174
137
|
/* number */
|
|
@@ -773,7 +736,7 @@
|
|
|
773
736
|
-moz-border-radius:0.25rem;
|
|
774
737
|
border-radius:0.25rem;
|
|
775
738
|
color:var(--components-typography-codetext-standard-text);
|
|
776
|
-
font-family:
|
|
739
|
+
font-family:Monaco, monospace;
|
|
777
740
|
font-size:0.875rem;
|
|
778
741
|
}
|
|
779
742
|
:where(.eds-contrast) .eds-text--code-text, :where(.eds-contrast) .eds-text--preformatted-text{
|
|
@@ -3,10 +3,10 @@ export type BlockquoteProps = {
|
|
|
3
3
|
/** Ekstra klassenavn */
|
|
4
4
|
className?: string;
|
|
5
5
|
} & React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
|
|
6
|
-
export declare const Blockquote: ({ className, ...rest }: BlockquoteProps) =>
|
|
6
|
+
export declare const Blockquote: ({ className, ...rest }: BlockquoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
type BlockquoteFooterProps = {
|
|
8
8
|
/** Ekstra klassenavn */
|
|
9
9
|
className?: string;
|
|
10
10
|
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
11
|
-
export declare const BlockquoteFooter: ({ className, ...rest }: BlockquoteFooterProps) =>
|
|
11
|
+
export declare const BlockquoteFooter: ({ className, ...rest }: BlockquoteFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -16,5 +16,5 @@ type HeadingBaseProps = {
|
|
|
16
16
|
spacing?: TypographySpacing;
|
|
17
17
|
};
|
|
18
18
|
export type HeadingProps<C extends React.ElementType> = PolymorphicComponentProps<C, HeadingBaseProps>;
|
|
19
|
-
export declare const Heading: <C extends React.ElementType = "h1">({ children, as, size, variant, spacing, className, ...rest }: HeadingProps<C>) =>
|
|
19
|
+
export declare const Heading: <C extends React.ElementType = "h1">({ children, as, size, variant, spacing, className, ...rest }: HeadingProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PolymorphicComponentProps } from '@entur/utils';
|
|
3
|
-
import { TypographySize, TypographyTextVariant, TypographyWeight
|
|
3
|
+
import { TypographySize, TypographySpacing, TypographyTextVariant, TypographyWeight } from '../types';
|
|
4
4
|
type TextBaseProps = {
|
|
5
5
|
/** Visuell tekststørrelse (typografi-token) */
|
|
6
6
|
size?: TypographySize;
|
|
@@ -16,5 +16,5 @@ type TextBaseProps = {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
};
|
|
18
18
|
export type TextProps<C extends React.ElementType> = PolymorphicComponentProps<C, TextBaseProps>;
|
|
19
|
-
export declare const Text: <C extends React.ElementType = "p">({ children, as, size, variant, weight, spacing, className, ...rest }: TextProps<C>) =>
|
|
19
|
+
export declare const Text: <C extends React.ElementType = "p">({ children, as, size, variant, weight, spacing, className, ...rest }: TextProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
package/dist/styles.css
CHANGED
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
--basecolors-frame-default:#ffffff;
|
|
7
7
|
--basecolors-frame-elevated:#ffffff;
|
|
8
8
|
--basecolors-frame-elevatedalt:#f6f6f9;
|
|
9
|
+
--basecolors-frame-highlight:#ff5959;
|
|
10
|
+
--basecolors-frame-highlightalt:#ffbf9e;
|
|
9
11
|
--basecolors-frame-subdued:#d9dae8;
|
|
10
12
|
--basecolors-frame-tint:#f6f6f9;
|
|
11
13
|
--basecolors-shape-accent:#181c56;
|
|
12
|
-
--basecolors-shape-bicycle-contrast:#
|
|
13
|
-
--basecolors-shape-bicycle-default:#
|
|
14
|
+
--basecolors-shape-bicycle-contrast:#00dbb6;
|
|
15
|
+
--basecolors-shape-bicycle-default:#0d827e;
|
|
14
16
|
--basecolors-shape-bus-contrast:#ff6392;
|
|
15
17
|
--basecolors-shape-bus-default:#c5044e;
|
|
16
18
|
--basecolors-shape-cableway-contrast:#b482fb;
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
--basecolors-shape-maskalt:#ffffff;
|
|
30
32
|
--basecolors-shape-metro-contrast:#f08901;
|
|
31
33
|
--basecolors-shape-metro-default:#bf5826;
|
|
32
|
-
--basecolors-shape-mobility-contrast:#
|
|
33
|
-
--basecolors-shape-mobility-default:#
|
|
34
|
+
--basecolors-shape-mobility-contrast:#00dbb6;
|
|
35
|
+
--basecolors-shape-mobility-default:#0d827e;
|
|
34
36
|
--basecolors-shape-plane-contrast:#fbafea;
|
|
35
37
|
--basecolors-shape-plane-default:#800664;
|
|
36
38
|
--basecolors-shape-subdued:#626493;
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
--basecolors-shape-train-default:#00367f;
|
|
42
44
|
--basecolors-shape-tram-contrast:#b482fb;
|
|
43
45
|
--basecolors-shape-tram-default:#78469a;
|
|
44
|
-
--basecolors-shape-walk-contrast:#
|
|
46
|
+
--basecolors-shape-walk-contrast:#9ea0bd;
|
|
45
47
|
--basecolors-shape-walk-default:#8d8e9c;
|
|
46
48
|
--basecolors-shape-airportlinkbus-contrast:#fbafea;
|
|
47
49
|
--basecolors-shape-airportlinkbus-default:#800664;
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
--basecolors-stroke-focus-contrast:#aeb7e2;
|
|
54
56
|
--basecolors-stroke-focus-standard:#181c56;
|
|
55
57
|
--basecolors-stroke-highlight:#ff5959;
|
|
58
|
+
--basecolors-stroke-highlight2:#ffbf9e;
|
|
56
59
|
--basecolors-stroke-light:#ffffff;
|
|
57
60
|
--basecolors-stroke-subdued:#8284ab;
|
|
58
61
|
--basecolors-stroke-subduedalt:#e3e6e8;
|
|
@@ -60,6 +63,7 @@
|
|
|
60
63
|
--basecolors-text-disabled:#6e6f73;
|
|
61
64
|
--basecolors-text-disabledalt:#b6b8ba;
|
|
62
65
|
--basecolors-text-highlight:#ff5959;
|
|
66
|
+
--basecolors-text-highlightalt:#ffbf9e;
|
|
63
67
|
--basecolors-text-light:#ffffff;
|
|
64
68
|
--basecolors-text-subdued:#626493;
|
|
65
69
|
--basecolors-text-subduedalt:#d9dae8;
|
|
@@ -72,11 +76,13 @@
|
|
|
72
76
|
--basecolors-frame-default:#08091c;
|
|
73
77
|
--basecolors-frame-elevated:rgba(229, 229, 233, 0.1490196078);
|
|
74
78
|
--basecolors-frame-elevatedalt:#464755;
|
|
79
|
+
--basecolors-frame-highlight:#ff5959;
|
|
80
|
+
--basecolors-frame-highlightalt:#ffbf9e;
|
|
75
81
|
--basecolors-frame-subdued:#2d2e3e;
|
|
76
82
|
--basecolors-frame-tint:#141527;
|
|
77
83
|
--basecolors-shape-accent:#e5e5e9;
|
|
78
|
-
--basecolors-shape-bicycle-contrast:#
|
|
79
|
-
--basecolors-shape-bicycle-default:#
|
|
84
|
+
--basecolors-shape-bicycle-contrast:#4db2a1;
|
|
85
|
+
--basecolors-shape-bicycle-default:#4db2a1;
|
|
80
86
|
--basecolors-shape-bus-contrast:#ef7398;
|
|
81
87
|
--basecolors-shape-bus-default:#ef7398;
|
|
82
88
|
--basecolors-shape-cableway-contrast:#b898e5;
|
|
@@ -89,14 +95,14 @@
|
|
|
89
95
|
--basecolors-shape-funicular-default:#b898e5;
|
|
90
96
|
--basecolors-shape-helicopter-contrast:#f2b8e5;
|
|
91
97
|
--basecolors-shape-helicopter-default:#f2b8e5;
|
|
92
|
-
--basecolors-shape-highlight:#
|
|
98
|
+
--basecolors-shape-highlight:#ff5959;
|
|
93
99
|
--basecolors-shape-light:#e5e5e9;
|
|
94
100
|
--basecolors-shape-mask:#2d2e3e;
|
|
95
101
|
--basecolors-shape-maskalt:#393a49;
|
|
96
102
|
--basecolors-shape-metro-contrast:#dd973c;
|
|
97
103
|
--basecolors-shape-metro-default:#dd973c;
|
|
98
|
-
--basecolors-shape-mobility-contrast:#
|
|
99
|
-
--basecolors-shape-mobility-default:#
|
|
104
|
+
--basecolors-shape-mobility-contrast:#4db2a1;
|
|
105
|
+
--basecolors-shape-mobility-default:#4db2a1;
|
|
100
106
|
--basecolors-shape-plane-contrast:#f2b8e5;
|
|
101
107
|
--basecolors-shape-plane-default:#f2b8e5;
|
|
102
108
|
--basecolors-shape-subdued:#b3b4bd;
|
|
@@ -118,14 +124,16 @@
|
|
|
118
124
|
--basecolors-stroke-disabled:#e3e6e8;
|
|
119
125
|
--basecolors-stroke-focus-contrast:#aeb7e2;
|
|
120
126
|
--basecolors-stroke-focus-standard:#aeb7e2;
|
|
121
|
-
--basecolors-stroke-highlight:#
|
|
127
|
+
--basecolors-stroke-highlight:#ff5959;
|
|
128
|
+
--basecolors-stroke-highlight2:#ffbf9e;
|
|
122
129
|
--basecolors-stroke-light:#b3b4bd;
|
|
123
130
|
--basecolors-stroke-subdued:#81828f;
|
|
124
131
|
--basecolors-stroke-subduedalt:#949699;
|
|
125
132
|
--basecolors-text-accent:#e5e5e9;
|
|
126
133
|
--basecolors-text-disabled:#b6b8ba;
|
|
127
134
|
--basecolors-text-disabledalt:#b6b8ba;
|
|
128
|
-
--basecolors-text-highlight:#
|
|
135
|
+
--basecolors-text-highlight:#ff5959;
|
|
136
|
+
--basecolors-text-highlightalt:#ffbf9e;
|
|
129
137
|
--basecolors-text-light:#e5e5e9;
|
|
130
138
|
--basecolors-text-subdued:#b3b4bd;
|
|
131
139
|
--basecolors-text-subduedalt:#b3b4bd;
|
|
@@ -182,7 +190,7 @@
|
|
|
182
190
|
}
|
|
183
191
|
|
|
184
192
|
@font-face{
|
|
185
|
-
font-family:
|
|
193
|
+
font-family:Nationale;
|
|
186
194
|
src:url("./fonts/Entur-Nationale-Light.eot");
|
|
187
195
|
src:url("./fonts/Entur-Nationale-Light.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-Light.woff2") format("woff2"), url("./fonts/Entur-Nationale-Light.woff") format("woff");
|
|
188
196
|
font-weight:300;
|
|
@@ -190,7 +198,7 @@
|
|
|
190
198
|
font-display:swap;
|
|
191
199
|
}
|
|
192
200
|
@font-face{
|
|
193
|
-
font-family:
|
|
201
|
+
font-family:Nationale;
|
|
194
202
|
src:url("./fonts/Entur-Nationale-LightItalic.eot");
|
|
195
203
|
src:url("./fonts/Entur-Nationale-LightItalic.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-LightItalic.woff2") format("woff2"), url("./fonts/Entur-Nationale-LightItalic.woff") format("woff");
|
|
196
204
|
font-weight:300;
|
|
@@ -198,7 +206,7 @@
|
|
|
198
206
|
font-display:swap;
|
|
199
207
|
}
|
|
200
208
|
@font-face{
|
|
201
|
-
font-family:
|
|
209
|
+
font-family:Nationale;
|
|
202
210
|
src:url("./fonts/Entur-Nationale-Regular.eot");
|
|
203
211
|
src:url("./fonts/Entur-Nationale-Regular.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-Regular.woff2") format("woff2"), url("./fonts/Entur-Nationale-Regular.woff") format("woff");
|
|
204
212
|
font-weight:400;
|
|
@@ -206,7 +214,7 @@
|
|
|
206
214
|
font-display:swap;
|
|
207
215
|
}
|
|
208
216
|
@font-face{
|
|
209
|
-
font-family:
|
|
217
|
+
font-family:Nationale;
|
|
210
218
|
src:url("./fonts/Entur-Nationale-Italic.eot");
|
|
211
219
|
src:url("./fonts/Entur-Nationale-Italic.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-Italic.woff2") format("woff2"), url("./fonts/Entur-Nationale-Italic.woff") format("woff");
|
|
212
220
|
font-weight:400;
|
|
@@ -214,7 +222,7 @@
|
|
|
214
222
|
font-display:swap;
|
|
215
223
|
}
|
|
216
224
|
@font-face{
|
|
217
|
-
font-family:
|
|
225
|
+
font-family:Nationale;
|
|
218
226
|
src:url("./fonts/Entur-Nationale-Medium.eot");
|
|
219
227
|
src:url("./fonts/Entur-Nationale-Medium.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-Medium.woff2") format("woff2"), url("./fonts/Entur-Nationale-Medium.woff") format("woff");
|
|
220
228
|
font-weight:500;
|
|
@@ -222,7 +230,7 @@
|
|
|
222
230
|
font-display:swap;
|
|
223
231
|
}
|
|
224
232
|
@font-face{
|
|
225
|
-
font-family:
|
|
233
|
+
font-family:Nationale;
|
|
226
234
|
src:url("./fonts/Entur-Nationale-MediumItalic.eot");
|
|
227
235
|
src:url("./fonts/Entur-Nationale-MediumItalic.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-MediumItalic.woff2") format("woff2"), url("./fonts/Entur-Nationale-MediumItalic.woff") format("woff");
|
|
228
236
|
font-weight:500;
|
|
@@ -230,7 +238,7 @@
|
|
|
230
238
|
font-display:swap;
|
|
231
239
|
}
|
|
232
240
|
@font-face{
|
|
233
|
-
font-family:
|
|
241
|
+
font-family:Nationale;
|
|
234
242
|
src:url("./fonts/Entur-Nationale-Demibold.eot");
|
|
235
243
|
src:url("./fonts/Entur-Nationale-Demibold.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-Demibold.woff2") format("woff2"), url("./fonts/Entur-Nationale-Demibold.woff") format("woff");
|
|
236
244
|
font-weight:600;
|
|
@@ -238,7 +246,7 @@
|
|
|
238
246
|
font-display:swap;
|
|
239
247
|
}
|
|
240
248
|
@font-face{
|
|
241
|
-
font-family:
|
|
249
|
+
font-family:Nationale;
|
|
242
250
|
src:url("./fonts/Entur-Nationale-DemiboldItalic.eot");
|
|
243
251
|
src:url("./fonts/Entur-Nationale-DemiboldItalic.eot?#iefix") format("embedded-opentype"), url("./fonts/Entur-Nationale-DemiboldItalic.woff2") format("woff2"), url("./fonts/Entur-Nationale-DemiboldItalic.woff") format("woff");
|
|
244
252
|
font-weight:600;
|
|
@@ -425,7 +433,7 @@
|
|
|
425
433
|
--primary-background-color:var(--basecolors-frame-default);
|
|
426
434
|
--primary-text-color:var(--components-typography-basetext-standard-text-accent);
|
|
427
435
|
--primary-label-color:var(--components-typography-label-standard-text-accent);
|
|
428
|
-
--eds-font-family:"Nationale",
|
|
436
|
+
--eds-font-family:"Nationale", arial, "Gotham Rounded", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen-sans, ubuntu, cantarell, "Helvetica Neue", sans-serif;
|
|
429
437
|
-webkit-box-sizing:border-box;
|
|
430
438
|
-moz-box-sizing:border-box;
|
|
431
439
|
box-sizing:border-box;
|
|
@@ -433,7 +441,7 @@
|
|
|
433
441
|
color:var(--primary-text-color);
|
|
434
442
|
background-color:#ffffff;
|
|
435
443
|
background-color:var(--primary-background-color);
|
|
436
|
-
font-family:
|
|
444
|
+
font-family:Nationale, Arial, "Gotham Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
437
445
|
font-weight:500;
|
|
438
446
|
font-size:1rem;
|
|
439
447
|
line-height:1.375rem;
|
|
@@ -732,7 +740,7 @@ p .eds-link--ext-icon{
|
|
|
732
740
|
border-radius:0.25rem;
|
|
733
741
|
color:#181c56;
|
|
734
742
|
color:var(--components-typography-codetext-standard-text);
|
|
735
|
-
font-family:
|
|
743
|
+
font-family:Monaco, monospace;
|
|
736
744
|
font-size:0.875rem;
|
|
737
745
|
}
|
|
738
746
|
|
package/dist/typography.cjs.js
CHANGED
|
@@ -386,10 +386,7 @@ const SubParagraph = ({
|
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
};
|
|
389
|
-
const UnorderedList = ({
|
|
390
|
-
className,
|
|
391
|
-
...rest
|
|
392
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classNames("eds-unordered-list", className), ...rest });
|
|
389
|
+
const UnorderedList = ({ className, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classNames("eds-unordered-list", className), ...rest });
|
|
393
390
|
utils.warnAboutMissingStyles("typography");
|
|
394
391
|
exports.Blockquote = Blockquote;
|
|
395
392
|
exports.BlockquoteFooter = BlockquoteFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.cjs.js","sources":["../src/Blockquote.tsx","../src/CodeText.tsx","../src/EmphasizedText.tsx","../src/BaseHeading.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/StrongText.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","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nexport type BlockquoteProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<\n React.BlockquoteHTMLAttributes<HTMLElement>,\n HTMLQuoteElement\n>;\n\nexport const Blockquote = ({ className, ref, ...rest }: BlockquoteProps) => {\n return (\n <blockquote\n className={classNames('eds-blockquote', className)}\n ref={ref}\n {...rest}\n />\n );\n};\n\nexport type BlockquoteFooterProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\nexport const BlockquoteFooter: React.FunctionComponent<\n 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 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 { 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';\nimport { ExternalIcon } from '@entur/icons';\n\nexport type LinkOwnProps = {\n external?: boolean;\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 ariaLabelExternalIcon?: string;\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 external = false,\n ariaLabelExternalIcon = '(ekstern lenke)',\n className,\n margin = 'both',\n children,\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 {children}\n {external ? (\n <ExternalIcon\n className=\"eds-link--ext-icon\"\n aria-label={ariaLabelExternalIcon}\n />\n ) : (\n <></>\n )}\n </Element>\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 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","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"],"names":["jsx","defaultElement","jsxs","ExternalIcon","Fragment","warnAboutMissingStyles"],"mappings":";;;;;;AAWO,MAAM,aAAa,CAAC,EAAE,WAAW,KAAK,GAAG,WAA4B;AAC1E,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,kBAAkB,SAAS;AAAA,MACjD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOO,MAAM,mBAET,CAAC,EAA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AA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACvBA,MAAMC,mBAAiB;AAEhB,MAAM,WAAW,CAAsD;AAAA,EAC5E;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,GAAG;AACL,MAAqC;AACnC,QAAM,UAA6B,MAAMA;AACzC,SACED,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,2BAA2B,GAAG,WAAW;AAAA,UAC1C,CAAC,8BAA8B,GAAG,WAAW;AAAA,UAC7C,CAAC,4BAA4B,GAAG,WAAW;AAAA,QAAA;AAAA,QAE7C;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACtBA,MAAM,iBAAiB;AAEhB,MAAM,eAAe,CAE1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyC;AACvC,QAAM,UAA6B,MAAM;AACzC,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,+BAA+B,GAAG,WAAW;AAAA,UAC9C,CAAC,kCAAkC,GAAG,WAAW;AAAA,UACjD,CAAC,gCAAgC,GAAG,WAAW;AAAA,QAAA;AAAA,QAEjD;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACnCO,MAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAMA,2BAAAA,IAAC,QAAG,WAAW,WAAW,sBAAsB,SAAS,GAAI,GAAG,KAAA,CAAM;ACb5EK,MAAAA,uBAAuB,YAAY;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"typography.cjs.js","sources":["../src/Blockquote.tsx","../src/CodeText.tsx","../src/EmphasizedText.tsx","../src/BaseHeading.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/StrongText.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","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nexport type BlockquoteProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<\n React.BlockquoteHTMLAttributes<HTMLElement>,\n HTMLQuoteElement\n>;\n\nexport const Blockquote = ({ className, ref, ...rest }: BlockquoteProps) => {\n return (\n <blockquote\n className={classNames('eds-blockquote', className)}\n ref={ref}\n {...rest}\n />\n );\n};\n\nexport type BlockquoteFooterProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\nexport const BlockquoteFooter: React.FunctionComponent<\n 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 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 { 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';\nimport { ExternalIcon } from '@entur/icons';\n\nexport type LinkOwnProps = {\n external?: boolean;\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 ariaLabelExternalIcon?: string;\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 external = false,\n ariaLabelExternalIcon = '(ekstern lenke)',\n className,\n margin = 'both',\n children,\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 {children}\n {external ? (\n <ExternalIcon\n className=\"eds-link--ext-icon\"\n aria-label={ariaLabelExternalIcon}\n />\n ) : (\n <></>\n )}\n </Element>\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 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 = ({\n children,\n className,\n title,\n ...rest\n}: ListItemProps) => (\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 = ({\n className,\n type = '1',\n ...rest\n}: NumberedListProps) => (\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 = ({ className, ...rest }: UnorderedListProps) => (\n <ul className={classNames('eds-unordered-list', className)} {...rest} />\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"],"names":["jsx","defaultElement","jsxs","ExternalIcon","Fragment","warnAboutMissingStyles"],"mappings":";;;;;;AAWO,MAAM,aAAa,CAAC,EAAE,WAAW,KAAK,GAAG,WAA4B;AAC1E,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,kBAAkB,SAAS;AAAA,MACjD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOO,MAAM,mBAET,CAAC,EAAE,WAAW,GAAG,WAAW;AAC9B,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,0BAA0B,SAAS;AAAA,MACxD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACjBA,MAAMC,mBAAiB;AAEhB,MAAM,WAAW,CAAsD;AAAA,EAC5E;AAAA,EACA;AAAA,EACA,GAAG;AAC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AAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,2BAA2B,GAAG,WAAW;AAAA,UAC1C,CAAC,8BAA8B,GAAG,WAAW;AAAA,UAC7C,CAAC,4BAA4B,GAAG,WAAW;AAAA,QAAA;AAAA,QAE7C;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACtBA,MAAM,iBAAiB;AAEhB,MAAM,eAAe,CAE1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyC;AACvC,QAAM,UAA6B,MAAM;AACzC,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,+BAA+B,GAAG,WAAW;AAAA,UAC9C,CAAC,kCAAkC,GAAG,WAAW;AAAA,UACjD,CAAC,gCAAgC,GAAG,WAAW;AAAA,QAAA;AAAA,QAEjD;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACnCO,MAAM,gBAAgB,CAAC,EAAE,WAAW,GAAG,KAAA,MAC5CA,2BAAAA,IAAC,MAAA,EAAG,WAAW,WAAW,sBAAsB,SAAS,GAAI,GAAG,KAAA,CAAM;ACXxEK,MAAAA,uBAAuB,YAAY;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/typography.esm.js
CHANGED
|
@@ -384,10 +384,7 @@ const SubParagraph = ({
|
|
|
384
384
|
}
|
|
385
385
|
);
|
|
386
386
|
};
|
|
387
|
-
const UnorderedList = ({
|
|
388
|
-
className,
|
|
389
|
-
...rest
|
|
390
|
-
}) => /* @__PURE__ */ jsx("ul", { className: classNames("eds-unordered-list", className), ...rest });
|
|
387
|
+
const UnorderedList = ({ className, ...rest }) => /* @__PURE__ */ jsx("ul", { className: classNames("eds-unordered-list", className), ...rest });
|
|
391
388
|
warnAboutMissingStyles("typography");
|
|
392
389
|
export {
|
|
393
390
|
Blockquote,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.esm.js","sources":["../src/Blockquote.tsx","../src/CodeText.tsx","../src/EmphasizedText.tsx","../src/BaseHeading.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/StrongText.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","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nexport type BlockquoteProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<\n React.BlockquoteHTMLAttributes<HTMLElement>,\n HTMLQuoteElement\n>;\n\nexport const Blockquote = ({ className, ref, ...rest }: BlockquoteProps) => {\n return (\n <blockquote\n className={classNames('eds-blockquote', className)}\n ref={ref}\n {...rest}\n />\n );\n};\n\nexport type BlockquoteFooterProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\nexport const BlockquoteFooter: React.FunctionComponent<\n 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 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 { 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';\nimport { ExternalIcon } from '@entur/icons';\n\nexport type LinkOwnProps = {\n external?: boolean;\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 ariaLabelExternalIcon?: string;\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 external = false,\n ariaLabelExternalIcon = '(ekstern lenke)',\n className,\n margin = 'both',\n children,\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 {children}\n {external ? (\n <ExternalIcon\n className=\"eds-link--ext-icon\"\n aria-label={ariaLabelExternalIcon}\n />\n ) : (\n <></>\n )}\n </Element>\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 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","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"],"names":["defaultElement"],"mappings":";;;;AAWO,MAAM,aAAa,CAAC,EAAE,WAAW,KAAK,GAAG,WAA4B;AAC1E,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,kBAAkB,SAAS;AAAA,MACjD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOO,MAAM,mBAET,CAAC,EAAE,WAAW,GAAG,WAAW;AAC9B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,0BAA0B,SAAS;AAAA,MACxD,GAAG;AAAA,IAAA;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G,WAAW;AAAA,UAC1C,CAAC,8BAA8B,GAAG,WAAW;AAAA,UAC7C,CAAC,4BAA4B,GAAG,WAAW;AAAA,QAAA;AAAA,QAE7C;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACtBA,MAAM,iBAAiB;AAEhB,MAAM,eAAe,CAE1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyC;AACvC,QAAM,UAA6B,MAAM;AACzC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,+BAA+B,GAAG,WAAW;AAAA,UAC9C,CAAC,kCAAkC,GAAG,WAAW;AAAA,UACjD,CAAC,gCAAgC,GAAG,WAAW;AAAA,QAAA;AAAA,QAEjD;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACnCO,MAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM,oBAAC,QAAG,WAAW,WAAW,sBAAsB,SAAS,GAAI,GAAG,KAAA,CAAM;ACb5E,uBAAuB,YAAY;"}
|
|
1
|
+
{"version":3,"file":"typography.esm.js","sources":["../src/Blockquote.tsx","../src/CodeText.tsx","../src/EmphasizedText.tsx","../src/BaseHeading.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/StrongText.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","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nexport type BlockquoteProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<\n React.BlockquoteHTMLAttributes<HTMLElement>,\n HTMLQuoteElement\n>;\n\nexport const Blockquote = ({ className, ref, ...rest }: BlockquoteProps) => {\n return (\n <blockquote\n className={classNames('eds-blockquote', className)}\n ref={ref}\n {...rest}\n />\n );\n};\n\nexport type BlockquoteFooterProps = {\n /** Ekstra klassenavn */\n className?: string;\n} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\nexport const BlockquoteFooter: React.FunctionComponent<\n 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 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 { 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';\nimport { ExternalIcon } from '@entur/icons';\n\nexport type LinkOwnProps = {\n external?: boolean;\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 ariaLabelExternalIcon?: string;\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 external = false,\n ariaLabelExternalIcon = '(ekstern lenke)',\n className,\n margin = 'both',\n children,\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 {children}\n {external ? (\n <ExternalIcon\n className=\"eds-link--ext-icon\"\n aria-label={ariaLabelExternalIcon}\n />\n ) : (\n <></>\n )}\n </Element>\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 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 = ({\n children,\n className,\n title,\n ...rest\n}: ListItemProps) => (\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 = ({\n className,\n type = '1',\n ...rest\n}: NumberedListProps) => (\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 = ({ className, ...rest }: UnorderedListProps) => (\n <ul className={classNames('eds-unordered-list', className)} {...rest} />\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"],"names":["defaultElement"],"mappings":";;;;AAWO,MAAM,aAAa,CAAC,EAAE,WAAW,KAAK,GAAG,WAA4B;AAC1E,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,kBAAkB,SAAS;AAAA,MACjD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOO,MAAM,mBAET,CAAC,EAAE,WAAW,GAAG,WAAW;AAC9B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,0BAA0B,SAAS;AAAA,MACxD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACjBA,MAAMA,mBAAiB;AAEhB,MAAM,WAAW,CAAsD;AAAA,EAC5E;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAqC;AACnC,QAAM,UAA6B,MAAMA;AACzC,SACE,oBAAC,WAAQ,WAAW,WAAW,iBAAiB,SAAS,GAAI,GAAG,MAAM;AAE1E;ACNA,MAAMA,mBAAiB;AAEhB,MAAM,iBAAiB,CAE5B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,GAAG;AACL,MAA2C;AACzC,QAAM,UAA6B,MAAMA;AACzC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,iCAAiC,GAAG,WAAW;AAAA,UAChD,CAAC,oCAAoC,GAAG,WAAW;AAAA,UACnD,CAA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AAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;ACnCO,MAAM,gBAAgB,CAAC,EAAE,WAAW,GAAG,KAAA,MAC5C,oBAAC,MAAA,EAAG,WAAW,WAAW,sBAAsB,SAAS,GAAI,GAAG,KAAA,CAAM;ACXxE,uBAAuB,YAAY;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/typography",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-next.0",
|
|
4
4
|
"license": "SEE LICENSE IN README.md",
|
|
5
5
|
"main": "./dist/typography.cjs.js",
|
|
6
6
|
"module": "./dist/typography.esm.js",
|
|
@@ -48,38 +48,36 @@
|
|
|
48
48
|
"build:main": "vite build",
|
|
49
49
|
"build:beta": "vite build --config vite.config.beta.ts",
|
|
50
50
|
"test": "jest",
|
|
51
|
-
"lint": "eslint src",
|
|
52
51
|
"lint:styles": "stylelint 'src/beta**/*.{css,scss}' --ignore-path ../../.gitignore",
|
|
53
52
|
"start": "vite build --watch",
|
|
54
53
|
"start:beta": "vite build --config vite.config.beta.ts --watch",
|
|
55
54
|
"migrate": "./scripts/migrate-typography.mjs"
|
|
56
55
|
},
|
|
57
56
|
"peerDependencies": {
|
|
58
|
-
"react": ">=
|
|
59
|
-
"react-dom": ">=
|
|
57
|
+
"react": ">=18.0.0",
|
|
58
|
+
"react-dom": ">=18.0.0"
|
|
60
59
|
},
|
|
61
60
|
"dependencies": {
|
|
62
|
-
"@entur/icons": "^
|
|
63
|
-
"@entur/tokens": "^3.
|
|
64
|
-
"@entur/utils": "^0.
|
|
61
|
+
"@entur/icons": "^10.0.0-next.0",
|
|
62
|
+
"@entur/tokens": "^3.24.1-next.0",
|
|
63
|
+
"@entur/utils": "^1.0.0-next.0",
|
|
65
64
|
"classnames": "^2.5.1",
|
|
66
65
|
"modern-normalize": "^3.0.1"
|
|
67
66
|
},
|
|
68
67
|
"optionalDependencies": {
|
|
69
|
-
"glob": "^
|
|
68
|
+
"glob": "^13.0.4"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@testing-library/jest-dom": "^5.17.0",
|
|
73
|
-
"@testing-library/react": "^
|
|
72
|
+
"@testing-library/react": "^16.3.0",
|
|
74
73
|
"@testing-library/user-event": "14.6.1",
|
|
75
74
|
"@vitejs/plugin-react": "^5.0.1",
|
|
76
|
-
"eslint": "^7.32.0",
|
|
77
75
|
"jest": "^29.0.0",
|
|
78
76
|
"jest-environment-jsdom": "^29.0.0",
|
|
79
77
|
"ts-jest": "^29.0.0",
|
|
80
78
|
"typescript": "^5.9.2",
|
|
81
|
-
"vite": "^7.
|
|
79
|
+
"vite": "^7.3.2",
|
|
82
80
|
"vite-plugin-dts": "^4.5.4"
|
|
83
81
|
},
|
|
84
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "0f435bdeec98cc3cea1db7434b13b1f771a39a18"
|
|
85
83
|
}
|
|
@@ -76,7 +76,7 @@ async function initializeGlob() {
|
|
|
76
76
|
glob = globModule.default || globModule;
|
|
77
77
|
useGlob = true;
|
|
78
78
|
console.log('📦 Using glob package for pattern matching');
|
|
79
|
-
} catch
|
|
79
|
+
} catch {
|
|
80
80
|
console.log('📁 Using Node.js built-ins for file discovery');
|
|
81
81
|
console.log(
|
|
82
82
|
' (Install glob for better pattern matching: npm install glob or yarn add glob)',
|
|
@@ -85,7 +85,6 @@ async function initializeGlob() {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// Configuration
|
|
88
|
-
const OLD_IMPORT = '@entur/typography';
|
|
89
88
|
const BETA_IMPORT = '@entur/typography/beta';
|
|
90
89
|
|
|
91
90
|
// Enhanced warning detection patterns - only truly problematic patterns
|
|
@@ -104,14 +103,6 @@ const PROBLEMATIC_PATTERNS = {
|
|
|
104
103
|
semanticMismatch: /<Heading[^>]*as="([^"]*)"[^>]*variant="([^"]*)"/g,
|
|
105
104
|
};
|
|
106
105
|
|
|
107
|
-
// Warning severity levels
|
|
108
|
-
const WARNING_CATEGORIES = {
|
|
109
|
-
CRITICAL: 'critical', // Will break functionality
|
|
110
|
-
HIGH: 'high', // Likely to cause issues
|
|
111
|
-
MEDIUM: 'medium', // May cause styling issues
|
|
112
|
-
LOW: 'low', // Best practice suggestions
|
|
113
|
-
INFO: 'info', // Informational only
|
|
114
|
-
};
|
|
115
106
|
|
|
116
107
|
// =============================================================================
|
|
117
108
|
// 🎯 MIGRATION FOLDERS CONFIGURATION
|
|
@@ -231,77 +222,6 @@ function analyzeFile(filePath, content) {
|
|
|
231
222
|
return analysis;
|
|
232
223
|
}
|
|
233
224
|
|
|
234
|
-
// Generate enhanced warnings with context and solutions
|
|
235
|
-
function generateWarningWithSolution(warning, context, filePath, lineNumber) {
|
|
236
|
-
const severity = determineSeverity(warning);
|
|
237
|
-
const suggestion = generateSuggestion(warning, context);
|
|
238
|
-
const codeExample = generateCodeExample(warning);
|
|
239
|
-
|
|
240
|
-
return {
|
|
241
|
-
message: warning,
|
|
242
|
-
severity,
|
|
243
|
-
suggestion,
|
|
244
|
-
codeExample,
|
|
245
|
-
file: filePath,
|
|
246
|
-
line: lineNumber,
|
|
247
|
-
documentation: getRelevantDocs(warning),
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// Determine warning severity based on content
|
|
252
|
-
function determineSeverity(warning) {
|
|
253
|
-
if (warning.includes('will break') || warning.includes('fatal'))
|
|
254
|
-
return WARNING_CATEGORIES.CRITICAL;
|
|
255
|
-
if (warning.includes('conflict') || warning.includes('override'))
|
|
256
|
-
return WARNING_CATEGORIES.HIGH;
|
|
257
|
-
if (warning.includes('may cause') || warning.includes('styling'))
|
|
258
|
-
return WARNING_CATEGORIES.MEDIUM;
|
|
259
|
-
if (warning.includes('best practice') || warning.includes('consider'))
|
|
260
|
-
return WARNING_CATEGORIES.LOW;
|
|
261
|
-
return WARNING_CATEGORIES.INFO;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// Generate actionable suggestions
|
|
265
|
-
function generateSuggestion(warning, context) {
|
|
266
|
-
if (warning.includes('style and margin')) {
|
|
267
|
-
return 'Remove the margin prop as it will be overridden by inline styles. Use spacing prop instead.';
|
|
268
|
-
}
|
|
269
|
-
if (warning.includes('missing variant')) {
|
|
270
|
-
return 'Add a variant prop to ensure consistent styling. Example: variant="title-1"';
|
|
271
|
-
}
|
|
272
|
-
if (warning.includes('nested typography')) {
|
|
273
|
-
return 'Avoid nesting Text components. Use spans or other inline elements for emphasis.';
|
|
274
|
-
}
|
|
275
|
-
if (warning.includes('deprecated margin')) {
|
|
276
|
-
return 'Replace margin prop with spacing prop for better consistency.';
|
|
277
|
-
}
|
|
278
|
-
return 'Review the component for potential styling conflicts.';
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// Generate code examples for fixes
|
|
282
|
-
function generateCodeExample(warning) {
|
|
283
|
-
if (warning.includes('style and margin')) {
|
|
284
|
-
return '// Before: <Text style={{color: "red"}} margin="bottom">\n// After: <Text style={{color: "red"}} spacing="bottom">';
|
|
285
|
-
}
|
|
286
|
-
if (warning.includes('missing variant')) {
|
|
287
|
-
return '// Before: <Heading as="h1">Title</Heading>\n// After: <Heading as="h1" variant="title-1">Title</Heading>';
|
|
288
|
-
}
|
|
289
|
-
if (warning.includes('nested typography')) {
|
|
290
|
-
return '// Before: <Text>Hello <Text>World</Text></Text>\n// After: <Text>Hello <span>World</span></Text>';
|
|
291
|
-
}
|
|
292
|
-
return '';
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// Get relevant documentation links
|
|
296
|
-
function getRelevantDocs(warning) {
|
|
297
|
-
if (warning.includes('variant'))
|
|
298
|
-
return 'https://linje.entur.no/komponenter/ressurser/typography-beta#heading-variants';
|
|
299
|
-
if (warning.includes('spacing'))
|
|
300
|
-
return 'https://linje.entur.no/komponenter/ressurser/typography-beta#spacing';
|
|
301
|
-
if (warning.includes('semantic'))
|
|
302
|
-
return 'https://linje.entur.no/komponenter/ressurser/typography-beta#semantic-html';
|
|
303
|
-
return 'https://linje.entur.no/komponenter/ressurser/typography-beta';
|
|
304
|
-
}
|
|
305
225
|
|
|
306
226
|
let ALLOWED_DIRECTORIES = process.env.TYPOGRAPHY_MIGRATION_DIRS
|
|
307
227
|
? process.env.TYPOGRAPHY_MIGRATION_DIRS.split(',')
|
|
@@ -420,14 +340,6 @@ const SPACING_MAPPING = {
|
|
|
420
340
|
'xs2-bottom': 'xs2-bottom',
|
|
421
341
|
};
|
|
422
342
|
|
|
423
|
-
// Import patterns to handle
|
|
424
|
-
const IMPORT_PATTERNS = [
|
|
425
|
-
/from\s+['"`]@entur\/typography['"`]/g,
|
|
426
|
-
/from\s+['"`]@entur\/typography\/dist['"`]/g,
|
|
427
|
-
/from\s+['"`]@entur\/typography\/dist\/index['"`]/g,
|
|
428
|
-
/from\s+['"`]@entur\/typography\/dist\/styles\.css['"`]/g,
|
|
429
|
-
/from\s+['"`]@entur\/typography\/styles['"`]/g,
|
|
430
|
-
];
|
|
431
343
|
|
|
432
344
|
// Parse JSX props more robustly
|
|
433
345
|
function parseJSXProps(propsString) {
|