@carbon/styles 1.114.0 → 1.115.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.
Files changed (46) hide show
  1. package/css/styles.css +3354 -1545
  2. package/css/styles.min.css +7 -1
  3. package/package.json +10 -10
  4. package/scss/components/Tearsheet/_index.scss +11 -0
  5. package/scss/components/Tearsheet/_tearsheet.scss +715 -0
  6. package/scss/components/__tests__/data-table-test.js +49 -0
  7. package/scss/components/_index.scss +5 -2
  8. package/scss/components/big-number/_big-number.scss +1 -0
  9. package/scss/components/button/_button.scss +11 -12
  10. package/scss/components/button/_vars.scss +4 -4
  11. package/scss/components/checkbox/_checkbox.scss +69 -26
  12. package/scss/components/combo-box/_combo-box.scss +32 -21
  13. package/scss/components/data-table/action/_data-table-action.scss +54 -22
  14. package/scss/components/data-table/sort/_data-table-sort.scss +37 -3
  15. package/scss/components/date-picker/_date-picker-next.scss +60 -0
  16. package/scss/components/date-picker/_date-picker.scss +73 -0
  17. package/scss/components/date-picker/_flatpickr.scss +10 -0
  18. package/scss/components/dropdown/_dropdown.scss +26 -4
  19. package/scss/components/fluid-date-picker/_fluid-date-picker.scss +95 -11
  20. package/scss/components/fluid-list-box/_fluid-list-box.scss +102 -23
  21. package/scss/components/fluid-number-input/_fluid-number-input.scss +204 -24
  22. package/scss/components/fluid-search/_fluid-search.scss +7 -4
  23. package/scss/components/fluid-select/_fluid-select.scss +31 -2
  24. package/scss/components/fluid-text-input/_fluid-text-input.scss +34 -4
  25. package/scss/components/form/_form.scss +1 -14
  26. package/scss/components/guidebanner/_guidebanner.scss +322 -0
  27. package/scss/components/guidebanner/_index.scss +11 -0
  28. package/scss/components/list-box/_list-box.scss +116 -8
  29. package/scss/components/menu/_menu.scss +18 -1
  30. package/scss/components/multiselect/_multiselect.scss +82 -47
  31. package/scss/components/notifications-panel/_index.scss +11 -0
  32. package/scss/components/notifications-panel/_notifications-panel.scss +459 -0
  33. package/scss/components/number-input/_number-input.scss +94 -8
  34. package/scss/components/radio-button/_radio-button.scss +93 -27
  35. package/scss/components/search/_search.scss +35 -8
  36. package/scss/components/select/_select.scss +65 -5
  37. package/scss/components/tabs/_tabs.scss +2 -1
  38. package/scss/components/tag/_mixins.scss +19 -1
  39. package/scss/components/tag/_tag.scss +46 -16
  40. package/scss/components/text-input/_text-input.scss +53 -121
  41. package/scss/components/tile/_tile.scss +131 -13
  42. package/scss/utilities/_skeleton.scss +7 -1
  43. /package/scss/components/{EditInPlace → edit-in-place}/_edit-in-place.scss +0 -0
  44. /package/scss/components/{EditInPlace → edit-in-place}/_index.scss +0 -0
  45. /package/scss/components/{OptionsTile → options-tile}/_index.scss +0 -0
  46. /package/scss/components/{OptionsTile → options-tile}/_options-tile.scss +0 -0
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2022
2
+ // Copyright IBM Corp. 2022, 2026
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -12,6 +12,8 @@
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../border-radius' as *;
16
+ @use '../../feature-flags' as *;
15
17
  @use '../../utilities/ai-gradient' as *;
16
18
  @use '../../utilities/convert';
17
19
  @use '../../utilities/focus-outline' as *;
@@ -22,6 +24,26 @@
22
24
  position: relative;
23
25
  background: $field;
24
26
  block-size: 100%;
