@carbon/styles 1.96.0 → 1.97.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.96.0",
4
+ "version": "1.97.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.43.0",
43
+ "@carbon/colors": "^11.44.0",
44
44
  "@carbon/feature-flags": ">=0.32.0",
45
- "@carbon/grid": "^11.46.0",
46
- "@carbon/layout": "^11.44.0",
47
- "@carbon/motion": "^11.38.0",
48
- "@carbon/themes": "^11.64.0",
49
- "@carbon/type": "^11.50.0",
45
+ "@carbon/grid": "^11.47.0",
46
+ "@carbon/layout": "^11.45.0",
47
+ "@carbon/motion": "^11.39.0",
48
+ "@carbon/themes": "^11.65.0",
49
+ "@carbon/type": "^11.51.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": "4a42de3036ca693bf2c6477e917824982fafd7af"
78
+ "gitHead": "57fdbc7bfad9349b5c4359c7d621e709cd4daa25"
79
79
  }
@@ -131,6 +131,47 @@ describe('@carbon/styles/scss/theme', () => {
131
131
  "support-caution-major",
132
132
  "support-caution-minor",
133
133
  "support-caution-undefined",
134
+ "syntax-comment",
135
+ "syntax-line-comment",
136
+ "syntax-block-comment",
137
+ "syntax-doc-comment",
138
+ "syntax-doc-string",
139
+ "syntax-keyword",
140
+ "syntax-operator-keyword",
141
+ "syntax-control-keyword",
142
+ "syntax-definition-keyword",
143
+ "syntax-module-keyword",
144
+ "syntax-variable",
145
+ "syntax-name",
146
+ "syntax-variable-name",
147
+ "syntax-label-name",
148
+ "syntax-attribute",
149
+ "syntax-attribute-name",
150
+ "syntax-property-name",
151
+ "syntax-tag",
152
+ "syntax-tag-name",
153
+ "syntax-type",
154
+ "syntax-type-name",
155
+ "syntax-class-name",
156
+ "syntax-namespace",
157
+ "syntax-macro-name",
158
+ "syntax-atom",
159
+ "syntax-literal",
160
+ "syntax-bool",
161
+ "syntax-null",
162
+ "syntax-self",
163
+ "syntax-number",
164
+ "syntax-integer",
165
+ "syntax-float",
166
+ "syntax-unit",
167
+ "syntax-string",
168
+ "syntax-character",
169
+ "syntax-attribute-value",
170
+ "syntax-special-string",
171
+ "syntax-regexp",
172
+ "syntax-escape",
173
+ "syntax-url",
174
+ "syntax-color",
134
175
  "ai-popover-background",
135
176
  "ai-popover-shadow-outer-01",
136
177
  "ai-popover-shadow-outer-02",
@@ -155,14 +196,18 @@ describe('@carbon/styles/scss/theme', () => {
155
196
  "chat-prompt-background",
156
197
  "chat-prompt-border-start",
157
198
  "chat-prompt-border-end",
199
+ "chat-prompt-text",
158
200
  "chat-bubble-user",
201
+ "chat-bubble-user-text",
159
202
  "chat-bubble-agent",
203
+ "chat-bubble-agent-text",
160
204
  "chat-bubble-border",
161
205
  "chat-avatar-bot",
162
206
  "chat-avatar-agent",
163
207
  "chat-avatar-user",
164
208
  "chat-shell-background",
165
209
  "chat-header-background",
210
+ "chat-header-text",
166
211
  "chat-button",
167
212
  "chat-button-hover",
168
213
  "chat-button-text-hover",
@@ -1,10 +1,11 @@
1
1
  //
2
- // Copyright IBM Corp. 2016, 2023
2
+ // Copyright IBM Corp. 2016, 2024
3
3
  //
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
7
 
8
+ @use 'sass:math';
8
9
  @use 'tokens' as *;
9
10
  @use 'vars' as *;
10
11
  @use 'mixins' as *;
@@ -21,6 +22,93 @@
21
22
  @use '../../utilities/visually-hidden' as *;
22
23
  @use '../../utilities/layout';
23
24
 
25
+ @function has-n-children($n) {
26
+ // Uses nth-child() to select the nth child, and :last-child to ensure that
27
+ // the selector only matches the last child of its parent.
28
+ @return ':has(:nth-child(#{$n}):last-child)';
29
+ }
30
+
31
+ @mixin button-set-fluid-column() {
32
+ --flex-direction: column;
33
+
34
+ .#{$prefix}--btn {
35
+ flex: initial;
36
+ inline-size: 100%;
37
+ max-inline-size: none;
38
+ }
39
+
40
+ .#{$prefix}--btn--ghost {
41
+ padding-inline-start: $spacing-05;
42
+ }
43
+ }
44
+
45
+ @mixin button-set-fluid-layout() {
46
+ container-type: inline-size;
47
+
48
+ .#{$prefix}--btn-set__fluid-inner {
49
+ --flex-direction: row;
50
+
51
+ display: flex;
52
+ flex-direction: var(--flex-direction);
53
+ align-items: stretch;
54
+ justify-content: flex-end;
55
+ inline-size: 100%;
56
+ }
57
+
58
+ // NOTE: Container queries are based on this value which is based on IBM Products implementation
59
+ // Side panel has up to 3 buttons unstacked from size lg (640px). Min 160.33px/button
60
+ // Narrow Tearsheet 540px has 4 buttons unstacked buttons. Min 135px/button
61
+ // May need to be configurable as 3 * 135px is less than 640px.
62
+ // Current value 176px only supports up to 3 buttons at 540px.
63
+ $min-inline-button-size: convert.to-rem(176px);
64
+
65
+ .#{$prefix}--btn-set__fluid-inner .#{$prefix}--btn {
66
+ // default non-column layout
67
+ flex: 0 1 25%;
68
+
69
+ // This increased size comes from use in IBM Products Tearsheet and SidePanel
70
+ max-inline-size: convert.to-rem(232px);
71
+ }
72
+
73
+ .#{$prefix}--btn-set__fluid-inner--auto-stack .#{$prefix}--btn {
74
+ min-inline-size: $min-inline-button-size;
75
+ }
76
+
77
+ .#{$prefix}--btn-set__fluid-inner .#{$prefix}--btn--ghost,
78
+ .#{$prefix}--btn-set__fluid-inner .#{$prefix}--btn--danger--ghost {
79
+ // ghost buttons always grow to fill the container
80
+ flex: 1 1 25%;
81
+ max-inline-size: none;
82
+ padding-inline-start: $spacing-07; /* increased padding when inline */
83
+ }
84
+
85
+ $max-fluid-buttons: 4;
86
+ // this determines whether or not column is used
87
+ @for $i from 1 through $max-fluid-buttons {
88
+ @container (width <= #{$i * $min-inline-button-size}) {
89
+ .#{$prefix}--btn-set__fluid-inner--auto-stack#{has-n-children($i)} {
90
+ @include button-set-fluid-column();
91
+ }
92
+ }
93
+ }
94
+
95
+ @container (width <= #{4 * $min-inline-button-size}) {
96
+ .#{$prefix}--btn-set__fluid-inner#{has-n-children(2)} {
97
+ .#{$prefix}--btn {
98
+ flex-basis: 50%;
99
+ max-inline-size: none;
100
+ }
101
+ }
102
+ }
103
+
104
+ @container (width <= #{3 * $min-inline-button-size}) {
105
+ .#{$prefix}--btn-set__fluid-inner#{has-n-children(1)} .#{$prefix}--btn {
106
+ flex: 1 1 100%;
107
+ max-inline-size: none;
108
+ }
109
+ }
110
+ }
111
+
24
112
  @mixin button {
25
113
  .#{$prefix}--btn {
26
114
  @include layout.use('size', $min: 'xs', $default: 'lg', $max: '2xl');
@@ -426,4 +514,8 @@
426
514
  [dir='rtl'] .#{$prefix}--btn-set .#{$prefix}--btn:not(:focus) {
427
515
  box-shadow: convert.to-rem(1px) 0 0 0 $button-separator;
428
516
  }
