@carbon/styles 1.42.1 → 1.44.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/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.42.1",
4
+ "version": "1.44.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.27.1",
46
+ "@carbon/themes": "^11.27.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": "30bacc5d251cb7579b313091b607b075f98c144c"
68
+ "gitHead": "c9e8c54239275eb4451b25f7f11c4b8bf40ddd43"
69
69
  }
@@ -390,6 +390,12 @@
390
390
  }
391
391
  }
392
392
 
393
+ .#{$prefix}--btn-set .#{$prefix}--btn.#{$prefix}--btn--loading {
394
+ border-color: transparent;
395
+ background-color: transparent;
396
+ box-shadow: none;
397
+ }
398
+
393
399
  // Windows HCM fix
394
400
  .#{$prefix}--btn:focus {
395
401
  @include high-contrast-mode('focus');
@@ -29,7 +29,7 @@
29
29
  @each $size, $trigger in $triggerSizes {
30
30
  .#{$prefix}--combo-button__container--#{$size}
31
31
  .#{$prefix}--combo-button__primary-action {
32
- min-inline-size: 10rem - convert.to-rem(1px) - $trigger;
32
+ min-inline-size: 12rem - convert.to-rem(1px) - $trigger;
33
33
  }
34
34
  }
35
35
 
@@ -215,7 +215,7 @@
215
215
  align-items: center;
216
216
  justify-content: center;
217
217
  padding: 0 $spacing-03;
218
- // Account for the border in `.bx--table-expand`
218
+ // Account for the border in `.cds--table-expand`
219
219
  block-size: calc(100% + 1px);
220
220
  inline-size: 100%;
221
221
  vertical-align: inherit;
@@ -13,6 +13,7 @@
13
13
  @use '../../theme' as *;
14
14
  @use '../../spacing' as *;
15
15
  @use '../../type' as *;
16
+ @use '../../utilities/ai-gradient' as *;
16
17
  @use '../../utilities/component-reset';
17
18
  @use '../../utilities/convert';
18
19
  @use '../../utilities/focus-outline' as *;
@@ -55,7 +56,7 @@
55
56
  align-items: center;
56
57
  }
57
58
 
58
- .#{$prefix}--date-picker-input__wrapper span {
59
+ .#{$prefix}--date-picker-input__wrapper > span {
59
60
  position: relative;
60
61
  }
61
62
 
@@ -176,7 +177,6 @@
176
177
 
177
178
  .#{$prefix}--date-picker__input:disabled ~ .#{$prefix}--date-picker__icon {
178
179
  cursor: not-allowed;
179
- fill: $icon-disabled;
180
180
  }
181
181
 
182
182
  .#{$prefix}--date-picker--range
@@ -189,6 +189,32 @@
189
189
  inline-size: convert.to-rem(143.5px);
190
190
  }
191
191
 
192
+ // Styles for `Slug` rendered inside `DatePickerInput`
193
+ .#{$prefix}--date-picker-input__wrapper--slug .#{$prefix}--slug {
194
+ position: absolute;
195
+ inset-block-start: 50%;
196
+ inset-inline-end: $spacing-08;
197
+ transform: translateY(-50%);
198
+ }
199
+
200
+ .#{$prefix}--date-picker-input__wrapper--slug
201
+ .#{$prefix}--date-picker__input {
202
+ @include ai-gradient;
203
+
204
+ padding-inline-end: $spacing-10;
205
+ }
206
+
207
+ // Read-only State
208
+ .#{$prefix}--date-picker__input[readonly] {
209
+ background: transparent;
210
+ border-block-end-color: $border-subtle;
211
+ cursor: text;
212
+ }
213
+
214
+ .#{$prefix}--date-picker__input[readonly] + .#{$prefix}--date-picker__icon {
215
+ fill: $icon-disabled;
216
+ }
217
+
192
218
  // Skeleton State
193
219
  .#{$prefix}--date-picker.#{$prefix}--skeleton input,
194
220
  .#{$prefix}--date-picker__input.#{$prefix}--skeleton {
@@ -205,7 +231,6 @@
205
231
  @include skeleton;
206
232
 
207
233
  block-size: convert.to-rem(14px);