27
+
28
+ @if enabled('enable-v12-release') {
29
+ border: 1px solid transparent;
30
+ border-radius: $border-radius-04;
31
+ background:
32
+ linear-gradient($field, $field) padding-box,
33
+ linear-gradient(
34
+ to bottom,
35
+ $border-subtle calc(100% - 4px),
36
+ $border-strong 100%
37
+ )
38
+ border-box;
39
+
40
+ &:has(.#{$prefix}--number--readonly),
41
+ &.#{$prefix}--number-input--fluid--readonly {
42
+ border-radius: $border-radius-00;
43
+ background: transparent;
44
+ border-block-end-color: $border-subtle;
45
+ }
46
+ }
25
47
  }
26
48
 
27
49
  .#{$prefix}--number-input--fluid .#{$prefix}--label {
@@ -56,6 +78,11 @@
56
78
 
57
79
  .#{$prefix}--number-input--fluid .#{$prefix}--number__input-wrapper {
58
80
  position: initial;
81
+
82
+ @if enabled('enable-v12-release') {
83
+ // Match default NumberInput: steppers are positioned against the field.
84
+ position: relative;
85
+ }
59
86
  }
60
87
 
61
88
  .#{$prefix}--number-input--fluid input[type='number'],
@@ -67,35 +94,115 @@
67
94
  outline: none;
68
95
  }
69
96
 
70
- .#{$prefix}--number-input--fluid .#{$prefix}--number__controls {
71
- block-size: convert.to-rem(40px);
72
- inset-block-start: convert.to-rem(23px);
73
- transform: translate(0);
97
+ // number-input.scss is emitted after this file, including AI `:has()`
98
+ // input rules (0,3,1). Flatten the inner field so rounded chrome stays
99
+ // on the fluid wrapper (which also wraps invalid/warn text).
100
+ .#{$prefix}--number-input--fluid
101
+ .#{$prefix}--number
102
+ .#{$prefix}--number__input-wrapper
103
+ input[type='number'],
104
+ .#{$prefix}--number-input--fluid
105
+ .#{$prefix}--number
106
+ .#{$prefix}--number__input-wrapper
107
+ input[type='text'] {
108
+ @if enabled('enable-v12-release') {
109
+ border: none;
110
+ border-radius: $border-radius-00;
111
+ background: transparent;
112
+ }
74
113
  }
75
114
 
76
115
  .#{$prefix}--number-input--fluid
116
+ .#{$prefix}--number
117
+ input[type='number']:focus,
118
+ .#{$prefix}--number-input--fluid
119
+ .#{$prefix}--number
120
+ input[type='text']:focus {
121
+ outline: none;
122
+ }
123
+
124
+ .#{$prefix}--number-input--fluid .#{$prefix}--number__controls {
125
+ z-index: 1;
126
+
127
+ @if enabled('enable-v12-release') {
128
+ // Same md stepper size as default NumberInput. Sit 1px past the
129
+ // input-wrapper so they meet the field's 1px border.
130
+ block-size: convert.to-rem(40px);
131
+ inset-block-end: convert.to-rem(-1px);
132
+ inset-block-start: auto;
133
+ inset-inline-end: convert.to-rem(-1px);
134
+ transform: none;
135
+ } @else {
136
+ block-size: convert.to-rem(40px);
137
+ inset-block-start: convert.to-rem(23px);
138
+ transform: translate(0);
139
+ }
140
+ }
141
+
142
+ .#{$prefix}--number-input--fluid .#{$prefix}--number__control-btn {
143
+ // Fluid steppers sit above the field's bottom edge (40px in a 64px
144
+ // control). The default NumberInput hover inset shadow would paint a
145
+ // second line 1px above the field border.
146
+ &:hover {
147
+ box-shadow: none;
148
+ }
149
+ }
150
+
151
+ // number-input is @used after fluid-number-input, so these selectors must
152
+ // beat `.cds--number input:focus ~ … .cds--number__control-btn`.
153
+ .#{$prefix}--number-input--fluid
154
+ .#{$prefix}--number
77
155
  input[type='number']:focus
