@carbon/ibm-products 1.10.0 → 1.11.2

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 (102) hide show
  1. package/css/index-full-carbon.css +249 -218
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +5 -5
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +21 -4
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +2 -2
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +102 -212
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +4 -4
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +219 -212
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +5 -5
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AddSelect/AddSelect.js +88 -87
  18. package/es/components/AddSelect/AddSelectColumn.js +193 -19
  19. package/es/components/AddSelect/AddSelectList.js +5 -5
  20. package/es/components/AddSelect/AddSelectSidebar.js +3 -15
  21. package/es/components/AddSelect/add-select-utils.js +64 -0
  22. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -1
  23. package/es/components/ButtonMenu/ButtonMenu.js +11 -3
  24. package/es/components/CreateFullPage/CreateFullPageStep.js +4 -4
  25. package/es/components/CreateTearsheet/CreateTearsheetStep.js +4 -4
  26. package/es/components/DataSpreadsheet/DataSpreadsheet.js +255 -140
  27. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +37 -38
  28. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +55 -6
  29. package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.js +27 -0
  30. package/es/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +28 -0
  31. package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +41 -0
  32. package/es/components/DataSpreadsheet/{checkActiveHeaderCell.js → utils/checkActiveHeaderCell.js} +1 -1
  33. package/es/components/DataSpreadsheet/{createActiveCellFn.js → utils/createActiveCellFn.js} +20 -9
  34. package/es/components/DataSpreadsheet/{createCellSelectionArea.js → utils/createCellSelectionArea.js} +8 -4
  35. package/es/components/DataSpreadsheet/{generateData.js → utils/generateData.js} +6 -0
  36. package/es/components/DataSpreadsheet/{getCellSize.js → utils/getCellSize.js} +0 -0
  37. package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +46 -0
  38. package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +82 -0
  39. package/es/components/DataSpreadsheet/utils/removeCellSelections.js +30 -0
  40. package/es/components/InlineEdit/InlineEdit.js +49 -8
  41. package/es/components/OptionsTile/OptionsTile.js +20 -20
  42. package/es/components/OptionsTile/index.js +1 -1
  43. package/es/components/PageHeader/PageHeader.js +35 -32
  44. package/es/components/PageHeader/PageHeaderTitle.js +2 -1
  45. package/es/components/PageHeader/PageHeaderUtils.js +21 -22
  46. package/es/components/index.js +0 -1
  47. package/es/global/js/package-settings.js +1 -2
  48. package/lib/components/AddSelect/AddSelect.js +91 -87
  49. package/lib/components/AddSelect/AddSelectColumn.js +193 -16
  50. package/lib/components/AddSelect/AddSelectList.js +5 -5
  51. package/lib/components/AddSelect/AddSelectSidebar.js +9 -15
  52. package/lib/components/AddSelect/add-select-utils.js +78 -0
  53. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -1
  54. package/lib/components/ButtonMenu/ButtonMenu.js +11 -3
  55. package/lib/components/CreateFullPage/CreateFullPageStep.js +4 -4
  56. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +4 -4
  57. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +263 -142
  58. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +39 -36
  59. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +62 -8
  60. package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +37 -0
  61. package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +39 -0
  62. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +52 -0
  63. package/lib/components/DataSpreadsheet/{checkActiveHeaderCell.js → utils/checkActiveHeaderCell.js} +1 -1
  64. package/lib/components/DataSpreadsheet/{createActiveCellFn.js → utils/createActiveCellFn.js} +20 -9
  65. package/lib/components/DataSpreadsheet/{createCellSelectionArea.js → utils/createCellSelectionArea.js} +8 -4
  66. package/lib/components/DataSpreadsheet/{generateData.js → utils/generateData.js} +6 -0
  67. package/lib/components/DataSpreadsheet/{getCellSize.js → utils/getCellSize.js} +0 -0
  68. package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +59 -0
  69. package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +92 -0
  70. package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +41 -0
  71. package/lib/components/InlineEdit/InlineEdit.js +52 -10
  72. package/lib/components/OptionsTile/OptionsTile.js +19 -19
  73. package/lib/components/PageHeader/PageHeader.js +35 -32
  74. package/lib/components/PageHeader/PageHeaderTitle.js +2 -1
  75. package/lib/components/PageHeader/PageHeaderUtils.js +21 -22
  76. package/lib/components/index.js +0 -8
  77. package/lib/global/js/package-settings.js +1 -2
  78. package/package.json +13 -13
  79. package/scss/components/AddSelect/_add-select.scss +20 -0
  80. package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +7 -3
  81. package/scss/components/CreateSidePanel/_create-side-panel.scss +1 -1
  82. package/scss/components/CreateSidePanel/_storybook-styles.scss +1 -1
  83. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +14 -1
  84. package/scss/components/EditSidePanel/_edit-side-panel.scss +9 -0
  85. package/scss/components/EditSidePanel/_storybook-styles.scss +1 -1
  86. package/scss/components/InlineEdit/_inline-edit.scss +35 -37
  87. package/scss/components/ModifiedTabs/_modified-tabs.scss +5 -0
  88. package/scss/components/NotificationsPanel/_notifications-panel.scss +7 -3
  89. package/scss/components/OptionsTile/_index.scss +1 -1
  90. package/scss/components/OptionsTile/_options-tile.scss +17 -17
  91. package/scss/components/OptionsTile/_storybook-styles.scss +4 -4
  92. package/scss/components/PageHeader/_page-header.scss +3 -2
  93. package/scss/components/SidePanel/_side-panel.scss +8 -8
  94. package/scss/components/Tearsheet/_tearsheet.scss +4 -0
  95. package/scss/components/_index.scss +0 -1
  96. package/es/components/LoadingBar/LoadingBar.js +0 -156
  97. package/es/components/LoadingBar/index.js +0 -7
  98. package/lib/components/LoadingBar/LoadingBar.js +0 -170
  99. package/lib/components/LoadingBar/index.js +0 -13
  100. package/scss/components/LoadingBar/_index.scss +0 -8
  101. package/scss/components/LoadingBar/_loading-bar.scss +0 -224
  102. package/scss/components/LoadingBar/_storybook-styles.scss +0 -14
