@box/blueprint-web 12.13.1 → 12.14.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/dist/lib-esm/index.css
CHANGED
|
@@ -5350,60 +5350,119 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
5350
5350
|
white-space:nowrap;
|
|
5351
5351
|
}
|
|
5352
5352
|
|
|
5353
|
-
.bp_notification_module_viewport--
|
|
5353
|
+
.bp_notification_module_viewport--bc071{
|
|
5354
|
+
--notification-viewport-space:var(--space-4);
|
|
5355
|
+
--notification-viewport-item-spacing:var(--space-3);
|
|
5354
5356
|
all:unset;
|
|
5355
5357
|
align-items:center;
|
|
5356
5358
|
display:flex;
|
|
5357
5359
|
flex-direction:column;
|
|
5358
|
-
gap:var(--
|
|
5360
|
+
gap:var(--notification-viewport-item-spacing);
|
|
5359
5361
|
left:50%;
|
|
5360
5362
|
position:fixed;
|
|
5361
|
-
top:var(--space
|
|
5363
|
+
top:var(--notification-viewport-space);
|
|
5362
5364
|
transform:translate(-50%);
|
|
5363
5365
|
z-index:2147483647;
|
|
5364
5366
|
}
|
|
5365
5367
|
|
|
5366
|
-
.bp_notification_module_root--
|
|
5367
|
-
|
|
5368
|
-
|
|
5368
|
+
.bp_notification_module_root--bc071[data-modern=false]{
|
|
5369
|
+
--notification-padding-vertical:var(--space-3);
|
|
5370
|
+
--notification-padding-horizontal:var(--space-4);
|
|
5371
|
+
--notification-item-spacing:var(--space-3);
|
|
5372
|
+
--notification-radius:var(--radius-3);
|
|
5373
|
+
--notification-border:var(--border-2);
|
|
5374
|
+
--notification-shadow:var(--dropshadow-3);
|
|
5375
|
+
--notification-background-info:var(--surface-message-surface-info);
|
|
5376
|
+
--notification-background-success:var(--surface-message-surface-success);
|
|
5377
|
+
--notification-background-warning:var(--surface-message-surface-warning);
|
|
5378
|
+
--notification-background-error:var(--surface-message-surface-error);
|
|
5379
|
+
--notification-background-blur:none;
|
|
5380
|
+
--notification-border-color-info:var(--border-message-border-info);
|
|
5381
|
+
--notification-border-color-success:var(--border-message-border-success);
|
|
5382
|
+
--notification-border-color-warning:var(--border-message-border-warning);
|
|
5383
|
+
--notification-border-color-error:var(--border-message-border-error);
|
|
5384
|
+
--notification-text-color:var(--text-text-on-light);
|
|
5385
|
+
--notification-text-container-height:var(--space-8);
|
|
5386
|
+
--notification-icon-size:var(--size-8);
|
|
5387
|
+
}
|
|
5388
|
+
|
|
5389
|
+
.bp_notification_module_root--bc071[data-modern=true]{
|
|
5390
|
+
--notification-padding-vertical:var(--bp-space-030);
|
|
5391
|
+
--notification-padding-horizontal:var(--bp-space-040);
|
|
5392
|
+
--notification-item-spacing:var(--bp-space-030);
|
|
5393
|
+
--notification-radius:var(--bp-radius-16);
|
|
5394
|
+
--notification-border:var(--bp-border-02);
|
|
5395
|
+
--notification-shadow:var(--dropshadow-3);
|
|
5396
|
+
--notification-background-info:var(--bp-light-blue-opacity-04);
|
|
5397
|
+
--notification-background-success:var(--bp-green-light-opacity-04);
|
|
5398
|
+
--notification-background-warning:var(--bp-yellow-opacity-04);
|
|
5399
|
+
--notification-background-error:var(--bp-watermelon-red-opacity-04);
|
|
5400
|
+
--notification-background-overlay:var(--bp-white-opacity-90);
|
|
5401
|
+
--notification-background-blur:16px;
|
|
5402
|
+
--notification-border-color-info:var(--bp-light-blue-opacity-30);
|
|
5403
|
+
--notification-border-color-success:var(--bp-green-light-opacity-30);
|
|
5404
|
+
--notification-border-color-warning:var(--bp-yellow-opacity-30);
|
|
5405
|
+
--notification-border-color-error:var(--bp-watermelon-red-opacity-30);
|
|
5406
|
+
--notification-outline-focus:var(--bp-outline-focus-on-light);
|
|
5407
|
+
--notification-text-color:var(--bp-text-text-on-light);
|
|
5408
|
+
--notification-text-container-height:var(--bp-space-080);
|
|
5409
|
+
--notification-icon-size:var(--bp-size-080);
|
|
5410
|
+
}
|
|
5411
|
+
.bp_notification_module_root--bc071[data-modern=true].bp_notification_module_info--bc071{
|
|
5412
|
+
background:linear-gradient(0deg, var(--notification-background-info) 0, var(--notification-background-info) 100%), var(--notification-background-overlay);
|
|
5413
|
+
}
|
|
5414
|
+
.bp_notification_module_root--bc071[data-modern=true].bp_notification_module_success--bc071{
|
|
5415
|
+
background:linear-gradient(0deg, var(--notification-background-success) 0, var(--notification-background-success) 100%), var(--notification-background-overlay);
|
|
5416
|
+
}
|
|
5417
|
+
.bp_notification_module_root--bc071[data-modern=true].bp_notification_module_warning--bc071{
|
|
5418
|
+
background:linear-gradient(0deg, var(--notification-background-warning) 0, var(--notification-background-warning) 100%), var(--notification-background-overlay);
|
|
5419
|
+
}
|
|
5420
|
+
.bp_notification_module_root--bc071[data-modern=true].bp_notification_module_error--bc071{
|
|
5421
|
+
background:linear-gradient(0deg, var(--notification-background-error) 0, var(--notification-background-error) 100%), var(--notification-background-overlay);
|
|
5422
|
+
}
|
|
5423
|
+
|
|
5424
|
+
.bp_notification_module_root--bc071{
|
|
5425
|
+
backdrop-filter:blur(var(--notification-background-blur));
|
|
5426
|
+
border:var(--notification-border) solid;
|
|
5427
|
+
border-radius:var(--notification-radius);
|
|
5428
|
+
box-shadow:var(--notification-shadow);
|
|
5369
5429
|
display:flex;
|
|
5370
5430
|
max-width:288px;
|
|
5371
5431
|
width:max-content;
|
|
5372
5432
|
}
|
|
5373
5433
|
@media (width > 374px){
|
|
5374
|
-
.bp_notification_module_root--
|
|
5434
|
+
.bp_notification_module_root--bc071{
|
|
5375
5435
|
max-width:343px;
|
|
5376
5436
|
}
|
|
5377
5437
|
}
|
|
5378
5438
|
@media (width > 767px){
|
|
5379
|
-
.bp_notification_module_root--
|
|
5439
|
+
.bp_notification_module_root--bc071{
|
|
5380
5440
|
max-width:728px;
|
|
5381
5441
|
}
|
|
5382
5442
|
}
|
|
5383
5443
|
@media (width > 1023px){
|
|
5384
|
-
.bp_notification_module_root--
|
|
5444
|
+
.bp_notification_module_root--bc071{
|
|
5385
5445
|
max-width:848px;
|
|
5386
5446
|
}
|
|
5387
5447
|
}
|
|
5388
5448
|
@media (width > 1219px){
|
|
5389
|
-
.bp_notification_module_root--
|
|
5449
|
+
.bp_notification_module_root--bc071{
|
|
5390
5450
|
max-width:896px;
|
|
5391
5451
|
}
|
|
5392
5452
|
}
|
|
5393
|
-
.bp_notification_module_root--
|
|
5453
|
+
.bp_notification_module_root--bc071 .bp_notification_module_container--bc071{
|
|
5394
5454
|
align-items:flex-start;
|
|
5395
|
-
box-shadow:var(--dropshadow-3);
|
|
5396
5455
|
display:flex;
|
|
5397
|
-
gap:var(--
|
|
5398
|
-
padding:var(--
|
|
5456
|
+
gap:var(--notification-item-spacing);
|
|
5457
|
+
padding:var(--notification-padding-vertical) 0;
|
|
5399
5458
|
width:100%;
|
|
5400
5459
|
}
|
|
5401
5460
|
@media (width > 767px){
|
|
5402
|
-
.bp_notification_module_root--
|
|
5461
|
+
.bp_notification_module_root--bc071 .bp_notification_module_container--bc071{
|
|
5403
5462
|
align-items:center;
|
|
5404
5463
|
}
|
|
5405
5464
|
}
|
|
5406
|
-
.bp_notification_module_root--
|
|
5465
|
+
.bp_notification_module_root--bc071 .bp_notification_module_mobileContainer--bc071{
|
|
5407
5466
|
align-items:left;
|
|
5408
5467
|
display:flex;
|
|
5409
5468
|
flex-direction:column;
|
|
@@ -5411,88 +5470,89 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
5411
5470
|
width:100%;
|
|
5412
5471
|
}
|
|
5413
5472
|
@media (width > 767px){
|
|
5414
|
-
.bp_notification_module_root--
|
|
5473
|
+
.bp_notification_module_root--bc071 .bp_notification_module_mobileContainer--bc071{
|
|
5415
5474
|
align-items:center;
|
|
5416
5475
|
flex-direction:row;
|
|
5417
5476
|
}
|
|
5418
5477
|
}
|
|
5419
|
-
.bp_notification_module_root--
|
|
5420
|
-
gap:var(--
|
|
5478
|
+
.bp_notification_module_root--bc071 .bp_notification_module_withButtons--bc071{
|
|
5479
|
+
gap:var(--notification-item-spacing);
|
|
5421
5480
|
}
|
|
5422
|
-
.bp_notification_module_root--
|
|
5423
|
-
background:var(--
|
|
5424
|
-
border-color:var(--border-
|
|
5481
|
+
.bp_notification_module_root--bc071.bp_notification_module_info--bc071{
|
|
5482
|
+
background:var(--notification-background-info);
|
|
5483
|
+
border-color:var(--notification-border-color-info);
|
|
5425
5484
|
}
|
|
5426
|
-
.bp_notification_module_root--
|
|
5427
|
-
background:var(--
|
|
5428
|
-
border-color:var(--border-
|
|
5485
|
+
.bp_notification_module_root--bc071.bp_notification_module_success--bc071{
|
|
5486
|
+
background:var(--notification-background-success);
|
|
5487
|
+
border-color:var(--notification-border-color-success);
|
|
5429
5488
|
}
|
|
5430
|
-
.bp_notification_module_root--
|
|
5431
|
-
background:var(--
|
|
5432
|
-
border-color:var(--border-
|
|
5489
|
+
.bp_notification_module_root--bc071.bp_notification_module_warning--bc071{
|
|
5490
|
+
background:var(--notification-background-warning);
|
|
5491
|
+
border-color:var(--notification-border-color-warning);
|
|
5433
5492
|
}
|
|
5434
|
-
.bp_notification_module_root--
|
|
5435
|
-
background:var(--
|
|
5436
|
-
border-color:var(--border-
|
|
5493
|
+
.bp_notification_module_root--bc071.bp_notification_module_error--bc071{
|
|
5494
|
+
background:var(--notification-background-error);
|
|
5495
|
+
border-color:var(--notification-border-color-error);
|
|
5437
5496
|
}
|
|
5438
|
-
.bp_notification_module_root--
|
|
5439
|
-
box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--outline-focus
|
|
5497
|
+
.bp_notification_module_root--bc071:focus-visible{
|
|
5498
|
+
box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--notification-outline-focus);
|
|
5440
5499
|
outline:none;
|
|
5441
5500
|
}
|
|
5442
|
-
.bp_notification_module_root--
|
|
5501
|
+
.bp_notification_module_root--bc071 .bp_notification_module_typeIconContainer--bc071{
|
|
5443
5502
|
align-items:center;
|
|
5444
5503
|
display:flex;
|
|
5445
|
-
height:var(--size
|
|
5504
|
+
height:var(--notification-icon-size);
|
|
5446
5505
|
justify-content:center;
|
|
5447
|
-
width:var(--size
|
|
5506
|
+
width:var(--notification-icon-size);
|
|
5448
5507
|
}
|
|
5449
|
-
.bp_notification_module_root--
|
|
5508
|
+
.bp_notification_module_root--bc071 .bp_notification_module_typeIconContainer--bc071 .bp_notification_module_typeIcon--bc071{
|
|
5450
5509
|
flex-shrink:0;
|
|
5451
|
-
margin-left:var(--
|
|
5510
|
+
margin-left:var(--notification-padding-horizontal);
|
|
5452
5511
|
}
|
|
5453
|
-
.bp_notification_module_root--
|
|
5512
|
+
.bp_notification_module_root--bc071 .bp_notification_module_text--bc071{
|
|
5454
5513
|
align-items:center;
|
|
5455
|
-
color:var(--
|
|
5514
|
+
color:var(--notification-text-color);
|
|
5456
5515
|
display:flex;
|
|
5457
5516
|
font-family:var(--body-default-bold-font-family);
|
|
5458
5517
|
font-size:var(--body-default-bold-font-size);
|
|
5459
5518
|
font-weight:var(--body-default-bold-font-weight);
|
|
5460
|
-
gap:var(--
|
|
5519
|
+
gap:var(--notification-item-spacing);
|
|
5461
5520
|
letter-spacing:var(--body-default-bold-letter-spacing);
|
|
5462
5521
|
line-height:var(--body-default-bold-line-height);
|
|
5522
|
+
min-height:var(--notification-text-container-height);
|
|
5463
5523
|
overflow:hidden;
|
|
5464
5524
|
-webkit-text-decoration:var(--body-default-bold-text-decoration);
|
|
5465
5525
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
5466
5526
|
text-transform:var(--body-default-bold-text-case);
|
|
5467
5527
|
}
|
|
5468
|
-
.bp_notification_module_root--
|
|
5528
|
+
.bp_notification_module_root--bc071 .bp_notification_module_text--bc071 > div{
|
|
5469
5529
|
overflow:hidden;
|
|
5470
5530
|
overflow-wrap:break-word;
|
|
5471
5531
|
}
|
|
5472
|
-
.bp_notification_module_root--
|
|
5532
|
+
.bp_notification_module_root--bc071 .bp_notification_module_contentButtonSection--bc071{
|
|
5473
5533
|
display:flex;
|
|
5474
|
-
gap:var(--
|
|
5534
|
+
gap:var(--notification-item-spacing);
|
|
5475
5535
|
margin-left:0;
|
|
5476
5536
|
}
|
|
5477
5537
|
@media (width > 767px){
|
|
5478
|
-
.bp_notification_module_root--
|
|
5538
|
+
.bp_notification_module_root--bc071 .bp_notification_module_contentButtonSection--bc071{
|
|
5479
5539
|
margin-left:auto;
|
|
5480
5540
|
}
|
|
5481
5541
|
}
|
|
5482
|
-
.bp_notification_module_root--
|
|
5542
|
+
.bp_notification_module_root--bc071 .bp_notification_module_contentButtonSection--bc071 .bp_notification_module_contentButtons--bc071{
|
|
5483
5543
|
display:flex;
|
|
5484
|
-
gap:var(--
|
|
5544
|
+
gap:var(--notification-item-spacing);
|
|
5485
5545
|
}
|
|
5486
|
-
.bp_notification_module_root--
|
|
5546
|
+
.bp_notification_module_root--bc071 .bp_notification_module_closeButtonSection--bc071{
|
|
5487
5547
|
display:flex;
|
|
5488
|
-
gap:var(--
|
|
5548
|
+
gap:var(--notification-item-spacing);
|
|
5489
5549
|
margin-left:auto;
|
|
5490
|
-
margin-right:var(--
|
|
5550
|
+
margin-right:var(--notification-padding-horizontal);
|
|
5491
5551
|
}
|
|
5492
|
-
.bp_notification_module_root--
|
|
5552
|
+
.bp_notification_module_root--bc071 .bp_notification_module_closeButtonSection--bc071 .bp_notification_module_closeButton--bc071{
|
|
5493
5553
|
align-self:center;
|
|
5494
5554
|
}
|
|
5495
|
-
.bp_notification_module_root--
|
|
5555
|
+
.bp_notification_module_root--bc071 .bp_notification_module_closeButtonSection--bc071 .bp_notification_module_closeButton--bc071 svg *{
|
|
5496
5556
|
fill:currentColor;
|
|
5497
5557
|
}
|
|
5498
5558
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"viewport":"bp_notification_module_viewport--
|
|
2
|
+
var styles = {"viewport":"bp_notification_module_viewport--bc071","root":"bp_notification_module_root--bc071","info":"bp_notification_module_info--bc071","success":"bp_notification_module_success--bc071","warning":"bp_notification_module_warning--bc071","error":"bp_notification_module_error--bc071","container":"bp_notification_module_container--bc071","mobileContainer":"bp_notification_module_mobileContainer--bc071","withButtons":"bp_notification_module_withButtons--bc071","typeIconContainer":"bp_notification_module_typeIconContainer--bc071","typeIcon":"bp_notification_module_typeIcon--bc071","text":"bp_notification_module_text--bc071","contentButtonSection":"bp_notification_module_contentButtonSection--bc071","contentButtons":"bp_notification_module_contentButtons--bc071","closeButtonSection":"bp_notification_module_closeButtonSection--bc071","closeButton":"bp_notification_module_closeButton--bc071"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -5,6 +5,7 @@ import { Size5 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
|
5
5
|
import * as Toast from '@radix-ui/react-toast';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
9
|
import { IconButton } from '../icon-button/icon-button.js';
|
|
9
10
|
import styles from './notification.module.js';
|
|
10
11
|
|
|
@@ -56,9 +57,13 @@ function PrivateNotificationElement(props) {
|
|
|
56
57
|
...rest
|
|
57
58
|
} = props;
|
|
58
59
|
const iconComponent = useMemo(() => getIcon(typeIconAriaLabel, variant), [typeIconAriaLabel, variant]);
|
|
60
|
+
const {
|
|
61
|
+
enableModernizedComponents
|
|
62
|
+
} = useBlueprintModernization();
|
|
59
63
|
return jsx(Toast.Root, {
|
|
60
64
|
...rest,
|
|
61
65
|
className: clsx(styles.root, styles[variant]),
|
|
66
|
+
"data-modern": enableModernizedComponents,
|
|
62
67
|
onOpenChange: onClose,
|
|
63
68
|
open: open,
|
|
64
69
|
type: sensitivity,
|