208
-
209
234
  inline-size: convert.to-rem(75px);
210
235
  }
211
236
 
@@ -214,15 +239,4 @@
214
239
  .#{$prefix}--date-picker__icon {
215
240
  @include high-contrast-mode('icon-fill');
216
241
  }
217
-
218
- // readonly
219
- .#{$prefix}--date-picker__input[readonly] {
220
- background: transparent;
221
- border-block-end-color: $border-subtle;
222
- cursor: text;
223
- }
224
-
225
- .#{$prefix}--date-picker__input[readonly] + .#{$prefix}--date-picker__icon {
226
- fill: $icon-disabled;
227
- }
228
242
  }
@@ -155,7 +155,7 @@
155
155
 
156
156
  button.#{$prefix}--dropdown-text {
157
157
  border: none;
158
- // button-reset mixin contradicts with bx--dropdown-text styles
158
+ // button-reset mixin contradicts with cds--dropdown-text styles
159
159
  background: none;
160
160
  color: $text-primary;
161
161
  inline-size: 100%;
@@ -171,7 +171,7 @@
171
171
 
172
172
  display: block;
173
173
  overflow: hidden;
174
- // Account for the border in `.bx--dropdown`
174
+ // Account for the border in `.cds--dropdown`
175
175
  block-size: calc(100% + 1px);
176
176
  // 2rem + SVG width
177
177
  padding-inline-end: convert.to-rem(42px);
@@ -284,13 +284,13 @@
284
284
  // We don't want to apply focus styles via focus selector when using the aria-activedescendant structure
285
285
  .#{$prefix}--dropdown-list[aria-activedescendant]
286
286
  .#{$prefix}--dropdown-link:focus {
287
- // Copied from .bx--dropdown-link styles
287
+ // Copied from .cds--dropdown-link styles
288
288
  padding: convert.to-rem(11px) 0;
289
289
  margin: 0 $spacing-05;
290
290
  outline: none;
291
291
  }
292
292
 
293
- // Need added weight for item that is :focused and .bx--dropdown--focused
293
+ // Need added weight for item that is :focused and .cds--dropdown--focused
294
294
  .#{$prefix}--dropdown-list[aria-activedescendant]
295
295
  .#{$prefix}--dropdown--focused:focus {
296
296
  // copied from default focus styles
@@ -53,7 +53,7 @@
53
53
  }
54
54
 
55
55
  // This class is of old markup with "select file" button
56
- // New code should use link-style "select file" UI (`.bx--file-browse-btn`)
56
+ // New code should use link-style "select file" UI (`.cds--file-browse-btn`)
57
57
  // TODO: deprecate this block
58
58
  .#{$prefix}--file-btn {
59
59
  display: inline-flex;
@@ -160,7 +160,7 @@
160
160
  }
161
161
 
162
162
  .#{$prefix}--inline-loading__animation .#{$prefix}--loading {
163
- // Vanilla markup has `.bx--inline-loading__animation` which is used for `margin-right` adjustment
163
+ // Vanilla markup has `.cds--inline-loading__animation` which is used for `margin-right` adjustment
164
164
  margin-inline-end: 0;
165
165
  }
166
166
 
@@ -12,6 +12,7 @@
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../utilities/ai-gradient' as *;
15
16
  @use '../../utilities/convert';
16
17
  @use '../../utilities/focus-outline' as *;
17
18
  @use '../date-picker';
@@ -397,4 +398,16 @@
397
398
  .#{$prefix}--date-picker__input {
398
399
  border-inline-start-color: $border-subtle;
399
400
  }
401
+
402
+ // Slug styles
403
+ .#{$prefix}--date-picker--fluid
404
+ .#{$prefix}--date-picker-input__wrapper--slug
405
+ .#{$prefix}--slug {
406
+ inset-block-start: convert.to-rem(43px);
407
+ }
408
+
409
+ .#{$prefix}--date-picker--fluid
410
+ .#{$prefix}--date-picker-input__wrapper--slug {
411
+ @include ai-gradient;
412
+ }
400
413
  }
@@ -12,6 +12,7 @@
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../utilities/ai-gradient' as *;
15
16
  @use '../../utilities/convert';
