@carbon/type 11.10.0-rc.0 → 11.11.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +8 -78
- package/lib/index.js +104 -174
- package/package.json +5 -4
- package/scss/_styles.scss +6 -5
- package/src/__tests__/__snapshots__/styles-test.js.snap +4 -4
- package/src/styles.js +6 -5
- package/umd/index.js +106 -178
package/lib/index.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var layout = require('@carbon/layout');
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* Copyright IBM Corp. 2018, 2018
|
|
7
9
|
*
|
|
@@ -90,79 +92,6 @@ function paramCase(string) {
|
|
|
90
92
|
return result;
|
|
91
93
|
}
|
|
92
94
|
|
|
93
|
-
/**
|
|
94
|
-
* Copyright IBM Corp. 2018, 2018
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
97
|
-
* LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* Copyright IBM Corp. 2018, 2018
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
103
|
-
* LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/
|
|
105
|
-
// Default, Use with em() and rem() functions
|
|
106
|
-
|
|
107
|
-
var baseFontSize = 16;
|
|
108
|
-
/**
|
|
109
|
-
* Convert a given px unit to a rem unit
|
|
110
|
-
* @param {number} px
|
|
111
|
-
* @returns {string}
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
function rem(px) {
|
|
115
|
-
return "".concat(px / baseFontSize, "rem");
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Convert a given px unit to its string representation
|
|
119
|
-
* @param {number} value - number of pixels
|
|
120
|
-
* @returns {string}
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
function px(value) {
|
|
125
|
-
return "".concat(value, "px");
|
|
126
|
-
} // Breakpoint
|
|
127
|
-
// Initial map of our breakpoints and their values
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var breakpoints = {
|
|
131
|
-
sm: {
|
|
132
|
-
width: rem(320),
|
|
133
|
-
columns: 4,
|
|
134
|
-
margin: '0'
|
|
135
|
-
},
|
|
136
|
-
md: {
|
|
137
|
-
width: rem(672),
|
|
138
|
-
columns: 8,
|
|
139
|
-
margin: rem(16)
|
|
140
|
-
},
|
|
141
|
-
lg: {
|
|
142
|
-
width: rem(1056),
|
|
143
|
-
columns: 16,
|
|
144
|
-
margin: rem(16)
|
|
145
|
-
},
|
|
146
|
-
xlg: {
|
|
147
|
-
width: rem(1312),
|
|
148
|
-
columns: 16,
|
|
149
|
-
margin: rem(16)
|
|
150
|
-
},
|
|
151
|
-
max: {
|
|
152
|
-
width: rem(1584),
|
|
153
|
-
columns: 16,
|
|
154
|
-
margin: rem(24)
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
function breakpointUp(name) {
|
|
159
|
-
return "@media (min-width: ".concat(breakpoints[name].width, ")");
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function breakpoint() {
|
|
163
|
-
return breakpointUp.apply(void 0, arguments);
|
|
164
|
-
} // Mini-unit
|
|
165
|
-
|
|
166
95
|
/**
|
|
167
96
|
* Copyright IBM Corp. 2018, 2018
|
|
168
97
|
*
|
|
@@ -171,7 +100,7 @@ function breakpoint() {
|
|
|
171
100
|
*/
|
|
172
101
|
var reset = {
|
|
173
102
|
html: {
|
|
174
|
-
fontSize: px(baseFontSize)
|
|
103
|
+
fontSize: layout.px(layout.baseFontSize)
|
|
175
104
|
},
|
|
176
105
|
body: {
|
|
177
106
|
fontFamily: fontFamilies.sans,
|
|
@@ -305,127 +234,127 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
305
234
|
}
|
|
306
235
|
|
|
307
236
|
var caption01$1 = {
|
|
308
|
-
fontSize: rem(scale[0]),
|
|
237
|
+
fontSize: layout.rem(scale[0]),
|
|
309
238
|
fontWeight: fontWeights.regular,
|
|
310
239
|
lineHeight: 1.33333,
|
|
311
|
-
letterSpacing: px(0.32)
|
|
240
|
+
letterSpacing: layout.px(0.32)
|
|
312
241
|
};
|
|
313
242
|
var caption02$1 = {
|
|
314
|
-
fontSize: rem(scale[1]),
|
|
243
|
+
fontSize: layout.rem(scale[1]),
|
|
315
244
|
fontWeight: fontWeights.regular,
|
|
316
245
|
lineHeight: 1.28572,
|
|
317
|
-
letterSpacing: px(0.32)
|
|
246
|
+
letterSpacing: layout.px(0.32)
|
|
318
247
|
};
|
|
319
248
|
var label01$1 = {
|
|
320
|
-
fontSize: rem(scale[0]),
|
|
249
|
+
fontSize: layout.rem(scale[0]),
|
|
321
250
|
fontWeight: fontWeights.regular,
|
|
322
251
|
lineHeight: 1.33333,
|
|
323
|
-
letterSpacing: px(0.32)
|
|
252
|
+
letterSpacing: layout.px(0.32)
|
|
324
253
|
};
|
|
325
254
|
var label02$1 = {
|
|
326
|
-
fontSize: rem(scale[1]),
|
|
255
|
+
fontSize: layout.rem(scale[1]),
|
|
327
256
|
fontWeight: fontWeights.regular,
|
|
328
257
|
lineHeight: 1.28572,
|
|
329
|
-
letterSpacing: px(0.16)
|
|
258
|
+
letterSpacing: layout.px(0.16)
|
|
330
259
|
};
|
|
331
260
|
var helperText01$1 = {
|
|
332
|
-
fontSize: rem(scale[0]),
|
|
261
|
+
fontSize: layout.rem(scale[0]),
|
|
333
262
|
lineHeight: 1.33333,
|
|
334
|
-
letterSpacing: px(0.32)
|
|
263
|
+
letterSpacing: layout.px(0.32)
|
|
335
264
|
};
|
|
336
265
|
var helperText02$1 = {
|
|
337
|
-
fontSize: rem(scale[1]),
|
|
266
|
+
fontSize: layout.rem(scale[1]),
|
|
338
267
|
lineHeight: 1.28572,
|
|
339
|
-
letterSpacing: px(0.16)
|
|
268
|
+
letterSpacing: layout.px(0.16)
|
|
340
269
|
};
|
|
341
270
|
var bodyShort01$1 = {
|
|
342
|
-
fontSize: rem(scale[1]),
|
|
271
|
+
fontSize: layout.rem(scale[1]),
|
|
343
272
|
fontWeight: fontWeights.regular,
|
|
344
273
|
lineHeight: 1.28572,
|
|
345
|
-
letterSpacing: px(0.16)
|
|
274
|
+
letterSpacing: layout.px(0.16)
|
|
346
275
|
};
|
|
347
276
|
var bodyLong01$1 = {
|
|
348
|
-
fontSize: rem(scale[1]),
|
|
277
|
+
fontSize: layout.rem(scale[1]),
|
|
349
278
|
fontWeight: fontWeights.regular,
|
|
350
279
|
lineHeight: 1.42857,
|
|
351
|
-
letterSpacing: px(0.16)
|
|
280
|
+
letterSpacing: layout.px(0.16)
|
|
352
281
|
};
|
|
353
282
|
var bodyShort02$1 = {
|
|
354
|
-
fontSize: rem(scale[2]),
|
|
283
|
+
fontSize: layout.rem(scale[2]),
|
|
355
284
|
fontWeight: fontWeights.regular,
|
|
356
285
|
lineHeight: 1.375,
|
|
357
286
|
letterSpacing: 0
|
|
358
287
|
};
|
|
359
288
|
var bodyLong02$1 = {
|
|
360
|
-
fontSize: rem(scale[2]),
|
|
289
|
+
fontSize: layout.rem(scale[2]),
|
|
361
290
|
fontWeight: fontWeights.regular,
|
|
362
291
|
lineHeight: 1.5,
|
|
363
292
|
letterSpacing: 0
|
|
364
293
|
};
|
|
365
294
|
var code01$1 = {
|
|
366
295
|
fontFamily: fontFamilies.mono,
|
|
367
|
-
fontSize: rem(scale[0]),
|
|
296
|
+
fontSize: layout.rem(scale[0]),
|
|
368
297
|
fontWeight: fontWeights.regular,
|
|
369
298
|
lineHeight: 1.33333,
|
|
370
|
-
letterSpacing: px(0.32)
|
|
299
|
+
letterSpacing: layout.px(0.32)
|
|
371
300
|
};
|
|
372
301
|
var code02$1 = {
|
|
373
302
|
fontFamily: fontFamilies.mono,
|
|
374
|
-
fontSize: rem(scale[1]),
|
|
303
|
+
fontSize: layout.rem(scale[1]),
|
|
375
304
|
fontWeight: fontWeights.regular,
|
|
376
305
|
lineHeight: 1.42857,
|
|
377
|
-
letterSpacing: px(0.32)
|
|
306
|
+
letterSpacing: layout.px(0.32)
|
|
378
307
|
};
|
|
379
308
|
var heading01$1 = {
|
|
380
|
-
fontSize: rem(scale[1]),
|
|
309
|
+
fontSize: layout.rem(scale[1]),
|
|
381
310
|
fontWeight: fontWeights.semibold,
|
|
382
311
|
lineHeight: 1.42857,
|
|
383
|
-
letterSpacing: px(0.16)
|
|
312
|
+
letterSpacing: layout.px(0.16)
|
|
384
313
|
};
|
|
385
314
|
var productiveHeading01$1 = {
|
|
386
|
-
fontSize: rem(scale[1]),
|
|
315
|
+
fontSize: layout.rem(scale[1]),
|
|
387
316
|
fontWeight: fontWeights.semibold,
|
|
388
317
|
lineHeight: 1.28572,
|
|
389
|
-
letterSpacing: px(0.16)
|
|
318
|
+
letterSpacing: layout.px(0.16)
|
|
390
319
|
};
|
|
391
320
|
var heading02$1 = {
|
|
392
|
-
fontSize: rem(scale[2]),
|
|
321
|
+
fontSize: layout.rem(scale[2]),
|
|
393
322
|
fontWeight: fontWeights.semibold,
|
|
394
323
|
lineHeight: 1.5,
|
|
395
324
|
letterSpacing: 0
|
|
396
325
|
};
|
|
397
326
|
var productiveHeading02$1 = {
|
|
398
|
-
fontSize: rem(scale[2]),
|
|
327
|
+
fontSize: layout.rem(scale[2]),
|
|
399
328
|
fontWeight: fontWeights.semibold,
|
|
400
329
|
lineHeight: 1.375,
|
|
401
330
|
letterSpacing: 0
|
|
402
331
|
};
|
|
403
332
|
var productiveHeading03$1 = {
|
|
404
|
-
fontSize: rem(scale[4]),
|
|
333
|
+
fontSize: layout.rem(scale[4]),
|
|
405
334
|
fontWeight: fontWeights.regular,
|
|
406
335
|
lineHeight: 1.4,
|
|
407
336
|
letterSpacing: 0
|
|
408
337
|
};
|
|
409
338
|
var productiveHeading04$1 = {
|
|
410
|
-
fontSize: rem(scale[6]),
|
|
339
|
+
fontSize: layout.rem(scale[6]),
|
|
411
340
|
fontWeight: fontWeights.regular,
|
|
412
341
|
lineHeight: 1.28572,
|
|
413
342
|
letterSpacing: 0
|
|
414
343
|
};
|
|
415
344
|
var productiveHeading05$1 = {
|
|
416
|
-
fontSize: rem(scale[7]),
|
|
417
|
-
fontWeight: fontWeights.
|
|
345
|
+
fontSize: layout.rem(scale[7]),
|
|
346
|
+
fontWeight: fontWeights.regular,
|
|
418
347
|
lineHeight: 1.25,
|
|
419
348
|
letterSpacing: 0
|
|
420
349
|
};
|
|
421
350
|
var productiveHeading06$1 = {
|
|
422
|
-
fontSize: rem(scale[9]),
|
|
351
|
+
fontSize: layout.rem(scale[9]),
|
|
423
352
|
fontWeight: fontWeights.light,
|
|
424
353
|
lineHeight: 1.199,
|
|
425
354
|
letterSpacing: 0
|
|
426
355
|
};
|
|
427
356
|
var productiveHeading07$1 = {
|
|
428
|
-
fontSize: rem(scale[11]),
|
|
357
|
+
fontSize: layout.rem(scale[11]),
|
|
429
358
|
fontWeight: fontWeights.light,
|
|
430
359
|
lineHeight: 1.199,
|
|
431
360
|
letterSpacing: 0
|
|
@@ -437,138 +366,139 @@ var expressiveHeading02$1 = _objectSpread2(_objectSpread2({}, heading02$1), {},
|
|
|
437
366
|
lineHeight: 1.5
|
|
438
367
|
});
|
|
439
368
|
var expressiveHeading03$1 = {
|
|
440
|
-
fontSize: rem(scale[4]),
|
|
369
|
+
fontSize: layout.rem(scale[4]),
|
|
441
370
|
fontWeight: fontWeights.regular,
|
|
442
371
|
lineHeight: 1.4,
|
|
443
372
|
letterSpacing: 0,
|
|
444
373
|
breakpoints: {
|
|
445
374
|
xlg: {
|
|
446
|
-
fontSize: rem(scale[4]),
|
|
447
|
-
lineHeight: 1.
|
|
375
|
+
fontSize: layout.rem(scale[4]),
|
|
376
|
+
lineHeight: 1.4
|
|
448
377
|
},
|
|
449
378
|
max: {
|
|
450
|
-
fontSize: rem(scale[5]),
|
|
379
|
+
fontSize: layout.rem(scale[5]),
|
|
451
380
|
lineHeight: 1.334
|
|
452
381
|
}
|
|
453
382
|
}
|
|
454
383
|
};
|
|
455
384
|
var expressiveHeading04$1 = {
|
|
456
|
-
fontSize: rem(scale[6]),
|
|
385
|
+
fontSize: layout.rem(scale[6]),
|
|
457
386
|
fontWeight: fontWeights.regular,
|
|
458
387
|
lineHeight: 1.28572,
|
|
459
388
|
letterSpacing: 0,
|
|
460
389
|
breakpoints: {
|
|
461
390
|
xlg: {
|
|
462
|
-
fontSize: rem(scale[7]),
|
|
463
|
-
fontWeight: fontWeights.
|
|
391
|
+
fontSize: layout.rem(scale[7]),
|
|
392
|
+
fontWeight: fontWeights.regular,
|
|
464
393
|
lineHeight: 1.25
|
|
465
394
|
},
|
|
466
395
|
max: {
|
|
467
|
-
fontSize: rem(scale[7]),
|
|
468
|
-
fontWeight: fontWeights.
|
|
396
|
+
fontSize: layout.rem(scale[7]),
|
|
397
|
+
fontWeight: fontWeights.regular
|
|
469
398
|
}
|
|
470
399
|
}
|
|
471
400
|
};
|
|
472
401
|
var expressiveHeading05$1 = {
|
|
473
|
-
fontSize: rem(scale[7]),
|
|
474
|
-
fontWeight: fontWeights.
|
|
402
|
+
fontSize: layout.rem(scale[7]),
|
|
403
|
+
fontWeight: fontWeights.regular,
|
|
475
404
|
lineHeight: 1.25,
|
|
476
405
|
letterSpacing: 0,
|
|
477
406
|
breakpoints: {
|
|
478
407
|
md: {
|
|
479
|
-
fontSize: rem(scale[8]),
|
|
408
|
+
fontSize: layout.rem(scale[8]),
|
|
409
|
+
fontWeight: fontWeights.light,
|
|
480
410
|
lineHeight: 1.22,
|
|
481
411
|
letterSpacing: 0
|
|
482
412
|
},
|
|
483
413
|
lg: {
|
|
484
|
-
fontSize: rem(scale[9]),
|
|
414
|
+
fontSize: layout.rem(scale[9]),
|
|
485
415
|
lineHeight: 1.19,
|
|
486
416
|
letterSpacing: 0
|
|
487
417
|
},
|
|
488
418
|
xlg: {
|
|
489
|
-
fontSize: rem(scale[10]),
|
|
419
|
+
fontSize: layout.rem(scale[10]),
|
|
490
420
|
lineHeight: 1.17,
|
|
491
421
|
letterSpacing: 0
|
|
492
422
|
},
|
|
493
423
|
max: {
|
|
494
|
-
fontSize: rem(scale[12]),
|
|
424
|
+
fontSize: layout.rem(scale[12]),
|
|
495
425
|
letterSpacing: 0
|
|
496
426
|
}
|
|
497
427
|
}
|
|
498
428
|
};
|
|
499
429
|
var expressiveHeading06$1 = {
|
|
500
|
-
fontSize: rem(scale[7]),
|
|
430
|
+
fontSize: layout.rem(scale[7]),
|
|
501
431
|
fontWeight: fontWeights.semibold,
|
|
502
432
|
lineHeight: 1.25,
|
|
503
433
|
letterSpacing: 0,
|
|
504
434
|
breakpoints: {
|
|
505
435
|
md: {
|
|
506
|
-
fontSize: rem(scale[8]),
|
|
436
|
+
fontSize: layout.rem(scale[8]),
|
|
507
437
|
fontWeight: fontWeights.semibold,
|
|
508
438
|
lineHeight: 1.22,
|
|
509
439
|
letterSpacing: 0
|
|
510
440
|
},
|
|
511
441
|
lg: {
|
|
512
|
-
fontSize: rem(scale[9]),
|
|
442
|
+
fontSize: layout.rem(scale[9]),
|
|
513
443
|
fontWeight: fontWeights.semibold,
|
|
514
444
|
lineHeight: 1.19,
|
|
515
445
|
letterSpacing: 0
|
|
516
446
|
},
|
|
517
447
|
xlg: {
|
|
518
|
-
fontSize: rem(scale[10]),
|
|
448
|
+
fontSize: layout.rem(scale[10]),
|
|
519
449
|
fontWeight: fontWeights.semibold,
|
|
520
450
|
lineHeight: 1.17,
|
|
521
451
|
letterSpacing: 0
|
|
522
452
|
},
|
|
523
453
|
max: {
|
|
524
|
-
fontSize: rem(scale[12]),
|
|
454
|
+
fontSize: layout.rem(scale[12]),
|
|
525
455
|
fontWeight: fontWeights.semibold,
|
|
526
456
|
letterSpacing: 0
|
|
527
457
|
}
|
|
528
458
|
}
|
|
529
459
|
};
|
|
530
460
|
var expressiveParagraph01$1 = {
|
|
531
|
-
fontSize: rem(scale[5]),
|
|
461
|
+
fontSize: layout.rem(scale[5]),
|
|
532
462
|
fontWeight: fontWeights.light,
|
|
533
463
|
lineHeight: 1.334,
|
|
534
464
|
letterSpacing: 0,
|
|
535
465
|
breakpoints: {
|
|
536
466
|
lg: {
|
|
537
|
-
fontSize: rem(scale[6]),
|
|
467
|
+
fontSize: layout.rem(scale[6]),
|
|
538
468
|
lineHeight: 1.28572
|
|
539
469
|
},
|
|
540
470
|
max: {
|
|
541
|
-
fontSize: rem(scale[7]),
|
|
471
|
+
fontSize: layout.rem(scale[7]),
|
|
542
472
|
lineHeight: 1.25
|
|
543
473
|
}
|
|
544
474
|
}
|
|
545
475
|
};
|
|
546
476
|
var quotation01$1 = {
|
|
547
477
|
fontFamily: fontFamilies.serif,
|
|
548
|
-
fontSize: rem(scale[4]),
|
|
478
|
+
fontSize: layout.rem(scale[4]),
|
|
549
479
|
fontWeight: fontWeights.regular,
|
|
550
480
|
lineHeight: 1.3,
|
|
551
481
|
letterSpacing: 0,
|
|
552
482
|
breakpoints: {
|
|
553
483
|
md: {
|
|
554
|
-
fontSize: rem(scale[4]),
|
|
484
|
+
fontSize: layout.rem(scale[4]),
|
|
555
485
|
fontWeight: fontWeights.regular,
|
|
556
486
|
letterSpacing: 0
|
|
557
487
|
},
|
|
558
488
|
lg: {
|
|
559
|
-
fontSize: rem(scale[5]),
|
|
489
|
+
fontSize: layout.rem(scale[5]),
|
|
560
490
|
fontWeight: fontWeights.regular,
|
|
561
491
|
lineHeight: 1.334,
|
|
562
492
|
letterSpacing: 0
|
|
563
493
|
},
|
|
564
494
|
xlg: {
|
|
565
|
-
fontSize: rem(scale[6]),
|
|
495
|
+
fontSize: layout.rem(scale[6]),
|
|
566
496
|
fontWeight: fontWeights.regular,
|
|
567
497
|
lineHeight: 1.28572,
|
|
568
498
|
letterSpacing: 0
|
|
569
499
|
},
|
|
570
500
|
max: {
|
|
571
|
-
fontSize: rem(scale[7]),
|
|
501
|
+
fontSize: layout.rem(scale[7]),
|
|
572
502
|
fontWeight: fontWeights.regular,
|
|
573
503
|
lineHeight: 1.25,
|
|
574
504
|
letterSpacing: 0
|
|
@@ -577,122 +507,122 @@ var quotation01$1 = {
|
|
|
577
507
|
};
|
|
578
508
|
var quotation02$1 = {
|
|
579
509
|
fontFamily: fontFamilies.serif,
|
|
580
|
-
fontSize: rem(scale[7]),
|
|
510
|
+
fontSize: layout.rem(scale[7]),
|
|
581
511
|
fontWeight: fontWeights.light,
|
|
582
512
|
lineHeight: 1.25,
|
|
583
513
|
letterSpacing: 0,
|
|
584
514
|
breakpoints: {
|
|
585
515
|
md: {
|
|
586
|
-
fontSize: rem(scale[8]),
|
|
516
|
+
fontSize: layout.rem(scale[8]),
|
|
587
517
|
lineHeight: 1.22
|
|
588
518
|
},
|
|
589
519
|
lg: {
|
|
590
|
-
fontSize: rem(scale[9]),
|
|
520
|
+
fontSize: layout.rem(scale[9]),
|
|
591
521
|
lineHeight: 1.19
|
|
592
522
|
},
|
|
593
523
|
xlg: {
|
|
594
|
-
fontSize: rem(scale[10]),
|
|
524
|
+
fontSize: layout.rem(scale[10]),
|
|
595
525
|
lineHeight: 1.17
|
|
596
526
|
},
|
|
597
527
|
max: {
|
|
598
|
-
fontSize: rem(scale[12])
|
|
528
|
+
fontSize: layout.rem(scale[12])
|
|
599
529
|
}
|
|
600
530
|
}
|
|
601
531
|
};
|
|
602
532
|
var display01$1 = {
|
|
603
|
-
fontSize: rem(scale[9]),
|
|
533
|
+
fontSize: layout.rem(scale[9]),
|
|
604
534
|
fontWeight: fontWeights.light,
|
|
605
535
|
lineHeight: 1.19,
|
|
606
536
|
letterSpacing: 0,
|
|
607
537
|
breakpoints: {
|
|
608
538
|
md: {
|
|
609
|
-
fontSize: rem(scale[9])
|
|
539
|
+
fontSize: layout.rem(scale[9])
|
|
610
540
|
},
|
|
611
541
|
lg: {
|
|
612
|
-
fontSize: rem(scale[11])
|
|
542
|
+
fontSize: layout.rem(scale[11])
|
|
613
543
|
},
|
|
614
544
|
xlg: {
|
|
615
|
-
fontSize: rem(scale[12]),
|
|
545
|
+
fontSize: layout.rem(scale[12]),
|
|
616
546
|
lineHeight: 1.17
|
|
617
547
|
},
|
|
618
548
|
max: {
|
|
619
|
-
fontSize: rem(scale[14]),
|
|
549
|
+
fontSize: layout.rem(scale[14]),
|
|
620
550
|
lineHeight: 1.13
|
|
621
551
|
}
|
|
622
552
|
}
|
|
623
553
|
};
|
|
624
554
|
var display02$1 = {
|
|
625
|
-
fontSize: rem(scale[9]),
|
|
555
|
+
fontSize: layout.rem(scale[9]),
|
|
626
556
|
fontWeight: fontWeights.semibold,
|
|
627
557
|
lineHeight: 1.19,
|
|
628
558
|
letterSpacing: 0,
|
|
629
559
|
breakpoints: {
|
|
630
560
|
md: {
|
|
631
|
-
fontSize: rem(scale[9])
|
|
561
|
+
fontSize: layout.rem(scale[9])
|
|
632
562
|
},
|
|
633
563
|
lg: {
|
|
634
|
-
fontSize: rem(scale[11])
|
|
564
|
+
fontSize: layout.rem(scale[11])
|
|
635
565
|
},
|
|
636
566
|
xlg: {
|
|
637
|
-
fontSize: rem(scale[12]),
|
|
567
|
+
fontSize: layout.rem(scale[12]),
|
|
638
568
|
lineHeight: 1.16
|
|
639
569
|
},
|
|
640
570
|
max: {
|
|
641
|
-
fontSize: rem(scale[14]),
|
|
571
|
+
fontSize: layout.rem(scale[14]),
|
|
642
572
|
lineHeight: 1.13
|
|
643
573
|
}
|
|
644
574
|
}
|
|
645
575
|
};
|
|
646
576
|
var display03$1 = {
|
|
647
|
-
fontSize: rem(scale[9]),
|
|
577
|
+
fontSize: layout.rem(scale[9]),
|
|
648
578
|
fontWeight: fontWeights.light,
|
|
649
579
|
lineHeight: 1.19,
|
|
650
580
|
letterSpacing: 0,
|
|
651
581
|
breakpoints: {
|
|
652
582
|
md: {
|
|
653
|
-
fontSize: rem(scale[11]),
|
|
583
|
+
fontSize: layout.rem(scale[11]),
|
|
654
584
|
lineHeight: 1.18
|
|
655
585
|
},
|
|
656
586
|
lg: {
|
|
657
|
-
fontSize: rem(scale[12]),
|
|
587
|
+
fontSize: layout.rem(scale[12]),
|
|
658
588
|
lineHeight: 1.16,
|
|
659
|
-
letterSpacing: px(-0.64)
|
|
589
|
+
letterSpacing: layout.px(-0.64)
|
|
660
590
|
},
|
|
661
591
|
xlg: {
|
|
662
|
-
fontSize: rem(scale[14]),
|
|
592
|
+
fontSize: layout.rem(scale[14]),
|
|
663
593
|
lineHeight: 1.13
|
|
664
594
|
},
|
|
665
595
|
max: {
|
|
666
|
-
fontSize: rem(scale[15]),
|
|
596
|
+
fontSize: layout.rem(scale[15]),
|
|
667
597
|
lineHeight: 1.11,
|
|
668
|
-
letterSpacing: px(-0.96)
|
|
598
|
+
letterSpacing: layout.px(-0.96)
|
|
669
599
|
}
|
|
670
600
|
}
|
|
671
601
|
};
|
|
672
602
|
var display04$1 = {
|
|
673
|
-
fontSize: rem(scale[9]),
|
|
603
|
+
fontSize: layout.rem(scale[9]),
|
|
674
604
|
fontWeight: fontWeights.light,
|
|
675
605
|
lineHeight: 1.19,
|
|
676
606
|
letterSpacing: 0,
|
|
677
607
|
breakpoints: {
|
|
678
608
|
md: {
|
|
679
|
-
fontSize: rem(scale[13]),
|
|
609
|
+
fontSize: layout.rem(scale[13]),
|
|
680
610
|
lineHeight: 1.15
|
|
681
611
|
},
|
|
682
612
|
lg: {
|
|
683
|
-
fontSize: rem(scale[16]),
|
|
613
|
+
fontSize: layout.rem(scale[16]),
|
|
684
614
|
lineHeight: 1.11,
|
|
685
|
-
letterSpacing: px(-0.64)
|
|
615
|
+
letterSpacing: layout.px(-0.64)
|
|
686
616
|
},
|
|
687
617
|
xlg: {
|
|
688
|
-
fontSize: rem(scale[19]),
|
|
618
|
+
fontSize: layout.rem(scale[19]),
|
|
689
619
|
lineHeight: 1.07,
|
|
690
|
-
letterSpacing: px(-0.64)
|
|
620
|
+
letterSpacing: layout.px(-0.64)
|
|
691
621
|
},
|
|
692
622
|
max: {
|
|
693
|
-
fontSize: rem(scale[22]),
|
|
623
|
+
fontSize: layout.rem(scale[22]),
|
|
694
624
|
lineHeight: 1.05,
|
|
695
|
-
letterSpacing: px(-0.96)
|
|
625
|
+
letterSpacing: layout.px(-0.96)
|
|
696
626
|
}
|
|
697
627
|
}
|
|
698
628
|
}; // Type changes - V11
|
|
@@ -700,16 +630,16 @@ var display04$1 = {
|
|
|
700
630
|
// No changes for code-01, code-02, label-01, label-02
|
|
701
631
|
|
|
702
632
|
var legal01$1 = {
|
|
703
|
-
fontSize: rem(scale[0]),
|
|
633
|
+
fontSize: layout.rem(scale[0]),
|
|
704
634
|
fontWeight: fontWeights.regular,
|
|
705
635
|
lineHeight: 1.33333,
|
|
706
|
-
letterSpacing: px(0.32)
|
|
636
|
+
letterSpacing: layout.px(0.32)
|
|
707
637
|
};
|
|
708
638
|
var legal02$1 = {
|
|
709
|
-
fontSize: rem(scale[1]),
|
|
639
|
+
fontSize: layout.rem(scale[1]),
|
|
710
640
|
fontWeight: fontWeights.regular,
|
|
711
641
|
lineHeight: 1.28572,
|
|
712
|
-
letterSpacing: px(0.16)
|
|
642
|
+
letterSpacing: layout.px(0.16)
|
|
713
643
|
}; // Body styles
|
|
714
644
|
|
|
715
645
|
var bodyCompact01$1 = bodyShort01$1;
|
|
@@ -801,7 +731,7 @@ var styles = /*#__PURE__*/Object.freeze({
|
|
|
801
731
|
});
|
|
802
732
|
|
|
803
733
|
var _excluded = ["breakpoints"];
|
|
804
|
-
var breakpointNames = Object.keys(breakpoints);
|
|
734
|
+
var breakpointNames = Object.keys(layout.breakpoints);
|
|
805
735
|
|
|
806
736
|
function next(name) {
|
|
807
737
|
return breakpointNames[breakpointNames.indexOf(name) + 1];
|
|
@@ -823,7 +753,7 @@ function fluid(selector) {
|
|
|
823
753
|
|
|
824
754
|
styles.fontSize = fluidTypeSize(styles, 'sm', fluidBreakpoints);
|
|
825
755
|
fluidBreakpointNames.forEach(function (name) {
|
|
826
|
-
styles[breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
|
|
756
|
+
styles[layout.breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
|
|
827
757
|
fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
|
|
828
758
|
});
|
|
829
759
|
});
|
|
@@ -831,7 +761,7 @@ function fluid(selector) {
|
|
|
831
761
|
}
|
|
832
762
|
|
|
833
763
|
function fluidTypeSize(defaultStyles, fluidBreakpointName, fluidBreakpoints) {
|
|
834
|
-
var breakpoint = breakpoints[fluidBreakpointName];
|
|
764
|
+
var breakpoint = layout.breakpoints[fluidBreakpointName];
|
|
835
765
|
var fluidBreakpoint = fluidBreakpointName === 'sm' ? defaultStyles : fluidBreakpoints[fluidBreakpointName];
|
|
836
766
|
var maxFontSize = defaultStyles.fontSize;
|
|
837
767
|
var minFontSize = defaultStyles.fontSize;
|
|
@@ -855,7 +785,7 @@ function fluidTypeSize(defaultStyles, fluidBreakpointName, fluidBreakpoints) {
|
|
|
855
785
|
}
|
|
856
786
|
|
|
857
787
|
if (nextFluidBreakpointName) {
|
|
858
|
-
var nextFluidBreakpoint = breakpoints[nextFluidBreakpointName];
|
|
788
|
+
var nextFluidBreakpoint = layout.breakpoints[nextFluidBreakpointName];
|
|
859
789
|
maxFontSize = fluidBreakpoints[nextFluidBreakpointName].fontSize;
|
|
860
790
|
maxViewportWidth = nextFluidBreakpoint.width;
|
|
861
791
|
return "calc(".concat(minFontSize, " + ").concat(subtract(maxFontSize, minFontSize), " * ((100vw - ").concat(minViewportWidth, ") / ").concat(subtract(maxViewportWidth, minViewportWidth), "))");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/type",
|
|
3
3
|
"description": "Typography for digital and software products using the Carbon Design System",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.11.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"clean": "rimraf css es lib umd"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@carbon/grid": "^11.7.0
|
|
40
|
+
"@carbon/grid": "^11.7.0",
|
|
41
|
+
"@carbon/layout": "^11.7.0"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@carbon/cli": "^11.5.0
|
|
44
|
+
"@carbon/cli": "^11.5.0",
|
|
44
45
|
"@carbon/test-utils": "^10.26.0",
|
|
45
46
|
"change-case": "^4.1.1",
|
|
46
47
|
"css": "^3.0.0",
|
|
@@ -52,5 +53,5 @@
|
|
|
52
53
|
"sassDir": "scss",
|
|
53
54
|
"needs": "^1.3.0"
|
|
54
55
|
},
|
|
55
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a55b418b5a33d88d224b9c35f62ebd09c9586764"
|
|
56
57
|
}
|