@carbon/ibm-products 2.35.0 → 2.36.0-alpha.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/css/index-full-carbon.css +957 -567
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +67 -74
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +227 -206
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +443 -247
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Coachmark/utils/enums.d.ts +36 -22
  18. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  19. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  20. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  21. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  22. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
  23. package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  24. package/es/components/CreateFullPage/CreateFullPage.js +12 -8
  25. package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
  26. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  27. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  28. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
  29. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  30. package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
  31. package/es/components/EditFullPage/EditFullPage.js +3 -3
  32. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  33. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  34. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  35. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  36. package/es/components/FullPageError/FullPageError.d.ts +2 -1
  37. package/es/components/FullPageError/FullPageError.js +24 -49
  38. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  39. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  40. package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
  41. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  42. package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  43. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  44. package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  45. package/es/components/NonLinearReading/NonLinearReading.js +2 -7
  46. package/es/components/SearchBar/SearchBar.d.ts +51 -3
  47. package/es/components/SearchBar/SearchBar.js +5 -6
  48. package/es/components/SidePanel/SidePanel.js +10 -5
  49. package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
  50. package/es/components/TruncatedList/TruncatedList.js +5 -4
  51. package/lib/components/Coachmark/utils/enums.d.ts +36 -22
  52. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  53. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  54. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  55. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  56. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
  57. package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  58. package/lib/components/CreateFullPage/CreateFullPage.js +12 -8
  59. package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
  60. package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  61. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  62. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
  63. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  64. package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
  65. package/lib/components/EditFullPage/EditFullPage.js +3 -3
  66. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  67. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  68. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  69. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  70. package/lib/components/FullPageError/FullPageError.d.ts +2 -1
  71. package/lib/components/FullPageError/FullPageError.js +24 -49
  72. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  73. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  74. package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
  75. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  76. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  77. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  78. package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  79. package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
  80. package/lib/components/SearchBar/SearchBar.d.ts +51 -3
  81. package/lib/components/SearchBar/SearchBar.js +5 -6
  82. package/lib/components/SidePanel/SidePanel.js +10 -5
  83. package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
  84. package/lib/components/TruncatedList/TruncatedList.js +5 -4
  85. package/package.json +4 -4
  86. package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
  87. package/scss/components/FullPageError/_full-page-error.scss +10 -10
  88. package/scss/components/UserAvatar/_user-avatar.scss +6 -3
@@ -1,7 +1,52 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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
+ import React, { PropsWithChildren, ReactNode } from 'react';
8
+ interface TruncatedListProps extends PropsWithChildren {
9
+ as?: React.ElementType | string;
10
+ /**
11
+ * Optional class name for expand/collapse button.
12
+ */
13
+ buttonClassName?: string;
14
+ /**
15
+ * The contents of the TruncatedList.
16
+ */
17
+ children: ReactNode;
18
+ /**
19
+ * Provide an optional class to be applied to the containing node.
20
+ */
21
+ className?: string;
22
+ /**
23
+ * Number of items to render and display when the list is truncated and collapsed.
24
+ * Scrolling is not enabled when collapsed. The smallest number is 1.
25
+ */
26
+ collapsedItemsLimit?: number;
27
+ /**
28
+ * Maximum number of items to show when the list is expanded. All
29
+ * items are rendered when the list is expanded. Scrolling is enabled
30
+ * if there are more items to display than this number.
31
+ */
32
+ expandedItemsLimit?: number;
33
+ /**
34
+ * Optional callback reports the collapsed state of the list.
35
+ */
36
+ onClick?: (value: any) => void;
37
+ /**
38
+ * Text label for when the list is expanded.
39
+ */
40
+ viewLessLabel?: string;
41
+ /**
42
+ * Callback function for building the label when the list is collapsed.
43
+ */
44
+ viewMoreLabel?: (value: any) => void;
45
+ }
1
46
  /**
2
47
  * The `TruncatedList` allows consumers to control how many items are
3
48
  * revealed to the user while giving the user the ability to expand
4
49
  * and see the entire list.
5
50
  */
6
- export let TruncatedList: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
51
+ export declare let TruncatedList: React.ForwardRefExoticComponent<TruncatedListProps & React.RefAttributes<HTMLDivElement>>;
52
+ export {};
@@ -37,7 +37,6 @@ var defaults = {
37
37
  return "View more (".concat(value, ")");
38
38
  }
39
39
  };