78
156
  ~ .#{$prefix}--number__controls
79
157
  .#{$prefix}--number__control-btn,
80
158
  .#{$prefix}--number-input--fluid
159
+ .#{$prefix}--number
81
160
  input[type='text']:focus
82
161
  ~ .#{$prefix}--number__controls
83
162
  .#{$prefix}--number__control-btn {
84
- border-block-end-color: $focus;
85
- box-shadow: inset 0 -1px $focus;
163
+ @if enabled('enable-v12-release') {
164
+ // Default NumberInput paints `border-width: 2px 0` in `$focus` so the
165
+ // steppers continue the input's focus ring. Fluid draws that ring on
166
+ // the wrapper; the 2px transparent gap lets the ring show through as
167
+ // a blue line on the button.
168
+ border: none;
169
+ box-shadow: none;
170
+ } @else {
171
+ border-block-end-color: $focus;
172
+ box-shadow: inset 0 -1px $focus;
173
+ }
86
174
  }
87
175
 
88
176
  .#{$prefix}--number-input--fluid
177
+ .#{$prefix}--number
89
178
  input[type='number']:focus
90
179
  ~ .#{$prefix}--number__controls
91
180
  .#{$prefix}--number__control-btn:last-of-type,
92
181
  .#{$prefix}--number-input--fluid
182
+ .#{$prefix}--number
93
183
  input[type='text']:focus
94
184
  ~ .#{$prefix}--number__controls
95
185
  .#{$prefix}--number__control-btn:last-of-type {
96
- box-shadow:
97
- inset 0 -1px $focus,
98
- inset -2px 0 $focus;
186
+ @if not enabled('enable-v12-release') {
187
+ box-shadow:
188
+ inset 0 -1px $focus,
189
+ inset -2px 0 $focus;
190
+ }
191
+ }
192
+
193
+ .#{$prefix}--number-input--fluid
194
+ .#{$prefix}--number
195
+ input[type='number']:focus
196
+ ~ .#{$prefix}--number__controls
197
+ .#{$prefix}--number__control-btn:last-of-type:hover,
198
+ .#{$prefix}--number-input--fluid
199
+ .#{$prefix}--number
200
+ input[type='text']:focus
201
+ ~ .#{$prefix}--number__controls
202
+ .#{$prefix}--number__control-btn:last-of-type:hover {
203
+ @if enabled('enable-v12-release') {
204
+ box-shadow: none;
205
+ }
99
206
  }
100
207
 
101
208
  .#{$prefix}--number-input--fluid
@@ -138,7 +245,9 @@
138
245
  input[type='text'][data-invalid]:focus
139
246
  ~ .#{$prefix}--number__controls
140
247
  .#{$prefix}--number__control-btn:last-of-type {
141
- box-shadow: inset -2px 0 $focus;
248
+ @if not enabled('enable-v12-release') {
249
+ box-shadow: inset -2px 0 $focus;
250
+ }
142
251
  }
143
252
 
144
253
  .#{$prefix}--number-input--fluid--invalid
@@ -149,7 +258,9 @@
149
258
  input[type='text'][data-invalid]:not(:focus)
150
259
  ~ .#{$prefix}--number__controls
151
260
  .#{$prefix}--number__control-btn:last-of-type:hover {
152
- box-shadow: inset -2px 0 $support-error;
261
+ @if not enabled('enable-v12-release') {
262
+ box-shadow: inset -2px 0 $support-error;
263
+ }
153
264
  }
154
265
 
155
266
  .#{$prefix}--number-input--fluid--invalid
@@ -163,9 +274,18 @@
163
274
  box-shadow: none;
164
275
  }
165
276
 
