@carbon/styles 1.100.0 → 1.101.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.100.0",
4
+ "version": "1.101.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -40,13 +40,13 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@carbon/colors": "^11.47.0",
44
- "@carbon/feature-flags": "1.0.0",
45
- "@carbon/grid": "^11.50.0",
46
- "@carbon/layout": "^11.48.0",
47
- "@carbon/motion": "^11.41.0",
48
- "@carbon/themes": "^11.68.0",
49
- "@carbon/type": "^11.54.0",
43
+ "@carbon/colors": "^11.48.0",
44
+ "@carbon/feature-flags": "^1.0.0",
45
+ "@carbon/grid": "^11.51.0",
46
+ "@carbon/layout": "^11.49.0",
47
+ "@carbon/motion": "^11.42.0",
48
+ "@carbon/themes": "^11.69.0",
49
+ "@carbon/type": "^11.55.0",
50
50
  "@ibm/plex": "6.0.0-next.6",
51
51
  "@ibm/plex-mono": "1.1.0",
52
52
  "@ibm/plex-sans": "1.1.0",
@@ -75,5 +75,5 @@
75
75
  "scss/**/*.css",
76
76
  "css/**/*.css"
77
77
  ],
78
- "gitHead": "6dde90f9edfb378e1585f1954c92484a37f22f02"
78
+ "gitHead": "4f48ac426be7302a57460b1c81d74dd5d6071ad6"
79
79
  }
@@ -261,6 +261,7 @@ describe('@carbon/styles/scss/theme', () => {
261
261
  "chat-button-text-selected",
262
262
  "highlight",
263
263
  "overlay",
264
+ "color-scheme",
264
265
  "toggle-off",
265
266
  "shadow",
266
267
  "focus",
package/scss/_reset.scss CHANGED
@@ -113,6 +113,10 @@
113
113
  font-family: inherit;
114
114
  }
115
115
 
116
+ :root {
117
+ color-scheme: custom-property.get-var('color-scheme', light);
118
+ }
119
+
116
120
  /* HTML5 display-role reset for older browsers */
117
121
  article,
118
122
  aside,
package/scss/_theme.scss CHANGED
@@ -15,6 +15,8 @@
15
15
  @mixin theme($args...) {
16
16
  @include theme.theme($args...);
17
17
 
18
+ color-scheme: custom-property.get-var('color-scheme', light);
19
+
18
20
  // If the system is in high-contrast mode, use the system defined colors. This mostly happens automatically, but
19
21
  // we need to do it manually for icons and selected backgrounds. Importantly, the custom properties we set here
20
22
  // need to override the CSS custom properties set above. See:
package/scss/_zone.scss CHANGED
@@ -44,7 +44,11 @@ $-components: (
44
44
  color: custom-property.get-var('text-primary');
45
45
 
46
46
  @each $key, $value in $theme {
47
- @if meta.type-of($value) == color {
47
+ @if $key == 'color-scheme' {
48
+ @include custom-property.declaration($key, $value);
49
+
50
+ color-scheme: custom-property.get-var($key, $value);
51
+ } @else if meta.type-of($value) == color {
48
52
  @include custom-property.declaration($key, $value);
49
53
  }
50
54
  }
@@ -253,6 +253,13 @@
253
253
  position: static;
254
254
  }
255
255
 
256
+ &.#{$prefix}--btn--ghost {
257
+ &:focus {
258
+ background-color: $background-active;
259
+ box-shadow: inset 0 0 0 $button-outline-width $button-focus-color;
260
+ }
261
+ }
262
+
256
263
  &.#{$prefix}--btn--ghost .#{$prefix}--btn__icon,
257
264
  &.#{$prefix}--btn--danger--ghost .#{$prefix}--btn__icon {
258
265
  margin: 0;
@@ -208,9 +208,9 @@
208
208
  }
209
209
 
210
210
  //----------------------------------------------------------------------------
211
- // Compact, Short, Tall Sortable
211
+ // Extra small, Short, Tall Sortable
212
212
  //----------------------------------------------------------------------------
213
- // Sortable compact
213
+ // Sortable Extra small
214
214
  .#{$prefix}--data-table--xs.#{$prefix}--data-table--sort th {
215
215
  block-size: convert.to-rem(24px);
216
216
  }
@@ -155,7 +155,7 @@
155
155
  margin-inline: -$spacing-05 - $spacing-05;
156
156
  }
157
157
 
158
- //TO-DO: remove .#{$prefix}--modal-content__regular-content in v11 since hasForm has been deprecated
158
+ // TODO: remove .#{$prefix}--modal-content__regular-content in v11 since hasForm has been deprecated
159
159
  // text/p gets 20% right padding
160
160
  .#{$prefix}--modal-content > p,
161
161
  .#{$prefix}--modal-content__regular-content {
@@ -164,7 +164,7 @@
164
164
  padding-inline-end: calc(20% - $spacing-07);
165
165
  }
166
166
 
167
- //TO-DO: remove .#{$prefix}--modal-content--with-form in v11 since hasForm has been deprecated\
167
+ // TODO: remove .#{$prefix}--modal-content--with-form in v11 since hasForm has been deprecated\
168
168
  // anything besides text/p spans full width, with just 16px padding
169
169
  .#{$prefix}--modal-content--with-form {
170
170
  padding-inline-end: $spacing-05;
@@ -304,6 +304,103 @@ $popover-caret-height: custom-property.get-var(
304
304
  transform: translate(-50%, calc(100% + $popover-offset));
305
305
  }
306
306
 
307
+ .#{$prefix}--popover--bottom:not(.#{$prefix}--popover--caret):not(
308
+ .#{$prefix}--popover--auto-align
309
+ ):not(.#{$prefix}--popover--tab-tip)
310
+ > .#{$prefix}--popover
311
+ > .#{$prefix}--popover-content,
312
+ .#{$prefix}--popover--bottom-start:not(.#{$prefix}--popover--caret):not(
313
+ .#{$prefix}--popover--auto-align
314
+ ):not(.#{$prefix}--popover--tab-tip)
315
+ > .#{$prefix}--popover
316
+ > .#{$prefix}--popover-content,
317
+ .#{$prefix}--popover--bottom-end:not(.#{$prefix}--popover--caret):not(
318
+ .#{$prefix}--popover--auto-align
319
+ ):not(.#{$prefix}--popover--tab-tip)
320
+ > .#{$prefix}--popover
321
+ > .#{$prefix}--popover-content {
322
+ inset-block-end: -$spacing-02;
323
+ }
324
+
325
+ .#{$prefix}--popover--top:not(.#{$prefix}--popover--caret):not(
326
+ .#{$prefix}--popover--auto-align
327
+ ):not(.#{$prefix}--popover--tab-tip)
328
+ > .#{$prefix}--popover
329
+ > .#{$prefix}--popover-content,
330
+ .#{$prefix}--popover--top-start:not(.#{$prefix}--popover--caret):not(
331
+ .#{$prefix}--popover--auto-align
332
+ ):not(.#{$prefix}--popover--tab-tip)
333
+ > .#{$prefix}--popover
334
+ > .#{$prefix}--popover-content,
335
+ .#{$prefix}--popover--top-end:not(.#{$prefix}--popover--caret):not(
336
+ .#{$prefix}--popover--auto-align
337
+ ):not(.#{$prefix}--popover--tab-tip)
338
+ > .#{$prefix}--popover
339
+ > .#{$prefix}--popover-content {
340
+ inset-block-start: -$spacing-02;
341
+ }
342
+
343
+ .#{$prefix}--popover--top-start:not(.#{$prefix}--popover--caret):not(
344
+ .#{$prefix}--popover--auto-align
345
+ ):not(.#{$prefix}--popover--tab-tip)
346
+ > .#{$prefix}--popover
347
+ > .#{$prefix}--popover-content,
348
+ .#{$prefix}--popover--bottom-start:not(.#{$prefix}--popover--caret):not(
349
+ .#{$prefix}--popover--auto-align
350
+ ):not(.#{$prefix}--popover--tab-tip)
351
+ > .#{$prefix}--popover
352
+ > .#{$prefix}--popover-content {
353
+ inset-inline-start: calc(50% - $popover-offset - 1rem);
354
+ }
355
+ .#{$prefix}--popover--top-end:not(.#{$prefix}--popover--caret):not(
356
+ .#{$prefix}--popover--auto-align
357
+ ):not(.#{$prefix}--popover--tab-tip)
358
+ > .#{$prefix}--popover
359
+ > .#{$prefix}--popover-content,
360
+ .#{$prefix}--popover--bottom-end:not(.#{$prefix}--popover--caret):not(
361
+ .#{$prefix}--popover--auto-align
362
+ ):not(.#{$prefix}--popover--tab-tip)
363
+ > .#{$prefix}--popover
364
+ > .#{$prefix}--popover-content {
365
+ inset-inline-end: calc(50% - $popover-offset - 1rem);
366
+ }
367
+
368
+ .#{$prefix}--popover--right:not(.#{$prefix}--popover--caret):not(
369
+ .#{$prefix}--popover--auto-align
370
+ ):not(.#{$prefix}--popover--tab-tip)
371
+ > .#{$prefix}--popover
372
+ > .#{$prefix}--popover-content,
373
+ .#{$prefix}--popover--right-start:not(.#{$prefix}--popover--caret):not(
374
+ .#{$prefix}--popover--auto-align
375
+ ):not(.#{$prefix}--popover--tab-tip)
376
+ > .#{$prefix}--popover
377
+ > .#{$prefix}--popover-content,
378
+ .#{$prefix}--popover--right-end:not(.#{$prefix}--popover--caret):not(
379
+ .#{$prefix}--popover--auto-align
380
+ ):not(.#{$prefix}--popover--tab-tip)
381
+ > .#{$prefix}--popover
382
+ > .#{$prefix}--popover-content {
383
+ inset-inline-start: calc(100% + $spacing-02);
384
+ }
385
+
386
+ .#{$prefix}--popover--left:not(.#{$prefix}--popover--caret):not(
387
+ .#{$prefix}--popover--auto-align
388
+ ):not(.#{$prefix}--popover--tab-tip)
389
+ > .#{$prefix}--popover
390
+ > .#{$prefix}--popover-content,
391
+ .#{$prefix}--popover--left-start:not(.#{$prefix}--popover--caret):not(
392
+ .#{$prefix}--popover--auto-align
393
+ ):not(.#{$prefix}--popover--tab-tip)
394
+ > .#{$prefix}--popover
395
+ > .#{$prefix}--popover-content,
396
+ .#{$prefix}--popover--left-end:not(.#{$prefix}--popover--caret):not(
397
+ .#{$prefix}--popover--auto-align
398
+ ):not(.#{$prefix}--popover--tab-tip)
399
+ > .#{$prefix}--popover
400
+ > .#{$prefix}--popover-content {
401
+ inset-inline-end: calc(100% + $spacing-02);
402
+ }
403
+
307
404
  [dir='rtl']
308
405
  .#{$prefix}--popover--bottom:not(.#{$prefix}--popover--auto-align)
309
406
  > .#{$prefix}--popover
@@ -87,6 +87,7 @@ $progress-indicator-bar-width: 1px inset transparent !default;
87
87
  .#{$prefix}--progress-label {
88
88
  @include type-style('body-compact-01');
89
89
 
90
+ display: block;
90
91
  overflow: hidden;
91
92
  margin: $spacing-03 0 0 0;
92
93
  color: $text-primary;
@@ -115,9 +116,7 @@ $progress-indicator-bar-width: 1px inset transparent !default;
115
116
  max-inline-size: 100%;
116
117
  }
117
118
 
118
- .#{$prefix}--progress-step-button:not(
119
- .#{$prefix}--progress-step-button--unclickable
120
- ) {
119
+ .#{$prefix}--progress-step-button {
121
120
  &:focus {
122
121
  outline: none;
123
122
  }
@@ -125,10 +124,14 @@ $progress-indicator-bar-width: 1px inset transparent !default;
125
124
  color: $focus;
126
125
  outline: convert.to-rem(1px) solid $focus;
127
126
  }
127
+ }
128
+
129
+ .#{$prefix}--progress-step-button:not(
130
+ .#{$prefix}--progress-step-button--unclickable
131
+ )
128
132
  .#{$prefix}--progress-label:active {
129
- box-shadow: 0 convert.to-rem(1px) 0 0 $text-primary;
130
- color: $text-primary;
131
- }
133
+ box-shadow: 0 convert.to-rem(1px) 0 0 $text-primary;
134
+ color: $text-primary;
132
135
  }
133
136
 
134
137
  //OVERFLOW STYLING
@@ -178,6 +181,7 @@ $progress-indicator-bar-width: 1px inset transparent !default;
178
181
  @include type-style('label-01');
179
182
 
180
183
  position: absolute;
184
+ display: block;
181
185
  color: $text-secondary;
182
186
  inset-inline-start: 0;
183
187
  margin-block-start: convert.to-rem(28px);
@@ -121,7 +121,7 @@
121
121
 
122
122
  .#{$prefix}--header__menu-trigger:hover > svg {
123
123
  fill: $icon-primary;
124
- //TO-DO: ask design if this color changes on hover, missing spec for it
124
+ // TODO: ask design if this color changes on hover, missing spec for it
125
125
  }
126
126
 
127
127
  .#{$prefix}--header__menu-toggle {
@@ -161,7 +161,7 @@
161
161
 
162
162
  a.#{$prefix}--header__name:focus {
163
163
  border-color: $focus;
164
- //TO-DO: follow up with design to see if this is correct, missing focus spec for it
164
+ // TODO: follow up with design to see if this is correct, missing focus spec for it
165
165
  }
166
166
 
167
167
  .#{$prefix}--header__name--prefix {
@@ -434,7 +434,7 @@
434
434
  inline-size: auto;
435
435
  inset-block-start: 0;
436
436
  inset-inline-start: 0;
437
- //TO-DO: double check with design that these tokens are correct, missing spec for it
437
+ // TODO: double check with design that these tokens are correct, missing spec for it
438
438
  outline: none;
439
439
  }
440
440
  }
@@ -74,7 +74,7 @@
74
74
  }
75
75
 
76
76
  .#{$prefix}--switcher__item-link--selected {
77
- //TO-DO: should we add a 3px left border-interactive here too? Doesn't currently have it, but specs have it
77
+ // TODO: should we add a 3px left border-interactive here too? Doesn't currently have it, but specs have it
78
78
  background: $layer-selected;
79
79
  color: $text-primary;
80
80
  }
@@ -161,7 +161,7 @@
161
161
  }
162
162
 
163
163
  // content box
164
- // @todo Simplify CSS selectors on next major release
164
+ // TODO: Simplify CSS selectors on next major release
165
165
  &::after,
166
166
  .#{$prefix}--assistive-text,
167
167
  + .#{$prefix}--assistive-text {
@@ -279,7 +279,7 @@
279
279
  }
280
280
  }
281
281
 
282
- // @todo Simplify CSS selectors on next major release
282
+ // TODO: Simplify CSS selectors on next major release
283
283
  &::before,
284
284
  &::after,
285
285
  .#{$prefix}--assistive-text,
@@ -339,7 +339,7 @@
339
339
  }
340
340
 
341
341
  // alignment options available only for top and bottom tooltip position
342
- // @todo Simplify CSS selectors on next major release
342
+ // TODO: Simplify CSS selectors on next major release
343
343
  &::after,
344
344
  .#{$prefix}--assistive-text,
345
345
  + .#{$prefix}--assistive-text {
@@ -378,7 +378,7 @@
378
378
  }
379
379
  }
380
380
 
381
- // @todo simplify on next major release to move the ::before pseudo element within the tooltip instead of the trigger
381
+ // TODO: simplify on next major release to move the ::before pseudo element within the tooltip instead of the trigger
382
382
  @if $tooltip-type == 'definition' {
383
383
  &.#{$prefix}--tooltip--a11y + .#{$prefix}--assistive-text {
384
384
  @if ($position == 'bottom') {