@carbon/styles 1.42.0 → 1.43.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.0",
4
+ "version": "1.43.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -65,5 +65,5 @@
65
65
  "scss/**/*.css",
66
66
  "css/**/*.css"
67
67
  ],
68
- "gitHead": "7e1982e232895b6223b88bca246f754ecd2609ac"
68
+ "gitHead": "dc9f4b277a5b45f97d37cd58ecdb1e919000f64b"
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');
@@ -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
  }
@@ -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';
@@ -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,
@@ -12,6 +12,7 @@
12
12
  @use '../../spacing' as *;
13
13
  @use '../../theme' as *;
14
14
  @use '../../type' as *;
15
+ @use '../../utilities/ai-gradient' as *;
15
16
  @use '../../utilities/skeleton' as *;
16
17
  @use '../../utilities/button-reset';
17
18
  @use '../../utilities/high-contrast-mode' as *;
@@ -159,26 +160,6 @@
159
160
  border-block-end: convert.to-rem(1px) solid $border-strong;
160
161
  color: $icon-primary;
161
162
 
162
- &::before,
163
- &::after {
164
- position: absolute;
165
- display: block;
166
- background-color: $field;
167
- // block-size: calc(100% - 4px) is calculated differently in Safari
168
- block-size: convert.to-rem(36px);
169
- content: '';
170
- inline-size: convert.to-rem(2px);
171
- inset-block-start: convert.to-rem(2px);
172
- }
173
-
174
- &::before {
175
- inset-inline-start: 0;
176
- }
177
-
178
- &::after {
179
- inset-inline-end: 0;
180
- }
181
-
182
163
  svg {
183
164
  fill: currentColor;
184
165
  }
@@ -195,18 +176,6 @@
195
176
  background-color: $field-hover;
196
177
  color: $icon-primary;
197
178
  cursor: pointer;
198
-
199
- &::before,
200
- &::after {
201
- background-color: $field-hover;
202
- }
203
- }
204
-
205
- &:focus::before,
206
- &:focus::after,
207
- &:hover:focus::before,
208
- &:hover:focus::after {
209
- background-color: transparent;
210
179
  }
211
180
 
212
181
  &:disabled {
@@ -225,56 +194,50 @@
225
194
  order: 2;
226
195
  }
227
196
 
228
- // add top and bottom outlines to number controls when input is focused
229
197
  .#{$prefix}--number
230
- input[type='number']:focus
198
+ input[type='number'][data-invalid]
231
199
  ~ .#{$prefix}--number__controls
232
200
  .#{$prefix}--number__control-btn {
233
- border-block-end-color: transparent;
234
-
235
- &:hover {
236
- @include focus-outline('outline');
237
- }
201
+ border-block-end-color: $support-error;
238
202
  }
239
203
 
204
+ // add top and bottom outlines to number controls when input is focused
240
205
  .#{$prefix}--number
241
- input[type='number'][data-invalid]
206
+ input[type='number']:focus
242
207
  ~ .#{$prefix}--number__controls
243
208
  .#{$prefix}--number__control-btn {
244
- border-block-end-color: transparent;
209
+ border-block-end-color: $focus;
210
+ box-shadow: inset 0 2px $focus, inset 0 -1px $focus;
245
211
  }
246
212
 
247
- // add invalid outline to number controls only when invalid input is not focused
248
213
  .#{$prefix}--number
249
- input[type='number'][data-invalid]:not(:focus)
214
+ input[type='number']:focus
250
215
  ~ .#{$prefix}--number__controls
251
- .#{$prefix}--number__control-btn:hover {
252
- @include focus-outline('invalid');
216
+ .#{$prefix}--number__control-btn:last-of-type {
217
+ box-shadow: inset 0 2px $focus, inset 0 -1px $focus, inset -2px 0 $focus;
253
218
  }
254
219
 
220
+ // add invalid box-shadow to number controls only when invalid input is not focused
255
221
  .#{$prefix}--number