166
- .#{$prefix}--number-input--fluid.#{$prefix}--number-input--fluid--focus
167
- .#{$prefix}--number {
168
- @include focus-outline('outline');
277
+ .#{$prefix}--number-input--fluid.#{$prefix}--number-input--fluid--focus {
278
+ @if enabled('enable-v12-release') {
279
+ @include focus-outline('outline');
280
+
281
+ .#{$prefix}--number {
282
+ outline: none;
283
+ }
284
+ } @else {
285
+ .#{$prefix}--number {
286
+ @include focus-outline('outline');
287
+ }
288
+ }
169
289
  }
170
290
 
171
291
  .#{$prefix}--number-input--fluid:not(
@@ -186,7 +306,10 @@
186
306
  input[type='text']:focus
187
307
  ~ .#{$prefix}--number__controls
188
308
  .#{$prefix}--number__control-btn:hover {
189
- border-block-end: 1px solid $focus;
309
+ @if not enabled('enable-v12-release') {
310
+ border-block-end: 1px solid $focus;
311
+ }
312
+
190
313
  outline: none;
191
314
  }
192
315
 
@@ -268,9 +391,18 @@
268
391
 
269
392
  .#{$prefix}--number-input--fluid.#{$prefix}--number-input--fluid--invalid:not(
270
393
  .#{$prefix}--number-input--fluid--focus
271
- )
272
- .#{$prefix}--number {
273
- @include focus-outline('invalid');
394
+ ) {
395
+ @if enabled('enable-v12-release') {
396
+ @include focus-outline('invalid');
397
+
398
+ .#{$prefix}--number {
399
+ outline: none;
400
+ }
401
+ } @else {
402
+ .#{$prefix}--number {
403
+ @include focus-outline('invalid');
404
+ }
405
+ }
274
406
  }
275
407
 
276
408
  .#{$prefix}--number-input--fluid--invalid
@@ -354,16 +486,29 @@
354
486
  input[type='text']
355
487
  ~ .#{$prefix}--number__controls
356
488
  .#{$prefix}--number__control-btn {
357
- border: initial;
358
- border-block-end-width: convert.to-rem(1px);
489
+ @if not enabled('enable-v12-release') {
490
+ border: 0;
491
+ }
359
492
  }
360
493
 
361
494
  // Disabled states
362
495
  .#{$prefix}--number-input--fluid--disabled:not(
363
496
  .#{$prefix}--number-input--fluid--invalid
364
- )
365
- .#{$prefix}--number {
366
- border-block-end: 1px solid $border-subtle;
497
+ ) {
498
+ @if enabled('enable-v12-release') {
499
+ border: 1px solid transparent;
500
+ border-radius: $border-radius-04;
501
+ background: $field;
502
+
503
+ input[type='number']:disabled,
504
+ input[type='text']:disabled {
505
+ background: transparent;
506
+ }
507
+ } @else {
508
+ .#{$prefix}--number {
509
+ border-block-end: 1px solid $border-subtle;
510
+ }
511
+ }
367
512
  }
368
513
 
369
514
  .#{$prefix}--number-input--fluid--disabled.#{$prefix}--number-input--fluid--invalid
