@carbon/styles 1.39.0 → 1.41.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.39.0",
4
+ "version": "1.41.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -38,13 +38,13 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@carbon/colors": "^11.19.0",
41
+ "@carbon/colors": "^11.20.0-rc.0",
42
42
  "@carbon/feature-flags": "^0.16.0",
43
- "@carbon/grid": "^11.20.0",
44
- "@carbon/layout": "^11.19.0",
45
- "@carbon/motion": "^11.15.0",
46
- "@carbon/themes": "^11.25.0",
47
- "@carbon/type": "^11.24.0",
43
+ "@carbon/grid": "^11.21.0-rc.0",
44
+ "@carbon/layout": "^11.20.0-rc.0",
45
+ "@carbon/motion": "^11.16.0-rc.0",
46
+ "@carbon/themes": "^11.26.0-rc.0",
47
+ "@carbon/type": "^11.25.0-rc.0",
48
48
  "@ibm/plex": "6.0.0-next.6"
49
49
  },
50
50
  "devDependencies": {
@@ -65,5 +65,5 @@
65
65
  "scss/**/*.css",
66
66
  "css/**/*.css"
67
67
  ],
68
- "gitHead": "7c151d929564f2cf414f3a0fef4a5fc888242fae"
68
+ "gitHead": "da28d28a2d3a34503099e25255076efd3da4db9f"
69
69
  }
package/scss/_zone.scss CHANGED
@@ -36,8 +36,8 @@ $-components: (
36
36
 
37
37
  @each $name, $theme in $zones {
38
38
  .#{config.$prefix}--#{'' + $name} {
39
- background: var(--cds-background);
40
- color: var(--cds-text-primary);
39
+ background-color: custom-property.get-var('background');
40
+ color: custom-property.get-var('text-primary');
41
41
 
42
42
  @each $key, $value in $theme {
43
43
  @if type-of($value) == color {
@@ -82,27 +82,17 @@ $content-padding: 0 0 0 $spacing-05 !default;
82
82
  padding-inline-end: layout.density('padding-inline');
83
83
  transition: background-color motion(standard, productive) $duration-fast-02;
84
84
 
85
- &:hover::before,
86
- &:focus::before {
87
- position: absolute;
88
- block-size: calc(100% + 2px);
89
- content: '';
90
- inline-size: 100%;
91
- inset-block-start: -1px;
92
- inset-inline-start: 0;
93
- }
94
-
95
- &:hover::before {
85
+ &:hover {
96
86
  background-color: $layer-hover;
97
87
  }
98
88
 
99
89
  &:focus {
90
+ box-shadow: /* Border top */ 0 -1px 0 0 $focus, inset 0 1px 0 0 $focus,
91
+ /* Border right */ inset 2px 0 0 0 $focus,
92
+ /* Border bottom */ 0 1px 0 0 $focus, inset 0 -1px 0 0 $focus,
93
+ /* Border left */ inset -2px 0 0 0 $focus;
100
94
  outline: none;
101
95
  }
102
-
103
- &:focus::before {
104
- @include focus-outline('outline-compat');
105
- }
106
96
  }
107
97
 
108
98
  // Disabled styles
@@ -51,11 +51,14 @@
51
51
  }
52
52
 
53
53
  .#{$prefix}--date-picker-input__wrapper {
54
- position: relative;
55
54
  display: flex;
56
55
  align-items: center;
57
56
  }
58
57
 
58
+ .#{$prefix}--date-picker-input__wrapper span {
59
+ position: relative;
60
+ }
61
+
59
62
  .#{$prefix}--date-picker.#{$prefix}--date-picker--simple
60
63
  .#{$prefix}--date-picker__input,
61
64
  .#{$prefix}--date-picker.#{$prefix}--date-picker--simple .#{$prefix}--label {
@@ -4,6 +4,7 @@
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.
6
6
  //
7
+ @use '../../breakpoint' as *;
7
8
 
8
9
  @use '../../config' as *;
9
10
  @use '../../motion' as *;
@@ -139,7 +140,7 @@
139
140
  display: grid;
140
141
  align-items: center;
141
142
  background-color: $layer;
142
- gap: convert.to-rem(12px) $spacing-05;
143
+ gap: convert.to-rem(12px) 0;
143
144
  grid-auto-rows: auto;
144
145
  grid-template-columns: 1fr auto;
145
146
  margin-block-end: $spacing-03;
@@ -171,15 +172,66 @@
171
172
  text-overflow: ellipsis;
172
173
  white-space: nowrap;
173
174
  }