@@ -44,6 +44,7 @@ var defaults = {
44
44
  NoTagsEmptyState: true,
45
45
  NotFoundEmptyState: true,
46
46
  NotificationsEmptyState: true,
47
+ OptionsTile: true,
47
48
  PageHeader: true,
48
49
  ProductiveCard: true,
49
50
  RemoveModal: true,
@@ -58,14 +59,12 @@ var defaults = {
58
59
  // other public components not yet reviewed and released:
59
60
  MultiAddSelect: false,
60
61
  SingleAddSelect: false,
61
- LoadingBar: false,
62
62
  ModifiedTabs: false,
63
63
  Toolbar: false,
64
64
  ToolbarButton: false,
65
65
  ToolbarGroup: false,
66
66
  WebTerminal: false,
67
67
  EditSidePanel: false,
68
- OptionsTile: false,
69
68
  CancelableTextEdit: false,
70
69
  InlineEdit: false,
71
70
  DataSpreadsheet: false
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "1.10.0",
4
+ "version": "1.11.2",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@babel/cli": "^7.17.6",
54
- "@babel/core": "^7.17.5",
55
- "babel-preset-ibm-cloud-cognitive": "^0.14.10",
54
+ "@babel/core": "^7.17.7",
55
+ "babel-preset-ibm-cloud-cognitive": "^0.14.11",
56
56
  "chalk": "^4.1.2",
57
57
  "change-case": "^4.1.2",
58
58
  "copyfiles": "^2.4.1",
@@ -60,33 +60,33 @@
60
60
  "fs-extra": "^10.0.1",
61
61
  "glob": "^7.2.0",
62
62
  "jest": "^27.5.1",
63
- "jest-config-ibm-cloud-cognitive": "^0.23.11",
64
- "npm-check-updates": "^12.5.2",
63
+ "jest-config-ibm-cloud-cognitive": "^0.23.12",
64
+ "npm-check-updates": "^12.5.4",
65
65
  "npm-run-all": "^4.1.5",
66
66
  "rimraf": "^3.0.2",
67
67
  "sass": "^1.49.9",
68
68
  "yargs": "^17.3.1"
69
69
  },
70
70
  "dependencies": {
71
- "@babel/runtime": "^7.17.2",
72
- "@carbon/telemetry": "^0.0.0-alpha.6",
71
+ "@babel/runtime": "^7.17.7",
72
+ "@carbon/telemetry": "^0.1.0",
73
73
  "react-resize-detector": "^7.0.0",
74
74
  "react-table": "^7.7.0",
75
75
  "react-window": "^1.8.6"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@carbon/colors": "^10.37.0",
79
- "@carbon/icons-react": "^10.47.0",
79
+ "@carbon/icons-react": "^10.48.0",
80
80
  "@carbon/import-once": "^10.7.0",
81
81
  "@carbon/layout": "^10.37.0",
82
82
  "@carbon/motion": "^10.29.0",
83
- "@carbon/themes": "^10.52.0",
84
- "@carbon/type": "^10.42.0",
85
- "carbon-components": "^10.54.0",
86
- "carbon-components-react": "^7.54.2",
83
+ "@carbon/themes": "^10.53.1",
84
+ "@carbon/type": "^10.43.1",
85
+ "carbon-components": "^10.55.1",
86
+ "carbon-components-react": "^7.55.1",
87
87
  "carbon-icons": "^7.0.7",
88
88
  "react": "^16.8.6 || ^17.0.1",
89
89
  "react-dom": "^16.8.6 || ^17.0.1"
90
90
  },
91
- "gitHead": "9c24da12c6e7a113e4d6f20bfb5d61a212460c89"
91
+ "gitHead": "1327941f8527f6ea940253307039bc99ba0a43f2"
92
92
  }
