@carbon/styles 1.37.0 → 1.38.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 (86) hide show
  1. package/css/styles.css +2588 -2403
  2. package/css/styles.min.css +1 -1
  3. package/package.json +5 -5
  4. package/scss/components/accordion/_accordion.scss +47 -35
  5. package/scss/components/aspect-ratio/_aspect-ratio.scss +7 -4
  6. package/scss/components/breadcrumb/_breadcrumb.scss +26 -20
  7. package/scss/components/button/_button.scss +16 -11
  8. package/scss/components/button/_mixins.scss +12 -12
  9. package/scss/components/checkbox/_checkbox.scss +55 -40
  10. package/scss/components/code-snippet/_code-snippet.scss +74 -59
  11. package/scss/components/code-snippet/_mixins.scss +2 -2
  12. package/scss/components/combo-box/_combo-box.scss +2 -2
  13. package/scss/components/combo-button/_combo-button.scss +2 -2
  14. package/scss/components/contained-list/_contained-list.scss +41 -22
  15. package/scss/components/content-switcher/_content-switcher.scss +32 -32
  16. package/scss/components/data-table/_data-table.scss +150 -144
  17. package/scss/components/data-table/_mixins.scss +3 -3
  18. package/scss/components/data-table/action/_data-table-action.scss +83 -81
  19. package/scss/components/data-table/expandable/_data-table-expandable.scss +60 -60
  20. package/scss/components/data-table/skeleton/_data-table-skeleton.scss +10 -8
  21. package/scss/components/data-table/sort/_data-table-sort.scss +38 -38
  22. package/scss/components/date-picker/_date-picker.scss +21 -20
  23. package/scss/components/date-picker/_flatpickr.scss +51 -51
  24. package/scss/components/dropdown/_dropdown.scss +49 -49
  25. package/scss/components/file-uploader/_file-uploader.scss +37 -37
  26. package/scss/components/fluid-combo-box/_fluid-combo-box.scss +4 -4
  27. package/scss/components/fluid-date-picker/_fluid-date-picker.scss +54 -54
  28. package/scss/components/fluid-list-box/_fluid-list-box.scss +33 -33
  29. package/scss/components/fluid-multiselect/_fluid-multiselect.scss +2 -2
  30. package/scss/components/fluid-number-input/_fluid-number-input.scss +30 -30
  31. package/scss/components/fluid-search/_fluid-search.scss +17 -17
  32. package/scss/components/fluid-select/_fluid-select.scss +17 -17
  33. package/scss/components/fluid-text-area/_fluid-text-area.scss +21 -21
  34. package/scss/components/fluid-text-input/_fluid-text-input.scss +26 -26
  35. package/scss/components/fluid-time-picker/_fluid-time-picker.scss +23 -23
  36. package/scss/components/form/_form.scss +16 -15
  37. package/scss/components/inline-loading/_inline-loading.scss +9 -9
  38. package/scss/components/link/_link.scss +1 -1
  39. package/scss/components/list/_list.scss +7 -7
  40. package/scss/components/list-box/_list-box.scss +109 -107
  41. package/scss/components/loading/_loading.scss +10 -9
  42. package/scss/components/menu/_menu.scss +7 -7
  43. package/scss/components/menu-button/_menu-button.scss +1 -1
  44. package/scss/components/modal/_modal.scss +72 -72
  45. package/scss/components/multiselect/_multiselect.scss +11 -11
  46. package/scss/components/notification/_actionable-notification.scss +37 -39
  47. package/scss/components/notification/_inline-notification.scss +26 -26
  48. package/scss/components/notification/_mixins.scss +3 -3
  49. package/scss/components/notification/_toast-notification.scss +16 -18
  50. package/scss/components/number-input/_number-input.scss +70 -70
  51. package/scss/components/overflow-menu/_overflow-menu.scss +50 -50
  52. package/scss/components/pagination/_pagination.scss +46 -34
  53. package/scss/components/pagination/_unstable_pagination.scss +26 -24
  54. package/scss/components/pagination-nav/_mixins.scss +6 -6
  55. package/scss/components/pagination-nav/_pagination-nav.scss +16 -11
  56. package/scss/components/popover/_popover.scss +201 -63
  57. package/scss/components/progress-bar/_progress-bar.scss +33 -11
  58. package/scss/components/progress-indicator/_progress-indicator.scss +46 -42
  59. package/scss/components/radio-button/_radio-button.scss +24 -23
  60. package/scss/components/search/_search.scss +35 -34
  61. package/scss/components/select/_select.scss +31 -29
  62. package/scss/components/skeleton-styles/_skeleton-styles.scss +10 -8
  63. package/scss/components/slider/_slider.scss +28 -28
  64. package/scss/components/structured-list/_mixins.scss +4 -4
  65. package/scss/components/structured-list/_structured-list.scss +16 -16
  66. package/scss/components/tabs/_tabs.scss +50 -50
  67. package/scss/components/tag/_tag.scss +22 -20
  68. package/scss/components/text-area/_text-area.scss +17 -15
  69. package/scss/components/text-input/_text-input.scss +43 -41
  70. package/scss/components/tile/_tile.scss +11 -11
  71. package/scss/components/time-picker/_time-picker.scss +17 -17
  72. package/scss/components/toggle/_toggle.scss +37 -24
  73. package/scss/components/toggletip/_toggletip.scss +3 -2
  74. package/scss/components/tooltip/_tooltip.scss +7 -5
  75. package/scss/components/treeview/_treeview.scss +27 -27
  76. package/scss/components/ui-shell/content/_content.scss +3 -3
  77. package/scss/components/ui-shell/header/_header.scss +47 -47
  78. package/scss/components/ui-shell/header-panel/_header-panel.scss +7 -7
  79. package/scss/components/ui-shell/side-nav/_side-nav.scss +65 -65
  80. package/scss/components/ui-shell/switcher/_switcher.scss +6 -6
  81. package/scss/utilities/_button-reset.scss +1 -1
  82. package/scss/utilities/_skeleton.scss +4 -4
  83. package/scss/utilities/_text-overflow.scss +1 -1
  84. package/scss/utilities/_text-truncate.scss +2 -2
  85. package/scss/utilities/_tooltip.scss +44 -46
  86. package/scss/utilities/_visually-hidden.scss +4 -4
