@entur/layout 2.1.16 → 2.1.18

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/LICENSE.md CHANGED
@@ -208,74 +208,3 @@ The European Commission may update this Appendix to later versions of the above
208
208
  a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the
209
209
  covered Source Code from exclusive appropriation.
210
210
  All other changes or additions to this Appendix require the production of a new EUPL version.
211
-
212
- # Standard Nucleo License
213
-
214
- - Last updated: July 2, 2018
215
- - [Github repo](https://github.com/NucleoApp/license-standard)
216
-
217
- By purchasing the Nucleo icons, you have the right to:
218
-
219
- - Use the Nucleo icons in unlimited personal and commercial projects, for yourself or a client, with no limitation to the number of impressions for your end product.
220
- - Use the Nucleo icons in applications, software, UI/UX design, print, and logo design.
221
- - Modify the Nucleo icons to create your icon variations.
222
-
223
- You don't have the right to:
224
-
225
- - Sublicense, resell, share, transfer, or otherwise redistribute the Nucleo icons (even for free or within a more complex downloadable file).
226
- - Use the Nucleo icons in a product that is directly competitive with Nucleo.
227
-
228
- ## Limitations & Extended license
229
-
230
- - **For each project, you can use a maximum of 250 Nucleo icons** (intended per unique style: for example, if you're using the same icon in both the outline and glyph styles, or in 2 different sizes, you're using 2 icons). You can lift this limit by purchasing an Extended License.
231
- - If you're using Nucleo icons in templates, themes or plugins offered for sale, you can use a maximum of 100 Nucleo icons. You can lift this limit by purchasing an Extended License.
232
- - If you're using the Nucleo icons in open source projects, you can use a maximum of 100 Nucleo icons.
233
- - If you're interested in using the Nucleo icons in items offered for sale (or for free) where the Nucleo icons contribute to the core value of the product being sold/shared, you will need an Extended License (e.g., a CMS where users can browse the Nucleo icons and pick the ones to include in their design).
234
-
235
- [Learn more about the Extended License](https://nucleoapp.com/extended-license)
236
-
237
- ## Freelance Projects & Contracted work
238
-
239
- If you're working on a project for a client, you can share with your client a maximum of 250 Nucleo icons per project. You can't share the Nucleo source files unless the client purchases a license.
240
-
241
- If the Nucleo icons contribute to the core value of the product being sold/shared, or if you (or your client) wish to include more than 250 icons in the project, the [Extended License](https://nucleoapp.com/extended-license) is required.
242
-
243
- ## Templates, Themes, UI Kits & Plugins
244
-
245
- If you're using Nucleo icons in templates, themes or plugins offered for sale (e.g., UI kits, Wordpress Themes, HTML/CSS Templates), **you can include up to 100 icons in the downloadable source files**. This limitation applies to the icon fonts as well.
246
-
247
- The downloadable source file has to include the [Nucleo Copyright Notice](https://nucleoapp.com/copyright-notice).
248
-
249
- If the Nucleo icons contribute to the core value of the template, theme or plugin sold (e.g., a theme builder where users can browse Nucleo icons and pick the ones to include in their design), or if you wish to use more than 100 Nucleo icons, you will need an [Extended License](https://nucleoapp.com/extended-license).
250
-
251
- It's not possible to purchase an Extended License if the template, theme or plugin is distributed for free.
252
-
253
- If you're offering a free and pro version of your product, the free version cannot include more than 100 icons even if you purchased an Extended License to lift the limit. The Extended License applies only to the pro version of your product.
254
-
255
- ## Open source projects
256
-
257
- If you're using the Nucleo icons in open source projects, **you can include up to 100 icons in the downloadable source files**. This limitation applies to the icon fonts as well.
258
-
259
- The downloadable source file has to include the [Nucleo Copyright Notice](https://nucleoapp.com/copyright-notice).
260
-
261
- It's not possible to purchase an Extended License for open source projects.
262
-
263
- ## Sharing Nucleo icons with team members
264
-
265
- If you're the sole owner of a Nucleo license, you can share with your team members only the icons used in your work, with a maximum of 250 icons (e.g., if you're a designer, you can share with the developers of your team only the Nucleo icons used in your design files).
266
-
267
- Your team members cannot reuse the Nucleo icons in other projects unless they purchase a license.
268
-
269
- If more than one team member needs access to the Nucleo icons, you can consider purchasing a [team license](https://nucleoapp.com/pricing).
270
-
271
- ## Design systems
272
-
273
- If you wish to include the Nucleo icons in a design system available on a public server, you can use a maximum of 250 Nucleo icons, even if your team purchased a Nucleo team license.
274
-
275
- If the design system is accessible only by the members of your organization (e.g., is hosted on a password protected server), but you're the sole owner of a Nucleo license, you can share with your colleagues a maximum of 250 Nucleo icons.
276
-
277
- If the design system is on a public server, you can lift the 250 icons limit by buying an [Extended License](https://nucleoapp.com/extended-license). However, please keep in mind you can't provide a link/button to download all the icons.
278
-
279
- If your team purchased a Nucleo team license that covers all the users with access to the design system, and the design system is not public (e.g., is hosted on a password protected server), then there's no limitation to the number of icons that can be included.
280
-
281
- If you're still unclear about what is or isn't allowed under this license, please contact us at info@nucleoapp.com.
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
3
  import './Badge.scss';
4
- export declare type BadgeTypes = 'status' | 'bullet' | 'notification';
5
- export declare type BadgeOwnProps = {
4
+ export type BadgeTypes = 'status' | 'bullet' | 'notification';
5
+ export type BadgeOwnProps = {
6
6
  /** Elementet som wrapper badgen
7
7
  * @default "span"
8
8
  */
@@ -23,8 +23,8 @@ export declare type BadgeOwnProps = {
23
23
  max?: number;
24
24
  type?: BadgeTypes;
25
25
  };
26
- export declare type BadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;
27
- export declare type BadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: BadgeProps<T>) => React.ReactElement | null;
26
+ export type BadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, BadgeOwnProps>;
27
+ export type BadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: BadgeProps<T>) => React.ReactElement | null;
28
28
  declare const defaultElement = "span";
29
29
  export declare const Badge: BadgeComponent;
30
30
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- declare type BulletBadgeBaseProps = {
3
+ type BulletBadgeBaseProps = {
4
4
  /** Elementet som wrapper badgen
5
5
  * @default "span"
6
6
  */
@@ -12,8 +12,8 @@ declare type BulletBadgeBaseProps = {
12
12
  /** Hvilken type badge man vil ha */
13
13
  variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
14
14
  };
15
- export declare type BulletBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;
16
- export declare type BulletBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: BulletBadgeProps<T>) => React.ReactElement | null;
15
+ export type BulletBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, BulletBadgeBaseProps>;
16
+ export type BulletBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: BulletBadgeProps<T>) => React.ReactElement | null;
17
17
  declare const defaultElement = "span";
18
18
  export declare const BulletBadge: BulletBadgeComponent;
19
19
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- declare type NotificationBadgeBaseProps = {
3
+ type NotificationBadgeBaseProps = {
4
4
  /** Elementet som wrapper badgen
5
5
  * @default "span"
6
6
  */
@@ -20,8 +20,8 @@ declare type NotificationBadgeBaseProps = {
20
20
  */
21
21
  max?: number;
22
22
  };
23
- export declare type NotificationBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;
24
- export declare type NotificationBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: NotificationBadgeProps<T>) => React.ReactElement | null;
23
+ export type NotificationBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, NotificationBadgeBaseProps>;
24
+ export type NotificationBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: NotificationBadgeProps<T>) => React.ReactElement | null;
25
25
  declare const defaultElement = "span";
26
26
  export declare const NotificationBadge: NotificationBadgeComponent;
27
27
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- declare type StatusBadgeBaseProps = {
3
+ type StatusBadgeBaseProps = {
4
4
  /** Elementet som wrapper badgen
5
5
  * @default "span"
6
6
  */
@@ -12,8 +12,8 @@ declare type StatusBadgeBaseProps = {
12
12
  /** Hvilken type badge man vil ha */
13
13
  variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
14
14
  };
15
- export declare type StatusBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;
16
- export declare type StatusBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: StatusBadgeProps<T>) => React.ReactElement | null;
15
+ export type StatusBadgeProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, StatusBadgeBaseProps>;
16
+ export type StatusBadgeComponent = <T extends React.ElementType = typeof defaultElement>(props: StatusBadgeProps<T>) => React.ReactElement | null;
17
17
  declare const defaultElement = "span";
18
18
  export declare const StatusBadge: StatusBadgeComponent;
19
19
  export {};
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentProps } from '@entur/utils';
3
3
  import './BaseCard.scss';
4
- export declare type BaseCardOwnProps = {
4
+ export type BaseCardOwnProps = {
5
5
  /** HTML-elementet eller React-komponenten som lager Card
6
6
  * @default "div"
7
7
  */
@@ -10,7 +10,7 @@ export declare type BaseCardOwnProps = {
10
10
  className?: string;
11
11
  children?: React.ReactNode;
12
12
  };
13
- export declare type BaseCardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, BaseCardOwnProps>;
13
+ export type BaseCardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, BaseCardOwnProps>;
14
14
  declare const defaultElement = "div";
15
15
  export declare const BaseCard: <E extends React.ElementType<any> = "div">({ children, className, as, ...rest }: BaseCardProps<E>) => JSX.Element;
16
16
  export {};
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- export declare type ContrastBaseProps = {
3
+ export type ContrastBaseProps = {
4
4
  /** Ekstra klassenavn */
5
5
  className?: string;
6
6
  };
7
- export declare type ContrastProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;
8
- export declare type ContrastComponent = <T extends React.ElementType = typeof defaultElement>(props: ContrastProps<T>) => React.ReactElement | null;
7
+ export type ContrastProps<T extends React.ElementType> = PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;
8
+ export type ContrastComponent = <T extends React.ElementType = typeof defaultElement>(props: ContrastProps<T>) => React.ReactElement | null;
9
9
  declare const defaultElement = "div";
10
10
  export declare const Contrast: ContrastComponent;
11
11
  export declare const ContrastContext: React.Context<boolean>;
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import './MediaCard.scss';
3
3
  import { PolymorphicComponentProps } from '@entur/utils';
4
- export declare type MediaCardOwnProps = {
4
+ export type MediaCardOwnProps = {
5
5
  /** HTML-elementet eller React-komponenten som lager bunnen (under media) av MediaCard
6
6
  * @default 'a'
7
7
  */
@@ -23,7 +23,7 @@ export declare type MediaCardOwnProps = {
23
23
  */
24
24
  wholeCardAsElement?: boolean;
25
25
  };
26
- export declare type MediaCardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, MediaCardOwnProps>;
26
+ export type MediaCardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, MediaCardOwnProps>;
27
27
  declare const defaultElement = "a";
28
28
  export declare const MediaCard: <E extends React.ElementType<any> = "a">({ title, description, children, className, category, style, as, wholeCardAsElement: whole, ...rest }: MediaCardProps<E>) => JSX.Element;
29
29
  export default MediaCard;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './NavigationCard.scss';
3
3
  import { PolymorphicComponentProps } from '@entur/utils';
4
- export declare type NavigationCardOwnProps = {
4
+ export type NavigationCardOwnProps = {
5
5
  /** HTML-elementet eller React-komponenten som lager NavigationCard
6
6
  * @default 'a'
7
7
  */
@@ -23,7 +23,7 @@ export declare type NavigationCardOwnProps = {
23
23
  */
24
24
  externalLink?: boolean;
25
25
  };
26
- export declare type NavigationCardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, NavigationCardOwnProps>;
26
+ export type NavigationCardProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, NavigationCardOwnProps>;
27
27
  declare const defaultElement = "a";
28
28
  export declare const NavigationCard: <E extends React.ElementType<any> = "a">({ title, children, titleIcon, compact, className, externalLink, as, ...rest }: NavigationCardProps<E>) => JSX.Element;
29
29
  export {};
package/dist/Tag.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Tag.scss';
3
3
  import { PolymorphicComponentProps } from '@entur/utils';
4
- export declare type TagOwnProps = {
4
+ export type TagOwnProps = {
5
5
  /** HTML-elementet eller React-komponenten som rendres
6
6
  * @default 'div'
7
7
  */
@@ -14,7 +14,7 @@ export declare type TagOwnProps = {
14
14
  compact?: boolean;
15
15
  children: React.ReactNode;
16
16
  };
17
- export declare type TagProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, TagOwnProps>;
17
+ export type TagProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, TagOwnProps>;
18
18
  declare const defaultElement = "div";
19
19
  export declare const Tag: <E extends React.ElementType<any> = "div">({ className, children, compact, as, ...rest }: TagProps<E>) => JSX.Element;
20
20
  export {};
@@ -14,35 +14,29 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
  var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
15
15
 
16
16
  function _extends() {
17
- _extends = Object.assign || function (target) {
17
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
18
18
  for (var i = 1; i < arguments.length; i++) {
19
19
  var source = arguments[i];
20
-
21
20
  for (var key in source) {
22
21
  if (Object.prototype.hasOwnProperty.call(source, key)) {
23
22
  target[key] = source[key];
24
23
  }
25
24
  }
26
25
  }
27
-
28
26
  return target;
29
27
  };
30
-
31
28
  return _extends.apply(this, arguments);
32
29
  }
33
-
34
30
  function _objectWithoutPropertiesLoose(source, excluded) {
35
31
  if (source == null) return {};
36
32
  var target = {};
37
33
  var sourceKeys = Object.keys(source);
38
34
  var key, i;
39
-
40
35
  for (i = 0; i < sourceKeys.length; i++) {
41
36
  key = sourceKeys[i];
42
37
  if (excluded.indexOf(key) >= 0) continue;
43
38
  target[key] = source[key];
44
39
  }
45
-
46
40
  return target;
47
41
  }
48
42
 
@@ -50,9 +44,8 @@ var _excluded$5 = ["className", "as"];
50
44
  var defaultElement$8 = 'div';
51
45
  var Contrast = /*#__PURE__*/React__default["default"].forwardRef(function Contrast(_ref, ref) {
52
46
  var className = _ref.className,
53
- as = _ref.as,
54
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
55
-
47
+ as = _ref.as,
48
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
56
49
  var Element = as || defaultElement$8;
57
50
  return React__default["default"].createElement(ContrastContext.Provider, {
58
51
  value: true
@@ -70,10 +63,9 @@ var _excluded$4 = ["children", "className", "as"];
70
63
  var defaultElement$7 = 'div';
71
64
  var BaseCard = function BaseCard(_ref) {
72
65
  var children = _ref.children,
73
- className = _ref.className,
74
- as = _ref.as,
75
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
76
-
66
+ className = _ref.className,
67
+ as = _ref.as,
68
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
77
69
  var Element = as || defaultElement$7;
78
70
  var classList = classNames__default["default"]('eds-base-card', className);
79
71
  return React__default["default"].createElement(Element, _extends({
@@ -85,16 +77,15 @@ var _excluded$3 = ["title", "children", "titleIcon", "compact", "className", "ex
85
77
  var defaultElement$6 = 'a';
86
78
  var NavigationCard = function NavigationCard(_ref) {
87
79
  var title = _ref.title,
88
- children = _ref.children,
89
- titleIcon = _ref.titleIcon,
90
- _ref$compact = _ref.compact,
91
- compact = _ref$compact === void 0 ? false : _ref$compact,
92
- className = _ref.className,
93
- _ref$externalLink = _ref.externalLink,
94
- externalLink = _ref$externalLink === void 0 ? false : _ref$externalLink,
95
- as = _ref.as,
96
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
97
-
80
+ children = _ref.children,
81
+ titleIcon = _ref.titleIcon,
82
+ _ref$compact = _ref.compact,
83
+ compact = _ref$compact === void 0 ? false : _ref$compact,
84
+ className = _ref.className,
85
+ _ref$externalLink = _ref.externalLink,
86
+ externalLink = _ref$externalLink === void 0 ? false : _ref$externalLink,
87
+ as = _ref.as,
88
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
98
89
  var Element = as || defaultElement$6;
99
90
  var classList = classNames__default["default"]('eds-navigation-card', className, {
100
91
  'eds-base-card--red-line': compact,
@@ -124,15 +115,14 @@ var _excluded$2 = ["title", "description", "children", "className", "category",
124
115
  var defaultElement$5 = 'a';
125
116
  var MediaCard = function MediaCard(_ref) {
126
117
  var title = _ref.title,
127
- description = _ref.description,
128
- children = _ref.children,
129
- className = _ref.className,
130
- category = _ref.category,
131
- style = _ref.style,
132
- as = _ref.as,
133
- whole = _ref.wholeCardAsElement,
134
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
135
-
118
+ description = _ref.description,
119
+ children = _ref.children,
120
+ className = _ref.className,
121
+ category = _ref.category,
122
+ style = _ref.style,
123
+ as = _ref.as,
124
+ whole = _ref.wholeCardAsElement,
125
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
136
126
  var Element = as || defaultElement$5;
137
127
  var classList = classNames__default["default"]('eds-base-card', 'eds-media-card', className);
138
128
  var wrapperElement = whole ? Element : 'div';
@@ -160,33 +150,28 @@ var _excluded$1 = ["children", "className", "max", "variant", "showZero", "invis
160
150
  var defaultElement$4 = 'span';
161
151
  var Badge = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
162
152
  var children = _ref.children,
163
- _ref$max = _ref.max,
164
- max = _ref$max === void 0 ? 99 : _ref$max,
165
- variant = _ref.variant,
166
- _ref$showZero = _ref.showZero,
167
- showZero = _ref$showZero === void 0 ? false : _ref$showZero,
168
- _ref$invisible = _ref.invisible,
169
- invisibleProp = _ref$invisible === void 0 ? false : _ref$invisible,
170
- as = _ref.as,
171
- _ref$type = _ref.type,
172
- type = _ref$type === void 0 ? 'status' : _ref$type,
173
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
174
-
153
+ _ref$max = _ref.max,
154
+ max = _ref$max === void 0 ? 99 : _ref$max,
155
+ variant = _ref.variant,
156
+ _ref$showZero = _ref.showZero,
157
+ showZero = _ref$showZero === void 0 ? false : _ref$showZero,
158
+ _ref$invisible = _ref.invisible,
159
+ invisibleProp = _ref$invisible === void 0 ? false : _ref$invisible,
160
+ as = _ref.as,
161
+ _ref$type = _ref.type,
162
+ type = _ref$type === void 0 ? 'status' : _ref$type,
163
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
175
164
  var Element = as || defaultElement$4;
176
165
  var invisible = invisibleProp;
177
-
178
166
  if (invisibleProp === false && (children === 0 && !showZero || children == null)) {
179
167
  invisible = true;
180
168
  }
181
-
182
169
  var displayValue;
183
-
184
170
  if (typeof children === 'number') {
185
171
  displayValue = children > max ? max + "+" : children;
186
172
  } else {
187
173
  displayValue = children;
188
174
  }
189
-
190
175
  var classList = classNames__default["default"]('eds-badge', {
191
176
  'eds-badge--invisible': invisible,
192
177
  'eds-badge--show-zero': showZero
@@ -199,8 +184,8 @@ var Badge = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
199
184
 
200
185
  var defaultElement$3 = 'span';
201
186
  var BulletBadge = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
202
- var Element = props.as || defaultElement$3; // @ts-expect-error type error due to props not being BadgeOwnProps
203
-
187
+ var Element = props.as || defaultElement$3;
188
+ // @ts-expect-error type error due to props not being BadgeOwnProps
204
189
  return React__default["default"].createElement(Badge, _extends({
205
190
  as: Element
206
191
  }, props, {
@@ -211,8 +196,8 @@ var BulletBadge = /*#__PURE__*/React__default["default"].forwardRef(function (pr
211
196
 
212
197
  var defaultElement$2 = 'span';
213
198
  var NotificationBadge = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
214
- var Element = props.as || defaultElement$2; // @ts-expect-error type error due to props not being BadgeOwnProps
215
-
199
+ var Element = props.as || defaultElement$2;
200
+ // @ts-expect-error type error due to props not being BadgeOwnProps
216
201
  return React__default["default"].createElement(Badge, _extends({
217
202
  as: Element
218
203
  }, props, {
@@ -223,8 +208,8 @@ var NotificationBadge = /*#__PURE__*/React__default["default"].forwardRef(functi
223
208
 
224
209
  var defaultElement$1 = 'span';
225
210
  var StatusBadge = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
226
- var Element = props.as || defaultElement$1; // @ts-expect-error type error due to props not being BadgeOwnProps
227
-
211
+ var Element = props.as || defaultElement$1;
212
+ // @ts-expect-error type error due to props not being BadgeOwnProps
228
213
  return React__default["default"].createElement(Badge, _extends({
229
214
  as: Element
230
215
  }, props, {
@@ -237,11 +222,10 @@ var _excluded = ["className", "children", "compact", "as"];
237
222
  var defaultElement = 'div';
238
223
  var Tag = function Tag(_ref) {
239
224
  var className = _ref.className,
240
- children = _ref.children,
241
- compact = _ref.compact,
242
- as = _ref.as,
243
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
244
-
225
+ children = _ref.children,
226
+ compact = _ref.compact,
227
+ as = _ref.as,
228
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
245
229
  var Element = as || defaultElement;
246
230
  var childrenArray = React__default["default"].Children.toArray(children);
247
231
  var hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== 'string';
@@ -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\">{titleIcon}</div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span className=\"eds-navigation-card__title-icon-compact\">\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon className=\"eds-navigation-card__external--not-compact\" />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\" />\n )}\n {compact && !externalLink && (\n <ForwardIcon className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\" />\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 { 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 /** Gjør hele kortet til \"as\"-elementet. Default er kun tekstområdet. Anbefales hvis media er et bilde\n * @default false\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 wholeCardAsElement: whole,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', 'eds-media-card', className);\n\n const wrapperElement = whole ? Element : 'div';\n const wrapperProps = whole ? rest : {};\n const innerProps = whole ? {} : rest;\n const InnerElement = whole ? 'div' : Element;\n return (\n <BaseCard\n as={wrapperElement}\n className={classList}\n style={style}\n {...wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <InnerElement className=\"eds-media-card__text\" {...innerProps}>\n {category && (\n <Label className=\"eds-media-card__category\">{category}</Label>\n )}\n <div className=\"eds-media-card__title\">{title}</div>\n <Paragraph>{description}</Paragraph>\n <ForwardIcon className=\"eds-media-card__arrow-icon\" />\n </InnerElement>\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};\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 '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","Element","ContrastContext","Provider","value","classNames","createContext","useContrast","useContext","BaseCard","children","classList","NavigationCard","title","titleIcon","compact","externalLink","Heading3","Paragraph","ExternalIcon","ForwardIcon","MediaCard","description","category","style","whole","wholeCardAsElement","wrapperElement","wrapperProps","innerProps","InnerElement","Label","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,KAAvB;IAEaC,QAAQ,gBAAsBC,yBAAK,CAACC,UAAN,CAAiB,SAASF,QAAT,OAI1DG,GAJ0D;MAGxDC,iBAAAA;MAAWC,UAAAA;MAAOC;;AAGpB,MAAMC,OAAO,GAAsBF,EAAE,IAAIN,gBAAzC;AACA,SACEE,uCAAA,CAACO,eA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C,UAAN,CAC/C,UACE6C,KADF,EAEE5C,GAFF;AAIE,MAAMI,OAAO,GAAsBwC,KAAK,CAAC1C,EAAN,IAAYN,gBAA/C;;AAEA,SAAOE,uCAAA,CAACqC,KAAD;AAAOjC,IAAAA,EAAE,EAAEE;AAAX,KAAwBwC,KAAxB;AAA+B5C,IAAAA,GAAG,EAAEA,GAApC;AAAyCyC,IAAAA,IAAI,EAAC;AAA9C,KAAP;AACD,CAR8C;;;ACNjD,IAAM7C,cAAc,GAAG,KAAvB;IAEamD,GAAG,GAAG,SAANA,GAAM;MACjB9C,iBAAAA;MACAY,gBAAAA;MACAK,eAAAA;MACAhB,UAAAA;MACGC;;AAEH,MAAMC,OAAO,GAAsBF,EAAE,IAAIN,cAAzC;AACA,MAAMoD,aAAa,GAAGlD,yBAAK,CAACmD,QAAN,CAAeC,OAAf,CAAuBrC,QAAvB,CAAtB;AACA,MAAMsC,cAAc,GAClBH,aAAa,CAACI,MAAd,GAAuB,CAAvB,IAA4B,OAAOJ,aAAa,CAAC,CAAD,CAApB,KAA4B,QAD1D;AAEA,MAAMK,eAAe,GACnBL,aAAa,CAACI,MAAd,GAAuB,CAAvB,IACA,OAAOJ,aAAa,CAACA,aAAa,CAACI,MAAd,GAAuB,CAAxB,CAApB,KAAmD,QAFrD;AAIA,SACEtD,uCAAA,CAACM,OAAD;AACEH,IAAAA,SAAS,EAAEO,8BAAU,CAAC,SAAD,EAAYP,SAAZ,EAAuB;AAC1C,+BAAyBkD,cADiB;AAE1C,gCAA0BE,eAFgB;AAG1C,0BAAoBnC;AAHsB,KAAvB;AADvB,KAMMf,IANN,GAQGU,QARH,CADF;AAYD;;AC/CDyC,4BAAsB,CAAC,QAAD,EAAW,YAAX,CAAtB;;;;;;;;;;;;;;"}
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\">{titleIcon}</div>\n )}\n <span className=\"eds-navigation-card__title\">\n {compact && titleIcon && (\n <span className=\"eds-navigation-card__title-icon-compact\">\n {titleIcon}\n </span>\n )}\n <Heading3 as=\"span\">{title}</Heading3>\n </span>\n {!compact && (\n <>\n <Paragraph>{children}</Paragraph>\n {externalLink && (\n <ExternalIcon className=\"eds-navigation-card__external--not-compact\" />\n )}\n </>\n )}\n {compact && externalLink && (\n <ExternalIcon className=\"eds-navigattion-card__icon eds-navigation-card__external--compact\" />\n )}\n {compact && !externalLink && (\n <ForwardIcon className=\"eds-navigattion-card__icon eds-navigation-card__arrow-icon\" />\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 { 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 /** Gjør hele kortet til \"as\"-elementet. Default er kun tekstområdet. Anbefales hvis media er et bilde\n * @default false\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 wholeCardAsElement: whole,\n ...rest\n}: MediaCardProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classNames('eds-base-card', 'eds-media-card', className);\n\n const wrapperElement = whole ? Element : 'div';\n const wrapperProps = whole ? rest : {};\n const innerProps = whole ? {} : rest;\n const InnerElement = whole ? 'div' : Element;\n return (\n <BaseCard\n as={wrapperElement}\n className={classList}\n style={style}\n {...wrapperProps}\n >\n <div className=\"eds-media-card__media\">{children}</div>\n <InnerElement className=\"eds-media-card__text\" {...innerProps}>\n {category && (\n <Label className=\"eds-media-card__category\">{category}</Label>\n )}\n <div className=\"eds-media-card__title\">{title}</div>\n <Paragraph>{description}</Paragraph>\n <ForwardIcon className=\"eds-media-card__arrow-icon\" />\n </InnerElement>\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};\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 '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","whole","wholeCardAsElement","wrapperElement","wrapperProps","innerProps","InnerElement","Label","Badge","max","variant","showZero","invisible","invisibleProp","type","displayValue","BulletBadge","props","NotificationBadge","StatusBadge","Tag","childrenArray","Children","toArray","hasLeadingIcon","length","hasTrailingIcon","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;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K,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,OACEzD,yBAAC,CAAAW,aAAA,CAAAJ,OAAO,EAAA,QAAA,CAAA;AACNJ,IAAAA,SAAS,EAAES,8BAAU,CAAC,SAAS,EAAET,SAAS,EAAE;AAC1C,MAAA,uBAAuB,EAAEqD,cAAc;AACvC,MAAA,wBAAwB,EAAEE,eAAe;AACzC,MAAA,kBAAkB,EAAEpC,OAAAA;KACrB,CAAA;GACGjB,EAAAA,IAAI,CAEPY,EAAAA,QAAQ,CACD,CAAA;AAEd;;AC/CA0C,4BAAsB,CAAC,QAAQ,EAAE,YAAY,CAAC;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),a=require("react"),t=require("classnames"),r=require("@entur/typography"),n=require("@entur/icons");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(a),d=s(t);function c(){return c=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},c.apply(this,arguments)}function i(e,a){if(null==e)return{};var t,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)a.indexOf(t=s[r])>=0||(n[t]=e[t]);return n}var o=["className","as"],u=l.default.forwardRef((function(e,a){var t=e.className,r=e.as,n=i(e,o);return l.default.createElement(f.Provider,{value:!0},l.default.createElement(r||"div",c({className:d.default("eds-contrast",t),ref:a},n)))})),f=l.default.createContext(!1),m=["children","className","as"],p=function(e){var a=e.children,t=e.className,r=e.as,n=i(e,m),s=r||"div",o=d.default("eds-base-card",t);return l.default.createElement(s,c({className:o},n),a)},v=["title","children","titleIcon","compact","className","externalLink","as"],g=["title","description","children","className","category","style","as","wholeCardAsElement"],N=["children","className","max","variant","showZero","invisible","as","type"],E=l.default.forwardRef((function(e,a){var t,r=e.children,n=e.max,s=void 0===n?99:n,o=e.variant,u=e.showZero,f=void 0!==u&&u,m=e.invisible,p=void 0!==m&&m,v=e.as,g=e.type,E=void 0===g?"status":g,y=i(e,N),_=v||"span",h=p;!1!==p||(0!==r||f)&&null!=r||(h=!0),t="number"==typeof r&&r>s?s+"+":r;var x=d.default("eds-badge",{"eds-badge--invisible":h,"eds-badge--show-zero":f},"eds-badge--variant-"+o,"eds-badge--type-"+E);return l.default.createElement(_,c({className:x,ref:a},y),t)})),y=l.default.forwardRef((function(e,a){return l.default.createElement(E,c({as:e.as||"span"},e,{ref:a,type:"bullet"}))})),_=l.default.forwardRef((function(e,a){return l.default.createElement(E,c({as:e.as||"span"},e,{ref:a,type:"notification"}))})),h=l.default.forwardRef((function(e,a){return l.default.createElement(E,c({as:e.as||"span"},e,{ref:a,type:"status"}))})),x=["className","children","compact","as"];e.warnAboutMissingStyles("layout","typography"),exports.Badge=E,exports.BaseCard=p,exports.BulletBadge=y,exports.Contrast=u,exports.ContrastContext=f,exports.MediaCard=function(e){var a=e.title,t=e.description,s=e.children,o=e.className,u=e.category,f=e.style,m=e.as,v=e.wholeCardAsElement,N=i(e,g),E=m||"a",y=d.default("eds-base-card","eds-media-card",o),_=v?{}:N,h=v?"div":E;return l.default.createElement(p,c({as:v?E:"div",className:y,style:f},v?N:{}),l.default.createElement("div",{className:"eds-media-card__media"},s),l.default.createElement(h,c({className:"eds-media-card__text"},_),u&&l.default.createElement(r.Label,{className:"eds-media-card__category"},u),l.default.createElement("div",{className:"eds-media-card__title"},a),l.default.createElement(r.Paragraph,null,t),l.default.createElement(n.ForwardIcon,{className:"eds-media-card__arrow-icon"})))},exports.NavigationCard=function(e){var a=e.title,t=e.children,s=e.titleIcon,o=e.compact,u=void 0!==o&&o,f=e.className,m=e.externalLink,g=void 0!==m&&m,N=e.as,E=i(e,v),y=N||"a",_=d.default("eds-navigation-card",f,{"eds-base-card--red-line":u,"eds-navigation-card--compact":u});return l.default.createElement(p,c({as:y,className:_},E),!u&&s&&l.default.createElement("div",{className:"eds-navigation-card__title-icon"},s),l.default.createElement("span",{className:"eds-navigation-card__title"},u&&s&&l.default.createElement("span",{className:"eds-navigation-card__title-icon-compact"},s),l.default.createElement(r.Heading3,{as:"span"},a)),!u&&l.default.createElement(l.default.Fragment,null,l.default.createElement(r.Paragraph,null,t),g&&l.default.createElement(n.ExternalIcon,{className:"eds-navigation-card__external--not-compact"})),u&&g&&l.default.createElement(n.ExternalIcon,{className:"eds-navigattion-card__icon eds-navigation-card__external--compact"}),u&&!g&&l.default.createElement(n.ForwardIcon,{className:"eds-navigattion-card__icon eds-navigation-card__arrow-icon"}))},exports.NotificationBadge=_,exports.StatusBadge=h,exports.Tag=function(e){var a=e.className,t=e.children,r=e.compact,n=e.as,s=i(e,x),o=n||"div",u=l.default.Children.toArray(t);return l.default.createElement(o,c({className:d.default("eds-tag",a,{"eds-tag--leading-icon":u.length>1&&"string"!=typeof u[0],"eds-tag--trailing-icon":u.length>1&&"string"!=typeof u[u.length-1],"eds-tag--compact":r})},s),t)},exports.useContrast=function(){return l.default.useContext(f)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),a=require("react"),t=require("classnames"),r=require("@entur/typography"),n=require("@entur/icons");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(a),d=s(t);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},c.apply(this,arguments)}function i(e,a){if(null==e)return{};var t,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)a.indexOf(t=s[r])>=0||(n[t]=e[t]);return n}var o=["className","as"],u=l.default.forwardRef((function(e,a){var t=e.className,r=e.as,n=i(e,o);return l.default.createElement(f.Provider,{value:!0},l.default.createElement(r||"div",c({className:d.default("eds-contrast",t),ref:a},n)))})),f=l.default.createContext(!1),m=["children","className","as"],p=function(e){var a=e.children,t=e.className,r=e.as,n=i(e,m),s=r||"div",o=d.default("eds-base-card",t);return l.default.createElement(s,c({className:o},n),a)},v=["title","children","titleIcon","compact","className","externalLink","as"],g=["title","description","children","className","category","style","as","wholeCardAsElement"],N=["children","className","max","variant","showZero","invisible","as","type"],E=l.default.forwardRef((function(e,a){var t,r=e.children,n=e.max,s=void 0===n?99:n,o=e.variant,u=e.showZero,f=void 0!==u&&u,m=e.invisible,p=void 0!==m&&m,v=e.as,g=e.type,E=void 0===g?"status":g,y=i(e,N),_=v||"span",h=p;!1!==p||(0!==r||f)&&null!=r||(h=!0),t="number"==typeof r&&r>s?s+"+":r;var x=d.default("eds-badge",{"eds-badge--invisible":h,"eds-badge--show-zero":f},"eds-badge--variant-"+o,"eds-badge--type-"+E);return l.default.createElement(_,c({className:x,ref:a},y),t)})),y=l.default.forwardRef((function(e,a){return l.default.createElement(E,c({as:e.as||"span"},e,{ref:a,type:"bullet"}))})),_=l.default.forwardRef((function(e,a){return l.default.createElement(E,c({as:e.as||"span"},e,{ref:a,type:"notification"}))})),h=l.default.forwardRef((function(e,a){return l.default.createElement(E,c({as:e.as||"span"},e,{ref:a,type:"status"}))})),x=["className","children","compact","as"];e.warnAboutMissingStyles("layout","typography"),exports.Badge=E,exports.BaseCard=p,exports.BulletBadge=y,exports.Contrast=u,exports.ContrastContext=f,exports.MediaCard=function(e){var a=e.title,t=e.description,s=e.children,o=e.className,u=e.category,f=e.style,m=e.as,v=e.wholeCardAsElement,N=i(e,g),E=m||"a",y=d.default("eds-base-card","eds-media-card",o),_=v?{}:N,h=v?"div":E;return l.default.createElement(p,c({as:v?E:"div",className:y,style:f},v?N:{}),l.default.createElement("div",{className:"eds-media-card__media"},s),l.default.createElement(h,c({className:"eds-media-card__text"},_),u&&l.default.createElement(r.Label,{className:"eds-media-card__category"},u),l.default.createElement("div",{className:"eds-media-card__title"},a),l.default.createElement(r.Paragraph,null,t),l.default.createElement(n.ForwardIcon,{className:"eds-media-card__arrow-icon"})))},exports.NavigationCard=function(e){var a=e.title,t=e.children,s=e.titleIcon,o=e.compact,u=void 0!==o&&o,f=e.className,m=e.externalLink,g=void 0!==m&&m,N=e.as,E=i(e,v),y=N||"a",_=d.default("eds-navigation-card",f,{"eds-base-card--red-line":u,"eds-navigation-card--compact":u});return l.default.createElement(p,c({as:y,className:_},E),!u&&s&&l.default.createElement("div",{className:"eds-navigation-card__title-icon"},s),l.default.createElement("span",{className:"eds-navigation-card__title"},u&&s&&l.default.createElement("span",{className:"eds-navigation-card__title-icon-compact"},s),l.default.createElement(r.Heading3,{as:"span"},a)),!u&&l.default.createElement(l.default.Fragment,null,l.default.createElement(r.Paragraph,null,t),g&&l.default.createElement(n.ExternalIcon,{className:"eds-navigation-card__external--not-compact"})),u&&g&&l.default.createElement(n.ExternalIcon,{className:"eds-navigattion-card__icon eds-navigation-card__external--compact"}),u&&!g&&l.default.createElement(n.ForwardIcon,{className:"eds-navigattion-card__icon eds-navigation-card__arrow-icon"}))},exports.NotificationBadge=_,exports.StatusBadge=h,exports.Tag=function(e){var a=e.className,t=e.children,r=e.compact,n=e.as,s=i(e,x),o=n||"div",u=l.default.Children.toArray(t);return l.default.createElement(o,c({className:d.default("eds-tag",a,{"eds-tag--leading-icon":u.length>1&&"string"!=typeof u[0],"eds-tag--trailing-icon":u.length>1&&"string"!=typeof u[u.length-1],"eds-tag--compact":r})},s),t)},exports.useContrast=function(){return l.default.useContext(f)};
2
2
  //# sourceMappingURL=layout.cjs.production.min.js.map