@@ -128,6 +128,22 @@
128
128
  padding: $spacing-05;
129
129
  border-top: 1px solid $ui-03;
130
130
  border-right: 1px solid $ui-03;
131
+
132
+ &-search-bar {
133
+ display: flex;
134
+
135
+ label {
136
+ display: none;
137
+ }
138
+ }
139
+
140
+ &-sort-filter {
141
+ display: flex;
142
+ }
143
+
144
+ .bx--overflow-menu {
145
+ border-bottom: 1px solid $ui-04;
146
+ }
131
147
  }
132
148
 
133
149
  .#{$block-class}__tag-container {
@@ -143,6 +159,10 @@
143
159
 
144
160
  // overrides
145
161
 
162
+ .#{$block-class}__tag-container .#{$carbon-prefix}--tag {
163
+ margin: 0;
164
+ }
165
+
146
166
  // the influencer sidebar needs to be even with the buttons
147
167
  .#{$block-class} .#{$tearsheet-class} .#{$tearsheet-class}__influencer {
148
168
  max-width: 29rem;
@@ -61,6 +61,10 @@
61
61
  display: inline-flex;
62
62
  vertical-align: middle;
63
63
  }
64
+
65
+ .#{$block-class}__displayed-breadcrumb:last-child {
66
+ max-width: calc(100% - $spacing-07); // allow room for breadcrumb back
67
+ }
64
68
  }
65
69
 
66
70
  .#{$carbon-prefix}--breadcrumb-item:last-child {
@@ -78,10 +82,10 @@
78
82
  width: 100%;
79
83
  text-overflow: ellipsis;
80
84
  }
85
+ }
81
86
 
82
- .#{$carbon-prefix}--link {
83
- max-height: 18px; // to match breadcrumb - overflow button is 20 by default
84
- }
87
+ .#{$block-class}__overflow-menu-options.#{$block-class}__overflow-menu-options {
88
+ z-index: z('header');
85
89
  }
86
90
  }
87
91
 
@@ -68,7 +68,7 @@
68
68
  }
69
69
 
70
70
  .#{$block-class}.#{$side-panel-block-class}
71
- .bx--btn.#{$side-panel-block-class}__close-button {
71
+ .#{$carbon-prefix}--btn.#{$side-panel-block-class}__close-button {
72
72
  display: none;
73
73
  }
74
74
 
@@ -17,7 +17,7 @@ $story-prefix: create-side-panel-stories__;
17
17
  grid-template-columns: 1fr 1fr;
18
18
  }
19
19
 
20
- .#{$story-prefix}example-form-group .bx--label {
20
+ .#{$story-prefix}example-form-group .#{$carbon-prefix}--label {
21
21
  margin-bottom: 0;