16
17
  @use '../../utilities/focus-outline' as *;
17
18
  @use '../number-input';
@@ -71,93 +72,76 @@
71
72
  transform: translate(0);
72
73
  }
73
74
 
74
- .#{$prefix}--number-input--fluid .#{$prefix}--number__control-btn,
75
75
  .#{$prefix}--number-input--fluid
76
76
  input[type='number']:focus
77
77
  ~ .#{$prefix}--number__controls
78
78
  .#{$prefix}--number__control-btn {
79
- border-block-end: 1px solid transparent;
79
+ border-block-end-color: $focus;
80
+ box-shadow: inset 0 -1px $focus;
80
81
  }
81
82
 
82
- .#{$prefix}--number-input--fluid.#{$prefix}--number-input--fluid--focus
83
- .#{$prefix}--number {
84
- @include focus-outline('outline');
85
- }
86
-
87
- // Weird overrides (needed to override focus borders on stepper buttons when hovered while input has focus)
88
- .#{$prefix}--number-input--fluid:not(
89
- .#{$prefix}--number-input--fluid--invalid
90
- )
91
- .#{$prefix}--number
92
- .#{$prefix}--number__input-wrapper:not(
93
- .#{$prefix}--number__input-wrapper--warning
94
- )
83
+ .#{$prefix}--number-input--fluid
95
84
  input[type='number']:focus
96
85
  ~ .#{$prefix}--number__controls
97
- .#{$prefix}--number__control-btn:hover {
98
- outline: 2px solid transparent;
86
+ .#{$prefix}--number__control-btn:last-of-type {
87
+ box-shadow: inset 0 -1px $focus, inset -2px 0 $focus;
99
88
  }
100
89
 
101
- .#{$prefix}--number-input--fluid:not(
102
- .#{$prefix}--number-input--fluid--invalid
103
- )
104
- .#{$prefix}--number
105
- .#{$prefix}--number__input-wrapper:not(
106
- .#{$prefix}--number__input-wrapper--warning
107
- )
90
+ .#{$prefix}--number-input--fluid
91
+ .#{$prefix}--number__input-wrapper--warning
108
92
  input[type='number']:focus
109
93
  ~ .#{$prefix}--number__controls
110
- .#{$prefix}--number__control-btn:hover::before {
111
- background: $focus;
112
- block-size: 1px;
113
- inline-size: 100%;
114
- inset-block-end: 0;
115
- inset-block-start: auto;
116
- inset-inline-start: 0;
117
- }
118
- // End weirdness
119
-
120
- .#{$prefix}--number-input--fluid:not(
121
- .#{$prefix}--number-input--fluid--invalid
122
- )
123
- .#{$prefix}--number-input-wrapper:not(
124
- .#{$prefix}--number-input-wrapper__warning
125
- )
94
+ .#{$prefix}--number__control-btn,
95
+ .#{$prefix}--number-input--fluid--invalid
126
96
  input[type='number']:focus
127
97
  ~ .#{$prefix}--number__controls
128
- .#{$prefix}--number__control-btn:hover {
129
- border-block-end: 1px solid $focus;
130
- outline: none;
98
+ .#{$prefix}--number__control-btn {
99
+ border-block-end-color: transparent;
100
+ box-shadow: none;
131
101
  }
132
102
 
133
103
  .#{$prefix}--number-input--fluid
134
- input[type='number']
104
+ .#{$prefix}--number__input-wrapper--warning
105
+ input[type='number']:focus
135
106
  ~ .#{$prefix}--number__controls
136
- .#{$prefix}--number__control-btn::after {
137
- block-size: calc(100% - convert.to-rem(1px));
138
- inset-block-start: 0;
107
+ .#{$prefix}--number__control-btn:last-of-type,
108
+ .#{$prefix}--number-input--fluid--invalid
109
+ input[type='number'][data-invalid]:focus
110
+ ~ .#{$prefix}--number__controls
111
+ .#{$prefix}--number__control-btn:last-of-type {
112
+ box-shadow: inset -2px 0 $focus;
139
113
  }
140
114
 
