@entur/typography 1.9.12 → 1.9.13-beta.1

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.
@@ -1,368 +1,416 @@
1
- import { warnAboutMissingStyles } from '@entur/utils';
2
- import React from 'react';
3
- import classNames from 'classnames';
4
- import { ExternalIcon } from '@entur/icons';
5
-
6
- function _extends() {
7
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
8
- for (var e = 1; e < arguments.length; e++) {
9
- var t = arguments[e];
10
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
1
+ import { warnAboutMissingStyles } from "@entur/utils";
2
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
+ import classNames from "classnames";
4
+ import { ExternalIcon } from "@entur/icons";
5
+ const Blockquote = ({ className, ref, ...rest }) => {
6
+ return /* @__PURE__ */ jsx(
7
+ "blockquote",
8
+ {
9
+ className: classNames("eds-blockquote", className),
10
+ ref,
11
+ ...rest
11
12
  }
12
- return n;
13
- }, _extends.apply(null, arguments);
14
- }
15
- function _objectWithoutPropertiesLoose(r, e) {
16
- if (null == r) return {};
17
- var t = {};
18
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
19
- if (e.includes(n)) continue;
20
- t[n] = r[n];
21
- }
22
- return t;
23
- }
24
-
25
- var _excluded$l = ["className", "ref"],
26
- _excluded2 = ["className"];
27
- var Blockquote = function Blockquote(_ref) {
28
- var className = _ref.className,
29
- ref = _ref.ref,
30
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$l);
31
- return React.createElement("blockquote", _extends({
32
- className: classNames('eds-blockquote', className),
33
- ref: ref
34
- }, rest));
35
- };
36
- var BlockquoteFooter = function BlockquoteFooter(_ref2) {
37
- var className = _ref2.className,
38
- rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
39
- return React.createElement("footer", _extends({
40
- className: classNames('eds-blockquote__footer', className)
41
- }, rest));
13
+ );
42
14
  };