22
22
  }
23
23
 
@@ -74,7 +74,7 @@
74
74
  @include set-body-borders();
75
75
 
76
76
  margin: 0;
77
- background-color: transparent;
77
+ background-color: $ui-background;
78
78
  cursor: cell;
79
79
  text-align: left;
80
80
  }
@@ -84,9 +84,22 @@
84
84
  color: $text-01;
85
85
  text-align: left;
86
86
  }
87
+ .#{$block-class}__cell-editor {
88
+ position: absolute;
89
+ z-index: 4;
90
+ display: none;
91
+ padding: 0 $spacing-03;
92
+ background-color: $ui-background;
93
+ resize: none;
94
+ &.#{$carbon-prefix}--text-area {
95
+ min-width: initial;
96
+ min-height: initial;
97
+ }
98
+ }
87
99
  .#{$block-class}__active-cell--highlight {
88
100
  position: absolute;
89
101
  z-index: 3;
102
+ display: none;
90
103
  border: $spacing-01 solid $interactive-01;
91
104
  background-color: transparent;
92
105
 
@@ -58,6 +58,15 @@
58
58
  width: 100%;
59
59
  margin-bottom: 0;
60
60
  }
61
+
62
+ .#{$block-class}__actions-container {
63
+ position: absolute;
64
+ z-index: 4;
65
+ right: 0;
66
+ bottom: 0;
67
+ width: 100%;
68
+ margin-bottom: 0;
69
+ }
61
70
  }
62
71
  }
63
72
 
@@ -17,7 +17,7 @@ $story-prefix: edit-side-panel-stories__;
17
17
  grid-template-columns: 1fr 1fr;
18
18
  }
19
19
 
20
- .#{$story-prefix}example-form-group .bx--label {
20
+ .#{$story-prefix}example-form-group .#{$carbon-prefix}--label {
21
21
  margin-bottom: 0;
22
22
  }
23
23
 
@@ -28,23 +28,6 @@
28
28
  }
29
29
  }
30
30
 