141
- .#{$prefix}--number-input--fluid.#{$prefix}--number-input--fluid--focus
142
- input[type='number']
115
+ .#{$prefix}--number-input--fluid--invalid
116
+ input[type='number'][data-invalid]:not(:focus)
143
117
  ~ .#{$prefix}--number__controls
144
- .#{$prefix}--number__control-btn.up-icon::after {
145
- background: $focus;
118
+ .#{$prefix}--number__control-btn:last-of-type:hover {
119
+ box-shadow: inset -2px 0 $support-error;
146
120
  }
147
121
 
148
- .#{$prefix}--number-input--fluid
149
- input[type='number']
122
+ .#{$prefix}--number-input--fluid--invalid
123
+ input[type='number'][data-invalid]:not(:focus)
150
124
  ~ .#{$prefix}--number__controls
151
- .#{$prefix}--number__control-btn.up-icon::after {
152
- block-size: calc(100%);
125
+ .#{$prefix}--number__control-btn:hover {
126
+ box-shadow: none;
153
127
  }
154
128
 
155
129
  .#{$prefix}--number-input--fluid.#{$prefix}--number-input--fluid--focus
156
- input[type='number']
130
+ .#{$prefix}--number {
131
+ @include focus-outline('outline');
132
+ }
133
+
134
+ .#{$prefix}--number-input--fluid:not(
135
+ .#{$prefix}--number-input--fluid--invalid
136
+ )
137
+ .#{$prefix}--number-input-wrapper:not(
138
+ .#{$prefix}--number-input-wrapper__warning
139
+ )
140
+ input[type='number']:focus
157
141
  ~ .#{$prefix}--number__controls
158
- .#{$prefix}--number__control-btn.up-icon:hover::after {
159
- background-color: $focus;
160
- block-size: calc(100%);
142
+ .#{$prefix}--number__control-btn:hover {
143
+ border-block-end: 1px solid $focus;
144
+ outline: none;
161
145
  }
162
146
 
163
147
  .#{$prefix}--number-input--fluid--invalid
@@ -290,4 +274,15 @@
290
274
  input[type='number']:disabled {
291
275
  background-color: transparent;
292
276
  }
277
+
278
+ // Slug styles
279
+ .#{$prefix}--number-input--fluid
280
+ .#{$prefix}--number__input-wrapper--slug
281
+ .#{$prefix}--slug {
282
+ inset-block-start: convert.to-rem(43px);
283
+ }
284
+
285
+ .#{$prefix}--number-input--fluid .#{$prefix}--number__input-wrapper--slug {
286
+ @include ai-gradient;
287
+ }
293
288
  }
@@ -12,6 +12,7 @@
12
12
  @use '../../config' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../utilities/ai-gradient' as *;
15
16
  @use '../../utilities/convert';
16
17
  @use '../../utilities/focus-outline' as *;
17
18
 
@@ -216,4 +217,9 @@
216
217
  block-size: 4rem;
217
218
  inline-size: 80%;
218
219
  }
220
+
221
+ // Slug styles
222
+ .#{$prefix}--text-area--fluid .#{$prefix}--text-area__wrapper--slug {
223
+ @include ai-gradient;
224
+ }
219
225
  }
@@ -185,4 +185,11 @@
185
185
  inset-block-start: convert.to-rem(36px);
186
186
  inset-inline-start: $spacing-05;
187
187
  }
188
+
189
+ // Slug styles
190
+ .#{$prefix}--text-input--fluid
191
+ .#{$prefix}--text-input__field-wrapper--slug
192
+ .#{$prefix}--slug {
193
+ inset-block-start: convert.to-rem(43px);
194
+ }
188
195
  }
@@ -83,6 +83,15 @@ $-loading-gap-small: 110;
83
83
  .#{$prefix}--loading--small .#{$prefix}--inline-loading__svg {
84
84
  stroke: $interactive;
85
85
  }
86
+
87
+ .#{$prefix}--btn .#{$prefix}--inline-loading--btn {
88
+ min-block-size: 0;
89
+
90
+ .#{$prefix}--inline-loading__text {
91
+ @include type-style('body-short-01');
92
+ }
93
+ }
94
+
86
95
  /* If IE11 Don't show check animation */
87
96
  @media screen and (-ms-high-contrast: active),