@@ -14,6 +14,7 @@
14
14
  @use '../../spacing' as *;
15
15
  @use '../../theme' as *;
16
16
  @use '../../type' as *;
17
+ @use '../../utilities/convert';
17
18
  @use '../../utilities/button-reset';
18
19
  @use '../../utilities/focus-outline' as *;
19
20
  @use '../../utilities/custom-property';
@@ -28,6 +29,24 @@
28
29
  @include layout.use('density', $default: 'normal');
29
30
  }
30
31
 
32
+ .#{$prefix}--contained-list .#{$prefix}--tag {
33
+ @include layout.redefine-tokens(
34
+ (
35
+ size: (
36
+ height: (
37
+ xs: convert.to-rem(18px),
38
+ sm: convert.to-rem(18px),
39
+ md: convert.to-rem(24px),
40
+ lg: convert.to-rem(24px),
41
+ xl: convert.to-rem(24px),
42
+ ),
43
+ ),
44
+ )
45
+ );
46
+
47
+ @include layout.use('size', $default: 'md', $min: 'sm', $max: 'xl');
48
+ }
49
+
31
50
  .#{$prefix}--contained-list > ul {
32
51
  padding: 0;
33
52
  margin: 0;
@@ -36,20 +55,20 @@
36
55
  .#{$prefix}--contained-list__header {
37
56
  position: sticky;
38
57
  z-index: 1;
39
- top: 0;
40
58
  display: flex;
41
59
  align-items: center;
60
+ inset-block-start: 0;
42
61
  padding-inline: layout.density('padding-inline');
43
62
  }
44
63
 
45
64
  .#{$prefix}--contained-list__label {
46
- width: 100%;
65
+ inline-size: 100%;
47
66
  }
48
67
 
49
68
  .#{$prefix}--contained-list .#{$prefix}--search {
50
69
  position: sticky;
51
70
  z-index: 1;
