@carbon/styles 1.48.0 → 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 +146 -51
- package/css/styles.min.css +1 -1
- package/package.json +3 -3
- package/scss/__tests__/theme-test.js +19 -3
- package/scss/components/button/_button.scss +6 -0
- package/scss/components/date-picker/_date-picker.scss +1 -1
- package/scss/components/fluid-date-picker/_fluid-date-picker.scss +9 -1
- package/scss/components/fluid-number-input/_fluid-number-input.scss +4 -1
- package/scss/components/fluid-text-area/_fluid-text-area.scss +4 -1
- package/scss/components/list-box/_list-box.scss +8 -1
- package/scss/components/modal/_modal.scss +1 -1
- package/scss/components/number-input/_number-input.scss +11 -1
- package/scss/components/select/_select.scss +2 -1
- package/scss/components/slug/_slug.scss +3 -9
- package/scss/components/text-area/_text-area.scss +2 -1
- package/scss/components/text-input/_text-input.scss +2 -1
- package/scss/components/tile/_tile.scss +17 -7
- package/scss/utilities/_ai-gradient.scss +54 -48
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
|
}
|
|
@@ -149,15 +149,31 @@ 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
152
|
"slug-callout-shadow-outer-01",
|
|
154
153
|
"slug-callout-shadow-outer-02",
|
|
155
|
-
"
|
|
156
|
-
"
|
|
154
|
+
"ai-inner-shadow",
|
|
155
|
+
"ai-aura-start",
|
|
156
|
+
"ai-aura-end",
|
|
157
|
+
"ai-aura-hover-background",
|
|
158
|
+
"ai-aura-hover-start",
|
|
159
|
+
"ai-aura-hover-end",
|
|
160
|
+
"ai-border-strong",
|
|
161
|
+
"ai-border-start",
|
|
162
|
+
"ai-border-end",
|
|
163
|
+
"ai-drop-shadow",
|
|
157
164
|
"slug-callout-caret-center",
|
|
158
165
|
"slug-callout-caret-bottom",
|
|
159
166
|
"slug-callout-caret-bottom-background",
|
|
160
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",
|
|
161
177
|
"highlight",
|
|
162
178
|
"overlay",
|
|
163
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
|
}
|
|
@@ -407,10 +407,18 @@
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
.#{$prefix}--date-picker--fluid
|
|
410
|
-
.#{$prefix}--date-picker-input__wrapper--slug
|
|
410
|
+
.#{$prefix}--date-picker-input__wrapper--slug:not(
|
|
411
|
+
:has(~ .#{$prefix}--slug--revert)
|
|
412
|
+
) {
|
|
411
413
|
@include ai-gradient;
|
|
412
414
|
}
|
|
413
415
|
|
|
416
|
+
.#{$prefix}--date-picker--fluid
|
|
417
|
+
.#{$prefix}--date-picker-input__wrapper--slug
|
|
418
|
+
.#{$prefix}--date-picker__input:not(.cds--date-picker__input--invalid) {
|
|
419
|
+
border-block-end-color: $ai-border-strong;
|
|
420
|
+
}
|
|
421
|
+
|
|
414
422
|
.#{$prefix}--date-picker--fluid
|
|
415
423
|
.#{$prefix}--date-picker-input__wrapper--slug
|
|
416
424
|
.#{$prefix}--date-picker__input,
|
|
@@ -303,7 +303,10 @@
|
|
|
303
303
|
padding-inline-end: convert.to-rem(120px);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.#{$prefix}--number-input--fluid
|
|
306
|
+
.#{$prefix}--number-input--fluid
|
|
307
|
+
.#{$prefix}--number__input-wrapper--slug:not(
|
|
308
|
+
:has(~ .#{$prefix}--slug--revert)
|
|
309
|
+
) {
|
|
307
310
|
@include ai-gradient;
|
|
308
311
|
}
|
|
309
312
|
}
|
|
@@ -219,7 +219,10 @@
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
// Slug styles
|
|
222
|
-
.#{$prefix}--text-area--fluid
|
|
222
|
+
.#{$prefix}--text-area--fluid
|
|
223
|
+
.#{$prefix}--text-area__wrapper--slug:not(
|
|
224
|
+
:has(~ .#{$prefix}--slug--revert)
|
|
225
|
+
) {
|
|
223
226
|
@include ai-gradient;
|
|
224
227
|
}
|
|
225
228
|
|
|
@@ -897,10 +897,17 @@ $list-box-menu-width: convert.to-rem(300px);
|
|
|
897
897
|
transform: translateY(-50%);
|
|
898
898
|
}
|
|
899
899
|
|
|
900
|
-
.#{$prefix}--list-box__wrapper--slug
|
|
900
|
+
.#{$prefix}--list-box__wrapper--slug
|
|
901
|
+
.#{$prefix}--list-box:not(:has(.#{$prefix}--slug--revert)) {
|
|
901
902
|
@include ai-gradient;
|
|
902
903
|
}
|
|
903
904
|
|
|
905
|
+
.#{$prefix}--list-box__wrapper--slug
|
|
906
|
+
.#{$prefix}--list-box
|
|
907
|
+
input[role='combobox'] {
|
|
908
|
+
border-block-end-color: transparent;
|
|
909
|
+
}
|
|
910
|
+
|
|
904
911
|
.#{$prefix}--list-box__wrapper--slug .#{$prefix}--list-box__field,
|
|
905
912
|
.#{$prefix}--list-box__wrapper--slug .#{$prefix}--text-input--empty {
|
|
906
913
|
padding-inline-end: $spacing-10;
|
|
@@ -445,13 +445,23 @@
|
|
|
445
445
|
padding-inline-end: convert.to-rem(144px);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
.#{$prefix}--number__input-wrapper--slug
|
|
448
|
+
.#{$prefix}--number__input-wrapper--slug
|
|
449
|
+
input[type='number']:not(:has(~ .#{$prefix}--slug--revert)),
|
|
449
450
|
.#{$prefix}--number__input-wrapper--slug input[type='number']:disabled {
|
|
450
451
|
@include ai-gradient;
|
|
451
452
|
|
|
452
453
|
padding-inline-end: convert.to-rem(112px);
|
|
453
454
|
}
|
|
454
455
|
|
|
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 {
|
|
462
|
+
border-block-end-color: $ai-border-strong;
|
|
463
|
+
}
|
|
464
|
+
|
|
455
465
|
// Skeleton State
|
|
456
466
|
.#{$prefix}--number.#{$prefix}--skeleton {
|
|
457
467
|
@include skeleton;
|
|
@@ -288,7 +288,8 @@
|
|
|
288
288
|
transform: translateY(-50%);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.#{$prefix}--select--slug
|
|
291
|
+
.#{$prefix}--select--slug
|
|
292
|
+
.#{$prefix}--select-input:not(:has(~ .#{$prefix}--slug--revert)) {
|
|
292
293
|
@include ai-gradient;
|
|
293
294
|
|
|
294
295
|
padding-inline-end: $spacing-10;
|
|
@@ -332,7 +332,7 @@ $sizes: (
|
|
|
332
332
|
border: 1px solid transparent;
|
|
333
333
|
border-radius: convert.to-rem(8px);
|
|
334
334
|
// Need to make tokens
|
|
335
|
-
box-shadow: inset 0 -80px 70px -65px $
|
|
335
|
+
box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
|
|
336
336
|
-40px 30px 100px -25px $slug-callout-shadow-outer-01,
|
|
337
337
|
-60px 80px 60px -45px $slug-callout-shadow-outer-02;
|
|
338
338
|
color: $text-primary;
|
|
@@ -368,7 +368,7 @@ $sizes: (
|
|
|
368
368
|
> .#{$prefix}--popover-caret::before {
|
|
369
369
|
position: absolute;
|
|
370
370
|
display: block;
|
|
371
|
-
border: 1px solid $
|
|
371
|
+
border: 1px solid $ai-border-start;
|
|
372
372
|
background: $background;
|
|
373
373
|
block-size: convert.to-rem(12px);
|
|
374
374
|
clip-path: polygon(98% 0, 0 0, -52% 150%) border-box;
|
|
@@ -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
|
}
|
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
transform: translate(0);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
.#{$prefix}--text-area__wrapper--slug
|
|
139
|
+
.#{$prefix}--text-area__wrapper--slug
|
|
140
|
+
.#{$prefix}--text-area:not(:has(~ .#{$prefix}--slug--revert)) {
|
|
140
141
|
@include ai-gradient;
|
|
141
142
|
|
|
142
143
|
padding-inline-end: $spacing-08;
|
|
@@ -423,7 +423,8 @@
|
|
|
423
423
|
transform: translateY(-50%);
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
.#{$prefix}--text-input__field-wrapper--slug
|
|
426
|
+
.#{$prefix}--text-input__field-wrapper--slug
|
|
427
|
+
.#{$prefix}--text-input:not(:has(~ .#{$prefix}--slug--revert)) {
|
|
427
428
|
@include ai-gradient;
|
|
428
429
|
|
|
429
430
|
padding-inline-end: $spacing-08;
|
|
@@ -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
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
/// Adds AI gradient styles to a component
|
|
12
12
|
/// @access private
|
|
13
13
|
/// @param {String} $direction - Direction of gradient from: `left`, `right`, `top`, and `bottom`
|
|
14
|
-
/// @param {Number} $
|
|
14
|
+
/// @param {Number} $span - Percentage span of gradient with regards to parent component
|
|
15
15
|
/// @example @include ai-gradient('right', '33%');
|
|
16
16
|
/// @group utilities
|
|
17
|
-
@mixin ai-gradient($direction: '
|
|
17
|
+
@mixin ai-gradient($direction: 'bottom', $span: 50%) {
|
|
18
18
|
$deg: 0;
|
|
19
19
|
@if $direction == 'bottom' {
|
|
20
20
|
$deg: 0deg;
|
|
@@ -27,17 +27,14 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
background-image: linear-gradient(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
theme.$ai-gradient-end $width,
|
|
39
|
-
transparent 100%
|
|
40
|
-
);
|
|
30
|
+
$deg,
|
|
31
|
+
theme.$ai-inner-shadow 0%,
|
|
32
|
+
15%,
|
|
33
|
+
theme.$ai-aura-end $span,
|
|
34
|
+
transparent 100%
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
border-block-end-color: theme.$ai-border-strong;
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
/// Experimental - name and structure subject to change. Use at your own risk!
|
|
@@ -45,62 +42,71 @@
|
|
|
45
42
|
/// @access private
|
|
46
43
|
/// @example @include callout-gradient();
|
|
47
44
|
/// @param {String} $type - Type of gradient, either 'default', 'selected' or 'hover'
|
|
48
|
-
/// @param {Number} $
|
|
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`
|
|
49
47
|
/// @group utilities
|
|
50
|
-
@mixin callout-gradient(
|
|
48
|
+
@mixin callout-gradient(
|
|
49
|
+
$type: 'default',
|
|
50
|
+
$offset: 0,
|
|
51
|
+
$background: theme.$background
|
|
52
|
+
) {
|
|
51
53
|
$start: 0%;
|
|
52
54
|
@if $offset != 0 {
|
|
53
55
|
$start: calc(0% + #{$offset});
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
@if $background == 'layer' {
|
|
59
|
+
$background: theme.$layer;
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
@if $type == 'hover' {
|
|
57
63
|
background: linear-gradient(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
to top,
|
|
65
|
+
theme.$ai-aura-hover-start $start,
|
|
66
|
+
15%,
|
|
67
|
+
theme.$ai-aura-hover-end 50%
|
|
68
|
+
)
|
|
69
|
+
padding-box,
|
|
63
70
|
linear-gradient(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
69
79
|
linear-gradient(
|
|
70
|
-
|
|
71
|
-
theme.$
|
|
72
|
-
theme.$
|
|
80
|
+
to top,
|
|
81
|
+
theme.$ai-aura-hover-background,
|
|
82
|
+
theme.$ai-aura-hover-background
|
|
73
83
|
)
|
|
74
|
-
|
|
84
|
+
border-box;
|
|
75
85
|
} @else if $type == 'selected' {
|
|
76
86
|
background: linear-gradient(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
transparent 50%
|
|
81
|
-
),
|
|
82
|
-
linear-gradient(
|
|
83
|
-
180deg,
|
|
84
|
-
theme.$slug-callout-gradient-top-selected $start,
|
|
85
|
-
theme.$slug-callout-gradient-bottom-selected 100%
|
|
87
|
+
to top,
|
|
88
|
+
theme.$ai-aura-start $start,
|
|
89
|
+
theme.$ai-aura-end 50%
|
|
86
90
|
)
|
|
87
|
-
|
|
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;
|
|
88
98
|
} @else {
|
|
89
99
|
background: linear-gradient(
|
|
90
100
|
to top,
|
|
91
|
-
theme.$
|
|
92
|
-
theme.$
|
|
101
|
+
theme.$ai-aura-start $start,
|
|
102
|
+
theme.$ai-aura-end 50%
|
|
93
103
|
)
|
|
94
104
|
padding-box,
|
|
95
|
-
linear-gradient(to top,
|
|
96
|
-
linear-gradient(
|
|
97
|
-
to bottom,
|
|
98
|
-
theme.$slug-callout-border-01,
|
|
99
|
-
theme.$slug-callout-border-02
|
|
100
|
-
)
|
|
105
|
+
linear-gradient(to top, $background, $background) padding-box,
|
|
106
|
+
linear-gradient(to bottom, theme.$ai-border-start, theme.$ai-border-end)
|
|
101
107
|
border-box,
|
|
102
108
|
// Needed to underlay the transparent border
|
|
103
|
-
linear-gradient(to top,
|
|
109
|
+
linear-gradient(to top, $background, $background)
|
|
104
110
|
border-box;
|
|
105
111
|
}
|
|
106
112
|
}
|