31
- @function --tooltip-top-bottom-safe-clip() {
32
- @return polygon(
33
- 0 0,
34
- -100vw 0,
35
- -100vw -100vh,
36
- 100vw -100vh,
37
- 100vw 0,
38
- 100% 0,
39
- 100% 100%,
40
- 100vw 100%,
41
- 100vw 100vh,
42
- -100vw 100vh,
43
- -100vw 100%,
44
- 0 100%
45
- );
46
- }
47
-
48
31
  @mixin input-button-defaults($block-class) {
49
32
  display: inline-flex;
50
33
  width: var(--#{$block-class}--size);
@@ -69,6 +52,7 @@
69
52
  --#{$block-class}--size: #{$spacing-08};
70
53
  --#{$block-class}--icon-size: #{$spacing-05};
71
54
  --#{$block-class}--background-color: #{$ui-01};
55
+ --#{$block-class}--toolbar-width: calc(2 * var(--#{$block-class}--size));
72
56
 
73
57
  &.#{$block-class}--light {
74
58
  --#{$block-class}--background-color: transparent;
@@ -121,11 +105,12 @@
121
105
  overflow: hidden;
122
106
  // positions text and placeholder including when showing placeholder
123
107
  // NOTE: Using flex does strange things to a caret in content editable
124
- width: calc(100% - 2 * var(--#{$block-class}--size) - $spacing-05);
125
- max-width: calc(100% - 2 * var(--#{$block-class}--size) - $spacing-05);
108
+ width: calc(100% - var(--#{$block-class}--toolbar-width) - $spacing-05);
109
+ max-width: calc(
110
+ 100% - var(--#{$block-class}--toolbar-width) - $spacing-05
111
+ );
126
112
  min-height: var(--#{$block-class}--size);
127
- // stylelint-disable-next-line carbon/layout-token-use
128
- margin-right: calc(2 * var(--#{$block-class}--size));
113
+ margin-right: var(--#{$block-class}--toolbar-width);
129
114
  // room for toolbar
130
115
  margin-left: $spacing-05;
131
116
  // stylelint-disable-next-line carbon/type-token-use
@@ -138,10 +123,7 @@
138
123
 
139
124
  &.#{$block-class}--invalid .#{$block-class}__input {
140
125
  // add space for validation
141
- width: calc(100% - 3 * var(--#{$block-class}--size) - $spacing-05);
142
- max-width: calc(100% - 3 * var(--#{$block-class}--size) - $spacing-05);
143
- // stylelint-disable-next-line carbon/layout-token-use
144
- margin-right: calc(3 * var(--#{$block-class}--size));
126
+ --#{$block-class}--toolbar-width: calc(3 * var(--#{$block-class}--size));
145
127
  }
146
128
 
147
129
  .#{$block-class}__input::after {
@@ -202,13 +184,15 @@
202
184
  }
203
185
 
204
186
  .#{$block-class}__after-input-elements {
187
+ --#{$block-class}--toolbar-width: calc(2 * var(--#{$block-class}--size));
188
+
205
189
  // not simply flexed in as this causes flexbox to mis-measure the size of the input
206
190
  position: absolute;
207
191
  top: 0;
208
192
  right: 0;
209
193
  display: flex;
210
194
  // width: room for validation, and two buttons
211
- width: calc(2 * var(--#{$block-class}--size));
195
+ width: var(--#{$block-class}--toolbar-width);
212
196
  height: 100%;
213
197
  justify-content: space-between;
214
198
  cursor: text;
@@ -216,14 +200,11 @@
216
200
 
217
201
  &.#{$block-class}--invalid .#{$block-class}__after-input-elements {
218
202
  // width: room for validation, and two buttons
219
- width: calc(3 * var(--#{$block-class}--size));
203
+ --#{$block-class}--toolbar-width: calc(3 * var(--#{$block-class}--size));
220
204
  }
221
205
 
222
206
  .#{$block-class}__toolbar--animation {
223
- // makes room for the top clip text but hides the side overflow
224
- clip-path: --tooltip-top-bottom-safe-clip();
225
- // NOTE: The above allows the tooltip to show through when overflowX: hidden would not when at right edge.
226
- // It is used with margin animation of contained buttons
207
+ // width: ;
227
208
  }
228
209
 
229
210
  &.#{$block-class}--editing .#{$block-class}__toolbar::after {
@@ -277,16 +258,33 @@
277
258
  &.#{$block-class}--editing
278
259
  .#{$block-class}__toolbar--animation
279
260
  .#{$block-class}__save {
280
- // stylelint-disable-next-line carbon/layout-token-use
281
- margin-right: calc(-1 * var(--#{$block-class}--size));
282
- transition: margin-right $duration--moderate-02
283
- motion(standard, productive);
261
+ margin-right: 0;
262
+ transition: all $duration--moderate-02 motion(standard, productive);
263
+ transition-property: margin, padding;
264
+
265
+ svg {
266
+ transition: width $duration--moderate-02 motion(standard, productive);
267
+ @media (prefers-reduced-motion: reduce) {
268
+ // stylelint-disable-next-line carbon/motion-token-use
269
+ transition: none;
270
+ }
271
+ }
284
272
  }
285
273
 
286
274
  &.#{$block-class}--editing
287
- .#{$block-class}__toolbar--saveable
275
+ .#{$block-class}__toolbar--animation:not(.#{$block-class}__toolbar--saveable)
288
276
  .#{$block-class}__save {
289
- margin-right: 0;
277
+ padding-right: 0;
278
+ padding-left: 0;
279
+ border-right: 0;
280
+ border-left: 0;
281
+ // stylelint-disable-next-line carbon/layout-token-use
282
+ margin-right: calc(-1 * var(--#{$block-class}--size));
283
+
284
+ svg {
285
+ overflow: hidden;
286
+ width: 0;
287
+ }
290
288
  }
291
289
 
292
290
  &.#{$block-class}.#{$block-class} .#{$block-class}__edit {
@@ -45,6 +45,11 @@
45
45
  border-radius: 0;
46
46
  cursor: pointer;
47
47
  transition: background-color $duration--fast-02 motion(standard, productive);
48
+ // stylelint-disable-next-line max-nesting-depth
49
+ @media (prefers-reduced-motion: reduce) {
50
+ // stylelint-disable-next-line carbon/motion-token-use
51
+ transition: none;
52
+ }
48
53
  }
49
54
 
50
55
  .modified-tabs__tab-new-icon {
@@ -183,16 +183,20 @@
183
183
  min-width: 5.5rem;
184
184
  padding: 0;
185
185
 
186
- .bx--btn__icon {
186
+ .#{$carbon-prefix}--btn__icon {
187
187
  transition: transform $duration--moderate-02 ease;
188
+ @media (prefers-reduced-motion: reduce) {
189
+ // stylelint-disable-next-line carbon/motion-token-use
190
+ transition: none;
191
+ }
188
192
  }
189
193
  &.#{$block-class}__notification-read-more-button {
190
- .bx--btn__icon {
194
+ .#{$carbon-prefix}--btn__icon {
191
195
  transform: rotate(0deg);
192
196
  }
193
197
  }
194
198
  &.#{$block-class}__notification-read-less-button {
195
- .bx--btn__icon {
199
+ .#{$carbon-prefix}--btn__icon {
196
200
  transform: rotate(180deg);
197
201
  }
198
202
  }
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2021
2
+ // Copyright IBM Corp. 2021, 2022
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.
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2021
2
+ // Copyright IBM Corp. 2021, 2022
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.
@@ -12,6 +12,10 @@
12
12
  // Other Carbon settings.
13
13
  @import 'carbon-components/scss/globals/scss/helper-mixins';
14
14
 
15
+ // PageHeader uses the following Carbon components:
16
+ // Toggle
17
+ @import 'carbon-components/scss/components/toggle/toggle';
18
+
15
19
  // Define all component styles in a mixin which is then exported using
16
20
  // the Carbon import-once mechanism.
17
21
  @mixin options-tile {
@@ -44,7 +48,7 @@
44
48
  box-sizing: border-box;
45
49
  align-items: center;
46
50
  padding-right: $spacing-05;
47
- grid-template-columns: 3rem 1fr 1rem;
51
+ grid-template-columns: 3rem 1fr 2rem; // chevron container, heading, toggle width
48
52
  }
49
53
 
50
54
  .#{$block-class}__header {
@@ -53,6 +57,10 @@
53
57
  transition: background-color $duration--fast-01 motion(entrance, productive);
54
58
  }
55
59
 
60
+ .#{$block-class}__header::-webkit-details-marker {
61
+ display: none;
62
+ }
63
+
56
64
  .#{$block-class}__header:hover {
57
65
  background-color: $hover-ui;
58
66
  }
@@ -61,11 +69,11 @@
61
69
  @include focus-outline('outline');
62
70
  }
63
71
 
64
- .#{$block-class}__title {
72
+ .#{$block-class}__heading {
65
73
  grid-column: 2;
66
74
  }
67
75
 
68
- .#{$block-class}__heading {
76
+ .#{$block-class}__title {
69
77
  @include carbon--type-style('productive-heading-01');
70
78
 
71
79
  color: $text-01;
@@ -88,7 +96,7 @@
88
96
  .#{$block-class}__summary--warn,
89
97
  .#{$block-class}__summary--locked {
90
98
  column-gap: $spacing-02;
91
- grid-template-columns: 1rem 1fr;
99
+ grid-template-columns: 1rem 1fr; // icon, text
92
100
  }
93
101
 
94
102
  .#{$block-class}__summary--invalid {
@@ -110,11 +118,15 @@
110
118
  .#{$block-class}__summary-text {
111
119
  overflow: hidden;
112
120
  height: max-content;
121
+ // spacing-05 + toggle width
122
+ // stylelint-disable-next-line carbon/layout-token-use
123
+ padding-right: calc(#{$spacing-05} + 2rem);
113
124
  text-overflow: ellipsis;
114
125
  white-space: nowrap;
115
126
  }
116
127
 
117
128
  .#{$block-class}__chevron {
129
+ display: block;
118
130
  justify-self: center;
119
131
  transition: transform $duration--fast-02 motion(standard, productive);
120
132
  }
@@ -195,18 +207,6 @@
195
207
  margin-top: $spacing-01;
196
208
  }
197
209
 
198
- .#{$block-class}--lg .#{$block-class}__summary-text {
199
- // spacing-05 + toggle width
200
- // stylelint-disable-next-line carbon/layout-token-use
201
- padding-right: calc(#{$spacing-05} + 1rem);
202
- }
203
-
204
- .#{$block-class}--xl .#{$block-class}__summary-text {
205
- // spacing-05 + toggle width
206
- // stylelint-disable-next-line carbon/layout-token-use
207
- padding-right: calc(#{$spacing-05} + 2rem);
208
- }
209
-
210
210
  @media (prefers-reduced-motion: reduce) {
211
211
  .#{$block-class}__summary,
212
212
  .#{$block-class}__chevron {
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2021
2
+ // Copyright IBM Corp. 2021, 2022
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.
@@ -10,9 +10,9 @@
10
10
  $block-class: #{$pkg-prefix}--options-tile;
11
11
 
12
12
  .#{$block-class} {
13
- width: 70vw;
14
- min-width: 32rem;
15
- max-width: 64rem;
13
+ width: 80vw;
14
+ min-width: 16rem;
15
+ max-width: 48rem;
16
16
  }
17
17
 
18
18
  .#{$block-class}__content p {
@@ -209,8 +209,8 @@ $right-section-alt-width: 100% - $left-section-alt-width;
209
209
  .#{$block-class}__breadcrumb-row--has-breadcrumbs
210
210
  .#{$block-class}__action-bar-column {
211
211
  // back button displayed only
212
- max-width: $left-section-alt-width;
213
- flex: 0 1 $left-section-alt-width;
212
+ max-width: $right-section-alt-width;
213
+ flex: 0 1 $right-section-alt-width;
214
214
 
215
215
  @include carbon--breakpoint(md) {
216
216
  max-width: $right-section-std-width;
@@ -253,6 +253,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
253
253
  }
254
254
 
255
255
  .#{$block-class}__breadcrumb-column {
256
+ overflow: hidden; /* required for ellipsis in title, title not visible in breadcrumb with back arrow */
256
257
  max-width: 100%;
257
258
  flex: 0 0 100%;
258
259
 
@@ -447,14 +447,14 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
447
447
  }
448
448
 
449
449
  // form fields should receive correct background color
450
- .#{$block-class}__container .bx--text-input,
451
- .#{$block-class}__container .bx--text-area,
452
- .#{$block-class}__container .bx--search-input,
453
- .#{$block-class}__container .bx--select-input,
454
- .#{$block-class}__container .bx--dropdown,
455
- .#{$block-class}__container .bx--dropdown-list,
456
- .#{$block-class}__container .bx--number input[type='number'],
457
- .#{$block-class}__container .bx--date-picker__input {
450
+ .#{$block-class}__container .#{$carbon-prefix}--text-input,
451
+ .#{$block-class}__container .#{$carbon-prefix}--text-area,
452
+ .#{$block-class}__container .#{$carbon-prefix}--search-input,
453
+ .#{$block-class}__container .#{$carbon-prefix}--select-input,
454
+ .#{$block-class}__container .#{$carbon-prefix}--dropdown,
455
+ .#{$block-class}__container .#{$carbon-prefix}--dropdown-list,
456
+ .#{$block-class}__container .#{$carbon-prefix}--number input[type='number'],
457
+ .#{$block-class}__container .#{$carbon-prefix}--date-picker__input {
458
458
  background-color: $field-02;
459
459
  }
460
460
 
@@ -47,6 +47,10 @@
47
47
  transition: visibility 0s linear,
48
48
  background-color $motion-duration motion(entrance, expressive),
49
49
  opacity $motion-duration motion(entrance, expressive);
50
+ @media (prefers-reduced-motion: reduce) {
51
+ // stylelint-disable-next-line carbon/motion-token-use
52
+ transition: none;
53
+ }
50
54
  }
51
55
 
52
56
  &.#{$block-class}--stacked-1-of-2 {
@@ -25,7 +25,6 @@
25
25
  @import './ExpressiveCard/index';
26
26
  @import './HTTPErrors/index';
27
27
  @import './ImportModal/index';
28
- @import './LoadingBar/index';
29
28
  @import './ModifiedTabs/index';
30
29
  @import './MultiAddSelect/index';
31
30
  @import './NotificationsPanel/index';