52
- top: layout.size('height');
71
+ inset-block-start: layout.size('height');
53
72
 
54
73
  &.#{$prefix}--search--expandable .#{$prefix}--search-input {
55
74
  background-color: $field;
@@ -57,8 +76,8 @@
57
76
  }
58
77
 
59
78
  .#{$prefix}--contained-list .#{$prefix}--search .#{$prefix}--search-input {
60
- border-bottom: 1px solid $border-subtle;
61
79
  background-color: $background;
80
+ border-block-end: 1px solid $border-subtle;
62
81
  }
63
82
 
64
83
  .#{$prefix}--contained-list
@@ -68,7 +87,7 @@
68
87
  }
69
88
 
70
89
  .#{$prefix}--contained-list .#{$prefix}--search .#{$prefix}--search-close {
71
- border-right: 2px solid transparent;
90
+ border-inline-end: 2px solid transparent;
72
91
  outline: none;
73
92
 
74
93
  &:focus {
@@ -80,7 +99,7 @@
80
99
  .#{$prefix}--search
81
100
  .#{$prefix}--search-input
82
101
  ~ .#{$prefix}--search-close:hover {
83
- border-bottom: 1px solid transparent;
102
+ border-block-end: 1px solid transparent;
84
103
  }
85
104
 
86
105
  .#{$prefix}--contained-list
@@ -88,7 +107,7 @@
88
107
  .#{$prefix}--search-input:focus
89
108
  ~ .#{$prefix}--search-close:hover {
90
109
  border: 2px solid $focus;
91
- border-left: 0;
110
+ border-inline-start: 0;
92
111
  outline: none;
93
112
  }
94
113
 
@@ -101,9 +120,9 @@
101
120
  .#{$prefix}--contained-list--on-page .#{$prefix}--contained-list__header {
102
121
  @include type-style('heading-compact-01');
103
122
 
104
- height: layout.size('height');
105
- border-bottom: 1px solid $border-subtle;
106
123
  background-color: $background;
124
+ block-size: layout.size('height');
125
+ border-block-end: 1px solid $border-subtle;
107
126
  color: $text-primary;
108
127
  }
109
128
 
@@ -124,8 +143,8 @@
124
143
  .#{$prefix}--contained-list--disclosed .#{$prefix}--contained-list__header {
125
144
  @include type-style('label-01');
126
145
 
127
- height: $spacing-07;
128
146
  background-color: $layer;
147
+ block-size: $spacing-07;
129
148
  color: $text-secondary;
130
149
  }
131
150
 
@@ -138,7 +157,7 @@
138
157
  }
139
158
 
140
159
  .#{$prefix}--contained-list-item:not(:first-of-type) {
141
- margin-top: -1px;
160
+ margin-block-start: -1px;
142
161
  }
143
162
 
144
163
  .#{$prefix}--contained-list-item__content {
@@ -167,26 +186,26 @@
167
186
 
168
187
  @include type-style('body-01');
169
188
 
170
- min-height: layout.size('height');
171
189
  padding: calc(calc((#{layout.size('height')} - var(--temp-1lh)) / 2))
172
190
  layout.density('padding-inline');
173
191
  color: $text-primary;
192
+ min-block-size: layout.size('height');
174
193
  }
175
194
 
176
195
  .#{$prefix}--contained-list-item:not(:last-of-type)::before {
177
196
  position: absolute;
178
- right: 0;
179
- bottom: 0;
180
- left: 0;
181
- height: 1px;
182
197
  background-color: $border-subtle;
198
+ block-size: 1px;
183
199
  content: '';
200
+ inset-block-end: 0;
201
+ inset-inline-end: 0;
202
+ inset-inline-start: 0;
184
203
  }
185
204
 
186
205
  .#{$prefix}--contained-list--inset-rulers
187
206
  .#{$prefix}--contained-list-item:not(:last-of-type)::before {
188
- right: layout.density('padding-inline');
189
- left: layout.density('padding-inline');
207
+ inset-inline-end: layout.density('padding-inline');
208
+ inset-inline-start: layout.density('padding-inline');
190
209
  }
191
210
 
