@box/blueprint-web-assets 5.4.1 → 5.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,29 @@
1
+ /**
2
+ * Lato → Inter Typeface Migration [UXF-959]
3
+ *
4
+ * This file contains three types of typography mixins:
5
+ * 1. `bp-lato-*` - typography variants for Lato (default)
6
+ * 2. `bp-inter-*` - typography variants for Inter
7
+ * 3. `bp-*` - font-agnostic typography variants
8
+ *
9
+ * Consumers should only use the generic `bp-*` mixins. The font-specific
10
+ * `bp-lato-*` and `bp-inter-*` mixins are transitional implementation details
11
+ * and are expected to be removed once Inter becomes the single typeface.
12
+ *
13
+ * The generic `bp-*` mixins only render Inter when the document body contains
14
+ * the `is-inter-font` class name. The consuming application is responsible
15
+ * for adding the class when the `box_inter_font` feature flag is enabled.
16
+ *
17
+ * See https://git.dev.box.net/Box/EndUserApp/blob/a0b83d2e1f66aef4f09619cae1a9f909468599b7/src/components/core/application/components/InterFontApplication.ts
18
+ *
19
+ * NOTE: Inter styles are currently hard-coded and must be replaced with CSS
20
+ * variables when the tokens are exported from Figma (LXP-839).
21
+ */
22
+
1
23
  $bp-lato-font-family: var(--bp-font-font-family), -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto,
2
24
  'Helvetica Neue', sans-serif;
25
+ $bp-inter-font-family: InterVariable, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto,
26
+ 'Helvetica Neue', sans-serif;
3
27
 
4
28
  @mixin bp-lato-title-mondo {
5
29
  font-weight: var(--bp-font-weight-black);
@@ -202,11 +226,6 @@ $bp-lato-font-family: var(--bp-font-font-family), -apple-system, BlinkMacSystemF
202
226
  letter-spacing: var(--bp-font-letter-spacing-01);
203
227
  }
204
228
 
205
- // TODO LXP-839 Use CSS variables once tokens are exported from Figma.
206
-
207
- $bp-inter-font-family: InterVariable, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto,
208
- 'Helvetica Neue', sans-serif;
209
-
210
229
  @mixin bp-inter-title-mondo {
211
230
  font-weight: 550;
212
231
  font-size: 2rem; // 32px
@@ -452,3 +471,179 @@ $bp-inter-font-family: InterVariable, -apple-system, BlinkMacSystemFont, 'San Fr
452
471
  text-transform: none;
453
472
  text-decoration: none;
454
473
  }