517
+
518
+ .#{$prefix}--btn-set--fluid {
519
+ @include button-set-fluid-layout();
520
+ }
429
521
  }
@@ -91,6 +91,15 @@
91
91
  padding-inline: $spacing-05;
92
92
  }
93
93
 
94
+ .#{$prefix}--data-table-header.#{$prefix}--data-table-header__with-decorator {
95
+ display: flex;
96
+ justify-content: space-between;
97
+ }
98
+
99
+ .#{$prefix}--data-table-header.#{$prefix}--data-table-header__with-decorator.#{$prefix}--data-table-header__with-decorator--standalone {
100
+ justify-content: flex-end;
101
+ }
102
+
94
103
  .#{$prefix}--data-table-header__title {
95
104
  @include type-style('heading-03');
96
105
 
@@ -290,7 +290,7 @@
290
290
  .#{$prefix}--form-requirement__title,
291
291
  .#{$prefix}--file__selected-file--invalid
292
292
  .#{$prefix}--form-requirement__supplement {
293
- @include type-style('label-01');
293
+ @include type-style('helper-text-01');
294
294
 
295
295
  padding: 0 $spacing-05;
296
296
  }
@@ -307,7 +307,7 @@
307
307
 
308
308
  // TODO: deprecate
309
309
  .#{$prefix}--file__selected-file--invalid + .#{$prefix}--form-requirement {
