@carbon/styles 1.48.0-rc.0 → 1.48.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/css/styles.css +217 -30
- package/css/styles.min.css +1 -1
- package/package.json +3 -3
- package/scss/__tests__/theme-test.js +9 -0
- package/scss/components/modal/_modal.scss +5 -2
- package/scss/components/popover/_popover.scss +4 -4
- package/scss/components/slug/_slug.scss +245 -16
- package/scss/components/toggletip/_toggletip.scss +0 -1
- package/scss/utilities/_ai-gradient.scss +13 -9
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/styles",
|
|
3
3
|
"description": "Styles for the Carbon Design System",
|
|
4
|
-
"version": "1.48.0
|
|
4
|
+
"version": "1.48.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@carbon/grid": "^11.21.0",
|
|
44
44
|
"@carbon/layout": "^11.20.0",
|
|
45
45
|
"@carbon/motion": "^11.16.0",
|
|
46
|
-
"@carbon/themes": "^11.29.0
|
|
46
|
+
"@carbon/themes": "^11.29.0",
|
|
47
47
|
"@carbon/type": "^11.25.0",
|
|
48
48
|
"@ibm/plex": "6.0.0-next.6"
|
|
49
49
|
},
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"scss/**/*.css",
|
|
66
66
|
"css/**/*.css"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "6d133d4f920b7c01f6ea2221938a339c14a85b42"
|
|
69
69
|
}
|
|
@@ -149,6 +149,15 @@ describe('@carbon/styles/scss/theme', () => {
|
|
|
149
149
|
"ai-gradient-start-01",
|
|
150
150
|
"ai-gradient-start-02",
|
|
151
151
|
"ai-gradient-end",
|
|
152
|
+
"slug-callout-shadow-inner",
|
|
153
|
+
"slug-callout-shadow-outer-01",
|
|
154
|
+
"slug-callout-shadow-outer-02",
|
|
155
|
+
"slug-callout-border-01",
|
|
156
|
+
"slug-callout-border-02",
|
|
157
|
+
"slug-callout-caret-center",
|
|
158
|
+
"slug-callout-caret-bottom",
|
|
159
|
+
"slug-callout-caret-bottom-background",
|
|
160
|
+
"slug-callout-caret-bottom-background-actions",
|
|
152
161
|
"highlight",
|
|
153
162
|
"overlay",
|
|
154
163
|
"toggle-off",
|
|
@@ -511,8 +511,11 @@
|
|
|
511
511
|
inset-inline-end: 0;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
.#{$prefix}--modal-header
|
|
515
|
-
|
|
514
|
+
.#{$prefix}--modal-header
|
|
515
|
+
> .#{$prefix}--slug:has(+ .#{$prefix}--modal-close-button),
|
|
516
|
+
.#{$prefix}--modal-header
|
|
517
|
+
> .#{$prefix}--modal-close-button
|
|
518
|
+
~ .#{$prefix}--slug,
|
|
516
519
|
.#{$prefix}--modal--slug
|
|
517
520
|
.#{$prefix}--modal-container-body
|
|
518
521
|
> .#{$prefix}--slug {
|
|
@@ -509,26 +509,26 @@ $popover-caret-height: custom-property.get-var(
|
|
|
509
509
|
.#{$prefix}--popover--left-top
|
|
510
510
|
> .#{$prefix}--popover
|
|
511
511
|
> .#{$prefix}--popover-content {
|
|
512
|
-
inset-block-start:
|
|
512
|
+
inset-block-start: 50%;
|
|
513
513
|
inset-inline-end: 100%;
|
|
514
514
|
// Add in 0.1px to prevent rounding errors where the content is
|
|
515
515
|
// moved farther than the caret
|
|
516
516
|
transform: translate(
|
|
517
517
|
calc(-1 * $popover-offset),
|
|
518
|
-
calc(-1 * 0.5 * $popover-offset
|
|
518
|
+
calc(-1 * 0.5 * $popover-offset - 16px)
|
|
519
519
|
);
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.#{$prefix}--popover--left-bottom
|
|
523
523
|
> .#{$prefix}--popover
|
|
524
524
|
> .#{$prefix}--popover-content {
|
|
525
|
-
inset-block-end:
|
|
525
|
+
inset-block-end: 50%;
|
|
526
526
|
inset-inline-end: 100%;
|
|
527
527
|
// Add in 0.1px to prevent rounding errors where the content is
|
|
528
528
|
// moved farther than the caret
|
|
529
529
|
transform: translate(
|
|
530
530
|
calc(-1 * $popover-offset),
|
|
531
|
-
calc(0.5 * $popover-offset
|
|
531
|
+
calc(0.5 * $popover-offset + 16px)
|
|
532
532
|
);
|
|
533
533
|
}
|
|
534
534
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@use '../../utilities/ai-gradient' as *;
|
|
8
8
|
@use '../../utilities/convert';
|
|
9
9
|
@use '../toggletip';
|
|
10
|
+
@use '../popover';
|
|
10
11
|
|
|
11
12
|
$sizes: (
|
|
12
13
|
mini: (
|
|
@@ -328,39 +329,267 @@ $sizes: (
|
|
|
328
329
|
.#{$prefix}--slug.#{$prefix}--slug--enabled .#{$prefix}--slug-content {
|
|
329
330
|
@include callout-gradient();
|
|
330
331
|
|
|
331
|
-
border: 1px solid
|
|
332
|
-
border-radius:
|
|
333
|
-
//
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
// filter: drop-shadow(-45px 45px 100px rgba(0, 0, 0, 0.2));
|
|
338
|
-
box-shadow: -45px 45px 100px rgba(0, 0, 0, 0.2);
|
|
332
|
+
border: 1px solid transparent;
|
|
333
|
+
border-radius: convert.to-rem(8px);
|
|
334
|
+
// Need to make tokens
|
|
335
|
+
box-shadow: inset 0 -80px 70px -65px $slug-callout-shadow-inner,
|
|
336
|
+
-40px 30px 100px -25px $slug-callout-shadow-outer-01,
|
|
337
|
+
-60px 80px 60px -45px $slug-callout-shadow-outer-02;
|
|
339
338
|
color: $text-primary;
|
|
340
339
|
min-inline-size: convert.to-rem(280px);
|
|
341
340
|
}
|
|
342
341
|
|
|
342
|
+
// Slug callout caret styles
|
|
343
343
|
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
344
344
|
> .#{$prefix}--toggletip
|
|
345
345
|
> .#{$prefix}--popover
|
|
346
346
|
> .#{$prefix}--popover-caret {
|
|
347
|
-
background:
|
|
347
|
+
background: transparent;
|
|
348
|
+
clip-path: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Caret pseudo element base styles
|
|
352
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
353
|
+
> .#{$prefix}--toggletip:is(
|
|
354
|
+
.#{$prefix}--popover--top,
|
|
355
|
+
.#{$prefix}--popover--top-right,
|
|
356
|
+
.#{$prefix}--popover--top-left,
|
|
357
|
+
.#{$prefix}--popover--bottom,
|
|
358
|
+
.#{$prefix}--popover--bottom-right,
|
|
359
|
+
.#{$prefix}--popover--bottom-left,
|
|
360
|
+
.#{$prefix}--popover--left,
|
|
361
|
+
.#{$prefix}--popover--left-top,
|
|
362
|
+
.#{$prefix}--popover--left-bottom,
|
|
363
|
+
.#{$prefix}--popover--right,
|
|
364
|
+
.#{$prefix}--popover--right-top,
|
|
365
|
+
.#{$prefix}--popover--right-bottom
|
|
366
|
+
)
|
|
367
|
+
> .#{$prefix}--popover
|
|
368
|
+
> .#{$prefix}--popover-caret::before {
|
|
369
|
+
position: absolute;
|
|
370
|
+
display: block;
|
|
371
|
+
border: 1px solid $slug-callout-border-01;
|
|
372
|
+
background: $background;
|
|
373
|
+
block-size: convert.to-rem(12px);
|
|
374
|
+
clip-path: polygon(98% 0, 0 0, -52% 150%) border-box;
|
|
375
|
+
content: '';
|
|
376
|
+
inline-size: convert.to-rem(12px);
|
|
377
|
+
transform: rotate(45deg);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
381
|
+
> .#{$prefix}--toggletip:is(
|
|
382
|
+
.#{$prefix}--popover--top,
|
|
383
|
+
.#{$prefix}--popover--top-right,
|
|
384
|
+
.#{$prefix}--popover--top-left,
|
|
385
|
+
.#{$prefix}--popover--bottom,
|
|
386
|
+
.#{$prefix}--popover--bottom-right,
|
|
387
|
+
.#{$prefix}--popover--bottom-left,
|
|
388
|
+
.#{$prefix}--popover--left,
|
|
389
|
+
.#{$prefix}--popover--left-top,
|
|
390
|
+
.#{$prefix}--popover--left-bottom,
|
|
391
|
+
.#{$prefix}--popover--right,
|
|
392
|
+
.#{$prefix}--popover--right-top,
|
|
393
|
+
.#{$prefix}--popover--right-bottom
|
|
394
|
+
)
|
|
395
|
+
> .#{$prefix}--popover
|
|
396
|
+
> .#{$prefix}--popover-caret::after {
|
|
397
|
+
position: absolute;
|
|
398
|
+
display: block;
|
|
399
|
+
background: $background;
|
|
400
|
+
block-size: convert.to-rem(14px);
|
|
401
|
+
content: '';
|
|
402
|
+
inline-size: convert.to-rem(2px);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Top
|
|
406
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
407
|
+
> .#{$prefix}--toggletip:is(
|
|
408
|
+
.#{$prefix}--popover--top,
|
|
409
|
+
.#{$prefix}--popover--top-right,
|
|
410
|
+
.#{$prefix}--popover--top-left
|
|
411
|
+
)
|
|
412
|
+
> .#{$prefix}--popover
|
|
413
|
+
> .#{$prefix}--popover-caret {
|
|
414
|
+
&::before {
|
|
415
|
+
inset-block-end: convert.to-rem(1px);
|
|
416
|
+
transform: rotate(-135deg);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
&::after {
|
|
420
|
+
background: $slug-callout-caret-bottom-background;
|
|
421
|
+
block-size: convert.to-rem(2px);
|
|
422
|
+
border-end-end-radius: 50%;
|
|
423
|
+
border-end-start-radius: 50%;
|
|
424
|
+
inline-size: convert.to-rem(14px);
|
|
425
|
+
inset-block-start: convert.to-rem(-2px);
|
|
426
|
+
inset-inline-start: convert.to-rem(-1px);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
431
|
+
> .#{$prefix}--toggletip:is(
|
|
432
|
+
.#{$prefix}--popover--top,
|
|
433
|
+
.#{$prefix}--popover--top-right,
|
|
434
|
+
.#{$prefix}--popover--top-left
|
|
435
|
+
)
|
|
436
|
+
> .#{$prefix}--popover
|
|
437
|
+
> .#{$prefix}--slug-content--with-actions
|
|
438
|
+
+ .#{$prefix}--popover-caret::after {
|
|
439
|
+
display: none;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// Right
|
|
443
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
444
|
+
> .#{$prefix}--toggletip:is(
|
|
445
|
+
.#{$prefix}--popover--right,
|
|
446
|
+
.#{$prefix}--popover--right-bottom,
|
|
447
|
+
.#{$prefix}--popover--right-top
|
|
448
|
+
)
|
|
449
|
+
> .#{$prefix}--popover
|
|
450
|
+
> .#{$prefix}--popover-caret {
|
|
451
|
+
&::before {
|
|
452
|
+
inset-inline-start: convert.to-rem(1px);
|
|
453
|
+
transform: rotate(-45deg);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&::after {
|
|
457
|
+
border-end-start-radius: 50%;
|
|
458
|
+
border-start-start-radius: 50%;
|
|
459
|
+
inset-block-start: convert.to-rem(-1px);
|
|
460
|
+
inset-inline-start: convert.to-rem(6px);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// Bottom
|
|
465
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
466
|
+
> .#{$prefix}--toggletip:is(
|
|
467
|
+
.#{$prefix}--popover--bottom,
|
|
468
|
+
.#{$prefix}--popover--bottom-left,
|
|
469
|
+
.#{$prefix}--popover--bottom-right
|
|
470
|
+
)
|
|
471
|
+
> .#{$prefix}--popover
|
|
472
|
+
> .#{$prefix}--popover-caret {
|
|
473
|
+
&::before {
|
|
474
|
+
inset-block-start: convert.to-rem(1px);
|
|
475
|
+
transform: rotate(45deg);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
&::after {
|
|
479
|
+
block-size: convert.to-rem(2px);
|
|
480
|
+
border-start-end-radius: 50%;
|
|
481
|
+
border-start-start-radius: 50%;
|
|
482
|
+
inline-size: convert.to-rem(14px);
|
|
483
|
+
inset-block-end: convert.to-rem(-2.5px);
|
|
484
|
+
inset-inline-start: convert.to-rem(-1px);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// Left
|
|
489
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
490
|
+
> .#{$prefix}--toggletip:is(
|
|
491
|
+
.#{$prefix}--popover--left,
|
|
492
|
+
.#{$prefix}--popover--left-bottom,
|
|
493
|
+
.#{$prefix}--popover--left-top
|
|
494
|
+
)
|
|
495
|
+
> .#{$prefix}--popover
|
|
496
|
+
> .#{$prefix}--popover-caret {
|
|
497
|
+
&::before {
|
|
498
|
+
inset-inline-end: convert.to-rem(1px);
|
|
499
|
+
transform: rotate(135deg);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
&::after {
|
|
503
|
+
border-end-end-radius: 50%;
|
|
504
|
+
border-start-end-radius: 50%;
|
|
505
|
+
inset-block-start: convert.to-rem(-1px);
|
|
506
|
+
inset-inline-start: convert.to-rem(-2px);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// Override for specific alignments
|
|
511
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
512
|
+
> .#{$prefix}--toggletip:is(
|
|
513
|
+
.#{$prefix}--popover--left-bottom,
|
|
514
|
+
.#{$prefix}--popover--right-bottom
|
|
515
|
+
)
|
|
516
|
+
> .#{$prefix}--popover
|
|
517
|
+
> .#{$prefix}--popover-caret::after {
|
|
518
|
+
background: transparent;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// Change caret color / border when it is near the bottom of the callout
|
|
522
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
523
|
+
> .#{$prefix}--toggletip:is(
|
|
524
|
+
.#{$prefix}--popover--left-bottom,
|
|
525
|
+
.#{$prefix}--popover--right-bottom,
|
|
526
|
+
.#{$prefix}--popover--top,
|
|
527
|
+
.#{$prefix}--popover--top-right,
|
|
528
|
+
.#{$prefix}--popover--top-left
|
|
529
|
+
)
|
|
530
|
+
> .#{$prefix}--popover
|
|
531
|
+
> .#{$prefix}--popover-caret {
|
|
532
|
+
&::before {
|
|
533
|
+
border-color: $slug-callout-caret-bottom;
|
|
534
|
+
background: $slug-callout-caret-bottom-background;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Adjust background if actions are present
|
|
539
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
540
|
+
> .#{$prefix}--toggletip:is(
|
|
541
|
+
.#{$prefix}--popover--left-bottom,
|
|
542
|
+
.#{$prefix}--popover--right-bottom,
|
|
543
|
+
.#{$prefix}--popover--top,
|
|
544
|
+
.#{$prefix}--popover--top-right,
|
|
545
|
+
.#{$prefix}--popover--top-left
|
|
546
|
+
)
|
|
547
|
+
> .#{$prefix}--popover:has(.#{$prefix}--slug-content--with-actions)
|
|
548
|
+
> .#{$prefix}--popover-caret {
|
|
549
|
+
&::before {
|
|
550
|
+
background: $slug-callout-caret-bottom-background-actions;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
// Change the caret border when it is near the middle of the callout
|
|
555
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
556
|
+
> .#{$prefix}--toggletip:is(
|
|
557
|
+
.#{$prefix}--popover--left,
|
|
558
|
+
.#{$prefix}--popover--right
|
|
559
|
+
)
|
|
560
|
+
> .#{$prefix}--popover
|
|
561
|
+
> .#{$prefix}--popover-caret {
|
|
562
|
+
&::before {
|
|
563
|
+
border-color: $slug-callout-caret-center;
|
|
564
|
+
}
|
|
348
565
|
}
|
|
349
566
|
|
|
350
567
|
.#{$prefix}--slug.#{$prefix}--slug--enabled .#{$prefix}--toggletip-content {
|
|
351
568
|
// This sets the max size to the size of the action bar with 3 buttons
|
|
352
|
-
max-inline-size: convert.to-rem(334px);
|
|
353
569
|
padding-block-end: convert.to-rem(80px);
|
|
354
|
-
padding-block-start: convert.to-rem(
|
|
355
|
-
padding-inline: convert.to-rem(
|
|
570
|
+
padding-block-start: convert.to-rem(24px);
|
|
571
|
+
padding-inline: convert.to-rem(24px);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
575
|
+
.#{$prefix}--slug-content--with-actions
|
|
576
|
+
.#{$prefix}--toggletip-content {
|
|
577
|
+
max-inline-size: convert.to-rem(334px);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
581
|
+
.#{$prefix}--slug-content:not(.#{$prefix}--slug-content--with-actions)
|
|
582
|
+
.#{$prefix}--toggletip-content {
|
|
583
|
+
max-inline-size: convert.to-rem(320px);
|
|
356
584
|
}
|
|
357
585
|
|
|
358
586
|
.#{$prefix}--slug.#{$prefix}--slug--enabled .#{$prefix}--slug-actions {
|
|
359
587
|
position: absolute;
|
|
360
588
|
justify-content: flex-end;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
border-end-
|
|
589
|
+
backdrop-filter: blur(85px);
|
|
590
|
+
background: rgba(0, 0, 0, 0.01);
|
|
591
|
+
border-end-end-radius: convert.to-rem(8px);
|
|
592
|
+
border-end-start-radius: convert.to-rem(8px);
|
|
364
593
|
column-gap: 0;
|
|
365
594
|
inline-size: 100%;
|
|
366
595
|
inset-block-end: 0;
|
|
@@ -378,7 +607,7 @@ $sizes: (
|
|
|
378
607
|
.#{$prefix}--slug-actions
|
|
379
608
|
.#{$prefix}--btn--primary {
|
|
380
609
|
order: 1;
|
|
381
|
-
border-end-end-radius: convert.to-rem(
|
|
610
|
+
border-end-end-radius: convert.to-rem(7px);
|
|
382
611
|
}
|
|
383
612
|
|
|
384
613
|
// Revert styles
|
|
@@ -87,16 +87,20 @@
|
|
|
87
87
|
rgba(0, 0, 0, 0.01);
|
|
88
88
|
} @else {
|
|
89
89
|
background: linear-gradient(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
to top,
|
|
91
|
+
theme.$slug-callout-aura-start $start,
|
|
92
|
+
theme.$slug-callout-aura-end 50%
|
|
93
|
+
)
|
|
94
|
+
padding-box,
|
|
95
|
+
linear-gradient(to top, theme.$background, theme.$background) padding-box,
|
|
95
96
|
linear-gradient(
|
|
96
|
-
|
|
97
|
-
theme.$slug-callout-
|
|
98
|
-
theme.$slug-callout-
|
|
97
|
+
to bottom,
|
|
98
|
+
theme.$slug-callout-border-01,
|
|
99
|
+
theme.$slug-callout-border-02
|
|
99
100
|
)
|
|
100
|
-
|
|
101
|
+
border-box,
|
|
102
|
+
// Needed to underlay the transparent border
|
|
103
|
+
linear-gradient(to top, theme.$background, theme.$background)
|
|
104
|
+
border-box;
|
|
101
105
|
}
|
|
102
106
|
}
|