40
-
41
40
  /**
42
41
  * The `TruncatedList` allows consumers to control how many items are
43
42
  * revealed to the user while giving the user the ability to expand
@@ -93,13 +92,15 @@ exports.TruncatedList = /*#__PURE__*/React__default["default"].forwardRef(functi
93
92
  // list is both collapsed and expanded.
94
93
  React.useEffect(function () {
95
94
  if (listRef && childrenArray.length > 0) {
95
+ var _listRef$current;
96
96
  var numItemsToShow = isCollapsed ? minItems : maxItems;
97
- var items = listRef.current.childNodes;
97
+ var items = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.childNodes;
98
98
  var _listHeight = 0;
99
99
  for (var index = 0; index < numItemsToShow; index++) {
100
- if (items[index]) {
100
+ if (items && items[index]) {
101
101
  var _window;
102
- var height = ((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(items[index])) === null || _window === void 0 ? void 0 : _window.height) || 16;
102
+ var itemElement = items[index];
103
+ var height = ((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(itemElement)) === null || _window === void 0 ? void 0 : _window.height) || '16';
103
104
  _listHeight += parseInt(height);
104
105
  }
105
106
  }
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": "2.35.0",
4
+ "version": "2.36.0-alpha.27+3b4e0fa75",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -108,11 +108,11 @@
108
108
  "@carbon/grid": "^11.22.0",
109
109
  "@carbon/layout": "^11.21.0",
110
110
  "@carbon/motion": "^11.17.0",
111
- "@carbon/react": "^1.53.0",
112
- "@carbon/themes": "^11.33.0",
111
+ "@carbon/react": "^1.55.0",
112
+ "@carbon/themes": "^11.34.0",
113
113
  "@carbon/type": "^11.26.0",
114
114
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
115
115
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
116
116
  },
117
- "gitHead": "7a5a7cdd83c39a7f0b5c1e5baf647ebe70ab2983"
117
+ "gitHead": "3b4e0fa7593382128900e68051863dbc949a319b"
118
118
  }
@@ -76,4 +76,6 @@
76
76
  opacity: 1;
77
77
  visibility: visible;
78
78
  }
79
+
80
+ background-color: $layer-selected-hover-01;
79
81
  }
@@ -24,7 +24,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
24
24
  .#{$block-class} {
25
25
  height: inherit;
26
26
  }
27
- .#{$block-class}__error-container {
27
+ .#{$block-class}__container {
28
28
  height: 100%;
29
29
  margin: 0 $spacing-06;
30
30
 
@@ -32,19 +32,19 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
32
32
  margin: 0 $spacing-03;
33
33
  }
34
34
  }
35
- .#{$block-class}__error-grid {
35
+ .#{$block-class}__grid {
36
36
  height: 100%;
37
37
  padding-top: $spacing-07;
38
38
  padding-bottom: $spacing-07;
39
39
  }
40
- .#{$block-class}__error-column {
40
+ .#{$block-class}__column {
41
41
  padding: 0;
42
42
  @include breakpoint(lg) {
43
43
  padding: 0 $spacing-07 0 0;
44
44
  }
45
45
  }
46
46
 
47
- .#{$block-class}__error-svg-container {
47
+ .#{$block-class}__svg-container {
48
48
  display: flex;
49
49
  height: 100%;
50
50
  padding: $spacing-03 $spacing-03 $spacing-11 $spacing-03;
@@ -53,16 +53,16 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
53
53
  }
54
54
  }
55
55
 
56
- .#{$block-class}__error-label,
57
- .#{$block-class}__error-title {
56
+ .#{$block-class}__label,
57
+ .#{$block-class}__title {
58
58
  @include type-style('fluid-heading-05', true);
59
59
  }
60
60
 
61
- .#{$block-class}__error-label {
61
+ .#{$block-class}__label {
62
62
  display: block;
63
63
  color: $text-error;
64
64
  }
65
- .#{$block-class}__error-title {
65
+ .#{$block-class}__title {
66
66
  margin-bottom: $spacing-09;
67
67
  }
68
68
 
@@ -73,12 +73,12 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
73
73
  }
74
74
 
75
75
  // safari rendering fix
76
- .#{$block-class}__error-svg-container svg.#{$block-class}__error-svg {
76
+ .#{$block-class}__svg-container svg.#{$block-class}__svg {
77
77
  width: 100%;
78
78
  }
79
79
 
80
80
  // svg theme styles
81
- .#{$block-class}__error-svg-container svg.#{$block-class}__error-svg path {
81
+ .#{$block-class}__svg-container svg.#{$block-class}__svg path {
82
82
  fill: $background;
83
83
  stroke: $border-inverse;
84
84
  }
@@ -65,7 +65,6 @@ $sizes: (
65
65
  }
66
66
 
67
67
  @mixin photo-styling {
68
- position: fixed;
69
68
  border-radius: 100%;
70
69
  object-fit: fill;
71
70
  }
@@ -78,14 +77,18 @@ $sizes: (
78
77
  @mixin setLightBg($order, $color) {
79
78
  :root .#{$block-class}--#{$order},
80
79
  .#{$carbon-prefix}--g10 .#{$block-class}--#{$order},
81
- .#{$carbon-prefix}--white .#{$block-class}--#{$order} {
80
+ .#{$carbon-prefix}--white .#{$block-class}--#{$order},
81
+ [storybook-carbon-theme='g10'] .#{$block-class}--#{$order},
82
+ [storybook-carbon-theme='white'] .#{$block-class}--#{$order} {
82
83
  @include setBgColor($color);
83
84
  }
84
85
  }
85
86
 
86
87
  @mixin setDarkBg($order, $color) {
87
88
  .#{$carbon-prefix}--g90 .#{$block-class}--#{$order},
88
- .#{$carbon-prefix}--g100 .#{$block-class}--#{$order} {
89
+ .#{$carbon-prefix}--g100 .#{$block-class}--#{$order},
90
+ [storybook-carbon-theme='g90'] .#{$block-class}--#{$order},
91
+ [storybook-carbon-theme='g100'] .#{$block-class}--#{$order} {
89
92
  @include setBgColor($color);
90
93
  }
91
94
  }