175
+
176
+ .#{$prefix}--file-filename-container-wrap {
177
+ margin-block-start: 1px;
178
+ max-inline-size: 17.5rem;
179
+ padding-inline-start: $spacing-05;
180
+ @include breakpoint-down(410px) {
181
+ max-inline-size: 13.5rem;
182
+ }
183
+ }
184
+
185
+ .#{$prefix}--file-filename-container-wrap-invalid {
186
+ max-inline-size: 15.5rem;
187
+
188
+ .#{$prefix}--file-filename-tooltip {
189
+ inline-size: -webkit-fill-available;
190
+ padding-inline-start: $spacing-05;
191
+ @-moz-document url-prefix() {
192
+ inline-size: -moz-available;
193
+ }
194
+ }
195
+ }
196
+
197
+ .#{$prefix}--file-filename-tooltip {
198
+ inline-size: -webkit-fill-available;
199
+ @-moz-document url-prefix() {
200
+ inline-size: -moz-available;
201
+ }
202
+ }
203
+
204
+ .#{$prefix}--file-filename-button {
205
+ @include type-style('body-compact-01');
206
+
207
+ overflow: hidden;
208
+ padding: 0;
209
+ border: none;
210
+ background: none;
211
+ color: inherit;
212
+ cursor: pointer;
213
+ font: inherit;
214
+ inline-size: -webkit-fill-available;
215
+ outline: inherit;
216
+ text-overflow: ellipsis;
217
+ white-space: nowrap;
218
+
219
+ @-moz-document url-prefix() {
220
+ inline-size: -moz-available;
221
+ }
222
+ }
223
+ .#{$prefix}--file-filename-button:focus {
224
+ outline: revert;
225
+ }
174
226
  }
175
227
 
176
228
  .#{$prefix}--file__selected-file--md {
177
- gap: $spacing-03 $spacing-05;
229
+ gap: $spacing-03 0;
178
230
  min-block-size: convert.to-rem(40px);
179
231
  }
180
232
 
181
233
  .#{$prefix}--file__selected-file--sm {
182
- gap: $spacing-02 $spacing-05;
234
+ gap: $spacing-02 0;
183
235
  min-block-size: convert.to-rem(32px);
184
236
  }
185
237
 
@@ -259,21 +311,32 @@
259
311
  color: $text-primary;
260
312
  padding-block-end: $spacing-03;
261
313
  }
262
-
263
314
  .#{$prefix}--file__state-container {
264
315
  display: flex;
265
316
  align-items: center;
266
317
  justify-content: center;
267
318
  min-inline-size: 1.5rem;
268
- padding-inline-end: $spacing-05;
319
+ padding-inline-end: convert.to-rem(12px);
269
320
 
270
321
  .#{$prefix}--loading__svg {
271
322
  stroke: $icon-primary;
272
323
  }
273
324
  }
274
325
 
326
+ .#{$prefix}--file__state-container .#{$prefix}--file-loading {
327
+ display: flex;
328
+ align-items: center;
329
+ justify-content: center;
330
+ padding: $spacing-02;
331
+ border: none;
332
+ background-color: transparent;
333
+ block-size: $spacing-05;
334
+ inline-size: $spacing-06;
335
+ }
336
+
275
337
  .#{$prefix}--file__state-container .#{$prefix}--file-complete {
276
338
  fill: $interactive;
339
+ inline-size: $spacing-06;
277
340
 
278
341
  &:focus {
279
342
  @include focus-outline('border');
@@ -60,6 +60,12 @@
60
60
  white-space: nowrap;
61
61
  }
62
62
 
63
+ .#{$prefix}--date-picker--fluid
64
+ .#{$prefix}--date-picker-input__wrapper
65
+ > span {
66
+ inline-size: 100%;
67
+ }
68
+
63
69
  .#{$prefix}--date-picker--fluid
64
70
  .#{$prefix}--date-picker-input__wrapper
65
71
  .#{$prefix}--date-picker__input {
@@ -405,7 +405,7 @@ $list-box-menu-width: convert.to-rem(300px);
405
405
  block-size: convert.to-rem(24px);
406
406
  cursor: pointer;
407
407
  inline-size: convert.to-rem(24px);
408
- inset-inline-end: $spacing-05;
408
+ inset-inline-end: $spacing-04;
409
409
  outline: none;
410
410
  transition: transform $duration-fast-01 motion(standard, productive);
411
411
  }
@@ -202,8 +202,8 @@
202
202
  font-weight: 400;
203
203
  grid-column: 1/-1;
204
204
  grid-row: 2/-2;
205
- margin-block-end: $spacing-09;
206
205
  overflow-y: auto;