192
211
  .#{$prefix}--contained-list-item--clickable
@@ -227,11 +246,11 @@
227
246
  .#{$prefix}--contained-list__action,
228
247
  .#{$prefix}--contained-list-item__action {
229
248
  position: absolute;
230
- top: 0;
231
- right: 0;
232
- left: 0;
233
249
  display: flex;
234
250
  justify-content: flex-end;
251
+ inset-block-start: 0;
252
+ inset-inline-end: 0;
253
+ inset-inline-start: 0;
235
254
  pointer-events: none;
236
255
  }
237
256
 
@@ -249,6 +268,6 @@
249
268
 
250
269
  .#{$prefix}--contained-list-item__icon {
251
270
  display: inline-flex;
252
- padding-top: $spacing-01;
271
+ padding-block-start: $spacing-01;
253
272
  }
254
273
  }
@@ -22,9 +22,9 @@
22
22
  @include layout.use('density', $default: 'normal');
23
23
 
24
24
  display: flex;
25
- width: 100%;
26
- height: layout.size('height');
27
25
  justify-content: space-evenly;
26
+ block-size: layout.size('height');
27
+ inline-size: 100%;
28
28
  }
29
29
 
30
30
  .#{$prefix}--content-switcher-btn {
@@ -37,25 +37,25 @@
37
37
  display: inline-flex;
38
38
  overflow: hidden;
39
39
  border: none;
40
- border-top: convert.to-rem(1px) solid $border-inverse;
41
- border-bottom: convert.to-rem(1px) solid $border-inverse;
42
40
  margin: 0;
43
41
  background-color: transparent;
42
+ border-block-end: convert.to-rem(1px) solid $border-inverse;
43
+ border-block-start: convert.to-rem(1px) solid $border-inverse;
44
44
  color: $text-secondary;
45
- text-align: left;
45
+ text-align: start;
46
46
  text-decoration: none;
47
47
  transition: all $duration-moderate-01 motion(standard, productive);
48
48
  white-space: nowrap;
49
49
 
50
50
  &::after {
51
51
  position: absolute;
52
- top: 0;
53
- left: 0;
54
52
  display: block;
55
- width: 100%;
56
- height: 100%;
57
53
  background-color: $layer-selected-inverse;
54
+ block-size: 100%;
58
55
  content: '';
56
+ inline-size: 100%;
57
+ inset-block-start: 0;
58
+ inset-inline-start: 0;
59
59
  transform: scaleY(0);
60
60
  transform-origin: bottom;
61
61
  transition: all $duration-moderate-01 motion(standard, productive);
@@ -109,16 +109,16 @@
109
109
 
110
110
  .#{$prefix}--content-switcher:not(.#{$prefix}--content-switcher--icon-only)
111
111
  .#{$prefix}--content-switcher-btn {
112
- width: 100%;
113
112
  align-items: center;
114
113
  padding: $spacing-03 layout.density('padding-inline');
114
+ inline-size: 100%;
115
115
  }
116
116
 
117
117
  .#{$prefix}--content-switcher:not(.#{$prefix}--content-switcher--icon-only)
118
118
  .#{$prefix}--content-switcher-btn:first-child {
119
- border-left: convert.to-rem(1px) solid $border-inverse;
120
- border-bottom-left-radius: convert.to-rem(4px);
121
- border-top-left-radius: convert.to-rem(4px);
119
+ border-end-start-radius: convert.to-rem(4px);
120
+ border-inline-start: convert.to-rem(1px) solid $border-inverse;
121
+ border-start-start-radius: convert.to-rem(4px);
122
122
 
