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