@@ -446,6 +591,41 @@
446
591
  :has(.#{$prefix}--slug--revert)
447
592
  ) {
448
593
  @include ai-gradient;
594
+
595
+ @if enabled('enable-v12-release') {
596
+ background: none;
597
+ border-block-end-color: transparent;
598
+ }
599
+ }
600
+
601
+ @if enabled('enable-v12-release') {
602
+ .#{$prefix}--number-input--fluid:has(
603
+ .#{$prefix}--number__input-wrapper--decorator .#{$prefix}--ai-label
604
+ ):not(:has(.#{$prefix}--ai-label--revert)),
605
+ .#{$prefix}--number-input--fluid:has(
606
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--ai-label
607
+ ):not(:has(.#{$prefix}--ai-label--revert)),
608
+ .#{$prefix}--number-input--fluid:has(
609
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--slug
610
+ ):not(:has(.#{$prefix}--slug--revert)) {
611
+ background:
612
+ linear-gradient(
613
+ 0deg,
614
+ $ai-aura-start-sm 0%,
615
+ 15%,
616
+ $ai-aura-end 50%,
617
+ transparent 100%
618
+ )
619
+ padding-box,
620
+ linear-gradient($field, $field) padding-box,
621
+ linear-gradient(
622
+ to bottom,
623
+ $ai-border-start calc(100% - 4px),
624
+ $ai-border-strong 100%
625
+ )
626
+ border-box;
627
+ border-block-end-color: transparent;
628
+ }
449
629
  }
450
630
 
451
631
  .#{$prefix}--number-input--fluid
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2022
2
+ // Copyright IBM Corp. 2022, 2026
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -9,6 +9,7 @@
9
9
  // Fluid Search
10
10
  //-----------------------------
11
11
  @use '../../config' as *;
12
+ @use '../../feature-flags' as *;
12
13
  @use '../../motion' as *;
13
14
  @use '../../spacing' as *;
14
15
  @use '../../theme' as *;
@@ -117,8 +118,10 @@
117
118
  cursor: not-allowed;
118
119
  }
119
120
 
120
- .#{$prefix}--search--fluid.#{$prefix}--search--disabled
121
- .#{$prefix}--search-input[disabled] {
122
- border-block-end: 1px solid $border-subtle;
121
+ @if not enabled('enable-v12-release') {
122
+ .#{$prefix}--search--fluid.#{$prefix}--search--disabled
123
+ .#{$prefix}--search-input[disabled] {
124
+ border-block-end: 1px solid $border-subtle;
125
+ }
123
126
  }
124
127
  }
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2022
2
+ // Copyright IBM Corp. 2022, 2026
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -12,6 +12,8 @@
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../border-radius' as *;
16
+ @use '../../feature-flags' as *;
15
17
  @use '../../utilities/convert';
16
18
  @use '../../utilities/focus-outline' as *;
17
19
  @use '../select';
@@ -19,11 +21,14 @@
19
21
  @mixin fluid-select {
20
22
  .#{$prefix}--select--fluid .#{$prefix}--select {
21
23
  position: relative;
22
- background: $field;
23
24
  block-size: 100%;
24
25
  transition:
25
26
  background-color $duration-fast-01 motion(standard, productive),
26
27
  outline $duration-fast-01 motion(standard, productive);
28
+
29
+ @if not enabled('enable-v12-release') {
30
+ background: $field;
31
+ }
27
32
  }
28
33
 
29
34
  .#{$prefix}--select--fluid .#{$prefix}--label {
@@ -111,6 +116,30 @@
111
116
  display: block;
112
117
  }
113
118
 
119
+ .#{$prefix}--select--fluid
120
+ .#{$prefix}--select:not(.#{$prefix}--select--readonly)
121
+ .#{$prefix}--select-input__wrapper {
122
+ @if enabled('enable-v12-release') {
123
+ border-radius: $border-radius-04;
124
+ }
125
+ }
126
+
127
+ .#{$prefix}--select--fluid .#{$prefix}--select-input__wrapper[data-invalid],
128
+ .#{$prefix}--select--fluid
129
+ .#{$prefix}--select--warning
130
+ .#{$prefix}--select-input__wrapper {
131
+ @if enabled('enable-v12-release') {
132
+ border-radius: $border-radius-04;
133
+ background: $field;
134
+
135
+ .#{$prefix}--select-input {
136
+ border: none;
137
+ border-radius: $border-radius-00;
138
+ background: transparent;
139
+ }
140
+ }
141
+ }
142
+
114
143
  .#{$prefix}--select--fluid
115
144
  .#{$prefix}--select-input__wrapper[data-invalid]