474
+
475
+ @mixin bp-title-mondo {
476
+ @include bp-lato-title-mondo;
477
+
478
+ @at-root :global(:where(body.is-inter-font)) & {
479
+ @include bp-inter-title-mondo;
480
+ }
481
+ }
482
+
483
+ @mixin bp-title-xlarge {
484
+ @include bp-lato-title-xlarge;
485
+
486
+ @at-root :global(:where(body.is-inter-font)) & {
487
+ @include bp-inter-title-xlarge;
488
+ }
489
+ }
490
+
491
+ @mixin bp-title-large {
492
+ @include bp-lato-title-large;
493
+
494
+ @at-root :global(:where(body.is-inter-font)) & {
495
+ @include bp-inter-title-large;
496
+ }
497
+ }
498
+
499
+ @mixin bp-title-medium {
500
+ @include bp-lato-title-medium;
501
+
502
+ @at-root :global(:where(body.is-inter-font)) & {
503
+ @include bp-inter-title-medium;
504
+ }
505
+ }
506
+
507
+ @mixin bp-title-small {
508
+ @include bp-lato-title-small;
509
+
510
+ @at-root :global(:where(body.is-inter-font)) & {
511
+ @include bp-inter-title-small;
512
+ }
513
+ }
514
+
515
+ @mixin bp-subtitle {
516
+ @include bp-lato-subtitle;
517
+
518
+ @at-root :global(:where(body.is-inter-font)) & {
519
+ @include bp-inter-subtitle;
520
+ }
521
+ }
522
+
523
+ @mixin bp-body-large-bold {
524
+ @include bp-lato-body-large-bold;
525
+
526
+ @at-root :global(:where(body.is-inter-font)) & {
527
+ @include bp-inter-body-large-bold;
528
+ }
529
+ }
530
+
531
+ @mixin bp-body-large {
532
+ @include bp-lato-body-large;
533
+
534
+ @at-root :global(:where(body.is-inter-font)) & {
535
+ @include bp-inter-body-large;
536
+ }
537
+ }
538
+
539
+ @mixin bp-body-default-bold {
540
+ @include bp-lato-body-default-bold;
541
+
542
+ @at-root :global(:where(body.is-inter-font)) & {
543
+ @include bp-inter-body-default-bold;
544
+ }
545
+ }
546
+
547
+ @mixin bp-body-default-semibold {
548
+ @include bp-lato-body-default-semibold;
549
+
550
+ @at-root :global(:where(body.is-inter-font)) & {
551
+ @include bp-inter-body-default-semibold;
552
+ }
553
+ }
554
+
555
+ @mixin bp-body-default {
556
+ @include bp-lato-body-default;
557
+
558
+ @at-root :global(:where(body.is-inter-font)) & {
559
+ @include bp-inter-body-default;
560
+ }
561
+ }
562
+
563
+ @mixin bp-body-small-semibold {
564
+ @include bp-lato-body-small-semibold;
565
+
566
+ @at-root :global(:where(body.is-inter-font)) & {
567
+ @include bp-inter-body-small-semibold;
568
+ }
569
+ }
570
+
571
+ @mixin bp-body-small {
572
+ @include bp-lato-body-small;
573
+
574
+ @at-root :global(:where(body.is-inter-font)) & {
575
+ @include bp-inter-body-small;
576
+ }
577
+ }
578
+
579
+ @mixin bp-caption-bold {
580
+ @include bp-lato-caption-bold;
581
+
582
+ @at-root :global(:where(body.is-inter-font)) & {
583
+ @include bp-inter-caption-bold;
584
+ }
585
+ }
586
+
587
+ @mixin bp-caption-default {
588
+ @include bp-lato-caption-default;
589
+
590
+ @at-root :global(:where(body.is-inter-font)) & {
591
+ @include bp-inter-caption-default;
592
+ }
593
+ }
594
+
595
+ @mixin bp-label-bold {
596
+ @include bp-lato-label-bold;
597
+
598
+ @at-root :global(:where(body.is-inter-font)) & {
599
+ @include bp-inter-label-bold;
600
+ }
601
+ }
602
+
603
+ @mixin bp-label-default {
604
+ @include bp-lato-label-default;
605
+
606
+ @at-root :global(:where(body.is-inter-font)) & {
607
+ @include bp-inter-label-default;
608
+ }
609
+ }
610
+
611
+ @mixin bp-link-default {
612
+ @include bp-lato-link-default;
613
+
614
+ @at-root :global(:where(body.is-inter-font)) & {
615
+ @include bp-inter-link-default;
616
+ }
617
+ }
618
+
619
+ @mixin bp-notification-default {
620
+ @include bp-lato-notification-default;
621
+
622
+ @at-root :global(:where(body.is-inter-font)) & {
623
+ @include bp-inter-notification-default;
624
+ }
625
+ }
626
+
627
+ @mixin bp-metric-large {
628
+ @include bp-lato-metric-large;
629
+
630
+ @at-root :global(:where(body.is-inter-font)) & {
631
+ @include bp-inter-metric-large;
632
+ }
633
+ }
634
+
635
+ @mixin bp-metric-medium {
636
+ @include bp-lato-metric-medium;
637
+
638
+ @at-root :global(:where(body.is-inter-font)) & {
639
+ @include bp-inter-metric-medium;
640
+ }
641
+ }
642
+
643
+ @mixin bp-metric-small {
644
+ @include bp-lato-metric-small;
645
+
646
+ @at-root :global(:where(body.is-inter-font)) & {
647
+ @include bp-inter-metric-small;
648
+ }
649
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web-assets",
3
- "version": "5.4.1",
3
+ "version": "5.4.3",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "scripts": {
6
6
  "build-storybook": "nx run blueprint-web-assets:build-storybook",
@@ -155,7 +155,7 @@
155
155
  }
156
156
  },
157
157
  "devDependencies": {
158
- "@box/storybook-utils": "^1.1.20",
158
+ "@box/storybook-utils": "^1.1.22",
159
159
  "@figma/code-connect": "1.4.4",
160
160
  "@types/react": "^18.0.0",
161
161
  "@types/react-dom": "^18.0.0",