256
- input[type='number']:focus
222
+ input[type='number'][data-invalid]:not(:focus)
257
223
  ~ .#{$prefix}--number__controls
258
- .#{$prefix}--number__control-btn.up-icon::after {
259
- background-color: transparent;
224
+ .#{$prefix}--number__control-btn:last-of-type:hover {
225
+ box-shadow: inset 0 2px $support-error, inset 0 -1px $support-error,
226
+ inset -2px 0 $support-error;
260
227
  }
261
228
 
262
229
  .#{$prefix}--number
263
- input[type='number'][data-invalid]
230
+ input[type='number'][data-invalid]:not(:focus)
264
231
  ~ .#{$prefix}--number__controls
265
- .#{$prefix}--number__control-btn.up-icon::after {
266
- background-color: $support-error;
232
+ .#{$prefix}--number__control-btn:hover {
233
+ box-shadow: inset 0 2px $support-error, inset 0 -1px $support-error;
267
234
  }
268
235
 
269
236
  .#{$prefix}--number
270
- input[type='number'][data-invalid]:focus
271
- ~ .#{$prefix}--number__controls
272
- .#{$prefix}--number__control-btn.up-icon::after,
273
- .#{$prefix}--number
274
- input[type='number'][data-invalid]
237
+ input[type='number'][data-invalid]:not(:focus)
275
238
  ~ .#{$prefix}--number__controls
276
- .#{$prefix}--number__control-btn.up-icon:focus::after {
277
- background-color: $focus;
239
+ .#{$prefix}--number__control-btn:focus:hover {
240
+ @include focus-outline('outline');
278
241
  }
279
242
 
280
243
  .#{$prefix}--number__rule-divider {
@@ -380,38 +343,6 @@
380
343
  opacity: 1;
381
344
  }
382
345
 
383
- // V11: Possibly deprecate
384
- .#{$prefix}--number--light input[type='number'] {
385
- background-color: $field-02;
386
- }
387
-
388
- // V11: Possibly deprecate
389
- .#{$prefix}--number--light input[type='number']:disabled {
390
- background-color: $field-02;
391
- }
392
-
393
- // V11: Possibly deprecate
394
- .#{$prefix}--number--light .#{$prefix}--number__control-btn::before,
395
- .#{$prefix}--number--light .#{$prefix}--number__control-btn::after {
396
- background-color: $field-02;
397
- }
398
-
399
- .#{$prefix}--number--light .#{$prefix}--number__control-btn:focus::before,
400
- .#{$prefix}--number--light .#{$prefix}--number__control-btn:focus::after {
401
- background-color: transparent;
402
- }
403
-
404
- // V11: Possibly deprecate
405
- // We include `:not(:focus)` here because the pseudo elements will overlap the
406
- // focus outline on the button if we set their background-color on focus
407
- .#{$prefix}--number--light .#{$prefix}--number__control-btn:hover,
408
- .#{$prefix}--number--light
409
- .#{$prefix}--number__control-btn:not(:focus):hover::before,
410
- .#{$prefix}--number--light
411
- .#{$prefix}--number__control-btn:not(:focus):hover::after {
412
- background-color: $layer-hover-02;
413
- }
414
-
415
346
  // Size Variant styles
416
347
  .#{$prefix}--number--lg input[type='number'] {
417
348
  block-size: convert.to-rem(48px);
@@ -423,12 +354,6 @@
423
354
 
424
355
  .#{$prefix}--number--lg .#{$prefix}--number__control-btn {
425
356
  inline-size: convert.to-rem(48px);
426
-
427
- &::before,
428
- &::after {
429
- // block-size: calc(100% - 4px) is calculated differently in Safari
430
- block-size: convert.to-rem(44px);
431
- }
432
357
  }
433
358
 
434
359
  .#{$prefix}--number--sm input[type='number'] {
@@ -441,12 +366,6 @@
441
366
 