116
145
  .#{$prefix}--select-input:not(:focus),
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2018, 2025
2
+ // Copyright IBM Corp. 2018, 2026
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -12,6 +12,8 @@
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../border-radius' as *;
16
+ @use '../../feature-flags' as *;
15
17
  @use '../../utilities/convert';
16
18
  @use '../../utilities/focus-outline' as *;
17
19
  @use '../text-input';
@@ -19,11 +21,14 @@
19
21
  @mixin fluid-text-input {
20
22
  .#{$prefix}--text-input--fluid.#{$prefix}--text-input-wrapper {
21
23
  position: relative;
22
- background: $field;
23
24
  block-size: 100%;
24
25
  transition:
25
26
  background-color $duration-fast-01 motion(standard, productive),
26
27
  outline $duration-fast-01 motion(standard, productive);
28
+
29
+ @if not enabled('enable-v12-release') {
30
+ background: $field;
31
+ }
27
32
  }
28
33
 
29
34
  .#{$prefix}--text-input--fluid .#{$prefix}--label {
@@ -92,6 +97,17 @@
92
97
  .#{$prefix}--text-input--fluid
93
98
  .#{$prefix}--text-input__field-wrapper--warning {
94
99
  display: block;
100
+
101
+ @if enabled('enable-v12-release') {
102
+ border-radius: $border-radius-04;
103
+ background: $field;
104
+
105
+ .#{$prefix}--text-input {
106
+ border: none;
107
+ border-radius: $border-radius-00;
108
+ background: transparent;
109
+ }
110
+ }
95
111
  }
96
112
 
97
113
  .#{$prefix}--text-input--fluid input[data-invalid] {
@@ -200,9 +216,23 @@
200
216
  // Skeleton
201
217
  .#{$prefix}--text-input--fluid__skeleton {
202
218
  position: relative;
203
- background: $skeleton-background;
204
219
  block-size: convert.to-rem(64px);
205
- border-block-end: 1px solid $skeleton-element;
220
+
221
+ @if enabled('enable-v12-release') {
222
+ border: 1px solid transparent;
223
+ border-radius: $border-radius-04;
224
+ background:
225
+ linear-gradient($skeleton-background, $skeleton-background) padding-box,
226
+ linear-gradient(
227
+ to bottom,
228
+ $border-subtle calc(100% - 4px),
229
+ $skeleton-element 100%
230
+ )
231
+ border-box;
232
+ } @else {
233
+ background: $skeleton-background;
234
+ border-block-end: 1px solid $skeleton-element;
235
+ }
206
236
  }
207
237
 
208
238
  .#{$prefix}--text-input--fluid__skeleton .#{$prefix}--skeleton {
@@ -22,17 +22,6 @@
22
22
  $input-label-weight: 400 !default;
23
23
 
24
24
  @mixin form {
25
- // Override Chrome autocomplete styles
26
- input:-webkit-autofill,
27
- input:-webkit-autofill:hover,
28
- input:-webkit-autofill:focus,
29
- textarea:-webkit-autofill,
30
- textarea:-webkit-autofill:hover,
31
- textarea:-webkit-autofill:focus {
32
- box-shadow: 0 0 0 1000px $field inset;
33
- -webkit-text-fill-color: $text-primary;
34
- }
35
-
36
25
  .#{$prefix}--fieldset {
37
26
  @include component-reset.reset;
38
27
  }
@@ -133,9 +122,7 @@ $input-label-weight: 400 !default;
133
122
  .#{$prefix}--list-box[data-invalid]:not(
134
123
  .#{$prefix}--multi-select--invalid--focused,
135
124
  .#{$prefix}--combo-box--invalid--focused
136
- ),
137
- .#{$prefix}--combo-box[data-invalid]:not(.#{$prefix}--multi-select--selected)
138
- .#{$prefix}--text-input:not(:focus) {
125
+ ) {
139
126
  @include focus-outline('invalid');
140
127
  }
141
128