@carbon/ibm-products-styles 2.64.0 → 2.65.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/ibm-products-styles",
3
3
  "description": "Carbon for IBM Products styles",
4
- "version": "2.64.0",
4
+ "version": "2.65.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "installConfig": {
7
7
  "hoistingLimits": "none"
@@ -52,23 +52,23 @@
52
52
  "cross-env": "^7.0.3",
53
53
  "glob": "^11.0.1",
54
54
  "jest": "^29.7.0",
55
- "jest-config-ibm-cloud-cognitive": "^1.27.0",
55
+ "jest-config-ibm-cloud-cognitive": "^1.28.0-rc.0",
56
56
  "jest-environment-jsdom": "^29.7.0",
57
57
  "npm-check-updates": "^18.0.0",
58
58
  "npm-run-all": "^4.1.5",
59
59
  "rimraf": "^6.0.1",
60
60
  "sass": "^1.85.1",
61
- "yargs": "^17.7.2"
61
+ "yargs": "^18.0.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "@carbon/grid": "^11.34.0",
65
- "@carbon/layout": "^11.32.0",
66
- "@carbon/motion": "^11.26.0",
67
- "@carbon/themes": "^11.50.0",
68
- "@carbon/type": "^11.38.0"
64
+ "@carbon/grid": "^11.36.0",
65
+ "@carbon/layout": "^11.34.0",
66
+ "@carbon/motion": "^11.28.0",
67
+ "@carbon/themes": "^11.53.0",
68
+ "@carbon/type": "^11.40.0"
69
69
  },
70
70
  "dependencies": {
71
71
  "@ibm/telemetry-js": "^1.9.1"
72
72
  },
73
- "gitHead": "b17f047c13c438ecf4a53c66381ed9fdcbf0c7e7"
73
+ "gitHead": "8ca7903de81096548714d1a4c9b6a03cc598b5c3"
74
74
  }
@@ -199,11 +199,6 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
199
199
  display: flex;
200
200
  flex-direction: row;
201
201
  flex-grow: 1;
202
- overflow-x: auto;
203
-
204
- @supports (overflow-inline: auto) {
205
- overflow-inline: auto;
206
- }
207
202
 
208
203
  .#{$block-class}__selections-form-control-label-wrapper {
209
204
  margin-inline-start: $spacing-03;
@@ -242,7 +237,6 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
242
237
  }
243
238
 
244
239
  .#{$block-class}__column {
245
- overflow: auto;
246
240
  flex: 0 0 20rem;
247
241
  padding: $spacing-05;
248
242
  border-block-start: 1px solid $border-subtle-01;
@@ -251,11 +245,21 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
251
245
  &-search-bar {
252
246
  display: flex;
253
247
 
254
- label {
255
- display: none;
248
+ .#{$carbon-prefix}--btn {
249
+ border-block-end: 1px solid $border-strong-01;
256
250
  }
257
251
  }
258
252
 
253
+ .#{$carbon-prefix}--popover--tab-tip.#{$carbon-prefix}--popover--open
254
+ .#{$carbon-prefix}--btn {
255
+ background: $layer;
256
+ }
257
+
258
+ &-filter-popover.#{$carbon-prefix}--popover-content {
259
+ padding: $spacing-05;
260
+ min-inline-size: $spacing-13;
261
+ }
262
+
259
263
  &-sort-filter {
260
264
  display: flex;
261
265
  }
@@ -462,8 +466,3 @@ button.#{$block-class}__global-filter-toggle {
462
466
  margin-block-start: $spacing-03;
463
467
  padding-block: 0;
464
468
  }
465
-
466
- .#{$block-class} + div .#{$carbon-prefix}--tooltip,
467
- .#{$block-class} + div .#{$carbon-prefix}--overflow-menu-options {
468
- z-index: 9000;
469
- }
@@ -5,15 +5,11 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- /* One or two values
9
- * - width (first value)
10
- * - min-width (optional second value)
11
- */
12
8
  $side-panel-sizes: (
13
9
  xs: 16rem,
14
10
  sm: 20rem,
15
11
  md: 30rem,
16
12
  lg: 40rem,
17
13
  xl: 65rem,
18
- 2xl: 40rem 75%,
14
+ 2xl: 80rem,
19
15
  );
@@ -1,3 +1,4 @@
1
+ //cspell: disable
1
2
  //
2
3
  // Copyright IBM Corp. 2020, 2025
3
4
  //
@@ -5,7 +6,6 @@
5
6
  // LICENSE file in the root directory of this source tree.
6
7
  //
7
8
 
8
- @use 'sass:list';
9
9
  @use 'sass:map';
10
10
 
11
11
  // Other Carbon settings.
@@ -16,6 +16,7 @@
16
16
  @use '@carbon/styles/scss/type';
