@occmundial/occ-atomic 2.0.0-beta.4 → 2.0.0-beta.6
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/CHANGELOG.md +22 -0
- package/build/Button/__snapshots__/Button.test.js.snap +11 -13
- package/build/Button/styles.js +2 -2
- package/build/Text/Text.js +429 -112
- package/build/Text/Text.test.js +5 -5
- package/build/Text/__snapshots__/Text.test.js.snap +144 -86
- package/build/Text/styles.js +165 -81
- package/build/Toaster/__snapshots__/Toaster.test.js.snap +1 -1
- package/package.json +1 -1
package/build/Text/Text.js
CHANGED
@@ -37,6 +37,64 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
37
37
|
|
38
38
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
39
39
|
|
40
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
41
|
+
|
42
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
43
|
+
|
44
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
45
|
+
|
46
|
+
var oldToNewClassMapper = {
|
47
|
+
// Text
|
48
|
+
hero: 'h1',
|
49
|
+
headline: 'h2',
|
50
|
+
heading: 'h4',
|
51
|
+
subheading: 'h5',
|
52
|
+
extraLarge: 'bodyXLarge',
|
53
|
+
large: 'bodyLarge',
|
54
|
+
standard: 'bodyRegular',
|
55
|
+
small: 'bodySmall',
|
56
|
+
micro: 'bodyXSmall',
|
57
|
+
// Color
|
58
|
+
primary: 'indigoPrimary',
|
59
|
+
secondary: 'pinkPrimary',
|
60
|
+
white: 'whitePrimary',
|
61
|
+
highEmphasis: 'corpPrimary',
|
62
|
+
midEmphasis: 'corpSecondary',
|
63
|
+
lowEmphasis: 'corpDisabled',
|
64
|
+
// Spacing
|
65
|
+
topXTiny: 'top1',
|
66
|
+
topTiny: 'top2',
|
67
|
+
topSmall: 'top4',
|
68
|
+
topBase: 'top5',
|
69
|
+
topMedium: 'top6',
|
70
|
+
topLarge: 'top8',
|
71
|
+
topXLarge: 'top9',
|
72
|
+
bottomXTiny: 'bottom1',
|
73
|
+
bottomTiny: 'bottom2',
|
74
|
+
bottomSmall: 'bottom4',
|
75
|
+
bottomBase: 'bottom5',
|
76
|
+
bottomMedium: 'bottom6',
|
77
|
+
bottomLarge: 'bottom8',
|
78
|
+
bottomXLarge: 'bottom9'
|
79
|
+
};
|
80
|
+
|
81
|
+
var getActiveKey = function getActiveKey(array) {
|
82
|
+
var _iterator = _createForOfIteratorHelper(array),
|
83
|
+
_step;
|
84
|
+
|
85
|
+
try {
|
86
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
87
|
+
var item = _step.value;
|
88
|
+
var key = Object.keys(item)[0];
|
89
|
+
if (item[key]) return key;
|
90
|
+
}
|
91
|
+
} catch (err) {
|
92
|
+
_iterator.e(err);
|
93
|
+
} finally {
|
94
|
+
_iterator.f();
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
40
98
|
var Text = /*#__PURE__*/function (_Component) {
|
41
99
|
_inherits(Text, _Component);
|
42
100
|
|
@@ -49,14 +107,6 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
49
107
|
}
|
50
108
|
|
51
109
|
_createClass(Text, [{
|
52
|
-
key: "filter",
|
53
|
-
value: function filter(array) {
|
54
|
-
return array.filter(function (item) {
|
55
|
-
var key = Object.keys(item)[0];
|
56
|
-
if (item[key]) return key;
|
57
|
-
});
|
58
|
-
}
|
59
|
-
}, {
|
60
110
|
key: "getSize",
|
61
111
|
value: function getSize() {
|
62
112
|
var _this$props = this.props,
|
@@ -69,8 +119,53 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
69
119
|
large = _this$props.large,
|
70
120
|
standard = _this$props.standard,
|
71
121
|
small = _this$props.small,
|
72
|
-
micro = _this$props.micro
|
73
|
-
|
122
|
+
micro = _this$props.micro,
|
123
|
+
display = _this$props.display,
|
124
|
+
h1 = _this$props.h1,
|
125
|
+
h2 = _this$props.h2,
|
126
|
+
h3 = _this$props.h3,
|
127
|
+
h4 = _this$props.h4,
|
128
|
+
h5 = _this$props.h5,
|
129
|
+
tagText = _this$props.tagText,
|
130
|
+
bodyXLarge = _this$props.bodyXLarge,
|
131
|
+
bodyLargeStrong = _this$props.bodyLargeStrong,
|
132
|
+
bodyLarge = _this$props.bodyLarge,
|
133
|
+
bodyRegularStrong = _this$props.bodyRegularStrong,
|
134
|
+
bodyRegular = _this$props.bodyRegular,
|
135
|
+
bodySmallStrong = _this$props.bodySmallStrong,
|
136
|
+
bodySmall = _this$props.bodySmall,
|
137
|
+
bodyXSmall = _this$props.bodyXSmall;
|
138
|
+
var sizeActive = getActiveKey([{
|
139
|
+
display: display
|
140
|
+
}, {
|
141
|
+
h1: h1
|
142
|
+
}, {
|
143
|
+
h2: h2
|
144
|
+
}, {
|
145
|
+
h3: h3
|
146
|
+
}, {
|
147
|
+
h4: h4
|
148
|
+
}, {
|
149
|
+
h5: h5
|
150
|
+
}, {
|
151
|
+
tag: tagText
|
152
|
+
}, {
|
153
|
+
bodyXLarge: bodyXLarge
|
154
|
+
}, {
|
155
|
+
bodyLargeStrong: bodyLargeStrong
|
156
|
+
}, {
|
157
|
+
bodyLarge: bodyLarge
|
158
|
+
}, {
|
159
|
+
bodyRegularStrong: bodyRegularStrong
|
160
|
+
}, {
|
161
|
+
bodyRegular: bodyRegular
|
162
|
+
}, {
|
163
|
+
bodySmallStrong: bodySmallStrong
|
164
|
+
}, {
|
165
|
+
bodySmall: bodySmall
|
166
|
+
}, {
|
167
|
+
bodyXSmall: bodyXSmall
|
168
|
+
}, {
|
74
169
|
hero: hero
|
75
170
|
}, {
|
76
171
|
headline: headline
|
@@ -88,14 +183,10 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
88
183
|
small: small
|
89
184
|
}, {
|
90
185
|
micro: micro
|
91
|
-
}];
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
return classes.standard;
|
96
|
-
} else {
|
97
|
-
return classes[Object.keys(filtered[0])[0]];
|
98
|
-
}
|
186
|
+
}]);
|
187
|
+
if (!sizeActive) return classes.bodyRegular;
|
188
|
+
var activeSizeParsed = oldToNewClassMapper[sizeActive];
|
189
|
+
return classes[activeSizeParsed || sizeActive];
|
99
190
|
}
|
100
191
|
}, {
|
101
192
|
key: "getEmphasis",
|
@@ -104,7 +195,7 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
104
195
|
classes = _this$props2.classes,
|
105
196
|
mid = _this$props2.mid,
|
106
197
|
low = _this$props2.low;
|
107
|
-
if (low) return classes.
|
198
|
+
if (low) return classes.corpDisabled;else if (mid) return classes.corpSecondary;else return classes.corpPrimary;
|
108
199
|
}
|
109
200
|
}, {
|
110
201
|
key: "getColor",
|
@@ -119,8 +210,13 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
119
210
|
info = _this$props3.info,
|
120
211
|
disabled = _this$props3.disabled,
|
121
212
|
white = _this$props3.white,
|
122
|
-
link = _this$props3.link
|
123
|
-
|
213
|
+
link = _this$props3.link,
|
214
|
+
indigoPrimary = _this$props3.indigoPrimary,
|
215
|
+
indigoSecondary = _this$props3.indigoSecondary,
|
216
|
+
pinkPrimary = _this$props3.pinkPrimary,
|
217
|
+
whiteSecondary = _this$props3.whiteSecondary,
|
218
|
+
whitePrimary = _this$props3.whitePrimary;
|
219
|
+
var colorActive = getActiveKey([{
|
124
220
|
primary: primary
|
125
221
|
}, {
|
126
222
|
secondary: secondary
|
@@ -138,14 +234,20 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
138
234
|
white: white
|
139
235
|
}, {
|
140
236
|
link: link
|
141
|
-
}
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
237
|
+
}, {
|
238
|
+
indigoPrimary: indigoPrimary
|
239
|
+
}, {
|
240
|
+
indigoSecondary: indigoSecondary
|
241
|
+
}, {
|
242
|
+
pinkPrimary: pinkPrimary
|
243
|
+
}, {
|
244
|
+
whiteSecondary: whiteSecondary
|
245
|
+
}, {
|
246
|
+
whitePrimary: whitePrimary
|
247
|
+
}]);
|
248
|
+
if (!colorActive) return false;
|
249
|
+
var colorActiveParsed = oldToNewClassMapper[colorActive];
|
250
|
+
return classes[colorActiveParsed || colorActive];
|
149
251
|
}
|
150
252
|
}, {
|
151
253
|
key: "getAlign",
|
@@ -168,7 +270,20 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
168
270
|
topBase = _this$props5.topBase,
|
169
271
|
topMedium = _this$props5.topMedium,
|
170
272
|
topLarge = _this$props5.topLarge,
|
171
|
-
topXLarge = _this$props5.topXLarge
|
273
|
+
topXLarge = _this$props5.topXLarge,
|
274
|
+
top0 = _this$props5.top0,
|
275
|
+
top1 = _this$props5.top1,
|
276
|
+
top2 = _this$props5.top2,
|
277
|
+
top3 = _this$props5.top3,
|
278
|
+
top4 = _this$props5.top4,
|
279
|
+
top5 = _this$props5.top5,
|
280
|
+
top6 = _this$props5.top6,
|
281
|
+
top7 = _this$props5.top7,
|
282
|
+
top8 = _this$props5.top8,
|
283
|
+
top9 = _this$props5.top9,
|
284
|
+
top10 = _this$props5.top10,
|
285
|
+
top11 = _this$props5.top11,
|
286
|
+
top12 = _this$props5.top12;
|
172
287
|
var spacing = [{
|
173
288
|
topXTiny: topXTiny
|
174
289
|
}, {
|
@@ -183,14 +298,37 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
183
298
|
topLarge: topLarge
|
184
299
|
}, {
|
185
300
|
topXLarge: topXLarge
|
301
|
+
}, {
|
302
|
+
top0: top0
|
303
|
+
}, {
|
304
|
+
top1: top1
|
305
|
+
}, {
|
306
|
+
top2: top2
|
307
|
+
}, {
|
308
|
+
top3: top3
|
309
|
+
}, {
|
310
|
+
top4: top4
|
311
|
+
}, {
|
312
|
+
top5: top5
|
313
|
+
}, {
|
314
|
+
top6: top6
|
315
|
+
}, {
|
316
|
+
top7: top7
|
317
|
+
}, {
|
318
|
+
top8: top8
|
319
|
+
}, {
|
320
|
+
top9: top9
|
321
|
+
}, {
|
322
|
+
top10: top10
|
323
|
+
}, {
|
324
|
+
top11: top11
|
325
|
+
}, {
|
326
|
+
top12: top12
|
186
327
|
}];
|
187
|
-
var
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
} else {
|
192
|
-
return " ".concat(classes[Object.keys(filtered[0])[0]]);
|
193
|
-
}
|
328
|
+
var topSpacingActive = getActiveKey(spacing);
|
329
|
+
if (!topSpacingActive) return '';
|
330
|
+
var topSpacingActiveParsed = oldToNewClassMapper[topSpacingActive];
|
331
|
+
return " ".concat(classes[topSpacingActiveParsed || topSpacingActive]);
|
194
332
|
}
|
195
333
|
}, {
|
196
334
|
key: "getBottomSpacing",
|
@@ -203,7 +341,20 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
203
341
|
bottomBase = _this$props6.bottomBase,
|
204
342
|
bottomMedium = _this$props6.bottomMedium,
|
205
343
|
bottomLarge = _this$props6.bottomLarge,
|
206
|
-
bottomXLarge = _this$props6.bottomXLarge
|
344
|
+
bottomXLarge = _this$props6.bottomXLarge,
|
345
|
+
bottom0 = _this$props6.bottom0,
|
346
|
+
bottom1 = _this$props6.bottom1,
|
347
|
+
bottom2 = _this$props6.bottom2,
|
348
|
+
bottom3 = _this$props6.bottom3,
|
349
|
+
bottom4 = _this$props6.bottom4,
|
350
|
+
bottom5 = _this$props6.bottom5,
|
351
|
+
bottom6 = _this$props6.bottom6,
|
352
|
+
bottom7 = _this$props6.bottom7,
|
353
|
+
bottom8 = _this$props6.bottom8,
|
354
|
+
bottom9 = _this$props6.bottom9,
|
355
|
+
bottom10 = _this$props6.bottom10,
|
356
|
+
bottom11 = _this$props6.bottom11,
|
357
|
+
bottom12 = _this$props6.bottom12;
|
207
358
|
var spacing = [{
|
208
359
|
bottomXTiny: bottomXTiny
|
209
360
|
}, {
|
@@ -218,14 +369,37 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
218
369
|
bottomLarge: bottomLarge
|
219
370
|
}, {
|
220
371
|
bottomXLarge: bottomXLarge
|
372
|
+
}, {
|
373
|
+
bottom0: bottom0
|
374
|
+
}, {
|
375
|
+
bottom1: bottom1
|
376
|
+
}, {
|
377
|
+
bottom2: bottom2
|
378
|
+
}, {
|
379
|
+
bottom3: bottom3
|
380
|
+
}, {
|
381
|
+
bottom4: bottom4
|
382
|
+
}, {
|
383
|
+
bottom5: bottom5
|
384
|
+
}, {
|
385
|
+
bottom6: bottom6
|
386
|
+
}, {
|
387
|
+
bottom7: bottom7
|
388
|
+
}, {
|
389
|
+
bottom8: bottom8
|
390
|
+
}, {
|
391
|
+
bottom9: bottom9
|
392
|
+
}, {
|
393
|
+
bottom10: bottom10
|
394
|
+
}, {
|
395
|
+
bottom11: bottom11
|
396
|
+
}, {
|
397
|
+
bottom12: bottom12
|
221
398
|
}];
|
222
|
-
var
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
} else {
|
227
|
-
return " ".concat(classes[Object.keys(filtered[0])[0]]);
|
228
|
-
}
|
399
|
+
var bottomSpacingActive = getActiveKey(spacing);
|
400
|
+
if (!bottomSpacingActive) return '';
|
401
|
+
var bottomSpacingActiveParsed = oldToNewClassMapper[bottomSpacingActive];
|
402
|
+
return " ".concat(classes[bottomSpacingActiveParsed || bottomSpacingActive]);
|
229
403
|
}
|
230
404
|
}, {
|
231
405
|
key: "getWeight",
|
@@ -258,13 +432,9 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
258
432
|
}, {
|
259
433
|
micro: micro
|
260
434
|
}];
|
261
|
-
var
|
262
|
-
|
263
|
-
|
264
|
-
return " ".concat(classes.strong);
|
265
|
-
} else {
|
266
|
-
return false;
|
267
|
-
}
|
435
|
+
var weightActive = getActiveKey(sizes);
|
436
|
+
if ((!weightActive || large || standard || small || micro) && strong) return " ".concat(classes.strong);
|
437
|
+
return false;
|
268
438
|
}
|
269
439
|
}, {
|
270
440
|
key: "render",
|
@@ -298,129 +468,276 @@ var Text = /*#__PURE__*/function (_Component) {
|
|
298
468
|
}(_react.Component);
|
299
469
|
|
300
470
|
Text.propTypes = {
|
471
|
+
/** display typography style. */
|
472
|
+
display: _propTypes["default"].bool,
|
473
|
+
|
474
|
+
/** h1 typography style. */
|
475
|
+
h1: _propTypes["default"].bool,
|
476
|
+
|
477
|
+
/** h2 typography style. */
|
478
|
+
h2: _propTypes["default"].bool,
|
479
|
+
|
480
|
+
/** h3 typography style. */
|
481
|
+
h3: _propTypes["default"].bool,
|
482
|
+
|
483
|
+
/** h4 typography style. */
|
484
|
+
h4: _propTypes["default"].bool,
|
485
|
+
|
486
|
+
/** h5 typography style. */
|
487
|
+
h5: _propTypes["default"].bool,
|
488
|
+
|
489
|
+
/** tagText typography style. */
|
490
|
+
tagText: _propTypes["default"].bool,
|
491
|
+
|
492
|
+
/** bodyXLarge typography style. */
|
493
|
+
bodyXLarge: _propTypes["default"].bool,
|
494
|
+
|
495
|
+
/** bodyLargeStrong typography style. */
|
496
|
+
bodyLargeStrong: _propTypes["default"].bool,
|
497
|
+
|
498
|
+
/** bodyLarge typography style. */
|
499
|
+
bodyLarge: _propTypes["default"].bool,
|
500
|
+
|
501
|
+
/** bodyRegularStrong typography style. */
|
502
|
+
bodyRegularStrong: _propTypes["default"].bool,
|
503
|
+
|
504
|
+
/** bodyRegular typography style. */
|
505
|
+
bodyRegular: _propTypes["default"].bool,
|
506
|
+
|
507
|
+
/** bodySmallStrong typography style. */
|
508
|
+
bodySmallStrong: _propTypes["default"].bool,
|
509
|
+
|
510
|
+
/** bodySmall typography style. */
|
511
|
+
bodySmall: _propTypes["default"].bool,
|
512
|
+
|
513
|
+
/** bodyXSmall typography style. */
|
514
|
+
bodyXSmall: _propTypes["default"].bool,
|
515
|
+
|
516
|
+
/** Indigo primary emphasis color style. */
|
517
|
+
indigoPrimary: _propTypes["default"].bool,
|
518
|
+
|
519
|
+
/** Indigo secondary emphasis color style. */
|
520
|
+
indigoSecondary: _propTypes["default"].bool,
|
521
|
+
|
522
|
+
/** Pink primary emphasis color style. */
|
523
|
+
pinkPrimary: _propTypes["default"].bool,
|
524
|
+
|
525
|
+
/** White secondary emphasis color style. */
|
526
|
+
whiteSecondary: _propTypes["default"].bool,
|
527
|
+
|
528
|
+
/** White emphasis color style. */
|
529
|
+
whitePrimary: _propTypes["default"].bool,
|
530
|
+
|
531
|
+
/** Corp secondary emphasis color style. */
|
532
|
+
corpSecondary: _propTypes["default"].bool,
|
533
|
+
|
534
|
+
/** Corp disabled emphasis color style. */
|
535
|
+
corpDisabled: _propTypes["default"].bool,
|
536
|
+
|
537
|
+
/** Top0 spacing style (2px). */
|
538
|
+
top0: _propTypes["default"].bool,
|
539
|
+
|
540
|
+
/** Top1 spacing style (4px). */
|
541
|
+
top1: _propTypes["default"].bool,
|
542
|
+
|
543
|
+
/** Top2 spacing style (8px). */
|
544
|
+
top2: _propTypes["default"].bool,
|
545
|
+
|
546
|
+
/** Top3 spacing style (12px). */
|
547
|
+
top3: _propTypes["default"].bool,
|
548
|
+
|
549
|
+
/** Top4 spacing style (16px). */
|
550
|
+
top4: _propTypes["default"].bool,
|
551
|
+
|
552
|
+
/** Top5 spacing style (24px). */
|
553
|
+
top5: _propTypes["default"].bool,
|
554
|
+
|
555
|
+
/** Top6 spacing style (32px). */
|
556
|
+
top6: _propTypes["default"].bool,
|
557
|
+
|
558
|
+
/** Top7 spacing style (40px). */
|
559
|
+
top7: _propTypes["default"].bool,
|
560
|
+
|
561
|
+
/** Top8 spacing style (48px). */
|
562
|
+
top8: _propTypes["default"].bool,
|
563
|
+
|
564
|
+
/** Top9 spacing style (64px). */
|
565
|
+
top9: _propTypes["default"].bool,
|
566
|
+
|
567
|
+
/** Top10 spacing style (80px). */
|
568
|
+
top10: _propTypes["default"].bool,
|
569
|
+
|
570
|
+
/** Top11 spacing style (120px). */
|
571
|
+
top11: _propTypes["default"].bool,
|
572
|
+
|
573
|
+
/** Top12 spacing style (160px). */
|
574
|
+
top12: _propTypes["default"].bool,
|
575
|
+
|
576
|
+
/** Bottom0 spacing style (2px). */
|
577
|
+
bottom0: _propTypes["default"].bool,
|
578
|
+
|
579
|
+
/** Bottom1 spacing style (4px). */
|
580
|
+
bottom1: _propTypes["default"].bool,
|
581
|
+
|
582
|
+
/** Bottom2 spacing style (8px). */
|
583
|
+
bottom2: _propTypes["default"].bool,
|
584
|
+
|
585
|
+
/** Bottom3 spacing style (12px). */
|
586
|
+
bottom3: _propTypes["default"].bool,
|
587
|
+
|
588
|
+
/** Bottom4 spacing style (16px). */
|
589
|
+
bottom4: _propTypes["default"].bool,
|
590
|
+
|
591
|
+
/** Bottom5 spacing style (24px). */
|
592
|
+
bottom5: _propTypes["default"].bool,
|
593
|
+
|
594
|
+
/** Bottom6 spacing style (32px). */
|
595
|
+
bottom6: _propTypes["default"].bool,
|
596
|
+
|
597
|
+
/** Bottom7 spacing style (40px). */
|
598
|
+
bottom7: _propTypes["default"].bool,
|
599
|
+
|
600
|
+
/** Bottom8 spacing style (48px). */
|
601
|
+
bottom8: _propTypes["default"].bool,
|
602
|
+
|
603
|
+
/** Bottom9 spacing style (64px). */
|
604
|
+
bottom9: _propTypes["default"].bool,
|
605
|
+
|
606
|
+
/** Bottom10 spacing style (80px). */
|
607
|
+
bottom10: _propTypes["default"].bool,
|
608
|
+
|
609
|
+
/** Bottom11 spacing style (120px). */
|
610
|
+
bottom11: _propTypes["default"].bool,
|
611
|
+
|
612
|
+
/** Bottom12 spacing style (160px). */
|
613
|
+
bottom12: _propTypes["default"].bool,
|
301
614
|
classes: _propTypes["default"].object.isRequired,
|
302
615
|
children: _propTypes["default"].node.isRequired,
|
303
616
|
|
304
|
-
/**
|
617
|
+
/** Strong style. Only applies in large, standard or small sizes. */
|
618
|
+
strong: _propTypes["default"].bool,
|
619
|
+
|
620
|
+
/** Success color style. */
|
621
|
+
success: _propTypes["default"].bool,
|
622
|
+
|
623
|
+
/** Error color style. */
|
624
|
+
error: _propTypes["default"].bool,
|
625
|
+
|
626
|
+
/** Warning color style. */
|
627
|
+
warning: _propTypes["default"].bool,
|
628
|
+
|
629
|
+
/** Left align style. */
|
630
|
+
left: _propTypes["default"].bool,
|
631
|
+
|
632
|
+
/** Center align style. */
|
633
|
+
center: _propTypes["default"].bool,
|
634
|
+
|
635
|
+
/** Right align style. */
|
636
|
+
right: _propTypes["default"].bool,
|
637
|
+
|
638
|
+
/** Html tag. */
|
639
|
+
tag: _propTypes["default"].string.isRequired,
|
640
|
+
|
641
|
+
/** The className of the text container. */
|
642
|
+
className: _propTypes["default"].string,
|
643
|
+
|
644
|
+
/** The style of the text container. */
|
645
|
+
style: _propTypes["default"].object,
|
646
|
+
id: _propTypes["default"].string,
|
647
|
+
testId: _propTypes["default"].string,
|
648
|
+
|
649
|
+
/** [Legacy prop] h1 typography style.*/
|
305
650
|
hero: _propTypes["default"].bool,
|
306
651
|
|
307
|
-
/**
|
652
|
+
/** [Legacy prop] h2 typography style.*/
|
308
653
|
headline: _propTypes["default"].bool,
|
309
654
|
|
310
|
-
/**
|
655
|
+
/** [Legacy prop] h4 typography style.*/
|
311
656
|
heading: _propTypes["default"].bool,
|
312
657
|
|
313
|
-
/**
|
658
|
+
/** [Legacy prop] h5 typography style.*/
|
314
659
|
subheading: _propTypes["default"].bool,
|
315
660
|
|
316
|
-
/**
|
661
|
+
/** [Legacy prop] bodyXLarge typography style.*/
|
317
662
|
extraLarge: _propTypes["default"].bool,
|
318
663
|
|
319
|
-
/**
|
664
|
+
/** [Legacy prop] bodyLarge typography style.*/
|
320
665
|
large: _propTypes["default"].bool,
|
321
666
|
|
322
|
-
/**
|
667
|
+
/** [Legacy prop] bodyRegular typography style.*/
|
323
668
|
standard: _propTypes["default"].bool,
|
324
669
|
|
325
|
-
/**
|
670
|
+
/** [Legacy prop] bodySmall typography style.*/
|
326
671
|
small: _propTypes["default"].bool,
|
327
672
|
|
328
|
-
/**
|
673
|
+
/** [Legacy prop] bodyXSmall typography style.*/
|
329
674
|
micro: _propTypes["default"].bool,
|
330
675
|
|
331
|
-
/**
|
332
|
-
strong: _propTypes["default"].bool,
|
333
|
-
|
334
|
-
/** Medium emphasis color style. */
|
676
|
+
/** [Legacy prop] Corp secondary emphasis color style.*/
|
335
677
|
mid: _propTypes["default"].bool,
|
336
678
|
|
337
|
-
/**
|
679
|
+
/** [Legacy prop] Corp disabled emphasis color style.*/
|
338
680
|
low: _propTypes["default"].bool,
|
339
681
|
|
340
|
-
/**
|
682
|
+
/** [Legacy prop] Indigo primary emphasis color style.*/
|
341
683
|
primary: _propTypes["default"].bool,
|
342
684
|
|
343
|
-
/**
|
685
|
+
/** [Legacy prop] Pink primary emphasis color style.*/
|
344
686
|
secondary: _propTypes["default"].bool,
|
345
687
|
|
346
|
-
/**
|
347
|
-
success: _propTypes["default"].bool,
|
348
|
-
|
349
|
-
/** Error color style. */
|
350
|
-
error: _propTypes["default"].bool,
|
351
|
-
|
352
|
-
/** Warning color style. */
|
353
|
-
warning: _propTypes["default"].bool,
|
354
|
-
|
355
|
-
/** Info color style. */
|
688
|
+
/** [Legacy prop] Info color style.*/
|
356
689
|
info: _propTypes["default"].bool,
|
357
690
|
|
358
|
-
/** Disabled color style
|
691
|
+
/** [Legacy prop] Disabled emphasis color style.*/
|
359
692
|
disabled: _propTypes["default"].bool,
|
360
693
|
|
361
|
-
/** White color style
|
694
|
+
/** [Legacy prop] White emphasis color style.*/
|
362
695
|
white: _propTypes["default"].bool,
|
363
696
|
|
364
|
-
/** Link color style
|
697
|
+
/** [Legacy prop] Link emphasis color style.*/
|
365
698
|
link: _propTypes["default"].bool,
|
366
699
|
|
367
|
-
/**
|
368
|
-
left: _propTypes["default"].bool,
|
369
|
-
|
370
|
-
/** Center align style. */
|
371
|
-
center: _propTypes["default"].bool,
|
372
|
-
|
373
|
-
/** Right align style. */
|
374
|
-
right: _propTypes["default"].bool,
|
375
|
-
|
376
|
-
/** X-Tiny top spacing style. */
|
700
|
+
/** [Legacy prop] Top1 spacing style (4px).*/
|
377
701
|
topXTiny: _propTypes["default"].bool,
|
378
702
|
|
379
|
-
/**
|
703
|
+
/** [Legacy prop] Top2 spacing style (8px).*/
|
380
704
|
topTiny: _propTypes["default"].bool,
|
381
705
|
|
382
|
-
/**
|
706
|
+
/** [Legacy prop] Top4 spacing style (16px).*/
|
383
707
|
topSmall: _propTypes["default"].bool,
|
384
708
|
|
385
|
-
/**
|
709
|
+
/** [Legacy prop] Top5 spacing style (24px).*/
|
386
710
|
topBase: _propTypes["default"].bool,
|
387
711
|
|
388
|
-
/**
|
712
|
+
/** [Legacy prop] Top6 spacing style (32px).*/
|
389
713
|
topMedium: _propTypes["default"].bool,
|
390
714
|
|
391
|
-
/**
|
715
|
+
/** [Legacy prop] Top8 spacing style (48px).*/
|
392
716
|
topLarge: _propTypes["default"].bool,
|
393
717
|
|
394
|
-
/**
|
718
|
+
/** [Legacy prop] Top9 spacing style (64px).*/
|
395
719
|
topXLarge: _propTypes["default"].bool,
|
396
720
|
|
397
|
-
/**
|
721
|
+
/** [Legacy prop] Bottom1 spacing style (4px).*/
|
398
722
|
bottomXTiny: _propTypes["default"].bool,
|
399
723
|
|
400
|
-
/**
|
724
|
+
/** [Legacy prop] Bottom2 spacing style (8px).*/
|
401
725
|
bottomTiny: _propTypes["default"].bool,
|
402
726
|
|
403
|
-
/**
|
727
|
+
/** [Legacy prop] Bottom4 spacing style (16px).*/
|
404
728
|
bottomSmall: _propTypes["default"].bool,
|
405
729
|
|
406
|
-
/**
|
730
|
+
/** [Legacy prop] Bottom5 spacing style (24px).*/
|
407
731
|
bottomBase: _propTypes["default"].bool,
|
408
732
|
|
409
|
-
/**
|
733
|
+
/** [Legacy prop] Bottom6 spacing style (32px).*/
|
410
734
|
bottomMedium: _propTypes["default"].bool,
|
411
735
|
|
412
|
-
/**
|
736
|
+
/** [Legacy prop] Bottom8 spacing style (48px).*/
|
413
737
|
bottomLarge: _propTypes["default"].bool,
|
414
738
|
|
415
|
-
/**
|
416
|
-
bottomXLarge: _propTypes["default"].bool
|
417
|
-
|
418
|
-
/** Html tag. */
|
419
|
-
tag: _propTypes["default"].string.isRequired,
|
420
|
-
className: _propTypes["default"].string,
|
421
|
-
style: _propTypes["default"].object,
|
422
|
-
id: _propTypes["default"].string,
|
423
|
-
testId: _propTypes["default"].string
|
739
|
+
/** [Legacy prop] Bottom9 spacing style (64px).*/
|
740
|
+
bottomXLarge: _propTypes["default"].bool
|
424
741
|
};
|
425
742
|
Text.defaultProps = {
|
426
743
|
tag: 'p'
|