88
97
  screen and (-ms-high-contrast: none) {
@@ -16,6 +16,7 @@
16
16
  @use '../../spacing' as *;
17
17
  @use '../../motion' as *;
18
18
  @use '../../layer' as *;
19
+ @use '../../utilities/ai-gradient' as *;
19
20
  @use '../../utilities/box-shadow' as *;
20
21
  @use '../../utilities/button-reset';
21
22
  @use '../../utilities/component-reset';
@@ -307,7 +308,7 @@ $list-box-menu-width: convert.to-rem(300px);
307
308
  display: inline-flex;
308
309
  overflow: hidden;
309
310
  align-items: center;
310
- // Account for the border in `.bx--list-box`
311
+ // Account for the border in `.cds--list-box`
311
312
  block-size: calc(100% + 1px);
312
313
  cursor: pointer;
313
314
  outline: none;
@@ -888,6 +889,58 @@ $list-box-menu-width: convert.to-rem(300px);
888
889
  text-overflow: ellipsis;
889
890
  }
890
891
 
892
+ // Slug styles
893
+ .#{$prefix}--list-box__wrapper--slug .#{$prefix}--slug {
894
+ position: absolute;
895
+ inset-block-start: 50%;
896
+ inset-inline-end: $spacing-08;
897
+ transform: translateY(-50%);
898
+ }
899
+
900
+ .#{$prefix}--list-box__wrapper--slug .#{$prefix}--list-box {
901
+ @include ai-gradient;
902
+ }
903
+
904
+ .#{$prefix}--list-box__wrapper--slug .#{$prefix}--list-box__field,
905
+ .#{$prefix}--list-box__wrapper--slug .#{$prefix}--text-input {
906
+ padding-inline-end: $spacing-10;
907
+ }
908
+
909
+ .#{$prefix}--list-box__wrapper--slug
910
+ .#{$prefix}--list-box--invalid
911
+ .#{$prefix}--list-box__field,
912
+ .#{$prefix}--list-box__wrapper--slug
913
+ .#{$prefix}--list-box--warning
914
+ .#{$prefix}--list-box__field {
915
+ padding-inline-end: $spacing-12;
916
+ }
917
+
918
+ .#{$prefix}--list-box__wrapper--slug
919
+ .#{$prefix}--list-box--invalid
920
+ .#{$prefix}--slug,
921
+ .#{$prefix}--list-box__wrapper--slug
922
+ .#{$prefix}--list-box--warning
923
+ .#{$prefix}--slug {
924
+ inset-inline-end: $spacing-10;
925
+ }
926
+
927
+ .#{$prefix}--list-box__wrapper--slug
928
+ .#{$prefix}--list-box__field:has(.#{$prefix}--list-box__selection)
929
+ ~ .#{$prefix}--slug {
930
+ inset-inline-end: $spacing-10;
931
+ }
932
+
933
+ .#{$prefix}--list-box__wrapper--slug
934
+ .#{$prefix}--list-box--invalid
935
+ .#{$prefix}--list-box__field:has(.#{$prefix}--list-box__selection)
936
+ ~ .#{$prefix}--slug,
937
+ .#{$prefix}--list-box__wrapper--slug
938
+ .#{$prefix}--list-box--warning
939
+ .#{$prefix}--list-box__field:has(.#{$prefix}--list-box__selection)
940
+ ~ .#{$prefix}--slug {
941
+ inset-inline-end: convert.to-rem(88px);
942
+ }
943
+
891
944
  // Windows HCM fix
892
945
  .#{$prefix}--list-box__field,
893
946
  .#{$prefix}--list-box__menu,
@@ -14,8 +14,12 @@
14
14
  /// @access public
15
15
  /// @group menu-button
16
16
  @mixin menu-button {
17
+ .#{$prefix}--menu-button__container {
18
+ display: inline-block;
19
+ }
20
+
17
21
  .#{$prefix}--menu-button__trigger:not(.#{$prefix}--btn--ghost) {
18
- min-inline-size: 10rem;
22
+ min-inline-size: 12rem;
19
23
  }
20
24
 
21
25
  .#{$prefix}--menu-button__trigger svg {