310
- @include type-style('label-01');
310
+ @include type-style('helper-text-01');
311
311
 
312
312
  display: block;
313
313
  overflow: visible;
@@ -217,7 +217,7 @@ $input-label-weight: 400 !default;
217
217
 
218
218
  .#{$prefix}--form-requirement {
219
219
  @include reset;
220
- @include type-style('label-01');
220
+ @include type-style('helper-text-01');
221
221
 
222
222
  display: none;
223
223
  overflow: hidden;
@@ -84,10 +84,12 @@ $link-focus-text-color: custom-property.get-var(
84
84
  text-decoration: none;
85
85
  }
86
86
 
87
+ .#{$prefix}--link.#{$prefix}--link--visited,
87
88
  .#{$prefix}--link.#{$prefix}--link--visited:visited {
88
89
  color: $link-visited-text-color;
89
90
  }
90
91
 
92
+ .#{$prefix}--link.#{$prefix}--link--visited:hover,
91
93
  .#{$prefix}--link.#{$prefix}--link--visited:visited:hover {
92
94
  color: $link-hover-text-color;
93
95
  }
@@ -885,8 +885,6 @@ $list-box-menu-width: convert.to-rem(300px);
885
885
  // When handling input, we need to target nodes that specifically opt-in to
886
886
  // the type text in order to make sure the text input is styled
887
887
  // correctly.
888
- // TODO: remove [role='combobox'] in v11
889
- .#{$prefix}--list-box input[role='combobox'],
890
888
  .#{$prefix}--list-box input[type='text'] {
891
889
  background-color: inherit;
892
890
  min-inline-size: 0;
@@ -18,6 +18,10 @@
18
18
  /// @access public
19
19
  /// @group multi-select
20
20
  @mixin multiselect {
21
+ .#{$prefix}--multi-select {
22
+ box-sizing: border-box;
23
+ }
24
+
21
25
  .#{$prefix}--multi-select .#{$prefix}--list-box__field--wrapper {
22
26
  display: inline-flex;
23
27
  align-items: center;
@@ -303,4 +303,13 @@
303
303
  [dir='rtl'] .#{$prefix}--pagination .#{$prefix}--select__arrow {
304
304
  transform: translate(0.5rem, -50%);
305
305
  }
306
+ // Override for disabled select inputs to maintain layer background color
307
+ .#{$prefix}--pagination
308
+ .#{$prefix}--select--inline
309
+ .#{$prefix}--select-input[disabled],
310
+ .#{$prefix}--pagination
311
+ .#{$prefix}--select--inline
312
+ .#{$prefix}--select-input[disabled]:hover {
313
+ background-color: $layer;
314
+ }
306
315
  }
@@ -12,8 +12,6 @@
12
12
  /// @example @include button-reset($width: false);
13
13
  /// @group utilities
14
14
  @mixin reset($width: true) {
15
- @include component-reset.reset;
16
-
17
15
  display: inline-block;
18
16
  padding: 0;
19
17
  border: 0;
@@ -26,6 +24,8 @@
26
24
  inline-size: 100%;
27
25
  }
28
26
 
27
+ @include component-reset.reset;
28
+
29
29
  &::-moz-focus-inner {
30
30
  border: 0;
31
31
  }