@entur/layout 2.2.3 → 2.3.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/Badge/Badge.d.ts +6 -1
- package/dist/Badge/BulletBadge.d.ts +6 -1
- package/dist/Badge/NotificationBadge.d.ts +6 -1
- package/dist/Badge/StatusBadge.d.ts +6 -1
- package/dist/layout.cjs.development.js.map +1 -1
- package/dist/layout.cjs.production.min.js.map +1 -1
- package/dist/layout.esm.js.map +1 -1
- package/dist/styles.css +313 -176
- package/package.json +6 -6
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentPropsWithRef } from '@entur/utils';
|
|
3
|
+
import { VariantType } from '@entur/utils';
|
|
3
4
|
import './Badge.scss';
|
|
5
|
+
/** @deprecated use variant="information" instead */
|
|
6
|
+
declare const info = "info";
|
|
7
|
+
/** @deprecated use variant="negative" instead */
|
|
8
|
+
declare const danger = "danger";
|
|
4
9
|
export type BadgeTypes = 'status' | 'bullet' | 'notification';
|
|
5
10
|
export type BadgeOwnProps = {
|
|
6
11
|
/** Elementet som wrapper badgen
|
|
@@ -12,7 +17,7 @@ export type BadgeOwnProps = {
|
|
|
12
17
|
/** Elementet som badge vil legges relativt til */
|
|
13
18
|
children: React.ReactNode;
|
|
14
19
|
/** Hvilken type badge man vil ha */
|
|
15
|
-
variant: 'primary' | '
|
|
20
|
+
variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;
|
|
16
21
|
/** Om 0 skal vises
|
|
17
22
|
* @default false
|
|
18
23
|
*/
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentPropsWithRef } from '@entur/utils';
|
|
3
|
+
import { VariantType } from '@entur/utils';
|
|
4
|
+
/** @deprecated use variant="information" instead */
|
|
5
|
+
declare const info = "info";
|
|
6
|
+
/** @deprecated use variant="negative" instead */
|
|
7
|
+
declare const danger = "danger";
|
|
3
8
|
type BulletBadgeBaseProps = {
|
|
4
9
|
/** Elementet som wrapper badgen
|
|
5
10
|
* @default "span"
|
|
@@ -10,7 +15,7 @@ type BulletBadgeBaseProps = {
|
|
|
10
15
|
/** Elementet som badge vil legges relativt til */
|
|
11
16
|
children: React.ReactNode;
|
|
12
17
|
/** Hvilken type badge man vil ha */
|
|
13
|
-
variant: 'primary' | '
|
|
18
|
+
variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;
|
|
14
19
|
};
|
|
15
20
|
export type BulletBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;
|
|
16
21
|
export type BulletBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: BulletBadgeProps<T>) => React.ReactElement | null;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentPropsWithRef } from '@entur/utils';
|
|
3
|
+
import { VariantType } from '@entur/utils';
|
|
4
|
+
/** @deprecated use variant="information" instead */
|
|
5
|
+
declare const info = "info";
|
|
6
|
+
/** @deprecated use variant="negative" instead */
|
|
7
|
+
declare const danger = "danger";
|
|
3
8
|
type NotificationBadgeBaseProps = {
|
|
4
9
|
/** Elementet som wrapper badgen
|
|
5
10
|
* @default "span"
|
|
@@ -10,7 +15,7 @@ type NotificationBadgeBaseProps = {
|
|
|
10
15
|
/** Elementet som badge vil legges relativt til */
|
|
11
16
|
children: React.ReactNode;
|
|
12
17
|
/** Hvilken type badge man vil ha */
|
|
13
|
-
variant: 'primary' | '
|
|
18
|
+
variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;
|
|
14
19
|
/** Om 0 skal vises
|
|
15
20
|
* @default false
|
|
16
21
|
*/
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentPropsWithRef } from '@entur/utils';
|
|
3
|
+
import { VariantType } from '@entur/utils';
|
|
4
|
+
/** @deprecated use variant="information" instead */
|
|
5
|
+
declare const info = "info";
|
|
6
|
+
/** @deprecated use variant="negative" instead */
|
|
7
|
+
declare const danger = "danger";
|
|
3
8
|
type StatusBadgeBaseProps = {
|
|
4
9
|
/** Elementet som wrapper badgen
|
|
5
10
|
* @default "span"
|
|
@@ -10,7 +15,7 @@ type StatusBadgeBaseProps = {
|
|
|
10
15
|
/** Elementet som badge vil legges relativt til */
|
|
11
16
|
children: React.ReactNode;
|
|
12
17
|
/** Hvilken type badge man vil ha */
|
|
13
|
-
variant: 'primary' | '
|
|
18
|
+
variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;
|
|
14
19
|
};
|
|
15
20
|
export type StatusBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;
|
|
16
21
|
export type StatusBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: StatusBadgeProps<T>) => React.ReactElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.cjs.development.js","sources":["../src/Contrast.tsx","../src/BaseCard.tsx","../src/NavigationCard.tsx","../src/MediaCard.tsx","../src/Badge/Badge.tsx","../src/Badge/BulletBadge.tsx","../src/Badge/NotificationBadge.tsx","../src/Badge/StatusBadge.tsx","../src/Tag.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './BaseCard.scss';\n\nexport type BaseCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager Card\n * @default \"div\"\n */\n as?: 'div' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n children?: React.ReactNode;\n};\n\nexport type BaseCardProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseCardOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const BaseCard = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n as,\n ...rest\n}: BaseCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', className);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { Paragraph } from '@entur/typography';\nimport classNames from 'classnames';\nimport { ForwardIcon, ExternalIcon } from '@entur/icons';\nimport { Heading3 } from '@entur/typography';\nimport { BaseCard } from './BaseCard';\nimport './NavigationCard.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type NavigationCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager NavigationCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Valgfritt ikon som står over tittelen */\n titleIcon?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Lager en mer kompakt NavigationCard, uten ikon og beskrivende tekst\n * @default false\n */\n compact?: boolean;\n /** Beskrivelse under tittel, om ikke \"compact\" er valgt */\n children?: React.ReactNode;\n /** Legger til et ikon for å symbolisere at kortet har en ekstern lenke\n * @default false\n */\n externalLink?: boolean;\n};\n\nexport type NavigationCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, NavigationCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const NavigationCard = <\n E extends React.ElementType = typeof defaultElement,\n>({\n title,\n children,\n titleIcon,\n compact = false,\n className,\n externalLink = false,\n as,\n ...rest\n}: NavigationCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-navigation-card', className, {\n 'eds-base-card--red-line': compact,\n 'eds-navigation-card--compact': compact,\n });\n return (\n <BaseCard as={Element} className={classList} {...rest}>\n {!compact && titleIcon && (\n <div className=\"eds-navigation-card__title-icon\" aria-hidden=\"true\">\n {titleIcon}\n </div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span\n className=\"eds-navigation-card__title-icon-compact\"\n aria-hidden=\"true\"\n >\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigation-card__external--not-compact\"\n />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\"\n />\n )}\n {compact && !externalLink && (\n <ForwardIcon\n className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </BaseCard>\n );\n};\n","import React, { CSSProperties } from 'react';\nimport { Paragraph, Label } from '@entur/typography';\nimport classNames from 'classnames';\nimport { BaseCard } from './BaseCard';\nimport { ForwardIcon } from '@entur/icons';\nimport './MediaCard.scss';\nimport { ConditionalWrapper, PolymorphicComponentProps } from '@entur/utils';\n\nexport type MediaCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Teksten under tittelen i MediaCard */\n description?: React.ReactNode;\n /** Kategori (eller lignende) som vises over tittelen */\n category?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Det du skulle ønske som media (f.eks. bilder eller video) */\n children?: React.ReactNode;\n /** Styling som sendes til komponenten */\n style?: CSSProperties;\n /** Hvilken heading som brukes for tittelen.\n * Blir kun satt hvis description også er satt.\n * @default 'h2'\n */\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** Skjul pil-ikonet nederst til høyre\n * @default false\n */\n hideArrow?: boolean;\n /** Props som sendes til wrapper-elementet i stedet for lenke-elementet */\n wrapperProps?: React.HTMLAttributes<HTMLElement>;\n /** @deprecated Denne prop-en har ikke lenger en funksjon.\n * Hvis du trenger å legge til props på wrapper-elementet, bruk 'wrapperProps'-prop-en\n */\n wholeCardAsElement?: boolean;\n};\n\nexport type MediaCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, MediaCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const MediaCard = <E extends React.ElementType = typeof defaultElement>({\n title,\n description,\n children,\n className,\n category,\n style,\n as,\n headingLevel = 'h2',\n wholeCardAsElement: whole,\n hideArrow,\n wrapperProps,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const Heading = headingLevel;\n\n const _wrapperProps = whole\n ? { ...wrapperProps, ...rest }\n : { ...wrapperProps };\n return (\n <BaseCard\n className={classNames('eds-base-card', 'eds-media-card', className)}\n style={style}\n {..._wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <div className=\"eds-media-card__text\">\n {category && (\n <Label className=\"eds-media-card__text__category\">{category}</Label>\n )}\n {/* we only want a heading wrapper when we also have description text */}\n <ConditionalWrapper\n condition={description !== undefined}\n wrapper={(children: React.ReactNode) => (\n <Heading className=\"eds-media-card__text__title\">\n {children}\n </Heading>\n )}\n >\n <Element\n tabIndex={0}\n className=\"eds-media-card__text__title-link\"\n {...rest}\n >\n {title}\n </Element>\n </ConditionalWrapper>\n {description !== undefined && <Paragraph>{description}</Paragraph>}\n {!hideArrow && (\n <ForwardIcon\n className=\"eds-media-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n </BaseCard>\n );\n};\n\nexport default MediaCard;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport './Badge.scss';\n\nexport type BadgeTypes = 'status' | 'bullet' | 'notification';\n\nexport type BadgeOwnProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n type?: BadgeTypes;\n invisible?: boolean;\n};\n\nexport type BadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;\n\nexport type BadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const Badge: BadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n max = 99,\n variant,\n showZero = false,\n invisible: invisibleProp = false,\n as,\n type = 'status',\n ...rest\n }: BadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n let invisible = invisibleProp;\n if (\n invisibleProp === false &&\n ((children === 0 && !showZero) || children == null)\n ) {\n invisible = true;\n }\n\n let displayValue;\n if (typeof children === 'number') {\n displayValue = children > max ? `${max}+` : children;\n } else {\n displayValue = children;\n }\n\n const classList = classNames(\n className,\n 'eds-badge',\n { 'eds-badge--invisible': invisible, 'eds-badge--show-zero': showZero },\n `eds-badge--variant-${variant}`,\n `eds-badge--type-${type}`,\n );\n\n return (\n <Element className={classList} ref={ref} {...rest}>\n {displayValue}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype BulletBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n};\n\nexport type BulletBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;\n\nexport type BulletBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BulletBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const BulletBadge: BulletBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: BulletBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"bullet\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype NotificationBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n};\n\nexport type NotificationBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;\n\nexport type NotificationBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NotificationBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const NotificationBadge: NotificationBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NotificationBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"notification\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype StatusBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n};\n\nexport type StatusBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;\n\nexport type StatusBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: StatusBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const StatusBadge: StatusBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: StatusBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"status\" />;\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport './Tag.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type TagOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default 'div'\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /**Mindre og mer kompakt Tag, til f.eks. tabellbruk\n * @default false\n */\n compact?: boolean;\n children: React.ReactNode;\n};\n\nexport type TagProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, TagOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Tag = <E extends React.ElementType = typeof defaultElement>({\n className,\n children,\n compact,\n as,\n ...rest\n}: TagProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n return (\n <Element\n className={classNames('eds-tag', className, {\n 'eds-tag--leading-icon': hasLeadingIcon,\n 'eds-tag--trailing-icon': hasTrailingIcon,\n 'eds-tag--compact': compact,\n })}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n","import './styles.scss';\nimport { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('layout', 'typography');\n\nexport * from './Contrast';\nexport * from './NavigationCard';\nexport * from './BaseCard';\nexport * from './MediaCard';\nexport * from './Badge/Badge';\nexport * from './Badge/BulletBadge';\nexport * from './Badge/NotificationBadge';\nexport * from './Badge/StatusBadge';\nexport * from './Tag';\n"],"names":["defaultElement","Contrast","React","forwardRef","ref","className","as","rest","_excluded","Element","ContrastContext","Provider","value","createElement","classNames","createContext","useContrast","useContext","BaseCard","children","classList","NavigationCard","title","titleIcon","compact","externalLink","Heading3","Fragment","Paragraph","ExternalIcon","ForwardIcon","MediaCard","description","category","style","headingLevel","whole","wholeCardAsElement","hideArrow","wrapperProps","Heading","_wrapperProps","Label","ConditionalWrapper","condition","undefined","wrapper","tabIndex","Badge","max","variant","showZero","invisible","invisibleProp","type","displayValue","BulletBadge","props","NotificationBadge","StatusBadge","Tag","childrenArray","Children","toArray","hasLeadingIcon","length","hasTrailingIcon","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,gBAAc,GAAG,KAAK,CAAA;AAErB,IAAMC,QAAQ,gBAAsBC,KAAK,CAACC,UAAU,CAAC,SAASF,QAAQ,CAI3EG,IAAAA,EAAAA,GAAsB,EAAA;EAAA,IADpBC,SAAS,QAATA,SAAS;AAAEC,IAAAA,EAAE,QAAFA,EAAE;IAAKC,IAAI,GAAA,6BAAA,CAAA,IAAA,EAAAC,WAAA,CAAA,CAAA;AAGxB,EAAA,IAAMC,OAAO,GAAsBH,EAAE,IAAIN,gBAAc,CAAA;AACvD,EAAA,OACEE,oBAACQ,eAAe,CAACC,QAAQ,EAAC;AAAAC,IAAAA,KAAK,EAAE,IAAA;AAAI,GAAA,EACnCV,KAAA,CAAAW,aAAA,CAACJ,OAAO,EAAA,QAAA,CAAA;AACNJ,IAAAA,SAAS,EAAES,UAAU,CAAC,cAAc,EAAET,SAAS,CAAC;AAChDD,IAAAA,GAAG,EAAEA,GAAAA;GACDG,EAAAA,IAAI,EACR,CACuB,CAAA;AAE/B,CAAC,EAAC;AAEK,IAAMG,eAAe,gBAAGR,KAAK,CAACa,aAAa,CAAU,KAAK,EAAC;AAErDC,IAAAA,WAAW,GAAkB,SAA7BA,WAAW,GAAA;AAAA,EAAA,OACtBd,KAAK,CAACe,UAAU,CAACP,eAAe,CAAC,CAAA;AAAA;;;ACvBnC,IAAMV,gBAAc,GAAG,KAAK,CAAA;AAEfkB,IAAAA,QAAQ,GAAG,SAAXA,QAAQ,CAKe,IAAA,EAAA;EAAA,IAJlCC,QAAQ,QAARA,QAAQ;AACRd,IAAAA,SAAS,QAATA,SAAS;AACTC,IAAAA,EAAE,QAAFA,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ge/Badge.tsx","../src/Badge/BulletBadge.tsx","../src/Badge/NotificationBadge.tsx","../src/Badge/StatusBadge.tsx","../src/Tag.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './BaseCard.scss';\n\nexport type BaseCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager Card\n * @default \"div\"\n */\n as?: 'div' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n children?: React.ReactNode;\n};\n\nexport type BaseCardProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseCardOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const BaseCard = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n as,\n ...rest\n}: BaseCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', className);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { Paragraph } from '@entur/typography';\nimport classNames from 'classnames';\nimport { ForwardIcon, ExternalIcon } from '@entur/icons';\nimport { Heading3 } from '@entur/typography';\nimport { BaseCard } from './BaseCard';\nimport './NavigationCard.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type NavigationCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager NavigationCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Valgfritt ikon som står over tittelen */\n titleIcon?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Lager en mer kompakt NavigationCard, uten ikon og beskrivende tekst\n * @default false\n */\n compact?: boolean;\n /** Beskrivelse under tittel, om ikke \"compact\" er valgt */\n children?: React.ReactNode;\n /** Legger til et ikon for å symbolisere at kortet har en ekstern lenke\n * @default false\n */\n externalLink?: boolean;\n};\n\nexport type NavigationCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, NavigationCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const NavigationCard = <\n E extends React.ElementType = typeof defaultElement,\n>({\n title,\n children,\n titleIcon,\n compact = false,\n className,\n externalLink = false,\n as,\n ...rest\n}: NavigationCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-navigation-card', className, {\n 'eds-base-card--red-line': compact,\n 'eds-navigation-card--compact': compact,\n });\n return (\n <BaseCard as={Element} className={classList} {...rest}>\n {!compact && titleIcon && (\n <div className=\"eds-navigation-card__title-icon\" aria-hidden=\"true\">\n {titleIcon}\n </div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span\n className=\"eds-navigation-card__title-icon-compact\"\n aria-hidden=\"true\"\n >\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigation-card__external--not-compact\"\n />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\"\n />\n )}\n {compact && !externalLink && (\n <ForwardIcon\n className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </BaseCard>\n );\n};\n","import React, { CSSProperties } from 'react';\nimport { Paragraph, Label } from '@entur/typography';\nimport classNames from 'classnames';\nimport { BaseCard } from './BaseCard';\nimport { ForwardIcon } from '@entur/icons';\nimport './MediaCard.scss';\nimport { ConditionalWrapper, PolymorphicComponentProps } from '@entur/utils';\n\nexport type MediaCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Teksten under tittelen i MediaCard */\n description?: React.ReactNode;\n /** Kategori (eller lignende) som vises over tittelen */\n category?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Det du skulle ønske som media (f.eks. bilder eller video) */\n children?: React.ReactNode;\n /** Styling som sendes til komponenten */\n style?: CSSProperties;\n /** Hvilken heading som brukes for tittelen.\n * Blir kun satt hvis description også er satt.\n * @default 'h2'\n */\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** Skjul pil-ikonet nederst til høyre\n * @default false\n */\n hideArrow?: boolean;\n /** Props som sendes til wrapper-elementet i stedet for lenke-elementet */\n wrapperProps?: React.HTMLAttributes<HTMLElement>;\n /** @deprecated Denne prop-en har ikke lenger en funksjon.\n * Hvis du trenger å legge til props på wrapper-elementet, bruk 'wrapperProps'-prop-en\n */\n wholeCardAsElement?: boolean;\n};\n\nexport type MediaCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, MediaCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const MediaCard = <E extends React.ElementType = typeof defaultElement>({\n title,\n description,\n children,\n className,\n category,\n style,\n as,\n headingLevel = 'h2',\n wholeCardAsElement: whole,\n hideArrow,\n wrapperProps,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const Heading = headingLevel;\n\n const _wrapperProps = whole\n ? { ...wrapperProps, ...rest }\n : { ...wrapperProps };\n return (\n <BaseCard\n className={classNames('eds-base-card', 'eds-media-card', className)}\n style={style}\n {..._wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <div className=\"eds-media-card__text\">\n {category && (\n <Label className=\"eds-media-card__text__category\">{category}</Label>\n )}\n {/* we only want a heading wrapper when we also have description text */}\n <ConditionalWrapper\n condition={description !== undefined}\n wrapper={(children: React.ReactNode) => (\n <Heading className=\"eds-media-card__text__title\">\n {children}\n </Heading>\n )}\n >\n <Element\n tabIndex={0}\n className=\"eds-media-card__text__title-link\"\n {...rest}\n >\n {title}\n </Element>\n </ConditionalWrapper>\n {description !== undefined && <Paragraph>{description}</Paragraph>}\n {!hideArrow && (\n <ForwardIcon\n className=\"eds-media-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n </BaseCard>\n );\n};\n\nexport default MediaCard;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\nimport './Badge.scss';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\nexport type BadgeTypes = 'status' | 'bullet' | 'notification';\n\nexport type BadgeOwnProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n type?: BadgeTypes;\n invisible?: boolean;\n};\n\nexport type BadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;\n\nexport type BadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const Badge: BadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n max = 99,\n variant,\n showZero = false,\n invisible: invisibleProp = false,\n as,\n type = 'status',\n ...rest\n }: BadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n let invisible = invisibleProp;\n if (\n invisibleProp === false &&\n ((children === 0 && !showZero) || children == null)\n ) {\n invisible = true;\n }\n\n let displayValue;\n if (typeof children === 'number') {\n displayValue = children > max ? `${max}+` : children;\n } else {\n displayValue = children;\n }\n\n const classList = classNames(\n className,\n 'eds-badge',\n { 'eds-badge--invisible': invisible, 'eds-badge--show-zero': showZero },\n `eds-badge--variant-${variant}`,\n `eds-badge--type-${type}`,\n );\n\n return (\n <Element className={classList} ref={ref} {...rest}>\n {displayValue}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype BulletBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n};\n\nexport type BulletBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;\n\nexport type BulletBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BulletBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const BulletBadge: BulletBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: BulletBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"bullet\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype NotificationBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n};\n\nexport type NotificationBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;\n\nexport type NotificationBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NotificationBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const NotificationBadge: NotificationBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NotificationBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"notification\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype StatusBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n};\n\nexport type StatusBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;\n\nexport type StatusBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: StatusBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const StatusBadge: StatusBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: StatusBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"status\" />;\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport './Tag.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type TagOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default 'div'\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /**Mindre og mer kompakt Tag, til f.eks. tabellbruk\n * @default false\n */\n compact?: boolean;\n children: React.ReactNode;\n};\n\nexport type TagProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, TagOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Tag = <E extends React.ElementType = typeof defaultElement>({\n className,\n children,\n compact,\n as,\n ...rest\n}: TagProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n return (\n <Element\n className={classNames('eds-tag', className, {\n 'eds-tag--leading-icon': hasLeadingIcon,\n 'eds-tag--trailing-icon': hasTrailingIcon,\n 'eds-tag--compact': compact,\n })}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n","import './styles.scss';\nimport { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('layout', 'typography');\n\nexport * from './Contrast';\nexport * from './NavigationCard';\nexport * from './BaseCard';\nexport * from './MediaCard';\nexport * from './Badge/Badge';\nexport * from './Badge/BulletBadge';\nexport * from './Badge/NotificationBadge';\nexport * from './Badge/StatusBadge';\nexport * from './Tag';\n"],"names":["defaultElement","Contrast","React","forwardRef","ref","className","as","rest","_excluded","Element","ContrastContext","Provider","value","createElement","classNames","createContext","useContrast","useContext","BaseCard","children","classList","NavigationCard","title","titleIcon","compact","externalLink","Heading3","Fragment","Paragraph","ExternalIcon","ForwardIcon","MediaCard","description","category","style","headingLevel","whole","wholeCardAsElement","hideArrow","wrapperProps","Heading","_wrapperProps","Label","ConditionalWrapper","condition","undefined","wrapper","tabIndex","Badge","max","variant","showZero","invisible","invisibleProp","type","displayValue","BulletBadge","props","NotificationBadge","StatusBadge","Tag","childrenArray","Children","toArray","hasLeadingIcon","length","hasTrailingIcon","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,gBAAc,GAAG,KAAK,CAAA;AAErB,IAAMC,QAAQ,gBAAsBC,KAAK,CAACC,UAAU,CAAC,SAASF,QAAQ,CAI3EG,IAAAA,EAA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AME,OAAO,GAAsBH,EAAE,IAAIN,cAAc,CAAA;EACvD,IAAM6D,aAAa,GAAG3D,KAAK,CAAC4D,QAAQ,CAACC,OAAO,CAAC5C,QAAQ,CAAC,CAAA;AACtD,EAAA,IAAM6C,cAAc,GAClBH,aAAa,CAACI,MAAM,GAAG,CAAC,IAAI,OAAOJ,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAA;AAClE,EAAA,IAAMK,eAAe,GACnBL,aAAa,CAACI,MAAM,GAAG,CAAC,IACxB,OAAOJ,aAAa,CAACA,aAAa,CAACI,MAAM,GAAG,CAAC,CAAC,KAAK,QAAQ,CAAA;AAE7D,EAAA,OACE/D,KAAC,CAAAW,aAAA,CAAAJ,OAAO,EAAA,QAAA,CAAA;AACNJ,IAAAA,SAAS,EAAES,UAAU,CAAC,SAAS,EAAET,SAAS,EAAE;AAC1C,MAAA,uBAAuB,EAAE2D,cAAc;AACvC,MAAA,wBAAwB,EAAEE,eAAe;AACzC,MAAA,kBAAkB,EAAE1C,OAAAA;KACrB,CAAA;GACGjB,EAAAA,IAAI,CAEPY,EAAAA,QAAQ,CACD,CAAA;AAEd;;AC/CAgD,4BAAsB,CAAC,QAAQ,EAAE,YAAY,CAAC;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.cjs.production.min.js","sources":["../src/Contrast.tsx","../src/BaseCard.tsx","../src/Badge/Badge.tsx","../src/Badge/BulletBadge.tsx","../src/Badge/NotificationBadge.tsx","../src/Badge/StatusBadge.tsx","../src/index.tsx","../src/MediaCard.tsx","../src/NavigationCard.tsx","../src/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './BaseCard.scss';\n\nexport type BaseCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager Card\n * @default \"div\"\n */\n as?: 'div' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n children?: React.ReactNode;\n};\n\nexport type BaseCardProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseCardOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const BaseCard = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n as,\n ...rest\n}: BaseCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', className);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport './Badge.scss';\n\nexport type BadgeTypes = 'status' | 'bullet' | 'notification';\n\nexport type BadgeOwnProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n type?: BadgeTypes;\n invisible?: boolean;\n};\n\nexport type BadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;\n\nexport type BadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const Badge: BadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n max = 99,\n variant,\n showZero = false,\n invisible: invisibleProp = false,\n as,\n type = 'status',\n ...rest\n }: BadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n let invisible = invisibleProp;\n if (\n invisibleProp === false &&\n ((children === 0 && !showZero) || children == null)\n ) {\n invisible = true;\n }\n\n let displayValue;\n if (typeof children === 'number') {\n displayValue = children > max ? `${max}+` : children;\n } else {\n displayValue = children;\n }\n\n const classList = classNames(\n className,\n 'eds-badge',\n { 'eds-badge--invisible': invisible, 'eds-badge--show-zero': showZero },\n `eds-badge--variant-${variant}`,\n `eds-badge--type-${type}`,\n );\n\n return (\n <Element className={classList} ref={ref} {...rest}>\n {displayValue}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype BulletBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n};\n\nexport type BulletBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;\n\nexport type BulletBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BulletBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const BulletBadge: BulletBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: BulletBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"bullet\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype NotificationBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n};\n\nexport type NotificationBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;\n\nexport type NotificationBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NotificationBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const NotificationBadge: NotificationBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NotificationBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"notification\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype StatusBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n};\n\nexport type StatusBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;\n\nexport type StatusBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: StatusBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const StatusBadge: StatusBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: StatusBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"status\" />;\n },\n);\n","import './styles.scss';\nimport { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('layout', 'typography');\n\nexport * from './Contrast';\nexport * from './NavigationCard';\nexport * from './BaseCard';\nexport * from './MediaCard';\nexport * from './Badge/Badge';\nexport * from './Badge/BulletBadge';\nexport * from './Badge/NotificationBadge';\nexport * from './Badge/StatusBadge';\nexport * from './Tag';\n","import React, { CSSProperties } from 'react';\nimport { Paragraph, Label } from '@entur/typography';\nimport classNames from 'classnames';\nimport { BaseCard } from './BaseCard';\nimport { ForwardIcon } from '@entur/icons';\nimport './MediaCard.scss';\nimport { ConditionalWrapper, PolymorphicComponentProps } from '@entur/utils';\n\nexport type MediaCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Teksten under tittelen i MediaCard */\n description?: React.ReactNode;\n /** Kategori (eller lignende) som vises over tittelen */\n category?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Det du skulle ønske som media (f.eks. bilder eller video) */\n children?: React.ReactNode;\n /** Styling som sendes til komponenten */\n style?: CSSProperties;\n /** Hvilken heading som brukes for tittelen.\n * Blir kun satt hvis description også er satt.\n * @default 'h2'\n */\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** Skjul pil-ikonet nederst til høyre\n * @default false\n */\n hideArrow?: boolean;\n /** Props som sendes til wrapper-elementet i stedet for lenke-elementet */\n wrapperProps?: React.HTMLAttributes<HTMLElement>;\n /** @deprecated Denne prop-en har ikke lenger en funksjon.\n * Hvis du trenger å legge til props på wrapper-elementet, bruk 'wrapperProps'-prop-en\n */\n wholeCardAsElement?: boolean;\n};\n\nexport type MediaCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, MediaCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const MediaCard = <E extends React.ElementType = typeof defaultElement>({\n title,\n description,\n children,\n className,\n category,\n style,\n as,\n headingLevel = 'h2',\n wholeCardAsElement: whole,\n hideArrow,\n wrapperProps,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const Heading = headingLevel;\n\n const _wrapperProps = whole\n ? { ...wrapperProps, ...rest }\n : { ...wrapperProps };\n return (\n <BaseCard\n className={classNames('eds-base-card', 'eds-media-card', className)}\n style={style}\n {..._wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <div className=\"eds-media-card__text\">\n {category && (\n <Label className=\"eds-media-card__text__category\">{category}</Label>\n )}\n {/* we only want a heading wrapper when we also have description text */}\n <ConditionalWrapper\n condition={description !== undefined}\n wrapper={(children: React.ReactNode) => (\n <Heading className=\"eds-media-card__text__title\">\n {children}\n </Heading>\n )}\n >\n <Element\n tabIndex={0}\n className=\"eds-media-card__text__title-link\"\n {...rest}\n >\n {title}\n </Element>\n </ConditionalWrapper>\n {description !== undefined && <Paragraph>{description}</Paragraph>}\n {!hideArrow && (\n <ForwardIcon\n className=\"eds-media-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n </BaseCard>\n );\n};\n\nexport default MediaCard;\n","import React from 'react';\nimport { Paragraph } from '@entur/typography';\nimport classNames from 'classnames';\nimport { ForwardIcon, ExternalIcon } from '@entur/icons';\nimport { Heading3 } from '@entur/typography';\nimport { BaseCard } from './BaseCard';\nimport './NavigationCard.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type NavigationCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager NavigationCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Valgfritt ikon som står over tittelen */\n titleIcon?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Lager en mer kompakt NavigationCard, uten ikon og beskrivende tekst\n * @default false\n */\n compact?: boolean;\n /** Beskrivelse under tittel, om ikke \"compact\" er valgt */\n children?: React.ReactNode;\n /** Legger til et ikon for å symbolisere at kortet har en ekstern lenke\n * @default false\n */\n externalLink?: boolean;\n};\n\nexport type NavigationCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, NavigationCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const NavigationCard = <\n E extends React.ElementType = typeof defaultElement,\n>({\n title,\n children,\n titleIcon,\n compact = false,\n className,\n externalLink = false,\n as,\n ...rest\n}: NavigationCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-navigation-card', className, {\n 'eds-base-card--red-line': compact,\n 'eds-navigation-card--compact': compact,\n });\n return (\n <BaseCard as={Element} className={classList} {...rest}>\n {!compact && titleIcon && (\n <div className=\"eds-navigation-card__title-icon\" aria-hidden=\"true\">\n {titleIcon}\n </div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span\n className=\"eds-navigation-card__title-icon-compact\"\n aria-hidden=\"true\"\n >\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigation-card__external--not-compact\"\n />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\"\n />\n )}\n {compact && !externalLink && (\n <ForwardIcon\n className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </BaseCard>\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport './Tag.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type TagOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default 'div'\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /**Mindre og mer kompakt Tag, til f.eks. tabellbruk\n * @default false\n */\n compact?: boolean;\n children: React.ReactNode;\n};\n\nexport type TagProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, TagOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Tag = <E extends React.ElementType = typeof defaultElement>({\n className,\n children,\n compact,\n as,\n ...rest\n}: TagProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n return (\n <Element\n className={classNames('eds-tag', className, {\n 'eds-tag--leading-icon': hasLeadingIcon,\n 'eds-tag--trailing-icon': hasTrailingIcon,\n 'eds-tag--compact': compact,\n })}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n"],"names":["Contrast","React","forwardRef","ref","className","as","rest","_objectWithoutPropertiesLoose","_ref","_excluded","ContrastContext","Provider","value","createElement","_extends","classNames","createContext","BaseCard","children","Element","classList","Badge","displayValue","_ref$max","max","variant","_ref$showZero","showZero","_ref$invisible","invisible","invisibleProp","_ref$type","type","BulletBadge","props","NotificationBadge","StatusBadge","warnAboutMissingStyles","title","description","category","style","_ref$headingLevel","headingLevel","whole","wholeCardAsElement","hideArrow","wrapperProps","Heading","_wrapperProps","Label","ConditionalWrapper","condition","undefined","wrapper","tabIndex","Paragraph","ForwardIcon","titleIcon","_ref$compact","compact","_ref$externalLink","externalLink","Heading3","Fragment","ExternalIcon","childrenArray","Children","toArray","length","useContext"],"mappings":"ukBAoBaA,EAA8BC,EAAMC,YAAW,SAI1DC,EAAAA,GAAsB,IADpBC,IAAAA,UAAWC,IAAAA,GAAOC,EAAIC,EAAAC,EAAAC,GAIxB,OACER,gBAACS,EAAgBC,SAAS,CAAAC,OAAO,GAC/BX,EAAAY,cAH+BR,GARd,MAWTS,EAAA,CACNV,UAAWW,EAAW,eAAgBX,GACtCD,IAAKA,GACDG,IAIZ,IAEaI,EAAkBT,EAAMe,eAAuB,mCClB/CC,EAAW,SAKYT,GAAA,IAJlCU,IAAAA,SACAd,IAAAA,UACAC,IAAAA,GACGC,EAAIC,EAAAC,EAAAC,GAEDU,EAA6Bd,GARd,MASfe,EAAYL,EAAW,gBAAiBX,GAC9C,OACEH,EAAAY,cAACM,EAAOL,EAAA,CAACV,UAAWgB,GAAed,GAChCY,EAGP,qSCQaG,EAAwBpB,EAAMC,YACzC,SAYEC,EAAAA,GACE,IAUEmB,EArBFJ,IAAAA,SACAd,IAAAA,UAASmB,EAAAf,EACTgB,IAAAA,aAAM,GAAED,EACRE,IAAAA,QAAOC,EAAAlB,EACPmB,SAAAA,cAAgBD,EAAAE,EAAApB,EAChBqB,UAAWC,cAAqBF,EAChCvB,IAAAA,GAAE0B,EAAAvB,EACFwB,KAAAA,aAAO,SAAQD,EACZzB,EAAIC,EAAAC,EAAAC,GAIHU,EAA6Bd,GAjBhB,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AAAtC,GACX4C,GACC7D,EAACY,cAAAoD,eACY,CAAA,aAAA,gBACX7D,UAAU,gDAKjBwD,GAAWE,GACV7D,EAACY,cAAAoD,EAAAA,aACY,CAAA,aAAA,gBACX7D,UAAU,sEAGbwD,IAAYE,GACX7D,gBAACwD,EAAAA,YAAW,CACVrD,UAAU,6DACE,cAAA,SAKtB,gEC1EmB,SAMYI,GAAA,IAL7BJ,IAAAA,UACAc,IAAAA,SACA0C,IAAAA,QACAvD,IAAAA,GACGC,EAAIC,EAAAC,EAAAC,GAEDU,EAA6Bd,GATd,MAUf6D,EAAgBjE,EAAMkE,SAASC,QAAQlD,GAO7C,OACEjB,EAACY,cAAAM,EAAOL,EAAA,CACNV,UAAWW,EAAW,UAAWX,EAAW,CAC1C,wBARJ8D,EAAcG,OAAS,GAAiC,iBAArBH,EAAc,GAS7C,yBAPJA,EAAcG,OAAS,GAC4B,iBAA5CH,EAAcA,EAAcG,OAAS,GAOxC,mBAAoBT,KAElBtD,GAEHY,EAGP,sBTX0C,WAAlB,OACtBjB,EAAMqE,WAAW5D,EAAgB"}
|
|
1
|
+
{"version":3,"file":"layout.cjs.production.min.js","sources":["../src/Contrast.tsx","../src/BaseCard.tsx","../src/Badge/Badge.tsx","../src/Badge/BulletBadge.tsx","../src/Badge/NotificationBadge.tsx","../src/Badge/StatusBadge.tsx","../src/index.tsx","../src/MediaCard.tsx","../src/NavigationCard.tsx","../src/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './BaseCard.scss';\n\nexport type BaseCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager Card\n * @default \"div\"\n */\n as?: 'div' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n children?: React.ReactNode;\n};\n\nexport type BaseCardProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseCardOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const BaseCard = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n as,\n ...rest\n}: BaseCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', className);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\nimport './Badge.scss';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\nexport type BadgeTypes = 'status' | 'bullet' | 'notification';\n\nexport type BadgeOwnProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n type?: BadgeTypes;\n invisible?: boolean;\n};\n\nexport type BadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;\n\nexport type BadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const Badge: BadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n max = 99,\n variant,\n showZero = false,\n invisible: invisibleProp = false,\n as,\n type = 'status',\n ...rest\n }: BadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n let invisible = invisibleProp;\n if (\n invisibleProp === false &&\n ((children === 0 && !showZero) || children == null)\n ) {\n invisible = true;\n }\n\n let displayValue;\n if (typeof children === 'number') {\n displayValue = children > max ? `${max}+` : children;\n } else {\n displayValue = children;\n }\n\n const classList = classNames(\n className,\n 'eds-badge',\n { 'eds-badge--invisible': invisible, 'eds-badge--show-zero': showZero },\n `eds-badge--variant-${variant}`,\n `eds-badge--type-${type}`,\n );\n\n return (\n <Element className={classList} ref={ref} {...rest}>\n {displayValue}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype BulletBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n};\n\nexport type BulletBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;\n\nexport type BulletBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BulletBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const BulletBadge: BulletBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: BulletBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"bullet\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype NotificationBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n};\n\nexport type NotificationBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;\n\nexport type NotificationBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NotificationBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const NotificationBadge: NotificationBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NotificationBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"notification\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype StatusBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n};\n\nexport type StatusBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;\n\nexport type StatusBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: StatusBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const StatusBadge: StatusBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: StatusBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"status\" />;\n },\n);\n","import './styles.scss';\nimport { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('layout', 'typography');\n\nexport * from './Contrast';\nexport * from './NavigationCard';\nexport * from './BaseCard';\nexport * from './MediaCard';\nexport * from './Badge/Badge';\nexport * from './Badge/BulletBadge';\nexport * from './Badge/NotificationBadge';\nexport * from './Badge/StatusBadge';\nexport * from './Tag';\n","import React, { CSSProperties } from 'react';\nimport { Paragraph, Label } from '@entur/typography';\nimport classNames from 'classnames';\nimport { BaseCard } from './BaseCard';\nimport { ForwardIcon } from '@entur/icons';\nimport './MediaCard.scss';\nimport { ConditionalWrapper, PolymorphicComponentProps } from '@entur/utils';\n\nexport type MediaCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Teksten under tittelen i MediaCard */\n description?: React.ReactNode;\n /** Kategori (eller lignende) som vises over tittelen */\n category?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Det du skulle ønske som media (f.eks. bilder eller video) */\n children?: React.ReactNode;\n /** Styling som sendes til komponenten */\n style?: CSSProperties;\n /** Hvilken heading som brukes for tittelen.\n * Blir kun satt hvis description også er satt.\n * @default 'h2'\n */\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** Skjul pil-ikonet nederst til høyre\n * @default false\n */\n hideArrow?: boolean;\n /** Props som sendes til wrapper-elementet i stedet for lenke-elementet */\n wrapperProps?: React.HTMLAttributes<HTMLElement>;\n /** @deprecated Denne prop-en har ikke lenger en funksjon.\n * Hvis du trenger å legge til props på wrapper-elementet, bruk 'wrapperProps'-prop-en\n */\n wholeCardAsElement?: boolean;\n};\n\nexport type MediaCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, MediaCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const MediaCard = <E extends React.ElementType = typeof defaultElement>({\n title,\n description,\n children,\n className,\n category,\n style,\n as,\n headingLevel = 'h2',\n wholeCardAsElement: whole,\n hideArrow,\n wrapperProps,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const Heading = headingLevel;\n\n const _wrapperProps = whole\n ? { ...wrapperProps, ...rest }\n : { ...wrapperProps };\n return (\n <BaseCard\n className={classNames('eds-base-card', 'eds-media-card', className)}\n style={style}\n {..._wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <div className=\"eds-media-card__text\">\n {category && (\n <Label className=\"eds-media-card__text__category\">{category}</Label>\n )}\n {/* we only want a heading wrapper when we also have description text */}\n <ConditionalWrapper\n condition={description !== undefined}\n wrapper={(children: React.ReactNode) => (\n <Heading className=\"eds-media-card__text__title\">\n {children}\n </Heading>\n )}\n >\n <Element\n tabIndex={0}\n className=\"eds-media-card__text__title-link\"\n {...rest}\n >\n {title}\n </Element>\n </ConditionalWrapper>\n {description !== undefined && <Paragraph>{description}</Paragraph>}\n {!hideArrow && (\n <ForwardIcon\n className=\"eds-media-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n </BaseCard>\n );\n};\n\nexport default MediaCard;\n","import React from 'react';\nimport { Paragraph } from '@entur/typography';\nimport classNames from 'classnames';\nimport { ForwardIcon, ExternalIcon } from '@entur/icons';\nimport { Heading3 } from '@entur/typography';\nimport { BaseCard } from './BaseCard';\nimport './NavigationCard.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type NavigationCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager NavigationCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Valgfritt ikon som står over tittelen */\n titleIcon?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Lager en mer kompakt NavigationCard, uten ikon og beskrivende tekst\n * @default false\n */\n compact?: boolean;\n /** Beskrivelse under tittel, om ikke \"compact\" er valgt */\n children?: React.ReactNode;\n /** Legger til et ikon for å symbolisere at kortet har en ekstern lenke\n * @default false\n */\n externalLink?: boolean;\n};\n\nexport type NavigationCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, NavigationCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const NavigationCard = <\n E extends React.ElementType = typeof defaultElement,\n>({\n title,\n children,\n titleIcon,\n compact = false,\n className,\n externalLink = false,\n as,\n ...rest\n}: NavigationCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-navigation-card', className, {\n 'eds-base-card--red-line': compact,\n 'eds-navigation-card--compact': compact,\n });\n return (\n <BaseCard as={Element} className={classList} {...rest}>\n {!compact && titleIcon && (\n <div className=\"eds-navigation-card__title-icon\" aria-hidden=\"true\">\n {titleIcon}\n </div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span\n className=\"eds-navigation-card__title-icon-compact\"\n aria-hidden=\"true\"\n >\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigation-card__external--not-compact\"\n />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\"\n />\n )}\n {compact && !externalLink && (\n <ForwardIcon\n className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </BaseCard>\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport './Tag.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type TagOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default 'div'\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /**Mindre og mer kompakt Tag, til f.eks. tabellbruk\n * @default false\n */\n compact?: boolean;\n children: React.ReactNode;\n};\n\nexport type TagProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, TagOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Tag = <E extends React.ElementType = typeof defaultElement>({\n className,\n children,\n compact,\n as,\n ...rest\n}: TagProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n return (\n <Element\n className={classNames('eds-tag', className, {\n 'eds-tag--leading-icon': hasLeadingIcon,\n 'eds-tag--trailing-icon': hasTrailingIcon,\n 'eds-tag--compact': compact,\n })}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n"],"names":["Contrast","React","forwardRef","ref","className","as","rest","_objectWithoutPropertiesLoose","_ref","_excluded","ContrastContext","Provider","value","createElement","_extends","classNames","createContext","BaseCard","children","Element","classList","Badge","displayValue","_ref$max","max","variant","_ref$showZero","showZero","_ref$invisible","invisible","invisibleProp","_ref$type","type","BulletBadge","props","NotificationBadge","StatusBadge","warnAboutMissingStyles","title","description","category","style","_ref$headingLevel","headingLevel","whole","wholeCardAsElement","hideArrow","wrapperProps","Heading","_wrapperProps","Label","ConditionalWrapper","condition","undefined","wrapper","tabIndex","Paragraph","ForwardIcon","titleIcon","_ref$compact","compact","_ref$externalLink","externalLink","Heading3","Fragment","ExternalIcon","childrenArray","Children","toArray","length","useContext"],"mappings":"ukBAoBaA,EAA8BC,EAAMC,YAAW,SAI1DC,EAAAA,GAAsB,IADpBC,IAAAA,UAAWC,IAAAA,GAAOC,EAAIC,EAAAC,EAAAC,GAIxB,OACER,gBAACS,EAAgBC,SAAS,CAAAC,OAAO,GAC/BX,EAAAY,cAH+BR,GARd,MAWTS,EAAA,CACNV,UAAWW,EAAW,eAAgBX,GACtCD,IAAKA,GACDG,IAIZ,IAEaI,EAAkBT,EAAMe,eAAuB,mCClB/CC,EAAW,SAKYT,GAAA,IAJlCU,IAAAA,SACAd,IAAAA,UACAC,IAAAA,GACGC,EAAIC,EAAAC,EAAAC,GAEDU,EAA6Bd,GARd,MASfe,EAAYL,EAAW,gBAAiBX,GAC9C,OACEH,EAAAY,cAACM,EAAOL,EAAA,CAACV,UAAWgB,GAAed,GAChCY,EAGP,qSCeaG,EAAwBpB,EAAMC,YACzC,SAYEC,EAAAA,GACE,IAUEmB,EArBFJ,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,cAAA,QAC1DsD,GAGLzD,EAAMY,cAAA,OAAA,CAAAT,UAAU,8BACbwD,GAAWF,GACVzD,EACEY,cAAA,OAAA,CAAAT,UAAU,0CACE,cAAA,QAEXsD,GAGLzD,EAACY,cAAAkD,EAAAA,UAAS1D,GAAG,QAAQiC,KAErBsB,GACA3D,EAAAY,cAAAZ,EAAA+D,SAAA,KACE/D,EAACY,cAAA2C,EAAAA,UAAW,KAAAtC,GACX4C,GACC7D,EAACY,cAAAoD,eACY,CAAA,aAAA,gBACX7D,UAAU,gDAKjBwD,GAAWE,GACV7D,EAACY,cAAAoD,EAAAA,aACY,CAAA,aAAA,gBACX7D,UAAU,sEAGbwD,IAAYE,GACX7D,gBAACwD,EAAAA,YAAW,CACVrD,UAAU,6DACE,cAAA,SAKtB,gEC1EmB,SAMYI,GAAA,IAL7BJ,IAAAA,UACAc,IAAAA,SACA0C,IAAAA,QACAvD,IAAAA,GACGC,EAAIC,EAAAC,EAAAC,GAEDU,EAA6Bd,GATd,MAUf6D,EAAgBjE,EAAMkE,SAASC,QAAQlD,GAO7C,OACEjB,EAACY,cAAAM,EAAOL,EAAA,CACNV,UAAWW,EAAW,UAAWX,EAAW,CAC1C,wBARJ8D,EAAcG,OAAS,GAAiC,iBAArBH,EAAc,GAS7C,yBAPJA,EAAcG,OAAS,GAC4B,iBAA5CH,EAAcA,EAAcG,OAAS,GAOxC,mBAAoBT,KAElBtD,GAEHY,EAGP,sBTX0C,WAAlB,OACtBjB,EAAMqE,WAAW5D,EAAgB"}
|
package/dist/layout.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.esm.js","sources":["../src/Contrast.tsx","../src/BaseCard.tsx","../src/NavigationCard.tsx","../src/MediaCard.tsx","../src/Badge/Badge.tsx","../src/Badge/BulletBadge.tsx","../src/Badge/NotificationBadge.tsx","../src/Badge/StatusBadge.tsx","../src/Tag.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './BaseCard.scss';\n\nexport type BaseCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager Card\n * @default \"div\"\n */\n as?: 'div' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n children?: React.ReactNode;\n};\n\nexport type BaseCardProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseCardOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const BaseCard = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n as,\n ...rest\n}: BaseCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', className);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { Paragraph } from '@entur/typography';\nimport classNames from 'classnames';\nimport { ForwardIcon, ExternalIcon } from '@entur/icons';\nimport { Heading3 } from '@entur/typography';\nimport { BaseCard } from './BaseCard';\nimport './NavigationCard.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type NavigationCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager NavigationCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Valgfritt ikon som står over tittelen */\n titleIcon?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Lager en mer kompakt NavigationCard, uten ikon og beskrivende tekst\n * @default false\n */\n compact?: boolean;\n /** Beskrivelse under tittel, om ikke \"compact\" er valgt */\n children?: React.ReactNode;\n /** Legger til et ikon for å symbolisere at kortet har en ekstern lenke\n * @default false\n */\n externalLink?: boolean;\n};\n\nexport type NavigationCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, NavigationCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const NavigationCard = <\n E extends React.ElementType = typeof defaultElement,\n>({\n title,\n children,\n titleIcon,\n compact = false,\n className,\n externalLink = false,\n as,\n ...rest\n}: NavigationCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-navigation-card', className, {\n 'eds-base-card--red-line': compact,\n 'eds-navigation-card--compact': compact,\n });\n return (\n <BaseCard as={Element} className={classList} {...rest}>\n {!compact && titleIcon && (\n <div className=\"eds-navigation-card__title-icon\" aria-hidden=\"true\">\n {titleIcon}\n </div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span\n className=\"eds-navigation-card__title-icon-compact\"\n aria-hidden=\"true\"\n >\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigation-card__external--not-compact\"\n />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\"\n />\n )}\n {compact && !externalLink && (\n <ForwardIcon\n className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </BaseCard>\n );\n};\n","import React, { CSSProperties } from 'react';\nimport { Paragraph, Label } from '@entur/typography';\nimport classNames from 'classnames';\nimport { BaseCard } from './BaseCard';\nimport { ForwardIcon } from '@entur/icons';\nimport './MediaCard.scss';\nimport { ConditionalWrapper, PolymorphicComponentProps } from '@entur/utils';\n\nexport type MediaCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Teksten under tittelen i MediaCard */\n description?: React.ReactNode;\n /** Kategori (eller lignende) som vises over tittelen */\n category?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Det du skulle ønske som media (f.eks. bilder eller video) */\n children?: React.ReactNode;\n /** Styling som sendes til komponenten */\n style?: CSSProperties;\n /** Hvilken heading som brukes for tittelen.\n * Blir kun satt hvis description også er satt.\n * @default 'h2'\n */\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** Skjul pil-ikonet nederst til høyre\n * @default false\n */\n hideArrow?: boolean;\n /** Props som sendes til wrapper-elementet i stedet for lenke-elementet */\n wrapperProps?: React.HTMLAttributes<HTMLElement>;\n /** @deprecated Denne prop-en har ikke lenger en funksjon.\n * Hvis du trenger å legge til props på wrapper-elementet, bruk 'wrapperProps'-prop-en\n */\n wholeCardAsElement?: boolean;\n};\n\nexport type MediaCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, MediaCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const MediaCard = <E extends React.ElementType = typeof defaultElement>({\n title,\n description,\n children,\n className,\n category,\n style,\n as,\n headingLevel = 'h2',\n wholeCardAsElement: whole,\n hideArrow,\n wrapperProps,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const Heading = headingLevel;\n\n const _wrapperProps = whole\n ? { ...wrapperProps, ...rest }\n : { ...wrapperProps };\n return (\n <BaseCard\n className={classNames('eds-base-card', 'eds-media-card', className)}\n style={style}\n {..._wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <div className=\"eds-media-card__text\">\n {category && (\n <Label className=\"eds-media-card__text__category\">{category}</Label>\n )}\n {/* we only want a heading wrapper when we also have description text */}\n <ConditionalWrapper\n condition={description !== undefined}\n wrapper={(children: React.ReactNode) => (\n <Heading className=\"eds-media-card__text__title\">\n {children}\n </Heading>\n )}\n >\n <Element\n tabIndex={0}\n className=\"eds-media-card__text__title-link\"\n {...rest}\n >\n {title}\n </Element>\n </ConditionalWrapper>\n {description !== undefined && <Paragraph>{description}</Paragraph>}\n {!hideArrow && (\n <ForwardIcon\n className=\"eds-media-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n </BaseCard>\n );\n};\n\nexport default MediaCard;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport './Badge.scss';\n\nexport type BadgeTypes = 'status' | 'bullet' | 'notification';\n\nexport type BadgeOwnProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n type?: BadgeTypes;\n invisible?: boolean;\n};\n\nexport type BadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;\n\nexport type BadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const Badge: BadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n max = 99,\n variant,\n showZero = false,\n invisible: invisibleProp = false,\n as,\n type = 'status',\n ...rest\n }: BadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n let invisible = invisibleProp;\n if (\n invisibleProp === false &&\n ((children === 0 && !showZero) || children == null)\n ) {\n invisible = true;\n }\n\n let displayValue;\n if (typeof children === 'number') {\n displayValue = children > max ? `${max}+` : children;\n } else {\n displayValue = children;\n }\n\n const classList = classNames(\n className,\n 'eds-badge',\n { 'eds-badge--invisible': invisible, 'eds-badge--show-zero': showZero },\n `eds-badge--variant-${variant}`,\n `eds-badge--type-${type}`,\n );\n\n return (\n <Element className={classList} ref={ref} {...rest}>\n {displayValue}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype BulletBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n};\n\nexport type BulletBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;\n\nexport type BulletBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BulletBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const BulletBadge: BulletBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: BulletBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"bullet\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype NotificationBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n};\n\nexport type NotificationBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;\n\nexport type NotificationBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NotificationBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const NotificationBadge: NotificationBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NotificationBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"notification\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype StatusBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';\n};\n\nexport type StatusBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;\n\nexport type StatusBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: StatusBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const StatusBadge: StatusBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: StatusBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"status\" />;\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport './Tag.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type TagOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default 'div'\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /**Mindre og mer kompakt Tag, til f.eks. tabellbruk\n * @default false\n */\n compact?: boolean;\n children: React.ReactNode;\n};\n\nexport type TagProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, TagOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Tag = <E extends React.ElementType = typeof defaultElement>({\n className,\n children,\n compact,\n as,\n ...rest\n}: TagProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n return (\n <Element\n className={classNames('eds-tag', className, {\n 'eds-tag--leading-icon': hasLeadingIcon,\n 'eds-tag--trailing-icon': hasTrailingIcon,\n 'eds-tag--compact': compact,\n })}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n","import './styles.scss';\nimport { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('layout', 'typography');\n\nexport * from './Contrast';\nexport * from './NavigationCard';\nexport * from './BaseCard';\nexport * from './MediaCard';\nexport * from './Badge/Badge';\nexport * from './Badge/BulletBadge';\nexport * from './Badge/NotificationBadge';\nexport * from './Badge/StatusBadge';\nexport * from './Tag';\n"],"names":["defaultElement","Contrast","React","forwardRef","ref","className","as","rest","_excluded","Element","ContrastContext","Provider","value","createElement","classNames","createContext","useContrast","useContext","BaseCard","children","classList","NavigationCard","title","titleIcon","compact","externalLink","Heading3","Fragment","Paragraph","ExternalIcon","ForwardIcon","MediaCard","description","category","style","headingLevel","whole","wholeCardAsElement","hideArrow","wrapperProps","Heading","_wrapperProps","Label","ConditionalWrapper","condition","undefined","wrapper","tabIndex","Badge","max","variant","showZero","invisible","invisibleProp","type","displayValue","BulletBadge","props","NotificationBadge","StatusBadge","Tag","childrenArray","Children","toArray","hasLeadingIcon","length","hasTrailingIcon","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,gBAAc,GAAG,KAAK,CAAA;AAErB,IAAMC,QAAQ,gBAAsBC,KAAK,CAACC,UAAU,CAAC,SAASF,QAAQ,CAI3EG,IAAAA,EAAAA,GAAsB,EAAA;EAAA,IADpBC,SAAS,QAATA,SAAS;AAAEC,IAAAA,EAAE,QAAFA,EAAE;IAAKC,IAAI,GAAA,6BAAA,CAAA,IAAA,EAAAC,WAAA,CAAA,CAAA;AAGxB,EAAA,IAAMC,OAAO,GAAsBH,EAAE,IAAIN,gBAAc,CAAA;AACvD,EAAA,OACEE,oBAACQ,eAAe,CAACC,QAAQ,EAAC;AAAAC,IAAAA,KAAK,EAAE,IAAA;AAAI,GAAA,EACnCV,KAAA,CAAAW,aAAA,CAACJ,OAAO,EAAA,QAAA,CAAA;AACNJ,IAAAA,SAAS,EAAES,UAAU,CAAC,cAAc,EAAET,SAAS,CAAC;AAChDD,IAAAA,GAAG,EAAEA,GAAAA;GACDG,EAAAA,IAAI,EACR,CACuB,CAAA;AAE/B,CAAC,EAAC;AAEK,IAAMG,eAAe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AAA,uBAAuB,EAAE2D,cAAc;AACvC,MAAA,wBAAwB,EAAEE,eAAe;AACzC,MAAA,kBAAkB,EAAE1C,OAAAA;KACrB,CAAA;GACGjB,EAAAA,IAAI,CAEPY,EAAAA,QAAQ,CACD,CAAA;AAEd;;AC/CAgD,sBAAsB,CAAC,QAAQ,EAAE,YAAY,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"layout.esm.js","sources":["../src/Contrast.tsx","../src/BaseCard.tsx","../src/NavigationCard.tsx","../src/MediaCard.tsx","../src/Badge/Badge.tsx","../src/Badge/BulletBadge.tsx","../src/Badge/NotificationBadge.tsx","../src/Badge/StatusBadge.tsx","../src/Tag.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './BaseCard.scss';\n\nexport type BaseCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager Card\n * @default \"div\"\n */\n as?: 'div' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n children?: React.ReactNode;\n};\n\nexport type BaseCardProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseCardOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const BaseCard = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n as,\n ...rest\n}: BaseCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', className);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { Paragraph } from '@entur/typography';\nimport classNames from 'classnames';\nimport { ForwardIcon, ExternalIcon } from '@entur/icons';\nimport { Heading3 } from '@entur/typography';\nimport { BaseCard } from './BaseCard';\nimport './NavigationCard.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type NavigationCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager NavigationCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Valgfritt ikon som står over tittelen */\n titleIcon?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Lager en mer kompakt NavigationCard, uten ikon og beskrivende tekst\n * @default false\n */\n compact?: boolean;\n /** Beskrivelse under tittel, om ikke \"compact\" er valgt */\n children?: React.ReactNode;\n /** Legger til et ikon for å symbolisere at kortet har en ekstern lenke\n * @default false\n */\n externalLink?: boolean;\n};\n\nexport type NavigationCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, NavigationCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const NavigationCard = <\n E extends React.ElementType = typeof defaultElement,\n>({\n title,\n children,\n titleIcon,\n compact = false,\n className,\n externalLink = false,\n as,\n ...rest\n}: NavigationCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-navigation-card', className, {\n 'eds-base-card--red-line': compact,\n 'eds-navigation-card--compact': compact,\n });\n return (\n <BaseCard as={Element} className={classList} {...rest}>\n {!compact && titleIcon && (\n <div className=\"eds-navigation-card__title-icon\" aria-hidden=\"true\">\n {titleIcon}\n </div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span\n className=\"eds-navigation-card__title-icon-compact\"\n aria-hidden=\"true\"\n >\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigation-card__external--not-compact\"\n />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon\n aria-label=\"Ekstern lenke\"\n className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\"\n />\n )}\n {compact && !externalLink && (\n <ForwardIcon\n className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </BaseCard>\n );\n};\n","import React, { CSSProperties } from 'react';\nimport { Paragraph, Label } from '@entur/typography';\nimport classNames from 'classnames';\nimport { BaseCard } from './BaseCard';\nimport { ForwardIcon } from '@entur/icons';\nimport './MediaCard.scss';\nimport { ConditionalWrapper, PolymorphicComponentProps } from '@entur/utils';\n\nexport type MediaCardOwnProps = {\n /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard\n * @default 'a'\n */\n as?: 'a' | 'button' | React.ElementType;\n /** Tittelen/teksten som står i CardBox */\n title: string;\n /** Teksten under tittelen i MediaCard */\n description?: React.ReactNode;\n /** Kategori (eller lignende) som vises over tittelen */\n category?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Det du skulle ønske som media (f.eks. bilder eller video) */\n children?: React.ReactNode;\n /** Styling som sendes til komponenten */\n style?: CSSProperties;\n /** Hvilken heading som brukes for tittelen.\n * Blir kun satt hvis description også er satt.\n * @default 'h2'\n */\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** Skjul pil-ikonet nederst til høyre\n * @default false\n */\n hideArrow?: boolean;\n /** Props som sendes til wrapper-elementet i stedet for lenke-elementet */\n wrapperProps?: React.HTMLAttributes<HTMLElement>;\n /** @deprecated Denne prop-en har ikke lenger en funksjon.\n * Hvis du trenger å legge til props på wrapper-elementet, bruk 'wrapperProps'-prop-en\n */\n wholeCardAsElement?: boolean;\n};\n\nexport type MediaCardProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, MediaCardOwnProps>;\n\nconst defaultElement = 'a';\n\nexport const MediaCard = <E extends React.ElementType = typeof defaultElement>({\n title,\n description,\n children,\n className,\n category,\n style,\n as,\n headingLevel = 'h2',\n wholeCardAsElement: whole,\n hideArrow,\n wrapperProps,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const Heading = headingLevel;\n\n const _wrapperProps = whole\n ? { ...wrapperProps, ...rest }\n : { ...wrapperProps };\n return (\n <BaseCard\n className={classNames('eds-base-card', 'eds-media-card', className)}\n style={style}\n {..._wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <div className=\"eds-media-card__text\">\n {category && (\n <Label className=\"eds-media-card__text__category\">{category}</Label>\n )}\n {/* we only want a heading wrapper when we also have description text */}\n <ConditionalWrapper\n condition={description !== undefined}\n wrapper={(children: React.ReactNode) => (\n <Heading className=\"eds-media-card__text__title\">\n {children}\n </Heading>\n )}\n >\n <Element\n tabIndex={0}\n className=\"eds-media-card__text__title-link\"\n {...rest}\n >\n {title}\n </Element>\n </ConditionalWrapper>\n {description !== undefined && <Paragraph>{description}</Paragraph>}\n {!hideArrow && (\n <ForwardIcon\n className=\"eds-media-card__arrow-icon\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n </BaseCard>\n );\n};\n\nexport default MediaCard;\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\nimport './Badge.scss';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\nexport type BadgeTypes = 'status' | 'bullet' | 'notification';\n\nexport type BadgeOwnProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n type?: BadgeTypes;\n invisible?: boolean;\n};\n\nexport type BadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;\n\nexport type BadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const Badge: BadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n max = 99,\n variant,\n showZero = false,\n invisible: invisibleProp = false,\n as,\n type = 'status',\n ...rest\n }: BadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n let invisible = invisibleProp;\n if (\n invisibleProp === false &&\n ((children === 0 && !showZero) || children == null)\n ) {\n invisible = true;\n }\n\n let displayValue;\n if (typeof children === 'number') {\n displayValue = children > max ? `${max}+` : children;\n } else {\n displayValue = children;\n }\n\n const classList = classNames(\n className,\n 'eds-badge',\n { 'eds-badge--invisible': invisible, 'eds-badge--show-zero': showZero },\n `eds-badge--variant-${variant}`,\n `eds-badge--type-${type}`,\n );\n\n return (\n <Element className={classList} ref={ref} {...rest}>\n {displayValue}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype BulletBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n};\n\nexport type BulletBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;\n\nexport type BulletBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: BulletBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const BulletBadge: BulletBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: BulletBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"bullet\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype NotificationBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n /** Om 0 skal vises\n * @default false\n */\n showZero?: boolean;\n /** Hva som er høyeste tallet før det legges på \"+\"\n * @default ++\n */\n max?: number;\n};\n\nexport type NotificationBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;\n\nexport type NotificationBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NotificationBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const NotificationBadge: NotificationBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NotificationBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"notification\" />;\n },\n);\n","import React from 'react';\nimport { Badge } from './Badge';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { VariantType } from '@entur/utils';\n\n/** @deprecated use variant=\"information\" instead */\nconst info = 'info';\n/** @deprecated use variant=\"negative\" instead */\nconst danger = 'danger';\n\ntype StatusBadgeBaseProps = {\n /** Elementet som wrapper badgen\n * @default \"span\"\n */\n as?: 'span' | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Elementet som badge vil legges relativt til */\n children: React.ReactNode;\n /** Hvilken type badge man vil ha */\n variant: 'primary' | 'neutral' | VariantType | typeof danger | typeof info;\n};\n\nexport type StatusBadgeProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;\n\nexport type StatusBadgeComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: StatusBadgeProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'span';\n\nexport const StatusBadge: StatusBadgeComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: StatusBadgeProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BadgeOwnProps\n return <Badge as={Element} {...props} ref={ref} type=\"status\" />;\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport './Tag.scss';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type TagOwnProps = {\n /** HTML-elementet eller React-komponenten som rendres\n * @default 'div'\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /**Mindre og mer kompakt Tag, til f.eks. tabellbruk\n * @default false\n */\n compact?: boolean;\n children: React.ReactNode;\n};\n\nexport type TagProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, TagOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Tag = <E extends React.ElementType = typeof defaultElement>({\n className,\n children,\n compact,\n as,\n ...rest\n}: TagProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n return (\n <Element\n className={classNames('eds-tag', className, {\n 'eds-tag--leading-icon': hasLeadingIcon,\n 'eds-tag--trailing-icon': hasTrailingIcon,\n 'eds-tag--compact': compact,\n })}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n","import './styles.scss';\nimport { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('layout', 'typography');\n\nexport * from './Contrast';\nexport * from './NavigationCard';\nexport * from './BaseCard';\nexport * from './MediaCard';\nexport * from './Badge/Badge';\nexport * from './Badge/BulletBadge';\nexport * from './Badge/NotificationBadge';\nexport * from './Badge/StatusBadge';\nexport * from './Tag';\n"],"names":["defaultElement","Contrast","React","forwardRef","ref","className","as","rest","_excluded","Element","ContrastContext","Provider","value","createElement","classNames","createContext","useContrast","useContext","BaseCard","children","classList","NavigationCard","title","titleIcon","compact","externalLink","Heading3","Fragment","Paragraph","ExternalIcon","ForwardIcon","MediaCard","description","category","style","headingLevel","whole","wholeCardAsElement","hideArrow","wrapperProps","Heading","_wrapperProps","Label","ConditionalWrapper","condition","undefined","wrapper","tabIndex","Badge","max","variant","showZero","invisible","invisibleProp","type","displayValue","BulletBadge","props","NotificationBadge","StatusBadge","Tag","childrenArray","Children","toArray","hasLeadingIcon","length","hasTrailingIcon","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,gBAAc,GAAG,KAAK,CAAA;AAErB,IAAMC,QAAQ,gBAAsBC,KAAK,CAACC,UAAU,CAAC,SAASF,QAAQ,CAI3EG,IAAAA,EAAAA,GAAsB,EAAA;EAAA,IADpBC,SAAS,QAATA,SAAS;AAAEC,IAAAA,EAAE,QAAFA,EAAE;IAAKC,IAAI,GAAA,6BAAA,CAAA,IAAA,EAAAC,WAAA,CAAA,CAAA;AAGxB,EAAA,IAAMC,OAAO,GAAsBH,EAAE,IAAIN,gBAAc,CAAA;AACvD,EAAA,OACEE,oBAACQ,eAAe,CAACC,QAAQ,EAAC;AAAAC,IAAAA,KAAK,EAAE,IAAA;AAAI,GAAA,EACnCV,KAAA,CAAAW,aAAA,CAACJ,OAAO,EAAA,QAAA,CAAA;AACNJ,IAAAA,SAAS,EAAES,UAAU,CAAC,cAAc,EAAET,SAAS,CAAC;AAChDD,IAAAA,GAAG,EAAEA,GAAAA;GACDG,EAAAA,IAAI,EACR,CACuB,CAAA;AAE/B,CAAC,EAAC;AAEK,IAAMG,eAAe,gBAAGR,KAAK,CAACa,aAAa,CAAU,KAAK,EAAC;AAErDC,IAAAA,WAAW,GAAkB,SAA7BA,WAAW,GAAA;AAAA,EAAA,OACtBd,KAAK,CAACe,UAAU,CAACP,eAAe,CAAC,CAAA;AAAA;;;ACvBnC,IAAMV,gBAAc,GAAG,KAAK,CAAA;AAEfkB,IAAAA,QAAQ,GAAG,SAAXA,QAAQ,CAKe,IAAA,EAAA;EAAA,IAJlCC,QAAQ,QAARA,QAAQ;AACRd,IAAAA,SAAS,QAATA,SAAS;AACTC,IAAAA,EAAE,QAAFA,EAAE;IACCC,I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ClE,CAAC;;;ACpBH,IAAMtD,cAAc,GAAG,KAAK,CAAA;AAEf4D,IAAAA,GAAG,GAAG,SAANA,GAAG,CAMe,IAAA,EAAA;EAAA,IAL7BvD,SAAS,QAATA,SAAS;AACTc,IAAAA,QAAQ,QAARA,QAAQ;AACRK,IAAAA,OAAO,QAAPA,OAAO;AACPlB,IAAAA,EAAE,QAAFA,EAAE;IACCC,IAAI,GAAA,6BAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAEP,EAAA,IAAME,OAAO,GAAsBH,EAAE,IAAIN,cAAc,CAAA;EACvD,IAAM6D,aAAa,GAAG3D,KAAK,CAAC4D,QAAQ,CAACC,OAAO,CAAC5C,QAAQ,CAAC,CAAA;AACtD,EAAA,IAAM6C,cAAc,GAClBH,aAAa,CAACI,MAAM,GAAG,CAAC,IAAI,OAAOJ,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAA;AAClE,EAAA,IAAMK,eAAe,GACnBL,aAAa,CAACI,MAAM,GAAG,CAAC,IACxB,OAAOJ,aAAa,CAACA,aAAa,CAACI,MAAM,GAAG,CAAC,CAAC,KAAK,QAAQ,CAAA;AAE7D,EAAA,OACE/D,KAAC,CAAAW,aAAA,CAAAJ,OAAO,EAAA,QAAA,CAAA;AACNJ,IAAAA,SAAS,EAAES,UAAU,CAAC,SAAS,EAAET,SAAS,EAAE;AAC1C,MAAA,uBAAuB,EAAE2D,cAAc;AACvC,MAAA,wBAAwB,EAAEE,eAAe;AACzC,MAAA,kBAAkB,EAAE1C,OAAAA;KACrB,CAAA;GACGjB,EAAAA,IAAI,CAEPY,EAAAA,QAAQ,CACD,CAAA;AAEd;;AC/CAgD,sBAAsB,CAAC,QAAQ,EAAE,YAAY,CAAC;;;;"}
|
package/dist/styles.css
CHANGED
|
@@ -299,44 +299,44 @@
|
|
|
299
299
|
.eds-contrast .eds-badge--variant-warning.eds-badge--type-bullet::before {
|
|
300
300
|
background-color: var(--components-layout-badge-warning-contrast-bullet);
|
|
301
301
|
}
|
|
302
|
-
.eds-badge--variant-danger {
|
|
302
|
+
.eds-badge--variant-danger, .eds-badge--variant-negative {
|
|
303
303
|
background-color: var(--components-layout-badge-negative-standard-fill);
|
|
304
304
|
color: var(--components-layout-badge-negative-standard-text);
|
|
305
305
|
}
|
|
306
|
-
.eds-contrast .eds-badge--variant-danger {
|
|
306
|
+
.eds-contrast .eds-badge--variant-danger, .eds-contrast .eds-badge--variant-negative {
|
|
307
307
|
background-color: var(--components-layout-badge-negative-contrast-fill);
|
|
308
308
|
color: var(--components-layout-badge-negative-contrast-text);
|
|
309
309
|
}
|
|
310
|
-
.eds-badge--variant-danger.eds-badge--type-status, .eds-badge--variant-danger.eds-badge--type-notification {
|
|
310
|
+
.eds-badge--variant-danger.eds-badge--type-status, .eds-badge--variant-danger.eds-badge--type-notification, .eds-badge--variant-negative.eds-badge--type-status, .eds-badge--variant-negative.eds-badge--type-notification {
|
|
311
311
|
border-color: var(--components-layout-badge-negative-standard-border);
|
|
312
312
|
}
|
|
313
|
-
.eds-contrast .eds-badge--variant-danger.eds-badge--type-status, .eds-contrast .eds-badge--variant-danger.eds-badge--type-notification {
|
|
313
|
+
.eds-contrast .eds-badge--variant-danger.eds-badge--type-status, .eds-contrast .eds-badge--variant-danger.eds-badge--type-notification, .eds-contrast .eds-badge--variant-negative.eds-badge--type-status, .eds-contrast .eds-badge--variant-negative.eds-badge--type-notification {
|
|
314
314
|
border-color: var(--components-layout-badge-negative-contrast-border);
|
|
315
315
|
}
|
|
316
|
-
.eds-badge--variant-danger.eds-badge--type-bullet::before {
|
|
316
|
+
.eds-badge--variant-danger.eds-badge--type-bullet::before, .eds-badge--variant-negative.eds-badge--type-bullet::before {
|
|
317
317
|
background-color: var(--components-layout-badge-negative-standard-bullet);
|
|
318
318
|
}
|
|
319
|
-
.eds-contrast .eds-badge--variant-danger.eds-badge--type-bullet::before {
|
|
319
|
+
.eds-contrast .eds-badge--variant-danger.eds-badge--type-bullet::before, .eds-contrast .eds-badge--variant-negative.eds-badge--type-bullet::before {
|
|
320
320
|
background-color: var(--components-layout-badge-negative-contrast-bullet);
|
|
321
321
|
}
|
|
322
|
-
.eds-badge--variant-info {
|
|
322
|
+
.eds-badge--variant-info, .eds-badge--variant-information {
|
|
323
323
|
background-color: var(--components-layout-badge-information-standard-fill);
|
|
324
324
|
color: var(--components-layout-badge-information-standard-text);
|
|
325
325
|
}
|
|
326
|
-
.eds-contrast .eds-badge--variant-info {
|
|
326
|
+
.eds-contrast .eds-badge--variant-info, .eds-contrast .eds-badge--variant-information {
|
|
327
327
|
background-color: var(--components-layout-badge-information-contrast-fill);
|
|
328
328
|
color: var(--components-layout-badge-information-contrast-text);
|
|
329
329
|
}
|
|
330
|
-
.eds-badge--variant-info.eds-badge--type-status, .eds-badge--variant-info.eds-badge--type-notification {
|
|
330
|
+
.eds-badge--variant-info.eds-badge--type-status, .eds-badge--variant-info.eds-badge--type-notification, .eds-badge--variant-information.eds-badge--type-status, .eds-badge--variant-information.eds-badge--type-notification {
|
|
331
331
|
border-color: var(--components-layout-badge-information-standard-border);
|
|
332
332
|
}
|
|
333
|
-
.eds-contrast .eds-badge--variant-info.eds-badge--type-status, .eds-contrast .eds-badge--variant-info.eds-badge--type-notification {
|
|
333
|
+
.eds-contrast .eds-badge--variant-info.eds-badge--type-status, .eds-contrast .eds-badge--variant-info.eds-badge--type-notification, .eds-contrast .eds-badge--variant-information.eds-badge--type-status, .eds-contrast .eds-badge--variant-information.eds-badge--type-notification {
|
|
334
334
|
border-color: var(--components-layout-badge-information-contrast-border);
|
|
335
335
|
}
|
|
336
|
-
.eds-badge--variant-info.eds-badge--type-bullet::before {
|
|
336
|
+
.eds-badge--variant-info.eds-badge--type-bullet::before, .eds-badge--variant-information.eds-badge--type-bullet::before {
|
|
337
337
|
background-color: var(--components-layout-badge-information-standard-bullet);
|
|
338
338
|
}
|
|
339
|
-
.eds-contrast .eds-badge--variant-info.eds-badge--type-bullet::before {
|
|
339
|
+
.eds-contrast .eds-badge--variant-info.eds-badge--type-bullet::before, .eds-contrast .eds-badge--variant-information.eds-badge--type-bullet::before {
|
|
340
340
|
background-color: var(--components-layout-badge-information-contrast-bullet);
|
|
341
341
|
}
|
|
342
342
|
.eds-badge--variant-neutral {
|
|
@@ -404,170 +404,6 @@
|
|
|
404
404
|
}
|
|
405
405
|
/* DO NOT CHANGE!*/
|
|
406
406
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
407
|
-
@import '~@entur/tokens/dist/semantic.css';
|
|
408
|
-
@import '~@entur/tokens/dist/base.css';
|
|
409
|
-
/* DO NOT CHANGE!*/
|
|
410
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
411
|
-
[data-color-mode=light],
|
|
412
|
-
:root {
|
|
413
|
-
--components-layout-badge-information-contrast-border: var(--stroke-colorless);
|
|
414
|
-
--components-layout-badge-information-contrast-bullet: var(--fill-information-contrast);
|
|
415
|
-
--components-layout-badge-information-contrast-fill: var(--fill-information-contrast);
|
|
416
|
-
--components-layout-badge-information-contrast-text: var(--text-accent);
|
|
417
|
-
--components-layout-badge-information-contrast-text-bullet: var(--text-light);
|
|
418
|
-
--components-layout-badge-information-standard-border: var(--stroke-information);
|
|
419
|
-
--components-layout-badge-information-standard-bullet: var(--fill-information-deep);
|
|
420
|
-
--components-layout-badge-information-standard-fill: var(--fill-information-muted);
|
|
421
|
-
--components-layout-badge-information-standard-text: var(--text-accent);
|
|
422
|
-
--components-layout-badge-information-standard-text-bullet: var(--text-accent);
|
|
423
|
-
--components-layout-badge-negative-contrast-border: var(--stroke-colorless);
|
|
424
|
-
--components-layout-badge-negative-contrast-bullet: var(--fill-negative-contrast);
|
|
425
|
-
--components-layout-badge-negative-contrast-fill: var(--fill-negative-tint);
|
|
426
|
-
--components-layout-badge-negative-contrast-text: var(--text-accent);
|
|
427
|
-
--components-layout-badge-negative-contrast-text-bullet: var(--text-light);
|
|
428
|
-
--components-layout-badge-negative-standard-border: var(--stroke-negative);
|
|
429
|
-
--components-layout-badge-negative-standard-bullet: var(--fill-negative-deep);
|
|
430
|
-
--components-layout-badge-negative-standard-fill: var(--fill-negative-muted);
|
|
431
|
-
--components-layout-badge-negative-standard-text: var(--text-accent);
|
|
432
|
-
--components-layout-badge-negative-standard-text-bullet: var(--text-accent);
|
|
433
|
-
--components-layout-badge-neutral-contrast-border: var(--stroke-colorless);
|
|
434
|
-
--components-layout-badge-neutral-contrast-bullet: var(--fill-primary-hover-contrast);
|
|
435
|
-
--components-layout-badge-neutral-contrast-fill: var(--fill-selected-hover-contrast);
|
|
436
|
-
--components-layout-badge-neutral-contrast-text: var(--text-light);
|
|
437
|
-
--components-layout-badge-neutral-contrast-text-bullet: var(--text-light);
|
|
438
|
-
--components-layout-badge-neutral-standard-border: var(--stroke-neutralalt);
|
|
439
|
-
--components-layout-badge-neutral-standard-bullet: var(--fill-selected-default-darkalt);
|
|
440
|
-
--components-layout-badge-neutral-standard-fill: var(--fill-selected-default-light);
|
|
441
|
-
--components-layout-badge-neutral-standard-text: var(--text-accent);
|
|
442
|
-
--components-layout-badge-neutral-standard-text-bullet: var(--text-accent);
|
|
443
|
-
--components-layout-badge-primary-contrast-bullet: var(--fill-primary-default-contrast);
|
|
444
|
-
--components-layout-badge-primary-contrast-fill: var(--fill-primary-default-contrast);
|
|
445
|
-
--components-layout-badge-primary-contrast-text: var(--text-accent);
|
|
446
|
-
--components-layout-badge-primary-contrast-text-bullet: var(--text-light);
|
|
447
|
-
--components-layout-badge-primary-standard-bullet: var(--fill-primary-default-light);
|
|
448
|
-
--components-layout-badge-primary-standard-fill: var(--fill-primary-default-light);
|
|
449
|
-
--components-layout-badge-primary-standard-text: var(--text-light);
|
|
450
|
-
--components-layout-badge-primary-standard-text-bullet: var(--text-accent);
|
|
451
|
-
--components-layout-badge-success-contrast-border: var(--stroke-colorless);
|
|
452
|
-
--components-layout-badge-success-contrast-bullet: var(--fill-success-contrast);
|
|
453
|
-
--components-layout-badge-success-contrast-fill: var(--fill-success-contrast);
|
|
454
|
-
--components-layout-badge-success-contrast-text: var(--text-accent);
|
|
455
|
-
--components-layout-badge-success-contrast-text-bullet: var(--text-light);
|
|
456
|
-
--components-layout-badge-success-standard-border: var(--stroke-success);
|
|
457
|
-
--components-layout-badge-success-standard-bullet: var(--fill-success-deep);
|
|
458
|
-
--components-layout-badge-success-standard-fill: var(--fill-success-muted);
|
|
459
|
-
--components-layout-badge-success-standard-text: var(--text-accent);
|
|
460
|
-
--components-layout-badge-success-standard-text-bullet: var(--text-accent);
|
|
461
|
-
--components-layout-badge-warning-contrast-border: var(--stroke-colorless);
|
|
462
|
-
--components-layout-badge-warning-contrast-bullet: var(--fill-warning-contrast);
|
|
463
|
-
--components-layout-badge-warning-contrast-fill: var(--fill-warning-contrast);
|
|
464
|
-
--components-layout-badge-warning-contrast-text: var(--text-accent);
|
|
465
|
-
--components-layout-badge-warning-contrast-text-bullet: var(--text-light);
|
|
466
|
-
--components-layout-badge-warning-standard-border: var(--stroke-warning);
|
|
467
|
-
--components-layout-badge-warning-standard-bullet: var(--fill-warning-deep);
|
|
468
|
-
--components-layout-badge-warning-standard-fill: var(--fill-warning-muted);
|
|
469
|
-
--components-layout-badge-warning-standard-text: var(--text-accent);
|
|
470
|
-
--components-layout-badge-warning-standard-text-bullet: var(--text-accent);
|
|
471
|
-
--components-layout-card-contrast-border-default: var(--stroke-colorless);
|
|
472
|
-
--components-layout-card-contrast-border-active: var(--stroke-contrast);
|
|
473
|
-
--components-layout-card-contrast-divide: var(--stroke-highlight);
|
|
474
|
-
--components-layout-card-contrast-fill-default: var(--fill-selected-default-contrast);
|
|
475
|
-
--components-layout-card-contrast-fill-hoveractive: var(--fill-selected-hover-contrast);
|
|
476
|
-
--components-layout-card-contrast-icon: var(--shape-light);
|
|
477
|
-
--components-layout-card-contrast-subjecttext: var(--text-subduedalt);
|
|
478
|
-
--components-layout-card-contrast-text: var(--text-light);
|
|
479
|
-
--components-layout-card-standard-border-default: var(--stroke-neutral);
|
|
480
|
-
--components-layout-card-standard-border-active: var(--stroke-accent);
|
|
481
|
-
--components-layout-card-standard-divide: var(--stroke-highlight);
|
|
482
|
-
--components-layout-card-standard-fill-default: var(--fill-background-standard-light);
|
|
483
|
-
--components-layout-card-standard-fill-hoveractive: var(--fill-background-tint-light);
|
|
484
|
-
--components-layout-card-standard-icon: var(--shape-accent);
|
|
485
|
-
--components-layout-card-standard-subjecttext: var(--text-subdued);
|
|
486
|
-
--components-layout-card-standard-text: var(--text-accent);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
[data-color-mode=dark] {
|
|
490
|
-
--components-layout-badge-information-contrast-border: var(--stroke-colorless);
|
|
491
|
-
--components-layout-badge-information-contrast-bullet: var(--fill-information-tint);
|
|
492
|
-
--components-layout-badge-information-contrast-fill: var(--fill-information-tint);
|
|
493
|
-
--components-layout-badge-information-contrast-text: var(--text-dark);
|
|
494
|
-
--components-layout-badge-information-contrast-text-bullet: var(--text-lightalt);
|
|
495
|
-
--components-layout-badge-information-standard-border: var(--stroke-colorless);
|
|
496
|
-
--components-layout-badge-information-standard-bullet: var(--fill-information-tint);
|
|
497
|
-
--components-layout-badge-information-standard-fill: var(--fill-information-tint);
|
|
498
|
-
--components-layout-badge-information-standard-text: var(--text-dark);
|
|
499
|
-
--components-layout-badge-information-standard-text-bullet: var(--text-lightalt);
|
|
500
|
-
--components-layout-badge-negative-contrast-border: var(--stroke-colorless);
|
|
501
|
-
--components-layout-badge-negative-contrast-bullet: var(--fill-negative-tint);
|
|
502
|
-
--components-layout-badge-negative-contrast-fill: var(--fill-negative-muted);
|
|
503
|
-
--components-layout-badge-negative-contrast-text: var(--text-dark);
|
|
504
|
-
--components-layout-badge-negative-contrast-text-bullet: var(--text-lightalt);
|
|
505
|
-
--components-layout-badge-negative-standard-border: var(--stroke-colorless);
|
|
506
|
-
--components-layout-badge-negative-standard-bullet: var(--fill-negative-tint);
|
|
507
|
-
--components-layout-badge-negative-standard-fill: var(--fill-negative-muted);
|
|
508
|
-
--components-layout-badge-negative-standard-text: var(--text-dark);
|
|
509
|
-
--components-layout-badge-negative-standard-text-bullet: var(--text-lightalt);
|
|
510
|
-
--components-layout-badge-neutral-contrast-border: var(--stroke-colorless);
|
|
511
|
-
--components-layout-badge-neutral-contrast-bullet: var(--fill-selected-default-dark);
|
|
512
|
-
--components-layout-badge-neutral-contrast-fill: var(--fill-selected-hover-dark);
|
|
513
|
-
--components-layout-badge-neutral-contrast-text: var(--text-lightalt);
|
|
514
|
-
--components-layout-badge-neutral-contrast-text-bullet: var(--text-lightalt);
|
|
515
|
-
--components-layout-badge-neutral-standard-border: var(--stroke-colorless);
|
|
516
|
-
--components-layout-badge-neutral-standard-bullet: var(--fill-selected-default-dark);
|
|
517
|
-
--components-layout-badge-neutral-standard-fill: var(--fill-selected-hover-dark);
|
|
518
|
-
--components-layout-badge-neutral-standard-text: var(--text-lightalt);
|
|
519
|
-
--components-layout-badge-neutral-standard-text-bullet: var(--text-lightalt);
|
|
520
|
-
--components-layout-badge-primary-contrast-bullet: var(--fill-primary-default-contrast);
|
|
521
|
-
--components-layout-badge-primary-contrast-fill: var(--fill-primary-default-contrast);
|
|
522
|
-
--components-layout-badge-primary-contrast-text: var(--text-dark);
|
|
523
|
-
--components-layout-badge-primary-contrast-text-bullet: var(--text-lightalt);
|
|
524
|
-
--components-layout-badge-primary-standard-bullet: var(--fill-primary-default-contrast);
|
|
525
|
-
--components-layout-badge-primary-standard-fill: var(--fill-primary-default-contrast);
|
|
526
|
-
--components-layout-badge-primary-standard-text: var(--text-dark);
|
|
527
|
-
--components-layout-badge-primary-standard-text-bullet: var(--text-lightalt);
|
|
528
|
-
--components-layout-badge-success-contrast-border: var(--stroke-colorless);
|
|
529
|
-
--components-layout-badge-success-contrast-bullet: var(--fill-success-tint);
|
|
530
|
-
--components-layout-badge-success-contrast-fill: var(--fill-success-tint);
|
|
531
|
-
--components-layout-badge-success-contrast-text: var(--text-dark);
|
|
532
|
-
--components-layout-badge-success-contrast-text-bullet: var(--text-lightalt);
|
|
533
|
-
--components-layout-badge-success-standard-border: var(--stroke-colorless);
|
|
534
|
-
--components-layout-badge-success-standard-bullet: var(--fill-success-tint);
|
|
535
|
-
--components-layout-badge-success-standard-fill: var(--fill-success-tint);
|
|
536
|
-
--components-layout-badge-success-standard-text: var(--text-dark);
|
|
537
|
-
--components-layout-badge-success-standard-text-bullet: var(--text-lightalt);
|
|
538
|
-
--components-layout-badge-warning-contrast-border: var(--stroke-colorless);
|
|
539
|
-
--components-layout-badge-warning-contrast-bullet: var(--fill-warning-tint);
|
|
540
|
-
--components-layout-badge-warning-contrast-fill: var(--fill-warning-tint);
|
|
541
|
-
--components-layout-badge-warning-contrast-text: var(--text-dark);
|
|
542
|
-
--components-layout-badge-warning-contrast-text-bullet: var(--text-lightalt);
|
|
543
|
-
--components-layout-badge-warning-standard-border: var(--stroke-colorless);
|
|
544
|
-
--components-layout-badge-warning-standard-bullet: var(--fill-warning-tint);
|
|
545
|
-
--components-layout-badge-warning-standard-fill: var(--fill-warning-tint);
|
|
546
|
-
--components-layout-badge-warning-standard-text: var(--text-dark);
|
|
547
|
-
--components-layout-badge-warning-standard-text-bullet: var(--text-lightalt);
|
|
548
|
-
--components-layout-card-contrast-border-default: var(--stroke-colorless);
|
|
549
|
-
--components-layout-card-contrast-border-active: var(--stroke-dark);
|
|
550
|
-
--components-layout-card-contrast-divide: var(--stroke-highlightalt);
|
|
551
|
-
--components-layout-card-contrast-fill-default: var(--fill-background-overlay-transparent);
|
|
552
|
-
--components-layout-card-contrast-fill-hoveractive: var(--fill-background-overlay-solid);
|
|
553
|
-
--components-layout-card-contrast-icon: var(--shape-lightalt);
|
|
554
|
-
--components-layout-card-contrast-subjecttext: var(--text-darkalt);
|
|
555
|
-
--components-layout-card-contrast-text: var(--text-lightalt);
|
|
556
|
-
--components-layout-card-standard-border-default: var(--stroke-colorless);
|
|
557
|
-
--components-layout-card-standard-border-active: var(--stroke-dark);
|
|
558
|
-
--components-layout-card-standard-divide: var(--stroke-highlightalt);
|
|
559
|
-
--components-layout-card-standard-fill-default: var(--fill-background-overlay-transparent);
|
|
560
|
-
--components-layout-card-standard-fill-hoveractive: var(--fill-background-overlay-solid);
|
|
561
|
-
--components-layout-card-standard-icon: var(--shape-lightalt);
|
|
562
|
-
--components-layout-card-standard-subjecttext: var(--text-darkalt);
|
|
563
|
-
--components-layout-card-standard-text: var(--text-lightalt);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
:root {
|
|
567
|
-
--eds-layout: 1;
|
|
568
|
-
}
|
|
569
|
-
/* DO NOT CHANGE!*/
|
|
570
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
571
407
|
.eds-tag {
|
|
572
408
|
background: #e9e9e9;
|
|
573
409
|
color: #181c56;
|
|
@@ -595,3 +431,304 @@
|
|
|
595
431
|
.eds-tag--compact.eds-tag--trailing-icon .eds-icon {
|
|
596
432
|
margin-left: 0.25rem;
|
|
597
433
|
}
|
|
434
|
+
/* DO NOT CHANGE!*/
|
|
435
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
436
|
+
/* DO NOT CHANGE!*/
|
|
437
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
438
|
+
/* DO NOT CHANGE!*/
|
|
439
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
440
|
+
[data-color-mode=light],
|
|
441
|
+
:root {
|
|
442
|
+
--components-layout-badge-information-contrast-border: rgba(255, 255, 255, 0);
|
|
443
|
+
--components-layout-badge-information-contrast-bullet: #64b3e7;
|
|
444
|
+
--components-layout-badge-information-contrast-fill: #64b3e7;
|
|
445
|
+
--components-layout-badge-information-contrast-text: #181c56;
|
|
446
|
+
--components-layout-badge-information-contrast-text-bullet: #ffffff;
|
|
447
|
+
--components-layout-badge-information-standard-border: #067eb2;
|
|
448
|
+
--components-layout-badge-information-standard-bullet: #067eb2;
|
|
449
|
+
--components-layout-badge-information-standard-fill: #e1eff8;
|
|
450
|
+
--components-layout-badge-information-standard-text: #181c56;
|
|
451
|
+
--components-layout-badge-information-standard-text-bullet: #181c56;
|
|
452
|
+
--components-layout-badge-negative-contrast-border: rgba(255, 255, 255, 0);
|
|
453
|
+
--components-layout-badge-negative-contrast-bullet: #ff5959;
|
|
454
|
+
--components-layout-badge-negative-contrast-fill: #ff9494;
|
|
455
|
+
--components-layout-badge-negative-contrast-text: #181c56;
|
|
456
|
+
--components-layout-badge-negative-contrast-text-bullet: #ffffff;
|
|
457
|
+
--components-layout-badge-negative-standard-border: #d31b1b;
|
|
458
|
+
--components-layout-badge-negative-standard-bullet: #d31b1b;
|
|
459
|
+
--components-layout-badge-negative-standard-fill: #ffcece;
|
|
460
|
+
--components-layout-badge-negative-standard-text: #181c56;
|
|
461
|
+
--components-layout-badge-negative-standard-text-bullet: #181c56;
|
|
462
|
+
--components-layout-badge-neutral-contrast-border: rgba(255, 255, 255, 0);
|
|
463
|
+
--components-layout-badge-neutral-contrast-bullet: #c7cdeb;
|
|
464
|
+
--components-layout-badge-neutral-contrast-fill: #54568c;
|
|
465
|
+
--components-layout-badge-neutral-contrast-text: #ffffff;
|
|
466
|
+
--components-layout-badge-neutral-contrast-text-bullet: #ffffff;
|
|
467
|
+
--components-layout-badge-neutral-standard-border: #949699;
|
|
468
|
+
--components-layout-badge-neutral-standard-bullet: #81828f;
|
|
469
|
+
--components-layout-badge-neutral-standard-fill: #f6f6f9;
|
|
470
|
+
--components-layout-badge-neutral-standard-text: #181c56;
|
|
471
|
+
--components-layout-badge-neutral-standard-text-bullet: #181c56;
|
|
472
|
+
--components-layout-badge-primary-contrast-bullet: #aeb7e2;
|
|
473
|
+
--components-layout-badge-primary-contrast-fill: #aeb7e2;
|
|
474
|
+
--components-layout-badge-primary-contrast-text: #181c56;
|
|
475
|
+
--components-layout-badge-primary-contrast-text-bullet: #ffffff;
|
|
476
|
+
--components-layout-badge-primary-standard-bullet: #181c56;
|
|
477
|
+
--components-layout-badge-primary-standard-fill: #181c56;
|
|
478
|
+
--components-layout-badge-primary-standard-text: #ffffff;
|
|
479
|
+
--components-layout-badge-primary-standard-text-bullet: #181c56;
|
|
480
|
+
--components-layout-badge-success-contrast-border: rgba(255, 255, 255, 0);
|
|
481
|
+
--components-layout-badge-success-contrast-bullet: #5ac39a;
|
|
482
|
+
--components-layout-badge-success-contrast-fill: #5ac39a;
|
|
483
|
+
--components-layout-badge-success-contrast-text: #181c56;
|
|
484
|
+
--components-layout-badge-success-contrast-text-bullet: #ffffff;
|
|
485
|
+
--components-layout-badge-success-standard-border: #1a8e60;
|
|
486
|
+
--components-layout-badge-success-standard-bullet: #1a8e60;
|
|
487
|
+
--components-layout-badge-success-standard-fill: #d0f1e3;
|
|
488
|
+
--components-layout-badge-success-standard-text: #181c56;
|
|
489
|
+
--components-layout-badge-success-standard-text-bullet: #181c56;
|
|
490
|
+
--components-layout-badge-warning-contrast-border: rgba(255, 255, 255, 0);
|
|
491
|
+
--components-layout-badge-warning-contrast-bullet: #ffe082;
|
|
492
|
+
--components-layout-badge-warning-contrast-fill: #ffe082;
|
|
493
|
+
--components-layout-badge-warning-contrast-text: #181c56;
|
|
494
|
+
--components-layout-badge-warning-contrast-text-bullet: #ffffff;
|
|
495
|
+
--components-layout-badge-warning-standard-border: #e9b10c;
|
|
496
|
+
--components-layout-badge-warning-standard-bullet: #ffca28;
|
|
497
|
+
--components-layout-badge-warning-standard-fill: #fff4cd;
|
|
498
|
+
--components-layout-badge-warning-standard-text: #181c56;
|
|
499
|
+
--components-layout-badge-warning-standard-text-bullet: #181c56;
|
|
500
|
+
--components-layout-card-contrast-border-default: rgba(255, 255, 255, 0);
|
|
501
|
+
--components-layout-card-contrast-border-active: #aeb7e2;
|
|
502
|
+
--components-layout-card-contrast-divide: #ff5959;
|
|
503
|
+
--components-layout-card-contrast-fill-default: #393d79;
|
|
504
|
+
--components-layout-card-contrast-fill-hoveractive: #54568c;
|
|
505
|
+
--components-layout-card-contrast-icon: #ffffff;
|
|
506
|
+
--components-layout-card-contrast-subjecttext: #d9dae8;
|
|
507
|
+
--components-layout-card-contrast-text: #ffffff;
|
|
508
|
+
--components-layout-card-standard-border-default: #e3e6e8;
|
|
509
|
+
--components-layout-card-standard-border-active: #181c56;
|
|
510
|
+
--components-layout-card-standard-divide: #ff5959;
|
|
511
|
+
--components-layout-card-standard-fill-default: #ffffff;
|
|
512
|
+
--components-layout-card-standard-fill-hoveractive: #f6f6f9;
|
|
513
|
+
--components-layout-card-standard-icon: #181c56;
|
|
514
|
+
--components-layout-card-standard-subjecttext: #626493;
|
|
515
|
+
--components-layout-card-standard-text: #181c56;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
[data-color-mode=dark] {
|
|
519
|
+
--components-layout-badge-information-contrast-border: rgba(255, 255, 255, 0);
|
|
520
|
+
--components-layout-badge-information-contrast-bullet: #acd7f1;
|
|
521
|
+
--components-layout-badge-information-contrast-fill: #acd7f1;
|
|
522
|
+
--components-layout-badge-information-contrast-text: #08091c;
|
|
523
|
+
--components-layout-badge-information-contrast-text-bullet: #e5e5e9;
|
|
524
|
+
--components-layout-badge-information-standard-border: rgba(255, 255, 255, 0);
|
|
525
|
+
--components-layout-badge-information-standard-bullet: #acd7f1;
|
|
526
|
+
--components-layout-badge-information-standard-fill: #acd7f1;
|
|
527
|
+
--components-layout-badge-information-standard-text: #08091c;
|
|
528
|
+
--components-layout-badge-information-standard-text-bullet: #e5e5e9;
|
|
529
|
+
--components-layout-badge-negative-contrast-border: rgba(255, 255, 255, 0);
|
|
530
|
+
--components-layout-badge-negative-contrast-bullet: #ff9494;
|
|
531
|
+
--components-layout-badge-negative-contrast-fill: #ffcece;
|
|
532
|
+
--components-layout-badge-negative-contrast-text: #08091c;
|
|
533
|
+
--components-layout-badge-negative-contrast-text-bullet: #e5e5e9;
|
|
534
|
+
--components-layout-badge-negative-standard-border: rgba(255, 255, 255, 0);
|
|
535
|
+
--components-layout-badge-negative-standard-bullet: #ff9494;
|
|
536
|
+
--components-layout-badge-negative-standard-fill: #ffcece;
|
|
537
|
+
--components-layout-badge-negative-standard-text: #08091c;
|
|
538
|
+
--components-layout-badge-negative-standard-text-bullet: #e5e5e9;
|
|
539
|
+
--components-layout-badge-neutral-contrast-border: rgba(255, 255, 255, 0);
|
|
540
|
+
--components-layout-badge-neutral-contrast-bullet: #e5e5e9;
|
|
541
|
+
--components-layout-badge-neutral-contrast-fill: rgba(229, 229, 233, 0.3490196078);
|
|
542
|
+
--components-layout-badge-neutral-contrast-text: #e5e5e9;
|
|
543
|
+
--components-layout-badge-neutral-contrast-text-bullet: #e5e5e9;
|
|
544
|
+
--components-layout-badge-neutral-standard-border: rgba(255, 255, 255, 0);
|
|
545
|
+
--components-layout-badge-neutral-standard-bullet: #e5e5e9;
|
|
546
|
+
--components-layout-badge-neutral-standard-fill: rgba(229, 229, 233, 0.3490196078);
|
|
547
|
+
--components-layout-badge-neutral-standard-text: #e5e5e9;
|
|
548
|
+
--components-layout-badge-neutral-standard-text-bullet: #e5e5e9;
|
|
549
|
+
--components-layout-badge-primary-contrast-bullet: #aeb7e2;
|
|
550
|
+
--components-layout-badge-primary-contrast-fill: #aeb7e2;
|
|
551
|
+
--components-layout-badge-primary-contrast-text: #08091c;
|
|
552
|
+
--components-layout-badge-primary-contrast-text-bullet: #e5e5e9;
|
|
553
|
+
--components-layout-badge-primary-standard-bullet: #aeb7e2;
|
|
554
|
+
--components-layout-badge-primary-standard-fill: #aeb7e2;
|
|
555
|
+
--components-layout-badge-primary-standard-text: #08091c;
|
|
556
|
+
--components-layout-badge-primary-standard-text-bullet: #e5e5e9;
|
|
557
|
+
--components-layout-badge-success-contrast-border: rgba(255, 255, 255, 0);
|
|
558
|
+
--components-layout-badge-success-contrast-bullet: #9cd9c2;
|
|
559
|
+
--components-layout-badge-success-contrast-fill: #9cd9c2;
|
|
560
|
+
--components-layout-badge-success-contrast-text: #08091c;
|
|
561
|
+
--components-layout-badge-success-contrast-text-bullet: #e5e5e9;
|
|
562
|
+
--components-layout-badge-success-standard-border: rgba(255, 255, 255, 0);
|
|
563
|
+
--components-layout-badge-success-standard-bullet: #9cd9c2;
|
|
564
|
+
--components-layout-badge-success-standard-fill: #9cd9c2;
|
|
565
|
+
--components-layout-badge-success-standard-text: #08091c;
|
|
566
|
+
--components-layout-badge-success-standard-text-bullet: #e5e5e9;
|
|
567
|
+
--components-layout-badge-warning-contrast-border: rgba(255, 255, 255, 0);
|
|
568
|
+
--components-layout-badge-warning-contrast-bullet: #ffeeb3;
|
|
569
|
+
--components-layout-badge-warning-contrast-fill: #ffeeb3;
|
|
570
|
+
--components-layout-badge-warning-contrast-text: #08091c;
|
|
571
|
+
--components-layout-badge-warning-contrast-text-bullet: #e5e5e9;
|
|
572
|
+
--components-layout-badge-warning-standard-border: rgba(255, 255, 255, 0);
|
|
573
|
+
--components-layout-badge-warning-standard-bullet: #ffeeb3;
|
|
574
|
+
--components-layout-badge-warning-standard-fill: #ffeeb3;
|
|
575
|
+
--components-layout-badge-warning-standard-text: #08091c;
|
|
576
|
+
--components-layout-badge-warning-standard-text-bullet: #e5e5e9;
|
|
577
|
+
--components-layout-card-contrast-border-default: rgba(255, 255, 255, 0);
|
|
578
|
+
--components-layout-card-contrast-border-active: #b3b4bd;
|
|
579
|
+
--components-layout-card-contrast-divide: #ff9494;
|
|
580
|
+
--components-layout-card-contrast-fill-default: rgba(229, 229, 233, 0.1490196078);
|
|
581
|
+
--components-layout-card-contrast-fill-hoveractive: #393a49;
|
|
582
|
+
--components-layout-card-contrast-icon: #e5e5e9;
|
|
583
|
+
--components-layout-card-contrast-subjecttext: #b3b4bd;
|
|
584
|
+
--components-layout-card-contrast-text: #e5e5e9;
|
|
585
|
+
--components-layout-card-standard-border-default: rgba(255, 255, 255, 0);
|
|
586
|
+
--components-layout-card-standard-border-active: #b3b4bd;
|
|
587
|
+
--components-layout-card-standard-divide: #ff9494;
|
|
588
|
+
--components-layout-card-standard-fill-default: rgba(229, 229, 233, 0.1490196078);
|
|
589
|
+
--components-layout-card-standard-fill-hoveractive: #393a49;
|
|
590
|
+
--components-layout-card-standard-icon: #e5e5e9;
|
|
591
|
+
--components-layout-card-standard-subjecttext: #b3b4bd;
|
|
592
|
+
--components-layout-card-standard-text: #e5e5e9;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/* DO NOT CHANGE!*/
|
|
596
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
597
|
+
/* DO NOT CHANGE!*/
|
|
598
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
599
|
+
[data-color-mode=light],
|
|
600
|
+
:root {
|
|
601
|
+
--basecolors-frame-contrast: #181c56;
|
|
602
|
+
--basecolors-frame-contrastalt: #393d79;
|
|
603
|
+
--basecolors-frame-default: #ffffff;
|
|
604
|
+
--basecolors-frame-elevated: #ffffff;
|
|
605
|
+
--basecolors-frame-elevatedalt: #f6f6f9;
|
|
606
|
+
--basecolors-frame-subdued: #d9dae8;
|
|
607
|
+
--basecolors-frame-tint: #f6f6f9;
|
|
608
|
+
--basecolors-shape-accent: #181c56;
|
|
609
|
+
--basecolors-shape-bicycle-contrast: #00db9b;
|
|
610
|
+
--basecolors-shape-bicycle-default: #388f76;
|
|
611
|
+
--basecolors-shape-bus-contrast: #ff6392;
|
|
612
|
+
--basecolors-shape-bus-default: #c5044e;
|
|
613
|
+
--basecolors-shape-cableway-contrast: #b482fb;
|
|
614
|
+
--basecolors-shape-cableway-default: #78469a;
|
|
615
|
+
--basecolors-shape-disabled: #6e6f73;
|
|
616
|
+
--basecolors-shape-disabledalt: #b6b8ba;
|
|
617
|
+
--basecolors-shape-ferry-contrast: #6fdfff;
|
|
618
|
+
--basecolors-shape-ferry-default: #0c6693;
|
|
619
|
+
--basecolors-shape-funicular-contrast: #b482fb;
|
|
620
|
+
--basecolors-shape-funicular-default: #78469a;
|
|
621
|
+
--basecolors-shape-helicopter-contrast: #fbafea;
|
|
622
|
+
--basecolors-shape-helicopter-default: #800664;
|
|
623
|
+
--basecolors-shape-highlight: #ff5959;
|
|
624
|
+
--basecolors-shape-light: #ffffff;
|
|
625
|
+
--basecolors-shape-mask: #ffffff;
|
|
626
|
+
--basecolors-shape-maskalt: #ffffff;
|
|
627
|
+
--basecolors-shape-metro-contrast: #f08901;
|
|
628
|
+
--basecolors-shape-metro-default: #bf5826;
|
|
629
|
+
--basecolors-shape-mobility-contrast: #00db9b;
|
|
630
|
+
--basecolors-shape-mobility-default: #388f76;
|
|
631
|
+
--basecolors-shape-plane-contrast: #fbafea;
|
|
632
|
+
--basecolors-shape-plane-default: #800664;
|
|
633
|
+
--basecolors-shape-subdued: #626493;
|
|
634
|
+
--basecolors-shape-subduedalt: #d9dae8;
|
|
635
|
+
--basecolors-shape-taxi-contrast: #ffe082;
|
|
636
|
+
--basecolors-shape-taxi-default: #3d3e40;
|
|
637
|
+
--basecolors-shape-train-contrast: #42a5f5;
|
|
638
|
+
--basecolors-shape-train-default: #00367f;
|
|
639
|
+
--basecolors-shape-tram-contrast: #b482fb;
|
|
640
|
+
--basecolors-shape-tram-default: #78469a;
|
|
641
|
+
--basecolors-shape-walk-contrast: #8284ab;
|
|
642
|
+
--basecolors-shape-walk-default: #8d8e9c;
|
|
643
|
+
--basecolors-shape-airportlinkbus-contrast: #fbafea;
|
|
644
|
+
--basecolors-shape-airportlinkbus-default: #800664;
|
|
645
|
+
--basecolors-shape-airportlinkrail-contrast: #fbafea;
|
|
646
|
+
--basecolors-shape-airportlinkrail-default: #800664;
|
|
647
|
+
--basecolors-stroke-contrast: #aeb7e2;
|
|
648
|
+
--basecolors-stroke-default: #181c56;
|
|
649
|
+
--basecolors-stroke-disabled: #949699;
|
|
650
|
+
--basecolors-stroke-focus-contrast: #aeb7e2;
|
|
651
|
+
--basecolors-stroke-focus-standard: #181c56;
|
|
652
|
+
--basecolors-stroke-highlight: #ff5959;
|
|
653
|
+
--basecolors-stroke-light: #ffffff;
|
|
654
|
+
--basecolors-stroke-subdued: #8284ab;
|
|
655
|
+
--basecolors-stroke-subduedalt: #e3e6e8;
|
|
656
|
+
--basecolors-text-accent: #181c56;
|
|
657
|
+
--basecolors-text-disabled: #6e6f73;
|
|
658
|
+
--basecolors-text-disabledalt: #b6b8ba;
|
|
659
|
+
--basecolors-text-highlight: #ff5959;
|
|
660
|
+
--basecolors-text-light: #ffffff;
|
|
661
|
+
--basecolors-text-subdued: #626493;
|
|
662
|
+
--basecolors-text-subduedalt: #d9dae8;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
[data-color-mode=dark] {
|
|
666
|
+
--basecolors-frame-contrast: #212233;
|
|
667
|
+
--basecolors-frame-contrastalt: #141527;
|
|
668
|
+
--basecolors-frame-default: #08091c;
|
|
669
|
+
--basecolors-frame-elevated: rgba(229, 229, 233, 0.1490196078);
|
|
670
|
+
--basecolors-frame-elevatedalt: #464755;
|
|
671
|
+
--basecolors-frame-subdued: #2d2e3e;
|
|
672
|
+
--basecolors-frame-tint: #141527;
|
|
673
|
+
--basecolors-shape-accent: #e5e5e9;
|
|
674
|
+
--basecolors-shape-bicycle-contrast: #4db295;
|
|
675
|
+
--basecolors-shape-bicycle-default: #4db295;
|
|
676
|
+
--basecolors-shape-bus-contrast: #e87a9b;
|
|
677
|
+
--basecolors-shape-bus-default: #e87a9b;
|
|
678
|
+
--basecolors-shape-cableway-contrast: #b898e5;
|
|
679
|
+
--basecolors-shape-cableway-default: #b898e5;
|
|
680
|
+
--basecolors-shape-disabled: #b6b8ba;
|
|
681
|
+
--basecolors-shape-disabledalt: #b3b4bd;
|
|
682
|
+
--basecolors-shape-ferry-contrast: #8ccfe2;
|
|
683
|
+
--basecolors-shape-ferry-default: #8ccfe2;
|
|
684
|
+
--basecolors-shape-funicular-contrast: #b898e5;
|
|
685
|
+
--basecolors-shape-funicular-default: #b898e5;
|
|
686
|
+
--basecolors-shape-helicopter-contrast: #f2b8e5;
|
|
687
|
+
--basecolors-shape-helicopter-default: #f2b8e5;
|
|
688
|
+
--basecolors-shape-highlight: #ff9494;
|
|
689
|
+
--basecolors-shape-light: #e5e5e9;
|
|
690
|
+
--basecolors-shape-mask: #2d2e3e;
|
|
691
|
+
--basecolors-shape-maskalt: #393a49;
|
|
692
|
+
--basecolors-shape-metro-contrast: #dd973c;
|
|
693
|
+
--basecolors-shape-metro-default: #dd973c;
|
|
694
|
+
--basecolors-shape-mobility-contrast: #4db295;
|
|
695
|
+
--basecolors-shape-mobility-default: #4db295;
|
|
696
|
+
--basecolors-shape-plane-contrast: #f2b8e5;
|
|
697
|
+
--basecolors-shape-plane-default: #f2b8e5;
|
|
698
|
+
--basecolors-shape-subdued: #b3b4bd;
|
|
699
|
+
--basecolors-shape-subduedalt: #b3b4bd;
|
|
700
|
+
--basecolors-shape-taxi-contrast: #ffe082;
|
|
701
|
+
--basecolors-shape-taxi-default: #ffe082;
|
|
702
|
+
--basecolors-shape-train-contrast: #60a2d7;
|
|
703
|
+
--basecolors-shape-train-default: #60a2d7;
|
|
704
|
+
--basecolors-shape-tram-contrast: #b898e5;
|
|
705
|
+
--basecolors-shape-tram-default: #b898e5;
|
|
706
|
+
--basecolors-shape-walk-contrast: #8d8e9c;
|
|
707
|
+
--basecolors-shape-walk-default: #8d8e9c;
|
|
708
|
+
--basecolors-shape-airportlinkbus-contrast: #f2b8e5;
|
|
709
|
+
--basecolors-shape-airportlinkbus-default: #f2b8e5;
|
|
710
|
+
--basecolors-shape-airportlinkrail-contrast: #f2b8e5;
|
|
711
|
+
--basecolors-shape-airportlinkrail-default: #f2b8e5;
|
|
712
|
+
--basecolors-stroke-contrast: #aeb7e2;
|
|
713
|
+
--basecolors-stroke-default: #b3b4bd;
|
|
714
|
+
--basecolors-stroke-disabled: #e3e6e8;
|
|
715
|
+
--basecolors-stroke-focus-contrast: #aeb7e2;
|
|
716
|
+
--basecolors-stroke-focus-standard: #aeb7e2;
|
|
717
|
+
--basecolors-stroke-highlight: #ff9494;
|
|
718
|
+
--basecolors-stroke-light: #b3b4bd;
|
|
719
|
+
--basecolors-stroke-subdued: #81828f;
|
|
720
|
+
--basecolors-stroke-subduedalt: #81828f;
|
|
721
|
+
--basecolors-text-accent: #e5e5e9;
|
|
722
|
+
--basecolors-text-disabled: #b6b8ba;
|
|
723
|
+
--basecolors-text-disabledalt: #b6b8ba;
|
|
724
|
+
--basecolors-text-highlight: #ff9494;
|
|
725
|
+
--basecolors-text-light: #e5e5e9;
|
|
726
|
+
--basecolors-text-subdued: #b3b4bd;
|
|
727
|
+
--basecolors-text-subduedalt: #b3b4bd;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
:root {
|
|
731
|
+
--eds-layout: 1;
|
|
732
|
+
}
|
|
733
|
+
/* DO NOT CHANGE!*/
|
|
734
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/layout",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/layout.esm.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"react-dom": ">=16.8.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@entur/icons": "^6.15.
|
|
31
|
-
"@entur/tokens": "^3.13.
|
|
32
|
-
"@entur/typography": "^1.8.
|
|
33
|
-
"@entur/utils": "^0.
|
|
30
|
+
"@entur/icons": "^6.15.5",
|
|
31
|
+
"@entur/tokens": "^3.13.3",
|
|
32
|
+
"@entur/typography": "^1.8.29",
|
|
33
|
+
"@entur/utils": "^0.11.0",
|
|
34
34
|
"classnames": "^2.3.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "a6bd766dd2c7bf84eb3a5bcc8cfdbabca765e28e"
|
|
37
37
|
}
|