123
123
  &:disabled {
124
124
  border-color: $border-disabled;
@@ -128,9 +128,9 @@
128
128
 
129
129
  .#{$prefix}--content-switcher:not(.#{$prefix}--content-switcher--icon-only)
130
130
  .#{$prefix}--content-switcher-btn:last-child {
131
- border-right: convert.to-rem(1px) solid $border-inverse;
132
- border-bottom-right-radius: convert.to-rem(4px);
133
- border-top-right-radius: convert.to-rem(4px);
131
+ border-end-end-radius: convert.to-rem(4px);
132
+ border-inline-end: convert.to-rem(1px) solid $border-inverse;
133
+ border-start-end-radius: convert.to-rem(4px);
134
134
 
135
135
  &:disabled {
136
136
  border-color: $border-disabled;
@@ -150,12 +150,12 @@
150
150
  .#{$prefix}--content-switcher-btn::before {
151
151
  position: absolute;
152
152
  z-index: 2;
153
- left: 0;
154
153
  display: block;
155
- width: convert.to-rem(1px);
156
- height: convert.to-rem(16px);
157
154
  background-color: $border-subtle;
155
+ block-size: convert.to-rem(16px);
158
156
  content: '';
157
+ inline-size: convert.to-rem(1px);
158
+ inset-inline-start: 0;
159
159
  }
160
160
 
161
161
  .#{$prefix}--content-switcher:not(.#{$prefix}--content-switcher--icon-only)
@@ -194,13 +194,13 @@
194
194
  }
195
195
 
196
196
  .#{$prefix}--content-switcher__icon + span {
197
- margin-left: $spacing-03;
197
+ margin-inline-start: $spacing-03;
198
198
  }
199
199
 
200
200
  .#{$prefix}--content-switcher__label {
201
201
  z-index: 1;
202
202
  overflow: hidden;
203
- max-width: 100%;
203
+ max-inline-size: 100%;
204
204
  text-overflow: ellipsis;
205
205
  white-space: nowrap;
206
206
  }
@@ -244,9 +244,9 @@
244
244
  .#{$prefix}--content-switcher--icon-only
245
245
  .#{$prefix}--content-switcher-popover__wrapper:first-child
246
246
  .#{$prefix}--content-switcher-btn {
247
- border-left: convert.to-rem(1px) solid $border-inverse;
248
- border-bottom-left-radius: convert.to-rem(4px);
249
- border-top-left-radius: convert.to-rem(4px);
247
+ border-end-start-radius: convert.to-rem(4px);
248
+ border-inline-start: convert.to-rem(1px) solid $border-inverse;
249
+ border-start-start-radius: convert.to-rem(4px);
250
250
  }
251
251
 
252
252
  .#{$prefix}--content-switcher--icon-only
@@ -261,9 +261,9 @@
261
261
  .#{$prefix}--content-switcher--icon-only
262
262
  .#{$prefix}--content-switcher-popover__wrapper:last-child
263
263
  .#{$prefix}--content-switcher-btn {
264
- border-right: convert.to-rem(1px) solid $border-inverse;
265
- border-bottom-right-radius: convert.to-rem(4px);
266
- border-top-right-radius: convert.to-rem(4px);
264
+ border-end-end-radius: convert.to-rem(4px);
265
+ border-inline-end: convert.to-rem(1px) solid $border-inverse;
266
+ border-start-end-radius: convert.to-rem(4px);
267
267
  }
268
268
 
269
269
  .#{$prefix}--content-switcher--icon-only
@@ -277,13 +277,13 @@
277
277
 
278
278
  .#{$prefix}--content-switcher--lg .#{$prefix}--content-switcher-btn {
279
279
  // accounts for the larger icon sizes to keep the switcher at 48px
280
- padding-right: convert.to-rem(14px);
281
- padding-left: convert.to-rem(14px);
280
+ padding-inline-end: convert.to-rem(14px);
281
+ padding-inline-start: convert.to-rem(14px);
282
282
  }
283
283
 
284
284
  .#{$prefix}--content-switcher--lg .#{$prefix}--content-switcher-btn svg {
285
- width: 20px;
286
- height: 20px;
285
+ block-size: 20px;
286
+ inline-size: 20px;
287
287
  }
288
288
 
289
289
  .#{$prefix}--content-switcher--icon-only
@@ -301,7 +301,7 @@
301
301
 
302
302
  .#{$prefix}--content-switcher--icon-only.#{$prefix}--content-switcher--sm
303
303
  .#{$prefix}--btn--sm {
304
- height: 2rem;
304
+ block-size: 2rem;
305
305
  }
306
306
 
307
307
  // Subtle border overrides