206
+ padding-block-end: $spacing-09;
207
207
  // Required to accommodate focus outline's negative offset:
208
208
  padding-block-start: $spacing-03;
209
209
  // anything besides text/p spans full width, with just 16px padding
@@ -347,22 +347,35 @@
347
347
  // -----------------------------
348
348
  // Modal overflow
349
349
  // -----------------------------
350
+ .#{$prefix}--modal-scroll-content {
351
+ // Required to accommodate focus outline's negative offset when scrolling in Chrome
352
+ border-block-end: 2px solid transparent;
353
+ }
350
354
  // Required so overflow-indicator disappears at end of content
351
355
  .#{$prefix}--modal-scroll-content > *:last-child {
352
- padding-block-end: $spacing-07;
356
+ padding-block-end: $spacing-06;
353
357
  }
354
358
 
355
359
  .#{$prefix}--modal-content--overflow-indicator {
356
360
  position: absolute;
357
- background-image: linear-gradient(to bottom, transparent, $layer);
358
- block-size: convert.to-rem(32px);
359
- content: '';
361
+ background: $layer;
362
+ block-size: convert.to-rem(48px);
360
363
  grid-column: 1/-1;
361
364
  grid-row: 2/-2;
362
- inline-size: 100%;
363
- inset-block-end: $spacing-09;
365
+ inline-size: calc(100% - $spacing-05);
366
+ inset-block-end: 0;
364
367
  inset-inline-start: 0;
365
368
  pointer-events: none;
369
+
370
+ &::before {
371
+ position: absolute;
372
+ background-image: linear-gradient(to bottom, transparent, $layer);
373
+ block-size: convert.to-rem(32px);
374
+ content: '';
375
+ inline-size: 100%;
376
+ inset-block-start: -32px;
377
+ pointer-events: none;
378
+ }
366
379
  }
367
380
 
368
381
  // Safari-only media query
@@ -379,7 +392,6 @@
379
392
  .#{$prefix}--modal-content:focus
380
393
  ~ .#{$prefix}--modal-content--overflow-indicator {
381
394
  margin: 0 2px 2px;
382
- inline-size: calc(100% - 4px);
383
395
  }
384
396
 
385
397
  @media screen and (-ms-high-contrast: active) {
@@ -30,17 +30,21 @@
30
30
  position: relative;
31
31
  display: flex;
32
32
  align-items: center;
33
+ gap: 1rem;
33
34
  user-select: none;
34
35
  }
35
36
 
36
37
  .#{$prefix}--slider {
37
38
  position: relative;
38
39
  padding: $spacing-05 0;
39
- margin: 0 $spacing-05;
40
40
  cursor: pointer;
41
41
  inline-size: 100%;
42
42
  max-inline-size: convert.to-rem(640px);
43
43
  min-inline-size: convert.to-rem(200px);
44
+
45
+ .#{$prefix}--slider-container--two-handles & {
46
+ margin-inline: rem(4px);
47
+ }
44
48
  }
45
49
 
46
50
  .#{$prefix}--slider__range-label {
@@ -48,10 +52,6 @@
48
52
 
49
53
  color: $text-primary;
50
54
  white-space: nowrap;
51
-
52
- &:last-of-type {
53
- margin-inline-end: $spacing-05;
54
- }
55
55
  }
56
56
 
57
57
  .#{$prefix}--slider__track {
@@ -117,10 +117,102 @@
117
117
  }
118
118
  }
119
119
 
