@carbon/styles 1.48.1 → 1.49.0-rc.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 +69 -13
- package/css/styles.min.css +1 -1
- package/package.json +3 -3
- package/scss/__tests__/theme-test.js +12 -0
- package/scss/components/button/_button.scss +6 -0
- package/scss/components/modal/_modal.scss +1 -1
- package/scss/components/number-input/_number-input.scss +6 -1
- package/scss/components/slug/_slug.scss +1 -7
- package/scss/components/tile/_tile.scss +17 -7
- package/scss/utilities/_ai-gradient.scss +40 -27
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.
|
|
4
|
+
"version": "1.49.0-rc.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.
|
|
46
|
+
"@carbon/themes": "^11.30.0-rc.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": "79048666dc3d8f66c3d64b46de45b25ce13d9adf"
|
|
69
69
|
}
|
|
@@ -154,6 +154,9 @@ describe('@carbon/styles/scss/theme', () => {
|
|
|
154
154
|
"ai-inner-shadow",
|
|
155
155
|
"ai-aura-start",
|
|
156
156
|
"ai-aura-end",
|
|
157
|
+
"ai-aura-hover-background",
|
|
158
|
+
"ai-aura-hover-start",
|
|
159
|
+
"ai-aura-hover-end",
|
|
157
160
|
"ai-border-strong",
|
|
158
161
|
"ai-border-start",
|
|
159
162
|
"ai-border-end",
|
|
@@ -162,6 +165,15 @@ describe('@carbon/styles/scss/theme', () => {
|
|
|
162
165
|
"slug-callout-caret-bottom",
|
|
163
166
|
"slug-callout-caret-bottom-background",
|
|
164
167
|
"slug-callout-caret-bottom-background-actions",
|
|
168
|
+
"chat-prompt-background",
|
|
169
|
+
"chat-prompt-border-start",
|
|
170
|
+
"chat-prompt-border-end",
|
|
171
|
+
"chat-bubble-user",
|
|
172
|
+
"chat-bubble-agent",
|
|
173
|
+
"chat-bubble-agent-border",
|
|
174
|
+
"chat-avatar-bot",
|
|
175
|
+
"chat-avatar-agent",
|
|
176
|
+
"chat-avatar-user",
|
|
165
177
|
"highlight",
|
|
166
178
|
"overlay",
|
|
167
179
|
"toggle-off",
|
|
@@ -176,6 +176,12 @@
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
// Adjust icon positioning in small, medium variants only
|
|
180
|
+
.#{$prefix}--btn--sm:not(.#{$prefix}--btn--icon-only) .#{$prefix}--btn__icon,
|
|
181
|
+
.#{$prefix}--btn--md:not(.#{$prefix}--btn--icon-only) .#{$prefix}--btn__icon {
|
|
182
|
+
margin-block-start: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
179
185
|
.#{$prefix}--btn--icon-only.#{$prefix}--btn--selected {
|
|
180
186
|
background: $background-selected;
|
|
181
187
|
}
|
|
@@ -453,7 +453,12 @@
|
|
|
453
453
|
padding-inline-end: convert.to-rem(112px);
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
.#{$prefix}--number__input-wrapper--slug
|
|
456
|
+
.#{$prefix}--number__input-wrapper--slug
|
|
457
|
+
input[type='number']:not([data-invalid]):not(
|
|
458
|
+
:has(~ .#{$prefix}--slug--revert)
|
|
459
|
+
)
|
|
460
|
+
~ .#{$prefix}--number__controls
|
|
461
|
+
.#{$prefix}--number__control-btn {
|
|
457
462
|
border-block-end-color: $ai-border-strong;
|
|
458
463
|
}
|
|
459
464
|
|
|
@@ -572,13 +572,7 @@ $sizes: (
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
.#{$prefix}--slug.#{$prefix}--slug--enabled
|
|
575
|
-
.#{$prefix}--slug-content
|
|
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)
|
|
575
|
+
.#{$prefix}--slug-content
|
|
582
576
|
.#{$prefix}--toggletip-content {
|
|
583
577
|
max-inline-size: convert.to-rem(320px);
|
|
584
578
|
}
|
|
@@ -387,13 +387,15 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
.#{$prefix}--tile--slug.#{$prefix}--tile {
|
|
390
|
-
@include callout-gradient();
|
|
390
|
+
@include callout-gradient('default', 0, 'layer');
|
|
391
391
|
|
|
392
|
-
border: 1px solid
|
|
392
|
+
border: 1px solid transparent;
|
|
393
|
+
box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
|
|
394
|
+
0 4px 10px 2px $ai-drop-shadow;
|
|
393
395
|
}
|
|
394
396
|
|
|
395
397
|
.#{$prefix}--tile--slug.#{$prefix}--tile--expandable:hover {
|
|
396
|
-
@include callout-gradient();
|
|
398
|
+
@include callout-gradient('default', 0, 'layer');
|
|
397
399
|
}
|
|
398
400
|
|
|
399
401
|
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::before,
|
|
@@ -412,7 +414,9 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
412
414
|
|
|
413
415
|
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::before,
|
|
414
416
|
.#{$prefix}--tile--slug.#{$prefix}--tile--clickable::before {
|
|
415
|
-
@include callout-gradient('hover');
|
|
417
|
+
@include callout-gradient('hover', 0, 'layer');
|
|
418
|
+
|
|
419
|
+
box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
|
|
416
420
|
}
|
|
417
421
|
|
|
418
422
|
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable:hover::before,
|
|
@@ -421,7 +425,13 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
421
425
|
}
|
|
422
426
|
|
|
423
427
|
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::after {
|
|
424
|
-
@include callout-gradient('selected');
|
|
428
|
+
@include callout-gradient('selected', 0, 'layer');
|
|
429
|
+
|
|
430
|
+
box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable:hover::after {
|
|
434
|
+
opacity: 0;
|
|
425
435
|
}
|
|
426
436
|
|
|
427
437
|
.#{$prefix}--tile--slug.#{$prefix}--tile--is-selected::after {
|
|
@@ -467,11 +477,11 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
467
477
|
.#{$prefix}--tile--slug-rounded.#{$prefix}--tile--selectable::before,
|
|
468
478
|
.#{$prefix}--tile--slug-rounded.#{$prefix}--tile--selectable::after,
|
|
469
479
|
.#{$prefix}--tile--slug-rounded.#{$prefix}--tile--clickable::before {
|
|
470
|
-
border-radius: $spacing-
|
|
480
|
+
border-radius: $spacing-03;
|
|
471
481
|
}
|
|
472
482
|
|
|
473
483
|
.#{$prefix}--tile--slug-rounded .#{$prefix}--tile__chevron {
|
|
474
|
-
border-end-end-radius: $spacing-
|
|
484
|
+
border-end-end-radius: $spacing-03;
|
|
475
485
|
}
|
|
476
486
|
|
|
477
487
|
// Windows HCM fix
|
|
@@ -43,45 +43,58 @@
|
|
|
43
43
|
/// @example @include callout-gradient();
|
|
44
44
|
/// @param {String} $type - Type of gradient, either 'default', 'selected' or 'hover'
|
|
45
45
|
/// @param {Number} $offset - specify a pixel offset the callout should start from the bottom
|
|
46
|
+
/// @param {String} $background - specify if the background should be `layer` or `background`
|
|
46
47
|
/// @group utilities
|
|
47
|
-
@mixin callout-gradient(
|
|
48
|
+
@mixin callout-gradient(
|
|
49
|
+
$type: 'default',
|
|
50
|
+
$offset: 0,
|
|
51
|
+
$background: theme.$background
|
|
52
|
+
) {
|
|
48
53
|
$start: 0%;
|
|
49
54
|
@if $offset != 0 {
|
|
50
55
|
$start: calc(0% + #{$offset});
|
|
51
56
|
}
|
|
52
57
|
|
|
58
|
+
@if $background == 'layer' {
|
|
59
|
+
$background: theme.$layer;
|
|
60
|
+
}
|
|
61
|
+
|
|
53
62
|
@if $type == 'hover' {
|
|
54
63
|
background: linear-gradient(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
to top,
|
|
65
|
+
theme.$ai-aura-hover-start $start,
|
|
66
|
+
15%,
|
|
67
|
+
theme.$ai-aura-hover-end 50%
|
|
68
|
+
)
|
|
69
|
+
padding-box,
|
|
60
70
|
linear-gradient(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
to top,
|
|
72
|
+
theme.$ai-aura-hover-background,
|
|
73
|
+
theme.$ai-aura-hover-background
|
|
74
|
+
)
|
|
75
|
+
padding-box,
|
|
76
|
+
linear-gradient(to bottom, theme.$ai-border-start, theme.$ai-border-end)
|
|
77
|
+
border-box,
|
|
78
|
+
// Needed to underlay the transparent border
|
|
66
79
|
linear-gradient(
|
|
67
|
-
|
|
68
|
-
theme.$
|
|
69
|
-
theme.$
|
|
80
|
+
to top,
|
|
81
|
+
theme.$ai-aura-hover-background,
|
|
82
|
+
theme.$ai-aura-hover-background
|
|
70
83
|
)
|
|
71
|
-
|
|
84
|
+
border-box;
|
|
72
85
|
} @else if $type == 'selected' {
|
|
73
86
|
background: linear-gradient(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
transparent 50%
|
|
78
|
-
),
|
|
79
|
-
linear-gradient(
|
|
80
|
-
180deg,
|
|
81
|
-
theme.$slug-callout-gradient-top-selected $start,
|
|
82
|
-
theme.$slug-callout-gradient-bottom-selected 100%
|
|
87
|
+
to top,
|
|
88
|
+
theme.$ai-aura-start $start,
|
|
89
|
+
theme.$ai-aura-end 50%
|
|
83
90
|
)
|
|
84
|
-
|
|
91
|
+
padding-box,
|
|
92
|
+
linear-gradient(to top, theme.$layer, theme.$layer) padding-box,
|
|
93
|
+
linear-gradient(to bottom, theme.$border-inverse, theme.$border-inverse)
|
|
94
|
+
border-box,
|
|
95
|
+
// Needed to underlay the transparent border
|
|
96
|
+
linear-gradient(to top, theme.$layer, theme.$layer)
|
|
97
|
+
border-box;
|
|
85
98
|
} @else {
|
|
86
99
|
background: linear-gradient(
|
|
87
100
|
to top,
|
|
@@ -89,11 +102,11 @@
|
|
|
89
102
|
theme.$ai-aura-end 50%
|
|
90
103
|
)
|
|
91
104
|
padding-box,
|
|
92
|
-
linear-gradient(to top,
|
|
105
|
+
linear-gradient(to top, $background, $background) padding-box,
|
|
93
106
|
linear-gradient(to bottom, theme.$ai-border-start, theme.$ai-border-end)
|
|
94
107
|
border-box,
|
|
95
108
|
// Needed to underlay the transparent border
|
|
96
|
-
linear-gradient(to top,
|
|
109
|
+
linear-gradient(to top, $background, $background)
|
|
97
110
|
border-box;
|
|
98
111
|
}
|
|
99
112
|
}
|