17
17
  @use '@carbon/styles/scss/breakpoint' as *;
18
18
  @use '@carbon/styles/scss/utilities';
19
+ @use '@carbon/styles/scss/components/button/tokens' as *;
19
20
 
20
21
  // Standard imports.
21
22
  @use '../../global/styles/project-settings' as c4p-settings;
@@ -29,6 +30,7 @@
29
30
 
30
31
  $block-class: #{c4p-settings.$pkg-prefix}--side-panel;
31
32
  $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
33
+ $clabs-prefix: 'clabs'; // TODO: remove when resizer available in labs
32
34
 
33
35
  @property --panel-transform {
34
36
  inherits: true;
@@ -37,13 +39,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
37
39
  }
38
40
 
39
41
  @mixin setPanelSize($size: map.get($side-panel-sizes, md)) {
40
- /* any value is single value list */
41
- inline-size: list.nth($size, 1);
42
- @if list.length($size) > 1 {
43
- min-inline-size: list.nth($size, 2);
44
- }
45
-
46
- max-inline-size: 100%;
42
+ inline-size: clamp(16rem, var(--c4p-side-panel-modified-size, $size), 100%);
47
43
  }
48
44
 
49
45
  @mixin setDividerStyles() {
@@ -89,14 +85,26 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
89
85
  background-color: $layer-01;
90
86
  block-size: calc(100% - 3rem);
91
87
  color: $text-primary;
88
+
92
89
  /* if the title does not scroll then we have a child scrolling section. */
93
90
  grid-template-rows: auto 1fr auto; /* titles content and actions */
94
91
  inset-block-start: $spacing-09;
92
+ max-inline-size: 100%;
93
+ min-inline-size: map.get($side-panel-sizes, xs);
95
94
 
96
95
  transform: translateX(0);
97
96
  transition-behavior: allow-discrete;
98
97
  transition-duration: $duration-moderate-01;
99
98
  transition-property: display, opacity, transform;
99
+ &:not(.#{$block-class}--slide-in) {
100
+ // enableSidepanelResizer flag class
101
+ &.#{$block-class}--enable-sidepanel-resizer {
102
+ grid-template-columns: 0 1fr;
103
+ @media (prefers-reduced-motion: no-preference) {
104
+ transition: all $duration-moderate-01 linear;
105
+ }
106
+ }
107
+ }
100
108
 
101
109
  @starting-style {
102
110
  opacity: 0;
@@ -104,6 +112,10 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
104
112
  transform: translateX(var(--panel-transform));
105
113
  }
106
114
 
115
+ @include breakpoint(md) {
116
+ max-inline-size: 75vw;
117
+ }
118
+
107
119
  @each $size, $size_value in $side-panel-sizes {
108
120
  &.#{$block-class}--#{$size} {
109
121
  @include setPanelSize($size_value);
@@ -188,6 +200,25 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
188
200
  inset-inline-end: 0;
189
201
  }
190
202
  &.#{$block-class}--left-placement {
203
+ .#{$clabs-prefix}__resizer {
204
+ grid-column: 2;
205
+ inset-inline-start: 0;
206
+
207
+ &::before {
208
+ inset-inline-start: 0;
209
+ }
210
+ }
211
+ &:not(.#{$block-class}--slide-in) {
212
+ // enableSidepanelResizer FeatureFlag class
213
+ &.#{$block-class}--enable-sidepanel-resizer {
214
+ grid-template-columns: 1fr 0;
215
+
216
+ @media (prefers-reduced-motion: no-preference) {
217
+ transition: all $duration-moderate-01 linear;
218
+ }
219
+ }
220
+ }
221
+
191
222
  border-inline-end: 1px solid $border-subtle-02;
192
223
  inset-inline-start: 0;
193
224
  }
@@ -200,6 +231,45 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
200
231
  0 4px 10px 2px $ai-drop-shadow;
201
232
  }
202
233
 
234
+ .#{$clabs-prefix}__resizer--vertical::before {
235
+ position: absolute;
236
+ z-index: -1;
237
+ background-color: transparent;
238
+ block-size: 100%;
239
+ content: '';
240
+ inline-size: $spacing-01;
241
+ inset-block-end: 0;
242
+ inset-inline-end: 0;
243
+ transition: background-color $duration-moderate-01
244
+ motion(standard, productive);
245
+ }
246
+
247
+ &:hover {
248
+ .#{$clabs-prefix}__resizer--vertical::before {
249
+ background-color: $button-secondary-hover;
250
+ }
251
+ }
252
+
253
+ .#{$clabs-prefix}__resizer {
254
+ background-color: transparent;
255
+ grid-row: span 4 / span 3;
256
+ inset-inline-start: -$spacing-02;
257
+
258
+ &--vertical::after {
259
+ position: absolute;
260
+ z-index: 10;
261
+ block-size: 100%;
262
+ content: '';
263
+ inline-size: $spacing-03;
264
+ inset-inline-start: -$spacing-01;
265
+ }
266
+
267
+ &:hover,
268
+ &:focus {
269
+ background-color: $border-interactive;
270
+ }
271
+ }
272
+
203
273
  .#{$block-class}__header {
