@entur/typography 1.10.0-beta.10 → 1.10.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beta/ListItemBeta.d.ts +16 -0
- package/dist/beta/NumberedListBeta.d.ts +16 -0
- package/dist/beta/UnorderedListBeta.d.ts +14 -0
- package/dist/beta/index.d.ts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/styles.css +78 -0
- package/dist/typography.cjs.development.js +103 -52
- package/dist/typography.cjs.development.js.map +1 -1
- package/dist/typography.cjs.production.min.js +1 -1
- package/dist/typography.cjs.production.min.js.map +1 -1
- package/dist/typography.esm.js +101 -53
- package/dist/typography.esm.js.map +1 -1
- package/package.json +2 -2
- package/scripts/migrate-typography.js +74 -17
package/dist/typography.esm.js
CHANGED
|
@@ -22,12 +22,12 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var _excluded$
|
|
25
|
+
var _excluded$s = ["className", "ref"],
|
|
26
26
|
_excluded2$1 = ["className"];
|
|
27
27
|
var Blockquote = function Blockquote(_ref) {
|
|
28
28
|
var className = _ref.className,
|
|
29
29
|
ref = _ref.ref,
|
|
30
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
30
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
31
31
|
return React.createElement("blockquote", _extends({
|
|
32
32
|
className: classNames('eds-blockquote', className),
|
|
33
33
|
ref: ref
|
|
@@ -41,19 +41,19 @@ var BlockquoteFooter = function BlockquoteFooter(_ref2) {
|
|
|
41
41
|
}, rest));
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
var _excluded$
|
|
44
|
+
var _excluded$r = ["className", "as"];
|
|
45
45
|
var defaultElement$h = 'code';
|
|
46
46
|
var CodeText = function CodeText(_ref) {
|
|
47
47
|
var className = _ref.className,
|
|
48
48
|
as = _ref.as,
|
|
49
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
49
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
50
50
|
var Element = as || defaultElement$h;
|
|
51
51
|
return React.createElement(Element, _extends({
|
|
52
52
|
className: classNames('eds-code-text', className)
|
|
53
53
|
}, rest));
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
var _excluded$
|
|
56
|
+
var _excluded$q = ["className", "margin", "as"];
|
|
57
57
|
var defaultElement$g = 'em';
|
|
58
58
|
var EmphasizedText = function EmphasizedText(_ref) {
|
|
59
59
|
var _classNames;
|
|
@@ -61,14 +61,14 @@ var EmphasizedText = function EmphasizedText(_ref) {
|
|
|
61
61
|
_ref$margin = _ref.margin,
|
|
62
62
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
63
63
|
as = _ref.as,
|
|
64
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
64
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
65
65
|
var Element = as || defaultElement$g;
|
|
66
66
|
return React.createElement(Element, _extends({
|
|
67
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
68
|
}, rest));
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
var _excluded$
|
|
71
|
+
var _excluded$p = ["className", "level", "margin", "as"];
|
|
72
72
|
var defaultElement$f = 'h1';
|
|
73
73
|
var BaseHeading = function BaseHeading(_ref) {
|
|
74
74
|
var _classNames;
|
|
@@ -76,7 +76,7 @@ var BaseHeading = function BaseHeading(_ref) {
|
|
|
76
76
|
level = _ref.level,
|
|
77
77
|
margin = _ref.margin,
|
|
78
78
|
as = _ref.as,
|
|
79
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
79
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
80
80
|
var Element = as || defaultElement$f;
|
|
81
81
|
var baseClass = "eds-h" + level;
|
|
82
82
|
return React.createElement(Element, _extends({
|
|
@@ -84,14 +84,14 @@ var BaseHeading = function BaseHeading(_ref) {
|
|
|
84
84
|
}, rest));
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
var _excluded$
|
|
87
|
+
var _excluded$o = ["margin", "children", "as"];
|
|
88
88
|
var defaultElement$e = 'h1';
|
|
89
89
|
var Heading1 = function Heading1(_ref) {
|
|
90
90
|
var _ref$margin = _ref.margin,
|
|
91
91
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
92
92
|
children = _ref.children,
|
|
93
93
|
as = _ref.as,
|
|
94
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
94
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
95
95
|
var Element = as || defaultElement$e;
|
|
96
96
|
return React.createElement(BaseHeading, _extends({
|
|
97
97
|
as: Element,
|
|
@@ -101,14 +101,14 @@ var Heading1 = function Heading1(_ref) {
|
|
|
101
101
|
}), children);
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
var _excluded$
|
|
104
|
+
var _excluded$n = ["margin", "children", "as"];
|
|
105
105
|
var defaultElement$d = 'h2';
|
|
106
106
|
var Heading2 = function Heading2(_ref) {
|
|
107
107
|
var _ref$margin = _ref.margin,
|
|
108
108
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
109
109
|
children = _ref.children,
|
|
110
110
|
as = _ref.as,
|
|
111
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
111
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
112
112
|
var Element = as || defaultElement$d;
|
|
113
113
|
return React.createElement(BaseHeading, _extends({
|
|
114
114
|
as: Element,
|
|
@@ -118,14 +118,14 @@ var Heading2 = function Heading2(_ref) {
|
|
|
118
118
|
}), children);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
var _excluded$
|
|
121
|
+
var _excluded$m = ["margin", "children", "as"];
|
|
122
122
|
var defaultElement$c = 'h3';
|
|
123
123
|
var Heading3 = function Heading3(_ref) {
|
|
124
124
|
var _ref$margin = _ref.margin,
|
|
125
125
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
126
126
|
children = _ref.children,
|
|
127
127
|
as = _ref.as,
|
|
128
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
128
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
129
129
|
var Element = as || defaultElement$c;
|
|
130
130
|
return React.createElement(BaseHeading, _extends({
|
|
131
131
|
as: Element,
|
|
@@ -135,14 +135,14 @@ var Heading3 = function Heading3(_ref) {
|
|
|
135
135
|
}), children);
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
-
var _excluded$
|
|
138
|
+
var _excluded$l = ["margin", "children", "as"];
|
|
139
139
|
var defaultElement$b = 'h4';
|
|
140
140
|
var Heading4 = function Heading4(_ref) {
|
|
141
141
|
var _ref$margin = _ref.margin,
|
|
142
142
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
143
143
|
children = _ref.children,
|
|
144
144
|
as = _ref.as,
|
|
145
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
145
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
146
146
|
var Element = as || defaultElement$b;
|
|
147
147
|
return React.createElement(BaseHeading, _extends({
|
|
148
148
|
as: Element,
|
|
@@ -152,14 +152,14 @@ var Heading4 = function Heading4(_ref) {
|
|
|
152
152
|
}), children);
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
-
var _excluded$
|
|
155
|
+
var _excluded$k = ["margin", "children", "as"];
|
|
156
156
|
var defaultElement$a = 'h5';
|
|
157
157
|
var Heading5 = function Heading5(_ref) {
|
|
158
158
|
var _ref$margin = _ref.margin,
|
|
159
159
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
160
160
|
children = _ref.children,
|
|
161
161
|
as = _ref.as,
|
|
162
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
162
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
163
163
|
var Element = as || defaultElement$a;
|
|
164
164
|
return React.createElement(BaseHeading, _extends({
|
|
165
165
|
as: Element,
|
|
@@ -169,14 +169,14 @@ var Heading5 = function Heading5(_ref) {
|
|
|
169
169
|
}), children);
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
var _excluded$
|
|
172
|
+
var _excluded$j = ["margin", "children", "as"];
|
|
173
173
|
var defaultElement$9 = 'h6';
|
|
174
174
|
var Heading6 = function Heading6(_ref) {
|
|
175
175
|
var _ref$margin = _ref.margin,
|
|
176
176
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
177
177
|
children = _ref.children,
|
|
178
178
|
as = _ref.as,
|
|
179
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
179
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
180
180
|
var Element = as || defaultElement$9;
|
|
181
181
|
return React.createElement(BaseHeading, _extends({
|
|
182
182
|
as: Element,
|
|
@@ -186,7 +186,7 @@ var Heading6 = function Heading6(_ref) {
|
|
|
186
186
|
}), children);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
var _excluded$
|
|
189
|
+
var _excluded$i = ["className", "margin", "as"];
|
|
190
190
|
var defaultElement$8 = 'label';
|
|
191
191
|
var Label = function Label(_ref) {
|
|
192
192
|
var _classNames;
|
|
@@ -194,14 +194,14 @@ var Label = function Label(_ref) {
|
|
|
194
194
|
_ref$margin = _ref.margin,
|
|
195
195
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
196
196
|
as = _ref.as,
|
|
197
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
197
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
198
198
|
var Element = as || defaultElement$8;
|
|
199
199
|
return React.createElement(Element, _extends({
|
|
200
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
201
|
}, rest));
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
var _excluded$
|
|
204
|
+
var _excluded$h = ["className", "margin", "as"];
|
|
205
205
|
var defaultElement$7 = 'p';
|
|
206
206
|
var LeadParagraph = function LeadParagraph(_ref) {
|
|
207
207
|
var _classNames;
|
|
@@ -209,14 +209,14 @@ var LeadParagraph = function LeadParagraph(_ref) {
|
|
|
209
209
|
_ref$margin = _ref.margin,
|
|
210
210
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
211
211
|
as = _ref.as,
|
|
212
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
212
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
213
213
|
var Element = as || defaultElement$7;
|
|
214
214
|
return React.createElement(Element, _extends({
|
|
215
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
216
|
}, rest));
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
-
var _excluded$
|
|
219
|
+
var _excluded$g = ["external", "ariaLabelExternalIcon", "className", "margin", "children", "as"];
|
|
220
220
|
var defaultElement$6 = 'a';
|
|
221
221
|
var Link = function Link(_ref) {
|
|
222
222
|
var _classNames;
|
|
@@ -229,7 +229,7 @@ var Link = function Link(_ref) {
|
|
|
229
229
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
230
230
|
children = _ref.children,
|
|
231
231
|
as = _ref.as,
|
|
232
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
232
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
233
233
|
var Element = as || defaultElement$6;
|
|
234
234
|
return React.createElement(Element, _extends({
|
|
235
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)
|
|
@@ -239,7 +239,7 @@ var Link = function Link(_ref) {
|
|
|
239
239
|
}) : React.createElement(React.Fragment, null));
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
var _excluded$
|
|
242
|
+
var _excluded$f = ["className", "margin", "as"];
|
|
243
243
|
var defaultElement$5 = 'strong';
|
|
244
244
|
var StrongText = function StrongText(_ref) {
|
|
245
245
|
var _classNames;
|
|
@@ -247,19 +247,19 @@ var StrongText = function StrongText(_ref) {
|
|
|
247
247
|
_ref$margin = _ref.margin,
|
|
248
248
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
249
249
|
as = _ref.as,
|
|
250
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
250
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
251
251
|
var Element = as || defaultElement$5;
|
|
252
252
|
return React.createElement(Element, _extends({
|
|
253
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
254
|
}, rest));
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
var _excluded$
|
|
257
|
+
var _excluded$e = ["children", "className", "title"];
|
|
258
258
|
var ListItem = function ListItem(_ref) {
|
|
259
259
|
var children = _ref.children,
|
|
260
260
|
className = _ref.className,
|
|
261
261
|
title = _ref.title,
|
|
262
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
262
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
263
263
|
return React.createElement("li", _extends({
|
|
264
264
|
className: classNames('eds-list-item', className)
|
|
265
265
|
}, rest), title && React.createElement(StrongText, {
|
|
@@ -267,27 +267,27 @@ var ListItem = function ListItem(_ref) {
|
|
|
267
267
|
}, title), children);
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
var _excluded$
|
|
270
|
+
var _excluded$d = ["className", "type"];
|
|
271
271
|
var NumberedList = function NumberedList(_ref) {
|
|
272
272
|
var _classNames;
|
|
273
273
|
var className = _ref.className,
|
|
274
274
|
_ref$type = _ref.type,
|
|
275
275
|
type = _ref$type === void 0 ? '1' : _ref$type,
|
|
276
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
276
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
277
277
|
return React.createElement("ol", _extends({
|
|
278
278
|
className: classNames('eds-numbered-list', (_classNames = {}, _classNames["eds-numbered-list--type-" + type] = type, _classNames), className),
|
|
279
279
|
type: type
|
|
280
280
|
}, rest));
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
-
var _excluded$
|
|
283
|
+
var _excluded$c = ["margin", "className", "as"];
|
|
284
284
|
var defaultElement$4 = 'p';
|
|
285
285
|
var Paragraph = function Paragraph(_ref) {
|
|
286
286
|
var _ref$margin = _ref.margin,
|
|
287
287
|
margin = _ref$margin === void 0 ? 'bottom' : _ref$margin,
|
|
288
288
|
className = _ref.className,
|
|
289
289
|
as = _ref.as,
|
|
290
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
290
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
291
291
|
var Element = as || defaultElement$4;
|
|
292
292
|
return React.createElement(Element, _extends({
|
|
293
293
|
className: classNames('eds-paragraph', {
|
|
@@ -297,19 +297,19 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
297
297
|
}, rest));
|
|
298
298
|
};
|
|
299
299
|
|
|
300
|
-
var _excluded$
|
|
300
|
+
var _excluded$b = ["className", "as"];
|
|
301
301
|
var defaultElement$3 = 'pre';
|
|
302
302
|
var PreformattedText = function PreformattedText(_ref) {
|
|
303
303
|
var className = _ref.className,
|
|
304
304
|
as = _ref.as,
|
|
305
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
305
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
306
306
|
var Element = as || defaultElement$3;
|
|
307
307
|
return React.createElement(Element, _extends({
|
|
308
308
|
className: classNames('eds-preformatted-text', className)
|
|
309
309
|
}, rest));
|
|
310
310
|
};
|
|
311
311
|
|
|
312
|
-
var _excluded$
|
|
312
|
+
var _excluded$a = ["className", "margin", "as"];
|
|
313
313
|
var defaultElement$2 = 'span';
|
|
314
314
|
var SmallText = function SmallText(_ref) {
|
|
315
315
|
var _classNames;
|
|
@@ -317,14 +317,14 @@ var SmallText = function SmallText(_ref) {
|
|
|
317
317
|
_ref$margin = _ref.margin,
|
|
318
318
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
319
319
|
as = _ref.as,
|
|
320
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
320
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
321
321
|
var Element = as || defaultElement$2;
|
|
322
322
|
return React.createElement(Element, _extends({
|
|
323
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
324
|
}, rest));
|
|
325
325
|
};
|
|
326
326
|
|
|
327
|
-
var _excluded$
|
|
327
|
+
var _excluded$9 = ["className", "margin", "as"];
|
|
328
328
|
var defaultElement$1 = 'span';
|
|
329
329
|
var SubLabel = function SubLabel(_ref) {
|
|
330
330
|
var _classNames;
|
|
@@ -332,31 +332,31 @@ var SubLabel = function SubLabel(_ref) {
|
|
|
332
332
|
_ref$margin = _ref.margin,
|
|
333
333
|
margin = _ref$margin === void 0 ? 'both' : _ref$margin,
|
|
334
334
|
as = _ref.as,
|
|
335
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
335
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
336
336
|
var Element = as || defaultElement$1;
|
|
337
337
|
return React.createElement(Element, _extends({
|
|
338
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
339
|
}, rest));
|
|
340
340
|
};
|
|
341
341
|
|
|
342
|
-
var _excluded$
|
|
342
|
+
var _excluded$8 = ["className", "margin", "as"];
|
|
343
343
|
var defaultElement = 'p';
|
|
344
344
|
var SubParagraph = function SubParagraph(_ref) {
|
|
345
345
|
var _classNames;
|
|
346
346
|
var className = _ref.className,
|
|
347
347
|
margin = _ref.margin,
|
|
348
348
|
as = _ref.as,
|
|
349
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
349
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
350
350
|
var Element = as || defaultElement;
|
|
351
351
|
return React.createElement(Element, _extends({
|
|
352
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
353
|
}, rest));
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
-
var _excluded$
|
|
356
|
+
var _excluded$7 = ["className"];
|
|
357
357
|
var UnorderedList = function UnorderedList(_ref) {
|
|
358
358
|
var className = _ref.className,
|
|
359
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
359
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
360
360
|
return React.createElement("ul", _extends({
|
|
361
361
|
className: classNames('eds-unordered-list', className)
|
|
362
362
|
}, rest));
|
|
@@ -400,6 +400,8 @@ function getSemanticTypeFromTextVariant(variant) {
|
|
|
400
400
|
case 'emphasized':
|
|
401
401
|
case 'code-text':
|
|
402
402
|
return 'code';
|
|
403
|
+
case 'preformatted-text':
|
|
404
|
+
return 'pre';
|
|
403
405
|
default:
|
|
404
406
|
return 'p';
|
|
405
407
|
}
|
|
@@ -416,7 +418,7 @@ function getSpacingClasses(spacing, componentPrefix) {
|
|
|
416
418
|
return _ref = {}, _ref[componentPrefix + "--spacing-none"] = spacing === 'none', _ref[componentPrefix + "--spacing-xs2"] = spacing === 'xs2', _ref[componentPrefix + "--spacing-xs2-top"] = spacing === 'xs2-top', _ref[componentPrefix + "--spacing-xs2-bottom"] = spacing === 'xs2-bottom', _ref[componentPrefix + "--spacing-xs"] = spacing === 'xs', _ref[componentPrefix + "--spacing-xs-top"] = spacing === 'xs-top', _ref[componentPrefix + "--spacing-xs-bottom"] = spacing === 'xs-bottom', _ref[componentPrefix + "--spacing-sm"] = spacing === 'sm', _ref[componentPrefix + "--spacing-sm-top"] = spacing === 'sm-top', _ref[componentPrefix + "--spacing-sm-bottom"] = spacing === 'sm-bottom', _ref[componentPrefix + "--spacing-md"] = spacing === 'md', _ref[componentPrefix + "--spacing-md-top"] = spacing === 'md-top', _ref[componentPrefix + "--spacing-md-bottom"] = spacing === 'md-bottom', _ref[componentPrefix + "--spacing-lg"] = spacing === 'lg', _ref[componentPrefix + "--spacing-lg-top"] = spacing === 'lg-top', _ref[componentPrefix + "--spacing-lg-bottom"] = spacing === 'lg-bottom', _ref[componentPrefix + "--spacing-xl"] = spacing === 'xl', _ref[componentPrefix + "--spacing-xl-top"] = spacing === 'xl-top', _ref[componentPrefix + "--spacing-xl-bottom"] = spacing === 'xl-bottom', _ref;
|
|
417
419
|
}
|
|
418
420
|
|
|
419
|
-
var _excluded$
|
|
421
|
+
var _excluded$6 = ["children", "as", "size", "variant", "weight", "spacing", "className"];
|
|
420
422
|
var TypographyText = function TypographyText(_ref) {
|
|
421
423
|
var children = _ref.children,
|
|
422
424
|
as = _ref.as,
|
|
@@ -426,7 +428,7 @@ var TypographyText = function TypographyText(_ref) {
|
|
|
426
428
|
weight = _ref$weight === void 0 ? 'medium' : _ref$weight,
|
|
427
429
|
spacing = _ref.spacing,
|
|
428
430
|
className = _ref.className,
|
|
429
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
431
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
430
432
|
var BodyElement = as || getSemanticTypeFromTextVariant(variant);
|
|
431
433
|
return React.createElement(BodyElement, _extends({
|
|
432
434
|
className: classNames('eds-text', variant && "eds-text--" + variant, size && "eds-text--" + size, weight && "eds-text--weight-" + weight, getSpacingClasses(spacing, 'eds-text'), className)
|
|
@@ -435,7 +437,7 @@ var TypographyText = function TypographyText(_ref) {
|
|
|
435
437
|
// Export as Text to avoid DOM conflicts
|
|
436
438
|
var Text = TypographyText;
|
|
437
439
|
|
|
438
|
-
var _excluded$
|
|
440
|
+
var _excluded$5 = ["children", "as", "size", "variant", "spacing", "className"];
|
|
439
441
|
var Heading = function Heading(_ref) {
|
|
440
442
|
var _classNames, _classNames2;
|
|
441
443
|
var children = _ref.children,
|
|
@@ -444,7 +446,7 @@ var Heading = function Heading(_ref) {
|
|
|
444
446
|
variant = _ref.variant,
|
|
445
447
|
spacing = _ref.spacing,
|
|
446
448
|
className = _ref.className,
|
|
447
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
449
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
448
450
|
var HeadingElement = as || 'h1';
|
|
449
451
|
// Function to determine the variant based on the semantic type
|
|
450
452
|
var usedVariant = variant != null ? variant : getHeadingVariantFromSemanticType(HeadingElement);
|
|
@@ -455,11 +457,11 @@ var Heading = function Heading(_ref) {
|
|
|
455
457
|
}, rest), children);
|
|
456
458
|
};
|
|
457
459
|
|
|
458
|
-
var _excluded$
|
|
460
|
+
var _excluded$4 = ["className"],
|
|
459
461
|
_excluded2 = ["className"];
|
|
460
462
|
var BlockquoteBeta = function BlockquoteBeta(_ref) {
|
|
461
463
|
var className = _ref.className,
|
|
462
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
464
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
463
465
|
return React.createElement("blockquote", _extends({
|
|
464
466
|
className: classNames('eds-text--blockquote', className)
|
|
465
467
|
}, rest));
|
|
@@ -472,7 +474,7 @@ var BlockquoteFooterBeta = function BlockquoteFooterBeta(_ref2) {
|
|
|
472
474
|
}, rest));
|
|
473
475
|
};
|
|
474
476
|
|
|
475
|
-
var _excluded = ["external", "ariaLabelExternalIcon", "className", "spacing", "children", "as"];
|
|
477
|
+
var _excluded$3 = ["external", "ariaLabelExternalIcon", "className", "spacing", "children", "as"];
|
|
476
478
|
var LinkBeta = function LinkBeta(_ref) {
|
|
477
479
|
var _ref$external = _ref.external,
|
|
478
480
|
external = _ref$external === void 0 ? false : _ref$external,
|
|
@@ -482,7 +484,7 @@ var LinkBeta = function LinkBeta(_ref) {
|
|
|
482
484
|
spacing = _ref.spacing,
|
|
483
485
|
children = _ref.children,
|
|
484
486
|
as = _ref.as,
|
|
485
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
487
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
486
488
|
var LinkElement = as || 'a';
|
|
487
489
|
return React.createElement(LinkElement, _extends({
|
|
488
490
|
className: classNames('eds-text--link', getSpacingClasses(spacing, 'eds-text--link'), className)
|
|
@@ -492,7 +494,53 @@ var LinkBeta = function LinkBeta(_ref) {
|
|
|
492
494
|
}) : null);
|
|
493
495
|
};
|
|
494
496
|
|
|
497
|
+
var _excluded$2 = ["className", "spacing", "as", "children"];
|
|
498
|
+
var UnorderedListBeta = function UnorderedListBeta(_ref) {
|
|
499
|
+
var className = _ref.className,
|
|
500
|
+
spacing = _ref.spacing,
|
|
501
|
+
as = _ref.as,
|
|
502
|
+
children = _ref.children,
|
|
503
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
504
|
+
var ListElement = as || 'ul';
|
|
505
|
+
return React.createElement(ListElement, _extends({
|
|
506
|
+
className: classNames('eds-text--unordered-list', getSpacingClasses(spacing, 'eds-text--unordered-list'), className)
|
|
507
|
+
}, rest), children);
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
var _excluded$1 = ["className", "type", "spacing", "as", "children"];
|
|
511
|
+
var NumberedListBeta = function NumberedListBeta(_ref) {
|
|
512
|
+
var _classNames;
|
|
513
|
+
var className = _ref.className,
|
|
514
|
+
_ref$type = _ref.type,
|
|
515
|
+
type = _ref$type === void 0 ? '1' : _ref$type,
|
|
516
|
+
spacing = _ref.spacing,
|
|
517
|
+
as = _ref.as,
|
|
518
|
+
children = _ref.children,
|
|
519
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
520
|
+
var ListElement = as || 'ol';
|
|
521
|
+
return React.createElement(ListElement, _extends({
|
|
522
|
+
className: classNames('eds-text--numbered-list', (_classNames = {}, _classNames["eds-text--numbered-list--type-" + type] = type, _classNames), getSpacingClasses(spacing, 'eds-text--numbered-list'), className),
|
|
523
|
+
type: type
|
|
524
|
+
}, rest), children);
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
var _excluded = ["children", "className", "title", "spacing", "as"];
|
|
528
|
+
var ListItemBeta = function ListItemBeta(_ref) {
|
|
529
|
+
var children = _ref.children,
|
|
530
|
+
className = _ref.className,
|
|
531
|
+
title = _ref.title,
|
|
532
|
+
spacing = _ref.spacing,
|
|
533
|
+
as = _ref.as,
|
|
534
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
535
|
+
var ItemElement = as || 'li';
|
|
536
|
+
return React.createElement(ItemElement, _extends({
|
|
537
|
+
className: classNames('eds-text--list-item', getSpacingClasses(spacing, 'eds-text--list-item'), className)
|
|
538
|
+
}, rest), title && React.createElement("span", {
|
|
539
|
+
className: "eds-text--list-item__title eds-text--weight-bold"
|
|
540
|
+
}, title), children);
|
|
541
|
+
};
|
|
542
|
+
|
|
495
543
|
warnAboutMissingStyles('typography');
|
|
496
544
|
|
|
497
|
-
export { Blockquote, BlockquoteBeta, BlockquoteFooter, BlockquoteFooterBeta, CodeText, EmphasizedText, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Label, LeadParagraph, Link, LinkBeta, ListItem, NumberedList, Paragraph, PreformattedText, SmallText, StrongText, SubLabel, SubParagraph, Text, UnorderedList };
|
|
545
|
+
export { Blockquote, BlockquoteBeta, BlockquoteFooter, BlockquoteFooterBeta, CodeText, EmphasizedText, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Label, LeadParagraph, Link, LinkBeta, ListItem, ListItemBeta, NumberedList, NumberedListBeta, Paragraph, PreformattedText, SmallText, StrongText, SubLabel, SubParagraph, Text, UnorderedList, UnorderedListBeta };
|
|
498
546
|
//# sourceMappingURL=typography.esm.js.map
|