43
-
44
- var _excluded$k = ["className", "as"];
45
- var defaultElement$h = 'code';
46
- var CodeText = function CodeText(_ref) {
47
- var className = _ref.className,
48
- as = _ref.as,
49
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
50
- var Element = as || defaultElement$h;
51
- return React.createElement(Element, _extends({
52
- className: classNames('eds-code-text', className)
53
- }, rest));
54
- };
55
-
56
- var _excluded$j = ["className", "margin", "as"];
57
- var defaultElement$g = 'em';
58
- var EmphasizedText = function EmphasizedText(_ref) {
59
- var _classNames;
60
- var className = _ref.className,
61
- _ref$margin = _ref.margin,
62
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
63
- as = _ref.as,
64
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
65
- var Element = as || defaultElement$g;
66
- return React.createElement(Element, _extends({
67
- className: classNames('eds-emphasized-text', (_classNames = {}, _classNames["eds-emphasized-text--margin-top"] = margin === 'top', _classNames["eds-emphasized-text--margin-bottom"] = margin === 'bottom', _classNames["eds-emphasized-text--margin-none"] = margin === 'none', _classNames), className)
68
- }, rest));
15
+ const BlockquoteFooter = ({ className, ...rest }) => {
16
+ return /* @__PURE__ */ jsx(
17
+ "footer",
18
+ {
19
+ className: classNames("eds-blockquote__footer", className),
20
+ ...rest
21
+ }
22
+ );
69
23
  };
70
-
71
- var _excluded$i = ["className", "level", "margin", "as"];
72
- var defaultElement$f = 'h1';
73
- var BaseHeading = function BaseHeading(_ref) {
74
- var _classNames;
75
- var className = _ref.className,
76
- level = _ref.level,
77
- margin = _ref.margin,
78
- as = _ref.as,
79
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$i);
80
- var Element = as || defaultElement$f;
81
- var baseClass = "eds-h" + level;
82
- return React.createElement(Element, _extends({
83
- className: classNames(baseClass, (_classNames = {}, _classNames[baseClass + "--margin-top"] = margin === 'top', _classNames[baseClass + "--margin-bottom"] = margin === 'bottom', _classNames[baseClass + "--margin-none"] = margin === 'none', _classNames), className)
84
- }, rest));
24
+ const defaultElement$h = "code";
25
+ const CodeText = ({
26
+ className,
27
+ as,
28
+ ...rest
29
+ }) => {
30
+ const Element = as || defaultElement$h;
31
+ return /* @__PURE__ */ jsx(Element, { className: classNames("eds-code-text", className), ...rest });
85
32
  };
86
-
87
- var _excluded$h = ["margin", "children", "as"];
88
- var defaultElement$e = 'h1';
89
- var Heading1 = function Heading1(_ref) {
90
- var _ref$margin = _ref.margin,
91
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
92
- children = _ref.children,
93
- as = _ref.as,
94
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$h);
95
- var Element = as || defaultElement$e;
96
- return React.createElement(BaseHeading, _extends({
97
- as: Element,
98
- margin: margin
99
- }, rest, {
100
- level: 1
101
- }), children);
33
+ const defaultElement$g = "em";
34
+ const EmphasizedText = ({
35
+ className,
36
+ margin = "both",
37
+ as,
38
+ ...rest
39
+ }) => {
40
+ const Element = as || defaultElement$g;
41
+ return /* @__PURE__ */ jsx(
42
+ Element,
43
+ {
44
+ className: classNames(
45
+ "eds-emphasized-text",
46
+ {
47
+ [`eds-emphasized-text--margin-top`]: margin === "top",
48
+ [`eds-emphasized-text--margin-bottom`]: margin === "bottom",
49
+ [`eds-emphasized-text--margin-none`]: margin === "none"
50
+ },
51
+ className
52
+ ),
53
+ ...rest
54
+ }
55
+ );
102
56
  };
103
-
104
- var _excluded$g = ["margin", "children", "as"];
105
- var defaultElement$d = 'h2';
106
- var Heading2 = function Heading2(_ref) {
107
- var _ref$margin = _ref.margin,
108
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
109
- children = _ref.children,
110
- as = _ref.as,
111
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
112
- var Element = as || defaultElement$d;
113
- return React.createElement(BaseHeading, _extends({
114
- as: Element,
115
- margin: margin
116
- }, rest, {
117
- level: 2
118
- }), children);
57
+ const defaultElement$f = "h1";
58
+ const BaseHeading = ({
59
+ className,
60
+ level,
61
+ margin,
62
+ as,
63
+ ...rest
64
+ }) => {
65
+ const Element = as || defaultElement$f;
66
+ const baseClass = `eds-h${level}`;
67
+ return /* @__PURE__ */ jsx(
68
+ Element,
69
+ {
70
+ className: classNames(
71
+ baseClass,
72
+ {
73
+ [`${baseClass}--margin-top`]: margin === "top",
74
+ [`${baseClass}--margin-bottom`]: margin === "bottom",
75
+ [`${baseClass}--margin-none`]: margin === "none"
76
+ },
77
+ className
78
+ ),
79
+ ...rest
80
+ }
81
+ );
119
82
  };
120
-
121
- var _excluded$f = ["margin", "children", "as"];
122
- var defaultElement$c = 'h3';
123
- var Heading3 = function Heading3(_ref) {
124
- var _ref$margin = _ref.margin,
125
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
126
- children = _ref.children,
127
- as = _ref.as,
128
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
129
- var Element = as || defaultElement$c;
130
- return React.createElement(BaseHeading, _extends({
131
- as: Element,
132
- margin: margin
133
- }, rest, {
134
- level: 3
135
- }), children);
83
+ const defaultElement$e = "h1";
84
+ const Heading1 = ({
85
+ margin = "both",
86
+ children,
87
+ as,
88
+ ...rest
89
+ }) => {
90
+ const Element = as || defaultElement$e;
91
+ return /* @__PURE__ */ jsx(BaseHeading, { as: Element, margin, ...rest, level: 1, children });
136
92
  };
137
-
138
- var _excluded$e = ["margin", "children", "as"];
139
- var defaultElement$b = 'h4';
140
- var Heading4 = function Heading4(_ref) {
141
- var _ref$margin = _ref.margin,
142
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
143
- children = _ref.children,
144
- as = _ref.as,
145
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
146
- var Element = as || defaultElement$b;
147
- return React.createElement(BaseHeading, _extends({
148
- as: Element,
149
- margin: margin
150
- }, rest, {
151
- level: 4
152
- }), children);
93
+ const defaultElement$d = "h2";
94
+ const Heading2 = ({
95
+ margin = "both",
96
+ children,
97
+ as,
98
+ ...rest
99
+ }) => {
100
+ const Element = as || defaultElement$d;
101
+ return /* @__PURE__ */ jsx(BaseHeading, { as: Element, margin, ...rest, level: 2, children });
153
102
  };
154
-
155
- var _excluded$d = ["margin", "children", "as"];
156
- var defaultElement$a = 'h5';
157
- var Heading5 = function Heading5(_ref) {
158
- var _ref$margin = _ref.margin,
159
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
160
- children = _ref.children,
161
- as = _ref.as,
162
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
163
- var Element = as || defaultElement$a;
164
- return React.createElement(BaseHeading, _extends({
165
- as: Element,
166
- margin: margin
167
- }, rest, {
168
- level: 5
169
- }), children);
103
+ const defaultElement$c = "h3";
104
+ const Heading3 = ({
105
+ margin = "both",
106
+ children,
107
+ as,
108
+ ...rest
109
+ }) => {
110
+ const Element = as || defaultElement$c;
111
+ return /* @__PURE__ */ jsx(BaseHeading, { as: Element, margin, ...rest, level: 3, children });
170
112
  };
171
-
172
- var _excluded$c = ["margin", "children", "as"];
173
- var defaultElement$9 = 'h6';
174
- var Heading6 = function Heading6(_ref) {
175
- var _ref$margin = _ref.margin,
176
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
177
- children = _ref.children,
178
- as = _ref.as,
179
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
180
- var Element = as || defaultElement$9;
181
- return React.createElement(BaseHeading, _extends({
182
- as: Element,
183
- margin: margin
184
- }, rest, {
185
- level: 6
186
- }), children);
113
+ const defaultElement$b = "h4";
114
+ const Heading4 = ({
115
+ margin = "both",
116
+ children,
117
+ as,
118
+ ...rest
119
+ }) => {
120
+ const Element = as || defaultElement$b;
121
+ return /* @__PURE__ */ jsx(BaseHeading, { as: Element, margin, ...rest, level: 4, children });
187
122
  };
188
-
189
- var _excluded$b = ["className", "margin", "as"];
190
- var defaultElement$8 = 'label';
191
- var Label = function Label(_ref) {
192
- var _classNames;
193
- var className = _ref.className,
194
- _ref$margin = _ref.margin,
195
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
196
- as = _ref.as,
197
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
198
- var Element = as || defaultElement$8;
199
- return React.createElement(Element, _extends({
200
- className: classNames('eds-label', (_classNames = {}, _classNames["eds-label--margin-top"] = margin === 'top', _classNames["eds-label--margin-bottom"] = margin === 'bottom', _classNames["eds-label--margin-none"] = margin === 'none', _classNames), className)
201
- }, rest));
123
+ const defaultElement$a = "h5";
124
+ const Heading5 = ({
125
+ margin = "both",
126
+ children,
127
+ as,
128
+ ...rest
129
+ }) => {
130
+ const Element = as || defaultElement$a;
131
+ return /* @__PURE__ */ jsx(BaseHeading, { as: Element, margin, ...rest, level: 5, children });
202
132
  };
203
-
204
- var _excluded$a = ["className", "margin", "as"];
205
- var defaultElement$7 = 'p';
206
- var LeadParagraph = function LeadParagraph(_ref) {
207
- var _classNames;
208
- var className = _ref.className,
209
- _ref$margin = _ref.margin,
210
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
211
- as = _ref.as,
212
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
213
- var Element = as || defaultElement$7;
214
- return React.createElement(Element, _extends({
215
- className: classNames('eds-lead-paragraph', (_classNames = {}, _classNames["eds-lead-paragraph--margin-top"] = margin === 'top', _classNames["eds-lead-paragraph--margin-bottom"] = margin === 'bottom', _classNames["eds-lead-paragraph--margin-none"] = margin === 'none', _classNames), className)
216
- }, rest));
133
+ const defaultElement$9 = "h6";
134
+ const Heading6 = ({
135
+ margin = "both",
136
+ children,
137
+ as,
138
+ ...rest
139
+ }) => {
140
+ const Element = as || defaultElement$9;
141
+ return /* @__PURE__ */ jsx(BaseHeading, { as: Element, margin, ...rest, level: 6, children });
217
142
  };
218
-
219
- var _excluded$9 = ["external", "ariaLabelExternalIcon", "className", "margin", "children", "as"];
220
- var defaultElement$6 = 'a';
221
- var Link = function Link(_ref) {
222
- var _classNames;
223
- var _ref$external = _ref.external,
224
- external = _ref$external === void 0 ? false : _ref$external,
225
- _ref$ariaLabelExterna = _ref.ariaLabelExternalIcon,
226
- ariaLabelExternalIcon = _ref$ariaLabelExterna === void 0 ? '(ekstern lenke)' : _ref$ariaLabelExterna,
227
- className = _ref.className,
228
- _ref$margin = _ref.margin,
229
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
230
- children = _ref.children,
231
- as = _ref.as,
232
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
233
- var Element = as || defaultElement$6;
234
- return React.createElement(Element, _extends({
235
- className: classNames('eds-link', (_classNames = {}, _classNames["eds-link--margin-top"] = margin === 'top', _classNames["eds-link--margin-bottom"] = margin === 'bottom', _classNames["eds-link--margin-none"] = margin === 'none', _classNames), className)
236
- }, rest), children, external ? React.createElement(ExternalIcon, {
237
- className: "eds-link--ext-icon",
238
- "aria-label": ariaLabelExternalIcon
239
- }) : React.createElement(React.Fragment, null));
143
+ const defaultElement$8 = "label";
144
+ const Label = ({
145
+ className,
146
+ margin = "both",
147
+ as,
148
+ ...rest
149
+ }) => {
150
+ const Element = as || defaultElement$8;
151
+ return /* @__PURE__ */ jsx(
152
+ Element,
153
+ {
154
+ className: classNames(
155
+ "eds-label",
156
+ {
157
+ [`eds-label--margin-top`]: margin === "top",
158
+ [`eds-label--margin-bottom`]: margin === "bottom",
159
+ [`eds-label--margin-none`]: margin === "none"
160
+ },
161
+ className
162
+ ),
163
+ ...rest
164
+ }
165
+ );
240
166
  };
241
-
242
- var _excluded$8 = ["className", "margin", "as"];
243
- var defaultElement$5 = 'strong';
244
- var StrongText = function StrongText(_ref) {
245
- var _classNames;
246
- var className = _ref.className,
247
- _ref$margin = _ref.margin,
248
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
249
- as = _ref.as,
250
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
251
- var Element = as || defaultElement$5;
252
- return React.createElement(Element, _extends({
253
- className: classNames('eds-strong-text', (_classNames = {}, _classNames["eds-strong-text--margin-top"] = margin === 'top', _classNames["eds-strong-text--margin-bottom"] = margin === 'bottom', _classNames["eds-strong-text--margin-none"] = margin === 'none', _classNames), className)
254
- }, rest));
167
+ const defaultElement$7 = "p";
168
+ const LeadParagraph = ({
169
+ className,
170
+ margin = "both",
171
+ as,
172
+ ...rest
173
+ }) => {
174
+ const Element = as || defaultElement$7;
175
+ return /* @__PURE__ */ jsx(
176
+ Element,
177
+ {
178
+ className: classNames(
179
+ "eds-lead-paragraph",
180
+ {
181
+ [`eds-lead-paragraph--margin-top`]: margin === "top",
182
+ [`eds-lead-paragraph--margin-bottom`]: margin === "bottom",
183
+ [`eds-lead-paragraph--margin-none`]: margin === "none"
184
+ },
185
+ className
186
+ ),
187
+ ...rest
188
+ }
189
+ );
255
190
  };
256
-
257
- var _excluded$7 = ["children", "className", "title"];
258
- var ListItem = function ListItem(_ref) {
259
- var children = _ref.children,
260
- className = _ref.className,
261
- title = _ref.title,
262
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
263
- return React.createElement("li", _extends({
264
- className: classNames('eds-list-item', className)
265
- }, rest), title && React.createElement(StrongText, {
266
- className: "eds-list-item__title"
267
- }, title), children);
191
+ const defaultElement$6 = "a";
192
+ const Link = ({
193
+ external = false,
194
+ ariaLabelExternalIcon = "(ekstern lenke)",
195
+ className,
196
+ margin = "both",
197
+ children,
198
+ as,
199
+ ...rest
200
+ }) => {
201
+ const Element = as || defaultElement$6;
202
+ return /* @__PURE__ */ jsxs(
203
+ Element,
204
+ {
205
+ className: classNames(
206
+ "eds-link",
207
+ {
208
+ [`eds-link--margin-top`]: margin === "top",
209
+ [`eds-link--margin-bottom`]: margin === "bottom",
210
+ [`eds-link--margin-none`]: margin === "none"
211
+ },
212
+ className
213
+ ),
214
+ ...rest,
215
+ children: [
216
+ children,
217
+ external ? /* @__PURE__ */ jsx(
218
+ ExternalIcon,
219
+ {
220
+ className: "eds-link--ext-icon",
221
+ "aria-label": ariaLabelExternalIcon
222
+ }
223
+ ) : /* @__PURE__ */ jsx(Fragment, {})
224
+ ]
225
+ }
226
+ );
268
227
  };
269
-
270
- var _excluded$6 = ["className", "type"];
271
- var NumberedList = function NumberedList(_ref) {
272
- var _classNames;
273
- var className = _ref.className,
274
- _ref$type = _ref.type,
275
- type = _ref$type === void 0 ? '1' : _ref$type,
276
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
277
- return React.createElement("ol", _extends({
278
- className: classNames('eds-numbered-list', (_classNames = {}, _classNames["eds-numbered-list--type-" + type] = type, _classNames), className),
279
- type: type
280
- }, rest));
228
+ const defaultElement$5 = "strong";
229
+ const StrongText = ({
230
+ className,
231
+ margin = "both",
232
+ as,
233
+ ...rest
234
+ }) => {
235
+ const Element = as || defaultElement$5;
236
+ return /* @__PURE__ */ jsx(
237
+ Element,
238
+ {
239
+ className: classNames(
240
+ "eds-strong-text",
241
+ {
242
+ [`eds-strong-text--margin-top`]: margin === "top",
243
+ [`eds-strong-text--margin-bottom`]: margin === "bottom",
244
+ [`eds-strong-text--margin-none`]: margin === "none"
245
+ },
246
+ className
247
+ ),
248
+ ...rest
249
+ }
250
+ );
281
251
  };
282
-
283
- var _excluded$5 = ["margin", "className", "as"];
284
- var defaultElement$4 = 'p';
285
- var Paragraph = function Paragraph(_ref) {
286
- var _ref$margin = _ref.margin,
287
- margin = _ref$margin === void 0 ? 'bottom' : _ref$margin,
288
- className = _ref.className,
289
- as = _ref.as,
290
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
291
- var Element = as || defaultElement$4;
292
- return React.createElement(Element, _extends({
293
- className: classNames('eds-paragraph', {
294
- 'eds-paragraph--margin-bottom': margin === 'bottom',
295
- 'eds-paragraph--margin-none': margin === 'none'
296
- }, className)
297
- }, rest));
252
+ const ListItem = ({
253
+ children,
254
+ className,
255
+ title,
256
+ ...rest
257
+ }) => /* @__PURE__ */ jsxs("li", { className: classNames("eds-list-item", className), ...rest, children: [
258
+ title && /* @__PURE__ */ jsx(StrongText, { className: "eds-list-item__title", children: title }),
259
+ children
260
+ ] });
261
+ const NumberedList = ({
262
+ className,
263
+ type = "1",
264
+ ...rest
265
+ }) => /* @__PURE__ */ jsx(
266
+ "ol",
267
+ {
268
+ className: classNames(
269
+ "eds-numbered-list",
270
+ { [`eds-numbered-list--type-${type}`]: type },
271
+ className
272
+ ),
273
+ type,
274
+ ...rest
275
+ }
276
+ );
277
+ const defaultElement$4 = "p";
278
+ const Paragraph = ({
279
+ margin = "bottom",
280
+ className,
281
+ as,
282
+ ...rest
283
+ }) => {
284
+ const Element = as || defaultElement$4;
285
+ return /* @__PURE__ */ jsx(
286
+ Element,
287
+ {
288
+ className: classNames(
289
+ "eds-paragraph",
290
+ {
291
+ "eds-paragraph--margin-bottom": margin === "bottom",
292
+ "eds-paragraph--margin-none": margin === "none"
293
+ },
294
+ className
295
+ ),
296
+ ...rest
297
+ }
298
+ );
298
299
  };
299
-
300
- var _excluded$4 = ["className", "as"];
301
- var defaultElement$3 = 'pre';
302
- var PreformattedText = function PreformattedText(_ref) {
303
- var className = _ref.className,
304
- as = _ref.as,
305
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
306
- var Element = as || defaultElement$3;
307
- return React.createElement(Element, _extends({
308
- className: classNames('eds-preformatted-text', className)
309
- }, rest));
300
+ const defaultElement$3 = "pre";
301
+ const PreformattedText = ({
302
+ className,
303
+ as,
304
+ ...rest
305
+ }) => {
306
+ const Element = as || defaultElement$3;
307
+ return /* @__PURE__ */ jsx(
308
+ Element,
309
+ {
310
+ className: classNames("eds-preformatted-text", className),
311
+ ...rest
312
+ }
313
+ );
310
314
  };
311
-
312
- var _excluded$3 = ["className", "margin", "as"];
313
- var defaultElement$2 = 'span';
314
- var SmallText = function SmallText(_ref) {
315
- var _classNames;
316
- var className = _ref.className,
317
- _ref$margin = _ref.margin,
318
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
319
- as = _ref.as,
320
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
321
- var Element = as || defaultElement$2;
322
- return React.createElement(Element, _extends({
323
- className: classNames('eds-small-text', (_classNames = {}, _classNames["eds-small-text--margin-top"] = margin === 'top', _classNames["eds-small-text--margin-bottom"] = margin === 'bottom', _classNames["eds-small-text--margin-none"] = margin === 'none', _classNames), className)
324
- }, rest));
315
+ const defaultElement$2 = "span";
316
+ const SmallText = ({
317
+ className,
318
+ margin = "both",
319
+ as,
320
+ ...rest
321
+ }) => {
322
+ const Element = as || defaultElement$2;
323
+ return /* @__PURE__ */ jsx(
324
+ Element,
325
+ {
326
+ className: classNames(
327
+ "eds-small-text",
328
+ {
329
+ [`eds-small-text--margin-top`]: margin === "top",
330
+ [`eds-small-text--margin-bottom`]: margin === "bottom",
331
+ [`eds-small-text--margin-none`]: margin === "none"
332
+ },
333
+ className
334
+ ),
335
+ ...rest
336
+ }
337
+ );
325
338
  };
326
-
327
- var _excluded$2 = ["className", "margin", "as"];
328
- var defaultElement$1 = 'span';
329
- var SubLabel = function SubLabel(_ref) {
330
- var _classNames;
331
- var className = _ref.className,
332
- _ref$margin = _ref.margin,
333
- margin = _ref$margin === void 0 ? 'both' : _ref$margin,
334
- as = _ref.as,
335
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
336
- var Element = as || defaultElement$1;
337
- return React.createElement(Element, _extends({
338
- className: classNames('eds-sub-label', (_classNames = {}, _classNames["eds-sub-label--margin-top"] = margin === 'top', _classNames["eds-sub-label--margin-bottom"] = margin === 'bottom', _classNames["eds-sub-label--margin-none"] = margin === 'none', _classNames), className)
339
- }, rest));
339
+ const defaultElement$1 = "span";
340
+ const SubLabel = ({
341
+ className,
342
+ margin = "both",
343
+ as,
344
+ ...rest
345
+ }) => {
346
+ const Element = as || defaultElement$1;
347
+ return /* @__PURE__ */ jsx(
348
+ Element,
349
+ {
350
+ className: classNames(
351
+ "eds-sub-label",
352
+ {
353
+ [`eds-sub-label--margin-top`]: margin === "top",
354
+ [`eds-sub-label--margin-bottom`]: margin === "bottom",
355
+ [`eds-sub-label--margin-none`]: margin === "none"
356
+ },
357
+ className
358
+ ),
359
+ ...rest
360
+ }
361
+ );
340
362
  };
341
-
342
- var _excluded$1 = ["className", "margin", "as"];
343
- var defaultElement = 'p';
344
- var SubParagraph = function SubParagraph(_ref) {
345
- var _classNames;
346
- var className = _ref.className,
347
- margin = _ref.margin,
348
- as = _ref.as,
349
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
350
- var Element = as || defaultElement;
351
- return React.createElement(Element, _extends({
352
- className: classNames('eds-sub-paragraph', (_classNames = {}, _classNames["eds-sub-paragraph--margin-top"] = margin === 'top', _classNames["eds-sub-paragraph--margin-bottom"] = margin === 'bottom', _classNames["eds-sub-paragraph--margin-none"] = margin === 'none', _classNames), className)
353
- }, rest));
363
+ const defaultElement = "p";
364
+ const SubParagraph = ({
365
+ className,
366
+ margin,
367
+ as,
368
+ ...rest
369
+ }) => {
370
+ const Element = as || defaultElement;
371
+ return /* @__PURE__ */ jsx(
372
+ Element,
373
+ {
374
+ className: classNames(
375
+ "eds-sub-paragraph",
376
+ {
377
+ [`eds-sub-paragraph--margin-top`]: margin === "top",
378
+ [`eds-sub-paragraph--margin-bottom`]: margin === "bottom",
379
+ [`eds-sub-paragraph--margin-none`]: margin === "none"
380
+ },
381
+ className
382
+ ),
383
+ ...rest
384
+ }
385
+ );
354
386
  };
355
-
356
- var _excluded = ["className"];
357
- var UnorderedList = function UnorderedList(_ref) {
358
- var className = _ref.className,
359
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
360
- return React.createElement("ul", _extends({
361
- className: classNames('eds-unordered-list', className)
362
- }, rest));
387
+ const UnorderedList = ({
388
+ className,
389
+ ...rest
390
+ }) => /* @__PURE__ */ jsx("ul", { className: classNames("eds-unordered-list", className), ...rest });
391
+ warnAboutMissingStyles("typography");
392
+ export {
393
+ Blockquote,
394
+ BlockquoteFooter,
395
+ CodeText,
396
+ EmphasizedText,
397
+ Heading1,
398
+ Heading2,
399
+ Heading3,
400
+ Heading4,
401
+ Heading5,
402
+ Heading6,
403
+ Label,
404
+ LeadParagraph,
405
+ Link,
406
+ ListItem,
407
+ NumberedList,
408
+ Paragraph,
409
+ PreformattedText,
410
+ SmallText,
411
+ StrongText,
412
+ SubLabel,
413
+ SubParagraph,
414
+ UnorderedList
363
415
  };
364
-
365
- warnAboutMissingStyles('typography');
366
-
367
- export { Blockquote, BlockquoteFooter, CodeText, EmphasizedText, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Label, LeadParagraph, Link, ListItem, NumberedList, Paragraph, PreformattedText, SmallText, StrongText, SubLabel, SubParagraph, UnorderedList };
368
416
  //# sourceMappingURL=typography.esm.js.map