204
274
  --#{$block-class}--title-padding-bottom: #{$spacing-05};
205
275
 
@@ -497,10 +567,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
497
567
  block-size: var(--#{$block-class}--actions-height);
498
568
  }
499
569
  }
500
- &.#{$block-class}.#{$block-class}--xs
501
- .#{$block-class}__actions-container.#{$action-set-block-class}--sm {
502
- @include setPanelSize(map.get($side-panel-sizes, xs));
503
- }
504
570
  }
505
571
 
506
572
  // form fields should receive correct background color
@@ -572,3 +638,54 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
572
638
  .#{$block-class}--has-decorator + .#{$block-class}__overlay {
573
639
  background-color: $ai-overlay;
574
640
  }
641
+
642
+ // TODO: remove along with prefix after resizer available in labs
643
+ .#{$clabs-prefix}__resizer {
644
+ position: relative;
645
+ flex: none;
646
+ background-color: $border-subtle-01;
647
+
648
+ &:hover {
649
+ @media (prefers-reduced-motion: no-preference) {
650
+ background-color: $border-interactive;
651
+ transition: background-color $duration-moderate-01;
652
+ }
653
+ }
654
+
655
+ &:focus {
656
+ background-color: $border-interactive;
657
+ outline: none;
658
+ }
659
+
660
+ &:active {
661
+ background-color: $border-interactive;
662
+ }
663
+
664
+ &:focus:not(:focus-visible) {
665
+ box-shadow: none;
666
+ outline: none;
667
+ }
668
+
669
+ &--horizontal {
670
+ block-size: $spacing-02;
671
+ cursor: ns-resize;
672
+ }
673
+
674
+ &--vertical {
675
+ cursor: ew-resize;
676
+ inline-size: $spacing-02;
677
+ }
678
+ }
679
+
680
+ .sr-only {
681
+ position: absolute;
682
+ overflow: hidden;
683
+ padding: 0;
684
+ border: 0;
685
+ margin: -1px;
686
+ block-size: 1px;
687
+ clip: rect(0, 0, 0, 0);
688
+ inline-size: 1px;
689
+ white-space: nowrap;
690
+ }
691
+ // END TODO: remove along with prefix after resizer available in labs
@@ -6,20 +6,48 @@
6
6
  */
7
7
 
8
8
  @mixin side-panel-decorator($prefix) {
9
- .#{$prefix}container {
10
- display: flex;
11
- flex-direction: column;
12
- block-size: 100vh;
9
+ .sbdocs {
10
+ // styles to apply to docs page iframe views of stories
11
+ .#{$prefix}container {
12
+ display: flex;
13
+ background-color: var(--cds-background, #ffffff);
14
+ block-size: 60vh;
15
+ box-shadow: 0 0 4px 1px var(--cds-layer-accent-01, #e0e0e0);
16
+ color: var(--cds-text-primary, #161616);
17
+ }
18
+ .#{$prefix}content {
19
+ block-size: unset;
20
+ }
13
21
  }
14
22
 
23
+ // styles applied to story pages
15
24
  .#{$prefix}content {
25
+ display: flex;
16
26
  flex-grow: 1;
27
+ align-items: center;
28
+ justify-content: center;
29
+ block-size: calc(100vh - 48px);
30
+
31
+ // dynamic prefix not working here, and this file is out of scope in the configuration
32
+ > div:first-of-type {
33
+ > div:last-of-type[class*='--annotation__content'] {
34
+ display: flex;
35
+ justify-content: center;
36
+ }
37
+ }
17
38
  }
18
39
 
19
40
  .#{$prefix}toggle {
20
- position: absolute;
21
- inset-block-start: 50%;
22
- inset-inline-start: 50%;
23
- transform: translate(-50%, -50%);
41
+ margin: auto;
42
+ }
43
+
44
+ .sb-show-main.sb-main-fullscreen {
45
+ // sidepanel sets overflow hidden to body when open, which is right in context of irl application but in story page, as we are rendering many isolated sidepanel variants, we need to unset this for presentational purposes
46
+ /* stylelint-disable-next-line declaration-no-important */
47
+ overflow: unset !important;
48
+ }
49
+
50
+ .sbdocs .docs-story > div {
51
+ overflow: hidden;
24
52
  }
25
53
  }