@box/blueprint-web 12.81.2 → 12.81.4

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,6 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
3
  import { forwardRef } from 'react';
4
+ import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
4
5
  import { Text } from '../text/text.js';
5
6
  import styles from './content-card.module.js';
6
7
 
@@ -10,6 +11,10 @@ const ContentCardBody = /*#__PURE__*/forwardRef((props, forwardedRef) => {
10
11
  children,
11
12
  ...rest
12
13
  } = props;
14
+ const {
15
+ enableModernizedComponents
16
+ } = useBlueprintModernization();
17
+ const variant = enableModernizedComponents ? 'caption' : 'bodyDefault';
13
18
  return jsx("div", {
14
19
  className: clsx(styles.cardBody, className),
15
20
  children: jsx(Text, {
@@ -18,7 +23,7 @@ const ContentCardBody = /*#__PURE__*/forwardRef((props, forwardedRef) => {
18
23
  as: "p",
19
24
  className: styles.cardBodyText,
20
25
  color: "textOnLightDefault",
21
- variant: "bodyDefault",
26
+ variant: variant,
22
27
  children: children
23
28
  })
24
29
  });
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"card":"bp_content_card_module_card--085da","ghostCard":"bp_content_card_module_ghostCard--085da","cardContent":"bp_content_card_module_cardContent--085da","cardTitle":"bp_content_card_module_cardTitle--085da","cardTitleText":"bp_content_card_module_cardTitleText--085da","cardBody":"bp_content_card_module_cardBody--085da","cardBodyText":"bp_content_card_module_cardBodyText--085da","cardIcon":"bp_content_card_module_cardIcon--085da","cardBackground":"bp_content_card_module_cardBackground--085da","image":"bp_content_card_module_image--085da","iconGhost":"bp_content_card_module_iconGhost--085da","titleGhost":"bp_content_card_module_titleGhost--085da","bodyGhost":"bp_content_card_module_bodyGhost--085da","pillGhostContainer":"bp_content_card_module_pillGhostContainer--085da","pillGhost":"bp_content_card_module_pillGhost--085da"};
2
+ var styles = {"card":"bp_content_card_module_card--daa2d","ghostCard":"bp_content_card_module_ghostCard--daa2d","cardContent":"bp_content_card_module_cardContent--daa2d","cardTitle":"bp_content_card_module_cardTitle--daa2d","cardTitleText":"bp_content_card_module_cardTitleText--daa2d","cardBody":"bp_content_card_module_cardBody--daa2d","cardBodyText":"bp_content_card_module_cardBodyText--daa2d","cardIcon":"bp_content_card_module_cardIcon--daa2d","cardBackground":"bp_content_card_module_cardBackground--daa2d","image":"bp_content_card_module_image--daa2d","iconGhost":"bp_content_card_module_iconGhost--daa2d","titleGhost":"bp_content_card_module_titleGhost--daa2d","bodyGhost":"bp_content_card_module_bodyGhost--daa2d","pillGhostContainer":"bp_content_card_module_pillGhostContainer--daa2d","pillGhost":"bp_content_card_module_pillGhost--daa2d"};
3
3
 
4
4
  export { styles as default };
@@ -3349,7 +3349,7 @@
3349
3349
  margin-block:var(--select-content-viewport-option-separator-margin-block);
3350
3350
  }
3351
3351
 
3352
- .bp_content_card_module_card--085da[data-modern=false],.bp_content_card_module_ghostCard--085da[data-modern=false]{
3352
+ .bp_content_card_module_card--daa2d[data-modern=false],.bp_content_card_module_ghostCard--daa2d[data-modern=false]{
3353
3353
  --content-card-background-color:var(--surface-surface);
3354
3354
  --content-card-background-height:var(--size-15);
3355
3355
  --content-card-border-radius:var(--size-3);
@@ -3358,6 +3358,8 @@
3358
3358
  --content-card-dropshadow:var(--dropshadow-3);
3359
3359
  --content-card-focused-border-color:var(--outline-focus-on-light);
3360
3360
  --content-card-focused-border-size:var(--border-2);
3361
+ --content-card-icon-border-radius:var(--size-3);
3362
+ --content-card-icon-image-border-radius:unset;
3361
3363
  --content-card-icon-border-size:var(--size-1);
3362
3364
  --content-card-icon-position:var(--size-3);
3363
3365
  --content-card-icon-size:var(--size-14);
@@ -3366,20 +3368,25 @@
3366
3368
  --content-card-padding:var(--size-4);
3367
3369
  --content-card-pressed-background-color:var(--surface-card-surface-pressed);
3368
3370
  --content-card-text-height:var(--size-12);
3371
+ --content-card-text-height-min:unset;
3372
+ --content-card-text-height-max:unset;
3373
+ --content-card-title-align-items:center;
3369
3374
  --content-card-border:var(--border-1) solid var(--border-card-border);
3370
3375
  --content-card-focused-border:var(--border-2) solid var(--outline-focus-on-light);
3371
3376
  --content-card-pressed-border:var(--border-1) solid var(--border-card-border);
3372
3377
  }
3373
3378
 
3374
- .bp_content_card_module_card--085da[data-modern=true],.bp_content_card_module_ghostCard--085da[data-modern=true]{
3379
+ .bp_content_card_module_card--daa2d[data-modern=true],.bp_content_card_module_ghostCard--daa2d[data-modern=true]{
3375
3380
  --content-card-background-color:var(--bp-surface-card-surface);
3376
3381
  --content-card-background-height:var(--bp-size-150);
3377
- --content-card-border-radius:var(--bp-radius-10);
3382
+ --content-card-border-radius:var(--bp-radius-08);
3378
3383
  --content-card-border-size:var(--bp-border-01);
3379
3384
  --content-card-content-gap:var(--bp-space-020);
3380
3385
  --content-card-dropshadow:var(--dropshadow-3);
3381
3386
  --content-card-focused-border-color:var(--bp-outline-focus-on-light);
3382
3387
  --content-card-focused-border-size:var(--bp-border-02);
3388
+ --content-card-icon-border-radius:var(--bp-radius-08);
3389
+ --content-card-icon-image-border-radius:var(--bp-radius-06);
3383
3390
  --content-card-icon-border-size:var(--bp-size-010);
3384
3391
  --content-card-icon-position:var(--bp-size-030);
3385
3392
  --content-card-icon-size:var(--bp-size-140);
@@ -3387,13 +3394,16 @@
3387
3394
  --content-card-min-width:13.75rem;
3388
3395
  --content-card-padding:var(--bp-space-040);
3389
3396
  --content-card-pressed-background-color:var(--bp-surface-card-surface-pressed);
3390
- --content-card-text-height:var(--bp-size-120);
3397
+ --content-card-text-height:unset;
3398
+ --content-card-text-height-min:var(--bp-size-080);
3399
+ --content-card-text-height-max:var(--bp-size-120);
3400
+ --content-card-title-align-items:flex-start;
3391
3401
  --content-card-border:var(--bp-border-01) solid var(--bp-border-card-border);
3392
3402
  --content-card-focused-border:var(--bp-border-02) solid var(--bp-outline-focus-on-light);
3393
3403
  --content-card-pressed-border:var(--bp-border-01) solid var(--bp-border-card-border);
3394
3404
  }
3395
3405
 
3396
- .bp_content_card_module_card--085da{
3406
+ .bp_content_card_module_card--daa2d{
3397
3407
  background-color:var(--content-card-background-color);
3398
3408
  border:var(--content-card-border);
3399
3409
  border-radius:var(--content-card-border-radius);
@@ -3404,21 +3414,21 @@
3404
3414
  padding:var(--content-card-padding);
3405
3415
  position:relative;
3406
3416
  }
3407
- .bp_content_card_module_card--085da:hover{
3417
+ .bp_content_card_module_card--daa2d:hover{
3408
3418
  box-shadow:var(--content-card-dropshadow);
3409
3419
  }
3410
- .bp_content_card_module_card--085da:focus-visible{
3420
+ .bp_content_card_module_card--daa2d:focus-visible{
3411
3421
  border:var(--content-card-focused-border);
3412
3422
  box-shadow:var(--content-card-dropshadow);
3413
3423
  outline:none;
3414
3424
  }
3415
- .bp_content_card_module_card--085da:active{
3425
+ .bp_content_card_module_card--daa2d:active{
3416
3426
  background-color:var(--content-card-pressed-background-color);
3417
3427
  border:var(--content-card-pressed-border);
3418
3428
  box-shadow:none;
3419
3429
  }
3420
3430
 
3421
- .bp_content_card_module_cardContent--085da{
3431
+ .bp_content_card_module_cardContent--daa2d{
3422
3432
  display:flex;
3423
3433
  flex-direction:column;
3424
3434
  gap:var(--content-card-content-gap);
@@ -3427,35 +3437,37 @@
3427
3437
  padding-block-start:calc(var(--content-card-icon-size) + var(--content-card-content-gap) + var(--content-card-icon-border-size));
3428
3438
  }
3429
3439
 
3430
- .bp_content_card_module_cardTitle--085da{
3431
- align-items:center;
3440
+ .bp_content_card_module_cardTitle--daa2d{
3441
+ align-items:var(--content-card-title-align-items);
3432
3442
  display:flex;
3433
3443
  height:var(--content-card-text-height);
3444
+ max-height:var(--content-card-text-height-max);
3445
+ min-height:var(--content-card-text-height-min);
3434
3446
  }
3435
3447
 
3436
- .bp_content_card_module_cardTitleText--085da{
3448
+ .bp_content_card_module_cardTitleText--daa2d{
3437
3449
  -webkit-box-orient:vertical;
3438
3450
  -webkit-line-clamp:2;
3439
3451
  display:-webkit-inline-box;
3440
3452
  overflow:hidden;
3441
3453
  }
3442
3454
 
3443
- .bp_content_card_module_cardBody--085da{
3455
+ .bp_content_card_module_cardBody--daa2d{
3444
3456
  height:var(--content-card-text-height);
3445
3457
  margin-block-end:var(--content-card-content-gap);
3446
3458
  }
3447
3459
 
3448
- .bp_content_card_module_cardBodyText--085da{
3460
+ .bp_content_card_module_cardBodyText--daa2d{
3449
3461
  -webkit-box-orient:vertical;
3450
3462
  -webkit-line-clamp:2;
3451
3463
  display:-webkit-inline-box;
3452
3464
  overflow:hidden;
3453
3465
  }
3454
3466
 
3455
- .bp_content_card_module_cardIcon--085da{
3467
+ .bp_content_card_module_cardIcon--daa2d{
3456
3468
  background-color:var(--content-card-background-color);
3457
3469
  border:var(--content-card-icon-border-size) solid var(--content-card-background-color);
3458
- border-radius:var(--content-card-border-radius);
3470
+ border-radius:var(--content-card-icon-border-radius);
3459
3471
  height:var(--content-card-icon-size);
3460
3472
  left:var(--content-card-icon-position);
3461
3473
  overflow:hidden;
@@ -3465,7 +3477,7 @@
3465
3477
  z-index:1;
3466
3478
  }
3467
3479
 
3468
- .bp_content_card_module_cardBackground--085da{
3480
+ .bp_content_card_module_cardBackground--daa2d{
3469
3481
  height:var(--content-card-background-height);
3470
3482
  left:0;
3471
3483
  overflow:hidden;
@@ -3474,12 +3486,13 @@
3474
3486
  width:100%;
3475
3487
  }
3476
3488
 
3477
- .bp_content_card_module_image--085da{
3489
+ .bp_content_card_module_image--daa2d{
3490
+ border-radius:var(--content-card-icon-image-border-radius);
3478
3491
  height:100%;
3479
3492
  width:100%;
3480
3493
  }
3481
3494
 
3482
- .bp_content_card_module_ghostCard--085da{
3495
+ .bp_content_card_module_ghostCard--daa2d{
3483
3496
  display:flex;
3484
3497
  flex-direction:column;
3485
3498
  max-width:calc(var(--content-card-max-width) - var(--content-card-padding));
@@ -3488,21 +3501,21 @@
3488
3501
  position:relative;
3489
3502
  }
3490
3503
 
3491
- .bp_content_card_module_iconGhost--085da,.bp_content_card_module_titleGhost--085da{
3504
+ .bp_content_card_module_iconGhost--daa2d,.bp_content_card_module_titleGhost--daa2d{
3492
3505
  margin-block-end:var(--content-card-padding);
3493
3506
  }
3494
3507
 
3495
- .bp_content_card_module_bodyGhost--085da{
3508
+ .bp_content_card_module_bodyGhost--daa2d{
3496
3509
  margin-block-end:var(--content-card-content-gap);
3497
3510
  }
3498
3511
 
3499
- .bp_content_card_module_pillGhostContainer--085da{
3512
+ .bp_content_card_module_pillGhostContainer--daa2d{
3500
3513
  display:flex;
3501
3514
  margin-block-end:var(--content-card-padding);
3502
3515
  margin-block-start:var(--content-card-content-gap);
3503
3516
  }
3504
3517
 
3505
- .bp_content_card_module_pillGhost--085da{
3518
+ .bp_content_card_module_pillGhost--daa2d{
3506
3519
  margin-inline-end:var(--content-card-content-gap);
3507
3520
  }
3508
3521
  .bp_content_field_module_contentFieldWrapper--dabac{
@@ -6774,7 +6787,7 @@ table.bp_inline_table_module_inlineTable--f6f94[data-modern=true] td:last-child,
6774
6787
  .bp_page_module_portalEntry--96006{
6775
6788
  display:contents;
6776
6789
  }
6777
- .bp_page_header_module_pageHeader--2768d[data-modern=false]{
6790
+ .bp_page_header_module_pageHeader--dd564[data-modern=false]{
6778
6791
  --page-header-min-height:var(--size-10);
6779
6792
  --page-header-max-height:var(--size-16);
6780
6793
  --page-header-background:var(--surface-surface);
@@ -6783,7 +6796,7 @@ table.bp_inline_table_module_inlineTable--f6f94[data-modern=true] td:last-child,
6783
6796
  --page-header-inline-height:var(--size-10);
6784
6797
  }
6785
6798
 
6786
- .bp_page_header_module_pageHeader--2768d[data-modern=true]{
6799
+ .bp_page_header_module_pageHeader--dd564[data-modern=true]{
6787
6800
  --page-header-min-height:var(--bp-size-100);
6788
6801
  --page-header-max-height:var(--bp-size-160);
6789
6802
  --page-header-background:var(--bp-surface-surface);
@@ -6791,13 +6804,14 @@ table.bp_inline_table_module_inlineTable--f6f94[data-modern=true] td:last-child,
6791
6804
  --page-header-default-padding-inline:var(--bp-space-020);
6792
6805
  --page-header-inline-height:var(--bp-size-100);
6793
6806
  }
6794
- .bp_page_header_module_pageHeader--2768d[data-modern=true]:not(.bp_page_header_module_inline--2768d){
6807
+ .bp_page_header_module_pageHeader--dd564[data-modern=true]:not(.bp_page_header_module_inline--dd564){
6795
6808
  border-bottom:var(--bp-border-01) solid var(--bp-border-header-border);
6796
6809
  }
6797
6810
 
6798
- .bp_page_header_module_pageHeader--2768d{
6811
+ .bp_page_header_module_pageHeader--dd564{
6799
6812
  align-items:center;
6800
6813
  background:var(--page-header-background);
6814
+ box-sizing:border-box;
6801
6815
  display:flex;
6802
6816
  flex-direction:row;
6803
6817
  justify-content:space-between;
@@ -6805,35 +6819,35 @@ table.bp_inline_table_module_inlineTable--f6f94[data-modern=true] td:last-child,
6805
6819
  min-height:var(--page-header-min-height);
6806
6820
  width:100%;
6807
6821
  }
6808
- .bp_page_header_module_pageHeader--2768d.bp_page_header_module_sticky--2768d{
6822
+ .bp_page_header_module_pageHeader--dd564.bp_page_header_module_sticky--dd564{
6809
6823
  bottom:var(--blueprint-page-header-bottom, 0);
6810
6824
  left:var(--blueprint-page-header-left, 0);
6811
6825
  position:sticky;
6812
6826
  right:var(--blueprint-page-header-right, 0);
6813
6827
  top:var(--blueprint-page-header-top, 0);
6814
6828
  }
6815
- .bp_page_header_module_pageHeader--2768d.bp_page_header_module_default--2768d{
6829
+ .bp_page_header_module_pageHeader--dd564.bp_page_header_module_default--dd564{
6816
6830
  height:var(--page-header-default-height);
6817
6831
  padding-inline:var(--page-header-default-padding-inline);
6818
6832
  }
6819
- .bp_page_header_module_pageHeader--2768d.bp_page_header_module_inline--2768d{
6833
+ .bp_page_header_module_pageHeader--dd564.bp_page_header_module_inline--dd564{
6820
6834
  height:var(--page-header-inline-height);
6821
6835
  }
6822
- .bp_page_header_module_pageHeader--2768d .bp_page_header_module_corner--2768d{
6836
+ .bp_page_header_module_pageHeader--dd564 .bp_page_header_module_corner--dd564{
6823
6837
  align-items:center;
6824
6838
  display:flex;
6825
6839
  flex-basis:content;
6826
6840
  flex-grow:0;
6827
6841
  flex-shrink:0;
6828
6842
  }
6829
- .bp_page_header_module_pageHeader--2768d .bp_page_header_module_startElements--2768d{
6843
+ .bp_page_header_module_pageHeader--dd564 .bp_page_header_module_startElements--dd564{
6830
6844
  align-items:center;
6831
6845
  display:flex;
6832
6846
  flex-grow:1;
6833
6847
  justify-content:flex-start;
6834
6848
  overflow:hidden;
6835
6849
  }
6836
- .bp_page_header_module_pageHeader--2768d .bp_page_header_module_endElements--2768d{
6850
+ .bp_page_header_module_pageHeader--dd564 .bp_page_header_module_endElements--dd564{
6837
6851
  align-items:center;
6838
6852
  display:flex;
6839
6853
  flex-direction:row;
@@ -1,4 +1,4 @@
1
1
  import '../../index.css';
2
- var styles = {"pageHeader":"bp_page_header_module_pageHeader--2768d","inline":"bp_page_header_module_inline--2768d","sticky":"bp_page_header_module_sticky--2768d","default":"bp_page_header_module_default--2768d","corner":"bp_page_header_module_corner--2768d","startElements":"bp_page_header_module_startElements--2768d","endElements":"bp_page_header_module_endElements--2768d"};
2
+ var styles = {"pageHeader":"bp_page_header_module_pageHeader--dd564","inline":"bp_page_header_module_inline--dd564","sticky":"bp_page_header_module_sticky--dd564","default":"bp_page_header_module_default--dd564","corner":"bp_page_header_module_corner--dd564","startElements":"bp_page_header_module_startElements--dd564","endElements":"bp_page_header_module_endElements--dd564"};
3
3
 
4
4
  export { styles as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "12.81.2",
3
+ "version": "12.81.4",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {