@carbon/styles 1.62.0-rc.0 → 1.63.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.
Files changed (34) hide show
  1. package/css/styles.css +12022 -11996
  2. package/css/styles.min.css +1 -1
  3. package/package.json +17 -11
  4. package/scss/__tests__/zone-test.js +1 -1
  5. package/scss/_reset.scss +1 -0
  6. package/scss/components/_index.scss +1 -0
  7. package/scss/components/accordion/_accordion.scss +6 -4
  8. package/scss/components/ai-label/_ai-label.scss +18 -0
  9. package/scss/components/ai-label/_index.scss +4 -0
  10. package/scss/components/combo-box/_combo-box.scss +3 -1
  11. package/scss/components/data-table/_data-table.scss +2 -2
  12. package/scss/components/data-table/expandable/_data-table-expandable.scss +2 -2
  13. package/scss/components/dropdown/_dropdown.scss +1 -1
  14. package/scss/components/fluid-combo-box/_fluid-combo-box.scss +7 -4
  15. package/scss/components/fluid-date-picker/_fluid-date-picker.scss +7 -3
  16. package/scss/components/fluid-list-box/_fluid-list-box.scss +6 -0
  17. package/scss/components/fluid-number-input/_fluid-number-input.scss +1 -1
  18. package/scss/components/form/_form.scss +2 -1
  19. package/scss/components/list-box/_list-box.scss +5 -0
  20. package/scss/components/multiselect/_multiselect.scss +1 -1
  21. package/scss/components/select/_select.scss +5 -0
  22. package/scss/components/slug/_slug.scss +11 -8
  23. package/scss/components/text-input/_text-input.scss +8 -3
  24. package/scss/components/tile/_tile.scss +1 -1
  25. package/scss/fonts/__tests__/__snapshots__/fonts-test.js.snap +180 -180
  26. package/scss/fonts/_mono.scss +66 -9
  27. package/scss/fonts/_sans-arabic.scss +17 -8
  28. package/scss/fonts/_sans-devanagari.scss +17 -8
  29. package/scss/fonts/_sans-hebrew.scss +17 -8
  30. package/scss/fonts/_sans-thai-looped.scss +17 -8
  31. package/scss/fonts/_sans-thai.scss +17 -8
  32. package/scss/fonts/_sans.scss +66 -9
  33. package/scss/fonts/_serif.scss +66 -9
  34. package/scss/fonts/_src.scss +20 -5
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.62.0-rc.0",
4
+ "version": "1.63.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -40,14 +40,21 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@carbon/colors": "^11.24.0-rc.0",
44
- "@carbon/feature-flags": "^0.21.0-rc.0",
45
- "@carbon/grid": "^11.25.0-rc.0",
46
- "@carbon/layout": "^11.24.0-rc.0",
47
- "@carbon/motion": "^11.20.0-rc.0",
48
- "@carbon/themes": "^11.38.0-rc.0",
49
- "@carbon/type": "^11.29.0-rc.0",
50
- "@ibm/plex": "6.0.0-next.6",
43
+ "@carbon/colors": "^11.24.0",
44
+ "@carbon/feature-flags": "^0.21.0",
45
+ "@carbon/grid": "^11.25.0",
46
+ "@carbon/layout": "^11.24.0",
47
+ "@carbon/motion": "^11.20.0",
48
+ "@carbon/themes": "^11.38.0",
49
+ "@carbon/type": "^11.29.0",
50
+ "@ibm/plex-mono": "0.0.3-alpha.0",
51
+ "@ibm/plex-sans": "0.0.3-alpha.0",
52
+ "@ibm/plex-sans-arabic": "0.0.3-alpha.0",
53
+ "@ibm/plex-sans-devanagari": "0.0.3-alpha.0",
54
+ "@ibm/plex-sans-hebrew": "0.0.3-alpha.0",
55
+ "@ibm/plex-sans-thai": "0.0.3-alpha.0",
56
+ "@ibm/plex-sans-thai-looped": "0.0.3-alpha.0",
57
+ "@ibm/plex-serif": "0.0.3-alpha.0",
51
58
  "@ibm/telemetry-js": "^1.5.0"
52
59
  },
53
60
  "devDependencies": {
@@ -56,7 +63,6 @@
56
63
  "browserslist-config-carbon": "^11.2.0",
57
64
  "css": "^3.0.0",
58
65
  "cssnano": "^7.0.0",
59
- "lodash.isequal": "^4.5.0",
60
66
  "postcss": "^8.4.14",
61
67
  "postcss-flexbugs-fixes": "^5.0.2",
62
68
  "rimraf": "^5.0.0",
@@ -68,5 +74,5 @@
68
74
  "scss/**/*.css",
69
75
  "css/**/*.css"
70
76
  ],
71
- "gitHead": "326ac312c2b669937ede1c0c68c0e3a6d9c34135"
77
+ "gitHead": "51d2a214ec7d870b4f807ed08a05031d091bfd46"
72
78
  }
@@ -11,7 +11,7 @@
11
11
 
12
12
  const { SassRenderer } = require('@carbon/test-utils/scss');
13
13
  const css = require('css');
14
- const isEqual = require('lodash.isequal');
14
+ const isEqual = require('react-fast-compare');
15
15
 
16
16
  const { render } = SassRenderer.create(__dirname);
17
17
 
package/scss/_reset.scss CHANGED
@@ -99,6 +99,7 @@
99
99
  border: 0;
100
100
  margin: 0;
101
101
  font: inherit;
102
+ font-feature-settings: 'liga' 1;
102
103
  font-size: 100%;
103
104
  vertical-align: baseline;
104
105
  }
@@ -6,6 +6,7 @@
6
6
  //
7
7
 
8
8
  @use 'accordion';
9
+ @use 'ai-label';
9
10
  @use 'aspect-ratio';
10
11
  @use 'breadcrumb';
11
12
  @use 'button';
@@ -217,7 +217,7 @@ $content-padding: 0 0 0 $spacing-05 !default;
217
217
  .#{$prefix}--accordion__item--active {
218
218
  overflow: visible;
219
219
 
220
- .#{$prefix}--accordion__wrapper {
220
+ > .#{$prefix}--accordion__wrapper {
221
221
  // Properties for when the accordion is open
222
222
  overflow: visible;
223
223
  max-block-size: fit-content;
@@ -226,9 +226,11 @@ $content-padding: 0 0 0 $spacing-05 !default;
226
226
  padding-block-end: $spacing-06;
227
227
  }
228
228
 
229
- .#{$prefix}--accordion__arrow {
230
- fill: $icon-primary;
231
- transform: rotate(-90deg) #{'/*rtl:ignore*/'};
229
+ > .#{$prefix}--accordion__heading {
230
+ > .#{$prefix}--accordion__arrow {
231
+ fill: $icon-primary;
232
+ transform: rotate(-90deg) #{'/*rtl:ignore*/'};
233
+ }
232
234
  }
233
235
  }
234
236
 
@@ -0,0 +1,18 @@
1
+ //
2
+ // Copyright IBM Corp. 2024
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ //-----------------------------
9
+ // AILabel
10
+ //-----------------------------
11
+ @use '../slug';
12
+
13
+ /// AILabel styles
14
+ /// @access public
15
+ /// @group AI
16
+ @mixin ai-label {
17
+ // Style overrides can be added here as needed
18
+ }
@@ -0,0 +1,4 @@
1
+ @forward 'ai-label';
2
+ @use 'ai-label';
3
+
4
+ @include ai-label.ai-label;
@@ -37,7 +37,9 @@
37
37
  @include focus-outline('outline');
38
38
  }
39
39
 
40
- .#{$prefix}--list-box--expanded
40
+ .#{$prefix}--combo-box.#{$prefix}--list-box--expanded:has(
41
+ input[aria-activedescendant]:not([aria-activedescendant=''])
42
+ )
41
43
  .#{$prefix}--combo-box--input--focus.#{$prefix}--text-input {
42
44
  outline-offset: convert.to-rem(-1px);
43
45
  outline-width: convert.to-rem(1px);
@@ -1012,7 +1012,7 @@
1012
1012
  background-attachment: fixed;
1013
1013
  }
1014
1014
 
1015
- tr.#{$prefix}--parent-row.cds--data-table--selected.#{$prefix}--data-table--slug-row,
1015
+ tr.#{$prefix}--parent-row.#{$prefix}--data-table--selected.#{$prefix}--data-table--slug-row,
1016
1016
  .#{$prefix}--data-table--selected.#{$prefix}--data-table--slug-row,
1017
1017
  tr.#{$prefix}--data-table--selected.#{$prefix}--data-table--slug-row
1018
1018
  + .#{$prefix}--expandable-row {
@@ -1031,7 +1031,7 @@
1031
1031
  border-block-end-color: $border-subtle;
1032
1032
  }
1033
1033
 