120
+ .#{$prefix}--slider__thumb-icon {
121
+ fill: $layer-selected-inverse;
122
+ }
123
+
124
+ .#{$prefix}--slider__thumb-icon--focus {
125
+ display: none;
126
+ fill: $interactive;
127
+ }
128
+
129
+ .#{$prefix}--slider__thumb--lower,
130
+ .#{$prefix}--slider__thumb--upper {
131
+ display: block;
132
+ /* stylelint-disable-next-line declaration-property-value-disallowed-list */
133
+ border-radius: unset;
134
+ background-color: transparent;
135
+ block-size: 24px;
136
+ box-shadow: none;
137
+ inline-size: 16px;
138
+ transform: translate(-100%, -50%);
139
+ transition: none;
140
+
141
+ &::before {
142
+ position: absolute;
143
+ z-index: -1;
144
+ display: block;
145
+ background: $background;
146
+ block-size: convert.to-rem(2px);
147
+ content: '';
148
+ inline-size: convert.to-rem(6px);
149
+ inset-block-start: calc(50% - #{convert.to-rem(2px) / 2});
150
+ inset-inline-end: 0;
151
+ }
152
+
153
+ &:hover {
154
+ transform: translate(-100%, -50%);
155
+
156
+ .#{$prefix}--slider__thumb-icon {
157
+ fill: $text-secondary;
158
+ }
159
+ }
160
+
161
+ &:active {
162
+ box-shadow: none;
163
+ transform: translate(-100%, -50%);
164
+ }
165
+
166
+ &:focus {
167
+ background-color: transparent;
168
+ box-shadow: none;
169
+ transform: translate(-100%, -50%);
170
+
171
+ .#{$prefix}--slider__thumb-icon {
172
+ display: none;
173
+ fill: $interactive;
174
+ }
175
+
176
+ .#{$prefix}--slider__thumb-icon--focus {
177
+ display: block;
178
+ }
179
+ }
180
+ }
181
+
182
+ .#{$prefix}--slider__thumb--lower:focus::before,
183
+ .#{$prefix}--slider__thumb--upper:focus::before {
184
+ inline-size: 100%;
185
+ }
186
+
187
+ .#{$prefix}--slider__thumb--upper {
188
+ transform: translate(0, -50%);
189
+
190
+ &::before {
191
+ inset-inline-end: auto;
192
+ inset-inline-start: 0;
193
+ }
194
+
195
+ &:hover {
196
+ transform: translate(0, -50%);
197
+ }
198
+
199
+ &:active {
200
+ transform: translate(0, -50%);
201
+ }
202
+
203
+ &:focus {
204
+ transform: translate(0, -50%);
205
+ }
206
+ }
207
+
120
208
  .#{$prefix}--slider__input {
121
209
  display: none;
122
210
  }
123
211
 
212
+ .#{$prefix}--slider-text-input-wrapper {
213
+ position: relative;
214
+ }
215
+
124
216
  .#{$prefix}--slider-text-input,
125
217
  .#{$prefix}-slider-text-input {
126
218
  -moz-appearance: textfield;
@@ -139,7 +231,7 @@
139
231
  }
140
232
 
141
233
  .#{$prefix}--slider__thumb:focus ~ .#{$prefix}--slider__filled-track {
142
- background-color: $interactive;
234
+ background-color: $border-interactive;
143
235
  }
144
236
 
145
237
  // Invalid & warn state
@@ -161,7 +253,6 @@
161
253
  .#{$prefix}--slider__validation-msg.#{$prefix}--form-requirement {
162
254
  display: block;
163
255
  overflow: visible;
164
- margin-block-start: 0;
165
256
  max-block-size: 100%;
166
257
  }
167
258
 
@@ -241,15 +332,26 @@
241
332
  cursor: default;
242
333
  }
243
334
 
244
- .#{$prefix}--slider--readonly .#{$prefix}--slider__thumb {
335
+ .#{$prefix}--slider-container--readonly .#{$prefix}--slider__thumb {
245
336
  block-size: 0;
246
337
  inline-size: 0;
338
+
339
+ &::before,
340
+ &::after {
341
+ display: none;
342
+ }
247
343
  }
248
344
 
249
- .#{$prefix}--slider--readonly ~ .#{$prefix}--slider-text-input {
345
+ .#{$prefix}--slider-container--readonly .#{$prefix}--slider-text-input {
250
346
  background-color: transparent;
251
347
  }
252
348
 
349
+ .#{$prefix}--slider__status-msg.#{$prefix}--form-requirement {
350
+ display: block;
351
+ overflow: visible;
352
+ max-block-size: 100%;
353
+ }
354
+
253
355
  // Skeleton state
254
356
  .#{$prefix}--slider-container.#{$prefix}--skeleton
255
357
  .#{$prefix}--slider__range-label {
@@ -265,11 +367,20 @@
265
367
  pointer-events: none;
266
368
  }
267
369
 
268
- .#{$prefix}--slider-container.#{$prefix}--skeleton
370
+ .#{$prefix}--slider-container.#{$prefix}--skeleton {
269
371
  .#{$prefix}--slider__thumb {
270
- cursor: default;
271
- inset-inline-start: 50%;
272
- pointer-events: none;
372
+ cursor: default;
373
+ inset-inline-start: 50%;
374
+ pointer-events: none;
375
+ }
376
+
377
+ .#{$prefix}--slider__thumb--lower {
378
+ inset-inline-start: 0;
379
+ }
380
+
381
+ .#{$prefix}--slider__thumb--upper {
382
+ inset-inline-start: 100%;
383
+ }
273
384
  }
274
385
 
275
386
  // Windows HCM fix