442
367
  .#{$prefix}--number--sm .#{$prefix}--number__control-btn {
443
368
  inline-size: convert.to-rem(32px);
444
-
445
- &::before,
446
- &::after {
447
- // block-size: calc(100% - 4px) is calculated differently in Safari
448
- block-size: convert.to-rem(28px);
449
- }
450
369
  }
451
370
 
452
371
  //No label positioning adjustment
@@ -478,11 +397,6 @@
478
397
  &:hover {
479
398
  background-color: transparent;
480
399
  cursor: pointer;
481
-
482
- &::before,
483
- &::after {
484
- background-color: transparent;
485
- }
486
400
  }
487
401
  }
488
402
 
@@ -493,17 +407,43 @@
493
407
  outline: none;
494
408
  }
495
409
 
496
- .#{$prefix}--number--readonly .#{$prefix}--number__control-btn::before,
497
- .#{$prefix}--number--readonly .#{$prefix}--number__control-btn::after {
498
- background: transparent;
499
- }
500
-
501
410
  .#{$prefix}--number--readonly
502
411
  .#{$prefix}--number__controls:hover
503
412
  .#{$prefix}--number__rule-divider:not(:first-of-type) {
504
413
  background-color: $border-subtle;
505
414
  }
506
415
 
416
+ // Styles for `Slug` rendered inside `NumberInput`
417
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--slug {
418
+ position: absolute;
419
+ inset-block-start: 50%;
420
+ inset-inline-end: convert.to-rem(88px);
421
+ transform: translateY(-50%);
422
+ }
423
+
424
+ .#{$prefix}--number__input-wrapper--slug
425
+ input[data-invalid]
426
+ ~ .#{$prefix}--slug,
427
+ .#{$prefix}--number__input-wrapper--slug.#{$prefix}--number__input-wrapper--warning
428
+ .#{$prefix}--slug {
429
+ inset-inline-end: convert.to-rem(120px);
430
+ }
431
+
432
+ .#{$prefix}--number
433
+ .#{$prefix}--number__input-wrapper--slug
434
+ input[data-invalid],
435
+ .#{$prefix}--number
436
+ .#{$prefix}--number__input-wrapper--slug.#{$prefix}--number__input-wrapper--warning
437
+ input {
438
+ padding-inline-end: convert.to-rem(144px);
439
+ }
440
+
441
+ .#{$prefix}--number__input-wrapper--slug input[type='number'] {
442
+ @include ai-gradient;
443
+
444
+ padding-inline-end: convert.to-rem(112px);
445
+ }
446
+
507
447
  // Skeleton State
508
448
  .#{$prefix}--number.#{$prefix}--skeleton {
509
449
  @include skeleton;
@@ -516,19 +456,19 @@
516
456
  }
517
457
  }
518
458
 
519
- // // Windows HCM fix
520
- // /* stylelint-disable */
521
- // .#{$prefix}--number__control-btn:hover,
522
- // .#{$prefix}--number__control-btn:focus {
523
- // @include high-contrast-mode('focus');
524
- // }
459
+ // Windows HCM fix
460
+ /* stylelint-disable */
461
+ .#{$prefix}--number__control-btn:hover,
462
+ .#{$prefix}--number__control-btn:focus {
463
+ @include high-contrast-mode('focus');
464
+ }
525
465
 
526
- // .#{$prefix}--number__control-btn {
527
- // @include high-contrast-mode('outline');
528
- // }
466
+ .#{$prefix}--number__control-btn {
467
+ @include high-contrast-mode('outline');
468
+ }
529
469
 
530
- // .#{$prefix}--number__control-btn svg {
531
- // @include high-contrast-mode('icon-fill');
532
- // }
533
- // /* stylelint-enable */
470
+ .#{$prefix}--number__control-btn svg {
471
+ @include high-contrast-mode('icon-fill');
472
+ }
473
+ /* stylelint-enable */
534
474
  }