1034
- tr.#{$prefix}--expandable-row.cds--data-table--selected.#{$prefix}--data-table--slug-row[data-parent-row]
1034
+ tr.#{$prefix}--expandable-row.#{$prefix}--data-table--selected.#{$prefix}--data-table--slug-row[data-parent-row]
1035
1035
  > td:not(.#{$prefix}--table-expand):not(
1036
1036
  .#{$prefix}--table-column-checkbox
1037
1037
  ):not(.#{$prefix}--table-column-slug) {
@@ -464,7 +464,7 @@
464
464
  .#{$prefix}--parent-row .#{$prefix}--table-column-slug,
465
465
  .#{$prefix}--parent-row
466
466
  .#{$prefix}--table-column-slug
467
- + td.cds--table-expand[data-previous-value='collapsed'] {
467
+ + td.#{$prefix}--table-expand[data-previous-value='collapsed'] {
468
468
  box-shadow: none;
469
469
  }
470
470
 
@@ -472,7 +472,7 @@
472
472
  .#{$prefix}--table-column-slug,
473
473
  .#{$prefix}--parent-row.#{$prefix}--expandable-row
474
474
  .#{$prefix}--table-column-slug
475
- + td.cds--table-expand[data-previous-value='collapsed'] {
475
+ + td.#{$prefix}--table-expand[data-previous-value='collapsed'] {
476
476
  border-block-end: 1px solid transparent;
477
477
  }
478
478
 
@@ -93,7 +93,7 @@
93
93
  border-block-end-color: $border-subtle;
94
94
  }
95
95
 
96
- .#{$prefix}--dropdown--open .cds--list-box__field {
96
+ .#{$prefix}--dropdown--open .#{$prefix}--list-box__field {
97
97
  outline: none;
98
98
  }
99
99
 
@@ -37,10 +37,13 @@
37
37
  white-space: nowrap;
38
38
  }
39
39
 
40
- .#{$prefix}--list-box__wrapper--fluid
41
- .#{$prefix}--combo-box
42
- .#{$prefix}--text-input:focus {
43
- outline: none;
40
+ .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box__wrapper--fluid--focus
41
+ .#{$prefix}--combo-box.#{$prefix}--list-box--expanded:has(
42
+ input[aria-activedescendant]:not([aria-activedescendant=''])
43
+ )
44
+ .#{$prefix}--combo-box--input--focus.#{$prefix}--text-input {
45
+ outline-offset: convert.to-rem(-1px);
46
+ outline-width: convert.to-rem(1px);
44
47
  }
45
48
 
46
49
  .#{$prefix}--list-box__wrapper--fluid
@@ -408,14 +408,18 @@
408
408
 
409
409
  .#{$prefix}--date-picker--fluid
410
410
  .#{$prefix}--date-picker-input__wrapper--slug:not(
411
- :has(~ .#{$prefix}--slug--revert)
411
+ :has(.#{$prefix}--slug--revert)
412
412
  ) {
413
413
  @include ai-gradient;
414
414
  }
415
415
 
416
416
  .#{$prefix}--date-picker--fluid
417
- .#{$prefix}--date-picker-input__wrapper--slug
418
- .#{$prefix}--date-picker__input:not(.cds--date-picker__input--invalid) {
417
+ .#{$prefix}--date-picker-input__wrapper--slug:not(
418
+ :has(.#{$prefix}--slug--revert)
419
+ )
420
+ .#{$prefix}--date-picker__input:not(
421
+ .#{$prefix}--date-picker__input--invalid
422
+ ) {
419
423
  border-block-end-color: $ai-border-strong;
420
424
  }
421
425
 
@@ -114,6 +114,12 @@
114
114
  outline-offset: 0;
115
115
  }
116
116
 
117
+ .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box__wrapper--fluid--focus:has(
118
+ .#{$prefix}--combo-box
119
+ ) {
120
+ outline: none;
121
+ }
122
+
117
123
  .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box__wrapper--fluid--focus:has(
118
124
  .#{$prefix}--list-box--expanded
119
125
  ) {
@@ -305,7 +305,7 @@
305
305
 
306
306
  .#{$prefix}--number-input--fluid
307
307
  .#{$prefix}--number__input-wrapper--slug:not(
308
- :has(~ .#{$prefix}--slug--revert)
308
+ :has(.#{$prefix}--slug--revert)
309
309
  ) {
310
310
  @include ai-gradient;
311
311
  }
@@ -129,7 +129,8 @@ $input-label-weight: 400 !default;
129
129
  .#{$prefix}--select-input__wrapper[data-invalid]
130
130
  .#{$prefix}--select-input:not(:focus),
131
131
  .#{$prefix}--list-box[data-invalid]:not(
132
- .#{$prefix}--multi-select--invalid--focused
132
+ .#{$prefix}--multi-select--invalid--focused,
133
+ .#{$prefix}--combo-box--invalid--focused
133
134
  ),
134
135
  .#{$prefix}--combo-box[data-invalid]:not(.#{$prefix}--multi-select--selected)
135
136
  .#{$prefix}--text-input:not(:focus) {
@@ -917,6 +917,11 @@ $list-box-menu-width: convert.to-rem(300px);
917
917
  inset-inline-end: convert.to-rem(-9px);
918
918
  }
