@box/blueprint-web 12.81.2 → 12.81.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,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:
|
|
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--
|
|
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 };
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -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--
|
|
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--
|
|
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-
|
|
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:
|
|
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--
|
|
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--
|
|
3417
|
+
.bp_content_card_module_card--daa2d:hover{
|
|
3408
3418
|
box-shadow:var(--content-card-dropshadow);
|
|
3409
3419
|
}
|
|
3410
|
-
.bp_content_card_module_card--
|
|
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--
|
|
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--
|
|
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--
|
|
3431
|
-
align-items:
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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--
|
|
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{
|