919
919
 
920
+ .#{$prefix}--list-box__wrapper--slug .#{$prefix}--slug--revert::after {
921
+ inset-block-start: convert.to-rem(8px);
922
+ inset-inline-end: convert.to-rem(-1px);
923
+ }
924
+
920
925
  .#{$prefix}--list-box__wrapper--slug
921
926
  .#{$prefix}--list-box:not(:has(.#{$prefix}--slug--revert)) {
922
927
  @include ai-gradient;
@@ -92,7 +92,7 @@
92
92
  .#{$prefix}--list-box__field--wrapper--input-focused:has(
93
93
  button[aria-expanded='false']
94
94
  ),
95
- .#{$prefix}--multi-select.#{$prefix}--multi-select--selected
95
+ .#{$prefix}--multi-select
96
96
  .#{$prefix}--list-box__field--wrapper--input-focused:has(
97
97
  button[aria-expanded='true']
98
98
  ) {
@@ -311,6 +311,11 @@
311
311
  inset-inline-end: calc(-#{$spacing-03} - #{$divider-width});
312
312
  }
313
313
 
314
+ .#{$prefix}--select--slug .#{$prefix}--slug--revert::after {
315
+ inset-block-start: convert.to-rem(8px);
316
+ inset-inline-end: convert.to-rem(-1px);
317
+ }
318
+
314
319
  .#{$prefix}--select--slug
315
320
  .#{$prefix}--select-input:not(:has(~ .#{$prefix}--slug--revert)) {
316
321
  @include ai-gradient;
@@ -56,7 +56,7 @@ $sizes: (
56
56
 
57
57
  /// Slug styles
58
58
  /// @access public
59
- /// @group slider
59
+ /// @group AI
60
60
  @mixin slug {
61
61
  .#{$prefix}--slug {
62
62
  display: flex;
@@ -92,18 +92,21 @@ $sizes: (
92
92
  }
93
93
  }
94
94
 
95
+ // Add 24px click target for mini, 2xs sizes
96
+ .#{$prefix}--slug__button--mini::after,
97
+ .#{$prefix}--slug__button--2xs::after {
98
+ position: absolute;
99
+ display: block;
100
+ block-size: 24px;
101
+ content: '';
102
+ inline-size: 24px;
103
+ }
104
+
95
105
  .#{$prefix}--slug .#{$prefix}--slug__button:focus {
96
106
  border: 1px solid $focus;
97
107
  box-shadow: inset 0 0 0 1px $focus;
98
108
  }
99
109
 
100
- .#{$prefix}--slug
101
- .#{$prefix}--slug__button.#{$prefix}--slug__button--mini:focus,
102
- .#{$prefix}--slug
103
- .#{$prefix}--slug__button.#{$prefix}--slug__button--2xs:focus {
104
- box-shadow: none;
105
- }
106
-
107
110
  .#{$prefix}--slug .#{$prefix}--slug__button:hover {
108
111
  background: $border-inverse;
109
112
  color: $text-inverse;
@@ -132,7 +132,11 @@
132
132
  }
133
133
 
134
134
  .#{$prefix}--toggle-password-tooltip .#{$prefix}--popover {
135
- inset-inline-start: -(convert.to-rem(40px));
135
+ inset-inline-start: -($spacing-08);
136
+ }
137
+
138
+ .#{$prefix}--toggle-password-tooltip .#{$prefix}--popover-content {
139
+ min-inline-size: $spacing-08;
136
140
  }
137
141
 
138
142
  .#{$prefix}--text-input--sm
@@ -398,14 +402,15 @@
398
402
  flex-direction: column;
399
403
  }
400
404
 
401
- .#{$prefix}--text-input-wrapper--inline .cds--form-requirement {
405
+ .#{$prefix}--text-input-wrapper--inline .#{$prefix}--form-requirement {
402
406
  display: block;
403
407
  overflow: visible;
404
408
  font-weight: 400;
405
409
  max-block-size: convert.to-rem(200px);
406
410
  }
407
411
 
408
- .#{$prefix}--text-input-wrapper--inline--invalid .cds--form-requirement {
412
+ .#{$prefix}--text-input-wrapper--inline--invalid
413
+ .#{$prefix}--form-requirement {
409
414
  color: $text-error;
410
415
  }
411
416
 
@@ -502,7 +502,7 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
502
502
  }
503
503
 
504
504
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
505
- .#{$prefix}--slug:has(> .cds--popover--open) {
505
+ .#{$prefix}--slug:has(> .#{$prefix}--popover--open) {
506
506
  z-index: 2;
507
507
  }
508
508