@carbon/ibm-products 2.35.0 → 2.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) 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/Carousel/Carousel.d.ts +46 -2
  18. package/es/components/Carousel/Carousel.js +36 -21
  19. package/es/components/Carousel/CarouselItem.d.ts +19 -2
  20. package/es/components/Carousel/CarouselItem.js +0 -1
  21. package/es/components/Coachmark/utils/enums.d.ts +36 -22
  22. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  23. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  24. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  25. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  26. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
  27. package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  28. package/es/components/CreateFullPage/CreateFullPage.js +12 -8
  29. package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
  30. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  31. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  32. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
  33. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  34. package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
  35. package/es/components/EditFullPage/EditFullPage.js +3 -3
  36. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  37. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  38. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  39. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  40. package/es/components/FullPageError/FullPageError.d.ts +2 -1
  41. package/es/components/FullPageError/FullPageError.js +24 -49
  42. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  43. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  44. package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
  45. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  46. package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  47. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  48. package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  49. package/es/components/NonLinearReading/NonLinearReading.js +2 -7
  50. package/es/components/SearchBar/SearchBar.d.ts +51 -3
  51. package/es/components/SearchBar/SearchBar.js +5 -6
  52. package/es/components/SidePanel/SidePanel.js +10 -5
  53. package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
  54. package/es/components/TruncatedList/TruncatedList.js +5 -4
  55. package/es/components/UserProfileImage/UserProfileImage.d.ts +66 -2
  56. package/es/components/UserProfileImage/UserProfileImage.js +5 -3
  57. package/lib/components/Carousel/Carousel.d.ts +46 -2
  58. package/lib/components/Carousel/Carousel.js +35 -20
  59. package/lib/components/Carousel/CarouselItem.d.ts +19 -2
  60. package/lib/components/Carousel/CarouselItem.js +0 -1
  61. package/lib/components/Coachmark/utils/enums.d.ts +36 -22
  62. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  63. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  64. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  65. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  66. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
  67. package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  68. package/lib/components/CreateFullPage/CreateFullPage.js +12 -8
  69. package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
  70. package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  71. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  72. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
  73. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  74. package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
  75. package/lib/components/EditFullPage/EditFullPage.js +3 -3
  76. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  77. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  78. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  79. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  80. package/lib/components/FullPageError/FullPageError.d.ts +2 -1
  81. package/lib/components/FullPageError/FullPageError.js +24 -49
  82. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  83. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  84. package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
  85. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  86. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  87. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  88. package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  89. package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
  90. package/lib/components/SearchBar/SearchBar.d.ts +51 -3
  91. package/lib/components/SearchBar/SearchBar.js +5 -6
  92. package/lib/components/SidePanel/SidePanel.js +10 -5
  93. package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
  94. package/lib/components/TruncatedList/TruncatedList.js +5 -4
  95. package/lib/components/UserProfileImage/UserProfileImage.d.ts +66 -2
  96. package/lib/components/UserProfileImage/UserProfileImage.js +5 -3
  97. package/package.json +7 -7
  98. package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
  99. package/scss/components/FullPageError/_full-page-error.scss +10 -10
  100. package/scss/components/UserAvatar/_user-avatar.scss +6 -3
  101. package/telemetry.yml +3 -0
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, typeof as _typeof, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { useRef, useCallback, useEffect, useImperativeHandle } from 'react';
10
10
  import PropTypes from '../../node_modules/prop-types/index.js';
11
11
  import { CarouselItem } from './CarouselItem.js';
@@ -14,7 +14,6 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
14
14
  import { pkg } from '../../settings.js';
15
15
 
16
16
  var _excluded = ["children", "className", "disableArrowScroll", "fadedEdgeColor", "onChangeIsScrollable", "onScroll"];
17
-
18
17
  // The block part of our conventional BEM class names (blockClass__E--M).
19
18
  var blockClass = "".concat(pkg.prefix, "--carousel");
20
19
  var componentName = 'Carousel';
@@ -53,29 +52,31 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
53
52
  _ref$onScroll = _ref.onScroll,
54
53
  onScroll = _ref$onScroll === void 0 ? defaults.onScroll : _ref$onScroll,
55
54
  rest = _objectWithoutProperties(_ref, _excluded);
56
- var carouselRef = useRef();
57
- var scrollRef = useRef();
55
+ var carouselRef = useRef(null);
56
+ var scrollRef = useRef(null);
58
57
  // Array of refs used to reference this component's children DOM elements
59
58
  var childElementsRef = useRef(Array(React__default.Children.count(children)).fill(useRef(null)));
60
- var leftFadedEdgeColor = (fadedEdgeColor === null || fadedEdgeColor === void 0 ? void 0 : fadedEdgeColor.left) || fadedEdgeColor;
61
- var rightFadedEdgeColor = (fadedEdgeColor === null || fadedEdgeColor === void 0 ? void 0 : fadedEdgeColor.right) || fadedEdgeColor;
59
+ var leftFadedEdgeColor = _typeof(fadedEdgeColor) === 'object' ? fadedEdgeColor === null || fadedEdgeColor === void 0 ? void 0 : fadedEdgeColor.left : fadedEdgeColor;
60
+ var rightFadedEdgeColor = _typeof(fadedEdgeColor) === 'object' ? fadedEdgeColor === null || fadedEdgeColor === void 0 ? void 0 : fadedEdgeColor.right : fadedEdgeColor;
62
61
 
63
62
  // Trigger callbacks to report state of the carousel
64
63
  var handleOnScroll = useCallback(function () {
64
+ var _scrollRef$current, _scrollRef$current2, _scrollRef$current3;
65
+ if (!scrollRef.current) {
66
+ return;
67
+ }
68
+
65
69
  // viewport's width
66
- var clientWidth = scrollRef.current.clientWidth;
70
+ var clientWidth = (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.clientWidth;
67
71
  // scroll position
68
- var scrollLeft = parseInt(scrollRef.current.scrollLeft, 10);
72
+ var scrollLeft = parseInt("".concat((_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.scrollLeft), 10);
69
73
  // scrollable width
70
- var scrollWidth = scrollRef.current.scrollWidth;
74
+ var scrollWidth = (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth;
71
75
 
72
76
  // The maximum scrollLeft achievable is the scrollable width - the viewport width.
73
77
  var scrollLeftMax = scrollWidth - clientWidth;
74
78
  // if isNaN(scrollLeft / scrollLeftMax), then set to zero
75
79
  var scrollPercent = parseFloat((scrollLeft / scrollLeftMax).toFixed(2)) || 0;
76
- if (!scrollRef.current) {
77
- return;
78
- }
79
80
 
80
81
  // Callback 1: Does the carousel have enough content to enable scrolling?
81
82
  onChangeIsScrollable(scrollWidth > clientWidth);
@@ -95,7 +96,8 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
95
96
 
96
97
  // Get all elements that are visible in the container.
97
98
  var getElementsInView = useCallback(function () {
98
- var containerRect = scrollRef.current.getBoundingClientRect();
99
+ var _scrollRef$current4;
100
+ var containerRect = scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.getBoundingClientRect();
99
101
  var inViewElements = childElementsRef.current.filter(function (el) {
100
102
  return getElementInView(containerRect, el.getBoundingClientRect());
101
103
  });
@@ -104,8 +106,9 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
104
106
 
105
107
  // Return container's and children's rect data
106
108
  var getContainerAndChildRectData = useCallback(function () {
109
+ var _scrollRef$current5;
107
110
  // Get the rect of the container
108
- var containerRect = scrollRef.current.getBoundingClientRect();
111
+ var containerRect = scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.getBoundingClientRect();
109
112
  // Get all child elements that are in view of the container, and return their bounding rects.
110
113
  var elementRectsInView = getElementsInView().map(function (el) {
111
114
  return el.getBoundingClientRect();
@@ -123,27 +126,37 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
123
126
  };
124
127
  }, [getElementsInView]);
125
128
  var handleScrollNext = useCallback(function () {
129
+ if (!scrollRef.current) {
130
+ return;
131
+ }
126
132
  var _getContainerAndChild = getContainerAndChildRectData(),
127
133
  containerRect = _getContainerAndChild.containerRect,
128
134
  visibleWidth = _getContainerAndChild.visibleWidth;
129
135
  // Set the scrollValue to the visibleWidth, but if the visibleWidth value is 0, set it to the container's width
130
- var scrollValue = visibleWidth > 0 ? visibleWidth : containerRect.width;
136
+ var scrollValue = visibleWidth > 0 ? visibleWidth : containerRect === null || containerRect === void 0 ? void 0 : containerRect.width;
131
137
  // Increment the scrollLeft of the container
132
138
  scrollRef.current.scrollLeft += scrollValue;
133
139
  }, [getContainerAndChildRectData]);
134
140
  var handleScrollPrev = useCallback(function () {
141
+ var _containerRect$width, _containerRect$left;
142
+ if (!scrollRef.current) {
143
+ return;
144
+ }
135
145
  var _getContainerAndChild2 = getContainerAndChildRectData(),
136
146
  containerRect = _getContainerAndChild2.containerRect,
137
147
  elementRectsInView = _getContainerAndChild2.elementRectsInView,
138
148
  visibleWidth = _getContainerAndChild2.visibleWidth;
139
149
  // Set the scrollValue to the visibleWidth minus the first child's left value,
140
150
  // but if the visibleWidth value is 0, set it to the container's width plus the container's left value
141
- var scrollValue = visibleWidth > 0 ? visibleWidth - elementRectsInView[0].left : containerRect.width + containerRect.left;
151
+ var scrollValue = visibleWidth > 0 ? visibleWidth - elementRectsInView[0].left : ((_containerRect$width = containerRect === null || containerRect === void 0 ? void 0 : containerRect.width) !== null && _containerRect$width !== void 0 ? _containerRect$width : 0) + ((_containerRect$left = containerRect === null || containerRect === void 0 ? void 0 : containerRect.left) !== null && _containerRect$left !== void 0 ? _containerRect$left : 0);
142
152
 
143
153
  // Decrement the scrollLeft of the container
144
154
  scrollRef.current.scrollLeft -= scrollValue;
145
155
  }, [getContainerAndChildRectData]);
146
156
  var handleScrollReset = useCallback(function () {
157
+ if (!scrollRef.current) {
158
+ return;
159
+ }
147
160
  // This doesn't trigger "scrollend"...
148
161
  scrollRef.current.scrollLeft = 0;
149
162
  // ...so trigger a callback manually.
@@ -170,6 +183,9 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
170
183
  // On window.resize, reset carousel to zero.
171
184
  useEffect(function () {
172
185
  var handleWindowResize = function handleWindowResize() {
186
+ if (!scrollRef.current) {
187
+ return;
188
+ }
173
189
  scrollRef.current.scrollLeft = 0;
174
190
  handleOnScroll();
175
191
  };
@@ -185,9 +201,9 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
185
201
  handleOnScroll();
186
202
  };
187
203
  var scrollDiv = scrollRef.current;
188
- scrollDiv.addEventListener('scrollend', handleScrollend);
204
+ scrollDiv === null || scrollDiv === void 0 || scrollDiv.addEventListener('scrollend', handleScrollend);
189
205
  return function () {
190
- return scrollDiv.removeEventListener('scrollend', handleScrollend);
206
+ return scrollDiv === null || scrollDiv === void 0 ? void 0 : scrollDiv.removeEventListener('scrollend', handleScrollend);
191
207
  };
192
208
  }, [handleOnScroll]);
193
209
 
@@ -207,9 +223,7 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
207
223
  passive: false
208
224
  });
209
225
  return function () {
210
- scrollDiv.removeEventListener('wheel', handleWheel, {
211
- passive: false
212
- });
226
+ scrollDiv.removeEventListener('wheel', handleWheel);
213
227
  };
214
228
  }
215
229
  }, []);
@@ -305,6 +319,7 @@ Carousel.propTypes = {
305
319
  *
306
320
  * Or pass an object (`{ left: $color1, right: $color2 }`) to specify different colors.
307
321
  */
322
+ /**@ts-ignore*/
308
323
  fadedEdgeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
309
324
  left: PropTypes.string,
310
325
  right: PropTypes.string
@@ -1,5 +1,22 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2023
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, { ReactNode } from 'react';
8
+ interface CarouselItemProps {
9
+ /**
10
+ * Provide the contents of the CarouselItem.
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node.
15
+ */
16
+ className?: string;
17
+ }
1
18
  /**
2
19
  * TODO: A description of the component.
3
20
  */
4
- export const CarouselItem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
21
+ declare const CarouselItem: React.ForwardRefExoticComponent<CarouselItemProps & React.RefAttributes<HTMLDivElement>>;
22
+ export { CarouselItem };
@@ -13,7 +13,6 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
13
  import { pkg } from '../../settings.js';
14
14
 
15
15
  var _excluded = ["children", "className"];
16
-
17
16
  // Carbon and package components we use.
18
17
  /* TODO: @import(s) of carbon components and other package components. */
19
18
 
@@ -1,23 +1,37 @@
1
- export namespace BEACON_KIND {
2
- let DEFAULT: string;
3
- }
4
- export namespace COACHMARK_OVERLAY_KIND {
5
- let TOOLTIP: string;
6
- let FLOATING: string;
7
- let FIXED: string;
8
- let STACKED: string;
9
- }
10
- export namespace COACHMARK_ALIGNMENT {
11
- let BOTTOM: string;
12
- let BOTTOM_LEFT: string;
13
- let BOTTOM_RIGHT: string;
14
- let LEFT: string;
15
- let LEFT_TOP: string;
16
- let LEFT_BOTTOM: string;
17
- let RIGHT: string;
18
- let RIGHT_TOP: string;
19
- let RIGHT_BOTTOM: string;
20
- let TOP: string;
21
- let TOP_LEFT: string;
22
- let TOP_RIGHT: string;
1
+ /**
2
+ * Reserved for future expansion, i.e. "RING".
3
+ */
4
+ export declare enum BEACON_KIND {
5
+ DEFAULT = "default"
23
6
  }
7
+ /**
8
+ * Describes the style and behavior of a Coachmark.
9
+ * @param TOOLTIP includes a caret pointing to the animated beacon.
10
+ * @param FLOATING includes a drag handle across the top.
11
+ * @param FIXED is fixed to the bottom-right of the viewport.
12
+ * @param STACKED is fixed to the bottom-right of the viewport, includes links to show more, stackable Coachmarks if included.
13
+ */
14
+ export declare const COACHMARK_OVERLAY_KIND: {
15
+ TOOLTIP: string;
16
+ FLOATING: string;
17
+ FIXED: string;
18
+ STACKED: string;
19
+ };
20
+ /**
21
+ * Where to render the Coachmark relative to its target.
22
+ * Applies only to Floating and Tooltip Coachmarks.
23
+ */
24
+ export declare const COACHMARK_ALIGNMENT: {
25
+ BOTTOM: string;
26
+ BOTTOM_LEFT: string;
27
+ BOTTOM_RIGHT: string;
28
+ LEFT: string;
29
+ LEFT_TOP: string;
30
+ LEFT_BOTTOM: string;
31
+ RIGHT: string;
32
+ RIGHT_TOP: string;
33
+ RIGHT_BOTTOM: string;
34
+ TOP: string;
35
+ TOP_LEFT: string;
36
+ TOP_RIGHT: string;
37
+ };
@@ -1,5 +1,29 @@
1
1
  /**
2
- * Use beacon for the target prop of a Coachmark component.
2
+ * Copyright IBM Corp. 2023, 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.
3
6
  */
4
- export let CoachmarkBeacon: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
7
  import React from 'react';
8
+ import { BEACON_KIND } from '../Coachmark';
9
+ interface CoachmarkBeaconProps {
10
+ /**
11
+ * Optional class name for this component.
12
+ */
13
+ className?: string;
14
+ /**
15
+ * What style of beacon.
16
+ * BEACON_KIND is an exported enum from the Coachmark and can be used for this value.
17
+ * @see {@link BEACON_KIND}
18
+ */
19
+ kind?: BEACON_KIND;
20
+ /**
21
+ * The aria label.
22
+ */
23
+ label: string;
24
+ }
25
+ /**
26
+ * Use beacon for the target prop of a Coachmark component.
27
+ */
28
+ export declare let CoachmarkBeacon: React.ForwardRefExoticComponent<CoachmarkBeaconProps & React.RefAttributes<HTMLDivElement>>;
29
+ export {};
@@ -22,7 +22,6 @@ var componentName = 'CoachmarkBeacon';
22
22
  var defaults = {
23
23
  kind: 'default'
24
24
  };
25
-
26
25
  /**
27
26
  * Use beacon for the target prop of a Coachmark component.
28
27
  */
@@ -54,8 +53,7 @@ var CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
54
53
  "aria-label": label,
55
54
  className: "".concat(blockClass, "__target")
56
55
  }), /*#__PURE__*/React__default.createElement("svg", {
57
- className: "".concat(blockClass, "__center"),
58
- alt: ""
56
+ className: "".concat(blockClass, "__center")
59
57
  }, _circle || (_circle = /*#__PURE__*/React__default.createElement("circle", {
60
58
  r: 1,
61
59
  cx: 38,
@@ -1,7 +1,33 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 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, { ReactNode } from 'react';
8
+ interface CoachmarkOverlayElementProps {
9
+ /**
10
+ * An optional button can be rendered below the description.
11
+ * This can be a link, button, Coachmark button, etc.
12
+ */
13
+ button?: ReactNode;
14
+ /**
15
+ * Optional class name for this component.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * The description of the Coachmark.
20
+ */
21
+ description: ReactNode;
22
+ /**
23
+ * The title of the Coachmark.
24
+ */
25
+ title: string;
26
+ }
1
27
  /**
2
28
  * Component to be displayed within a CoachmarkOverlayElements container.
3
29
  * Can be used 1 to N number, to display content in a Coachmark's overlay
4
30
  * in a carousel fashion.
5
31
  */
6
- export let CoachmarkOverlayElement: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
32
+ export declare let CoachmarkOverlayElement: React.ForwardRefExoticComponent<CoachmarkOverlayElementProps & React.RefAttributes<HTMLDivElement>>;
33
+ export {};
@@ -17,7 +17,6 @@ var _excluded = ["button", "className", "description", "title"];
17
17
  // The block part of our conventional BEM class names (blockClass__E--M).
18
18
  var blockClass = "".concat(pkg.prefix, "--coachmark-overlay-element");
19
19
  var componentName = 'CoachmarkOverlayElement';
20
-
21
20
  /**
22
21
  * Component to be displayed within a CoachmarkOverlayElements container.
23
22
  * Can be used 1 to N number, to display content in a Coachmark's overlay
@@ -2,7 +2,7 @@ export declare const inputData: {
2
2
  properties: ({
3
3
  id: string;
4
4
  label: string;
5
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
5
+ icon: import("@carbon/react/icons").CarbonIconType;
6
6
  type: string;
7
7
  config: {
8
8
  options: {
@@ -17,13 +17,13 @@ export declare const inputData: {
17
17
  } | {
18
18
  id: string;
19
19
  label: string;
20
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
20
+ icon: import("@carbon/react/icons").CarbonIconType;
21
21
  type: string;
22
22
  config: {
23
23
  options: {
24
24
  label: string;
25
25
  id: string;
26
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
26
+ icon: import("@carbon/react/icons").CarbonIconType;
27
27
  }[];
28
28
  includeSearch: boolean;
29
29
  min?: undefined;
@@ -33,7 +33,7 @@ export declare const inputData: {
33
33
  } | {
34
34
  id: string;
35
35
  label: string;
36
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
36
+ icon: import("@carbon/react/icons").CarbonIconType;
37
37
  type: string;
38
38
  config: {
39
39
  options?: undefined;
@@ -45,7 +45,7 @@ export declare const inputData: {
45
45
  } | {
46
46
  id: string;
47
47
  label: string;
48
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
48
+ icon: import("@carbon/react/icons").CarbonIconType;
49
49
  type: string;
50
50
  config: {
51
51
  min: number;
@@ -1,5 +1,122 @@
1
- export const StepsContext: React.Context<null>;
2
- export const StepNumberContext: React.Context<number>;
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2023
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, { ReactNode } from 'react';
8
+ export declare const StepsContext: React.Context<null>;
9
+ export declare const StepNumberContext: React.Context<number>;
10
+ interface HeaderBreadcrumbs {
11
+ /** breadcrumb item key */
12
+ key: string;
13
+ /** breadcrumb item label */
14
+ label: string;
15
+ /** breadcrumb item link */
16
+ href?: string;
17
+ /** breadcrumb item title tooltip */
18
+ title?: string;
19
+ /** Provide if this breadcrumb item represents the current page */
20
+ isCurrentPage?: boolean;
21
+ }
22
+ type CreateFullPageBreadcrumbsProps = {
23
+ /** The header breadcrumbs */
24
+ breadcrumbs?: null | undefined;
25
+ /**
26
+ * Label for open/close overflow button used for breadcrumb items that do not fit
27
+ */
28
+ breadcrumbsOverflowAriaLabel?: never;
29
+ } | {
30
+ /** The header breadcrumbs */
31
+ breadcrumbs: HeaderBreadcrumbs;
32
+ /**
33
+ * Label for open/close overflow button used for breadcrumb items that do not fit
34
+ */
35
+ breadcrumbsOverflowAriaLabel: string;
36
+ };
37
+ type CreateFullPageBaseProps = {
38
+ /**
39
+ * The back button text
40
+ */
41
+ backButtonText?: string;
42
+ /**
43
+ * The cancel button text
44
+ */
45
+ cancelButtonText: string;
46
+ /**
47
+ * The main content of the full page
48
+ */
49
+ children?: ReactNode;
50
+ /**
51
+ * Provide an optional class to be applied to the containing node.
52
+ */
53
+ className?: string;
54
+ /**
55
+ * Specifies elements to focus on first on render.
56
+ */
57
+ firstFocusElement?: string;
58
+ /**
59
+ * This can be used to open the component to a step other than the first step.
60
+ * For example, a create flow was previously in progress, data was saved, and
61
+ * is now being completed.
62
+ */
63
+ initialStep?: number;
64
+ /** Maximum visible breadcrumb-items before overflow is used (values less than 1 are treated as 1) */
65
+ maxVisibleBreadcrumbs?: number;
66
+ /**
67
+ * The primary 'danger' button text in the modal
68
+ */
69
+ modalDangerButtonText: string;
70
+ /**
71
+ * The description located below the title in the modal
72
+ */
73
+ modalDescription?: string;
74
+ /**
75
+ * The secondary button text in the modal
76
+ */
77
+ modalSecondaryButtonText: string;
78
+ /**
79
+ * The title located in the header of the modal
80
+ */
81
+ modalTitle: string;
82
+ /**
83
+ * The next button text
84
+ */
85
+ nextButtonText: string;
86
+ /**
87
+ * A prop to omit the trailing slash for the breadcrumbs
88
+ */
89
+ noTrailingSlash?: boolean;
90
+ /**
91
+ * An optional handler that is called when the user closes the full page (by
92
+ * clicking the secondary button, located in the modal, which triggers after
93
+ * clicking the ghost button in the modal
94
+ */
95
+ onClose?: () => void;
96
+ /**
97
+ * Specify a handler for submitting the multi step full page (final step).
98
+ * This function can _optionally_ return a promise that is either resolved or rejected and the CreateFullPage will handle the submitting state of the create button.
99
+ */
100
+ onRequestSubmit: () => void;
101
+ /**
102
+ * A secondary title of the full page, displayed in the influencer area
103
+ */
104
+ secondaryTitle?: string;
105
+ /**
106
+ * @ignore
107
+ * The aria label to be used for the UI Shell SideNav Carbon component
108
+ */
109
+ sideNavAriaLabel?: string;
110
+ /**
111
+ * The submit button text
112
+ */
113
+ submitButtonText: string;
114
+ /**
115
+ * The main title of the full page, displayed in the header area
116
+ */
117
+ title?: string;
118
+ };
119
+ type CreateFullPageProps = CreateFullPageBaseProps & CreateFullPageBreadcrumbsProps;
3
120
  /**
4
121
  * Use with creations that must be completed in order for a service to be usable.
5
122
  *
@@ -12,5 +129,5 @@ on the Carbon's grid system
12
129
  include `<Row>` and `<Column>` components inside of each `CreateFullPageStep`
13
130
  component to get the desired affect.
14
131
  */
15
- export let CreateFullPage: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
16
- import React from 'react';
132
+ export declare let CreateFullPage: React.ForwardRefExoticComponent<CreateFullPageProps & React.RefAttributes<HTMLDivElement>>;
133
+ export {};
@@ -35,7 +35,6 @@ var StepsContext = /*#__PURE__*/createContext(null);
35
35
  // This is a context supplied separately to each step in the container
36
36
  // to let it know what number it is in the sequence of steps
37
37
  var StepNumberContext = /*#__PURE__*/createContext(-1);
38
-
39
38
  /**
40
39
  * Use with creations that must be completed in order for a service to be usable.
41
40
  *
@@ -114,7 +113,7 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
114
113
  _useState20 = _slicedToArray(_useState19, 2),
115
114
  firstIncludedStep = _useState20[0],
116
115
  setFirstIncludedStep = _useState20[1];
117
- var _useState21 = useState(null),
116
+ var _useState21 = useState(),
118
117
  _useState22 = _slicedToArray(_useState21, 2),
119
118
  lastIncludedStep = _useState22[0],
120
119
  setLastIncludedStep = _useState22[1];
@@ -129,11 +128,13 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
129
128
  if (lastItem !== lastIncludedStep) {
130
129
  setLastIncludedStep(lastItem);
131
130
  }
131
+
132
+ /**@ts-ignore */
132
133
  if (open && initialStep) {
133
134
  var numberOfHiddenSteps = getNumberOfHiddenSteps(stepData, initialStep);
134
135
  setCurrentStep(Number(initialStep + numberOfHiddenSteps));
135
136
  }
136
- }, [stepData, firstIncludedStep, lastIncludedStep, initialStep]);
137
+ }, [stepData, firstIncludedStep, lastIncludedStep, initialStep, modalIsOpen]);
137
138
  useCreateComponentFocus({
138
139
  previousState: previousState,
139
140
  currentStep: currentStep,
@@ -145,9 +146,11 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
145
146
  useResetCreateComponent({
146
147
  firstIncludedStep: firstIncludedStep,
147
148
  previousState: previousState,
149
+ /**@ts-ignore */
148
150
  open: open,
149
151
  setCurrentStep: setCurrentStep,
150
152
  stepData: stepData,
153
+ /**@ts-ignore */
151
154
  initialStep: initialStep,
152
155
  totalSteps: stepData === null || stepData === void 0 ? void 0 : stepData.length,
153
156
  componentName: componentName
@@ -160,6 +163,7 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
160
163
  isSubmitDisabled: isDisabled,
161
164
  setCurrentStep: setCurrentStep,
162
165
  setIsSubmitting: setIsSubmitting,
166
+ /**@ts-ignore */
163
167
  setShouldViewAll: setShouldViewAll,
164
168
  onClose: onClose,
165
169
  onRequestSubmit: onRequestSubmit,
@@ -180,15 +184,14 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
180
184
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
181
185
  ref: ref,
182
186
  className: cx(blockClass, className)
183
- }, getDevtoolsProps(componentName)), (title || (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) > 0) && /*#__PURE__*/React__default.createElement("div", {
184
- className: "".concat(blockClass, "__header")
185
- }, /*#__PURE__*/React__default.createElement(SimpleHeader, {
187
+ }, getDevtoolsProps(componentName)), (title || breadcrumbs) && /*#__PURE__*/React__default.createElement(SimpleHeader, {
186
188
  title: title,
187
189
  breadcrumbs: breadcrumbs,
188
190
  noTrailingSlash: noTrailingSlash,
189
191
  overflowAriaLabel: breadcrumbsOverflowAriaLabel,
190
- maxVisible: maxVisibleBreadcrumbs
191
- })), /*#__PURE__*/React__default.createElement("div", {
192
+ maxVisible: maxVisibleBreadcrumbs,
193
+ className: "".concat(blockClass, "__header")
194
+ }), /*#__PURE__*/React__default.createElement("div", {
192
195
  className: "".concat(blockClass, "__influencer-and-body-container")
193
196
  }, /*#__PURE__*/React__default.createElement("div", {
194
197
  className: "".concat(blockClass, "__influencer")
@@ -271,6 +274,7 @@ CreateFullPage.propTypes = {
271
274
  */
272
275
  backButtonText: PropTypes.string.isRequired,
273
276
  /** The header breadcrumbs */
277
+ /**@ts-ignore */
274
278
  breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
275
279
  /** breadcrumb item key */
276
280
  key: PropTypes.string.isRequired,
@@ -129,6 +129,8 @@ var CreateTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
129
129
  if (open && initialStep) {
130
130
  var numberOfHiddenSteps = getNumberOfHiddenSteps(stepData, initialStep);
131
131
  setCurrentStep(Number(initialStep + numberOfHiddenSteps));
132
+ } else {
133
+ setCurrentStep(firstIncludedStep);
132
134
  }
133
135
  }, [stepData, firstIncludedStep, lastIncludedStep, initialStep, open]);
134
136
  useCreateComponentFocus({
@@ -135,14 +135,15 @@ var DatagridRow = function DatagridRow(datagridState) {
135
135
  })) : /*#__PURE__*/React__default.createElement("td", {
136
136
  className: "".concat(blockClass, "__table-row-ai-spacer")
137
137
  }) : null, row.cells.map(function (cell, index) {
138
- var _cell$column, _content$props, _associatedHeader$;
138
+ var _cell$column, _cell$column2, _content$props, _associatedHeader$;
139
139
  var cellProps = cell.getCellProps();
140
140
  // eslint-disable-next-line no-unused-vars
141
141
  var children = cellProps.children;
142
142
  cellProps.role;
143
143
  var restProps = _objectWithoutProperties(cellProps, _excluded2);
144
+ var columnClassname = cell === null || cell === void 0 || (_cell$column = cell.column) === null || _cell$column === void 0 ? void 0 : _cell$column.className;
144
145
  var content = children || /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !row.isSkeleton && cell.render('Cell'), row.isSkeleton && (_SkeletonText || (_SkeletonText = /*#__PURE__*/React__default.createElement(SkeletonText, null))));
145
- if ((cell === null || cell === void 0 || (_cell$column = cell.column) === null || _cell$column === void 0 ? void 0 : _cell$column.id) === selectionColumnId) {
146
+ if ((cell === null || cell === void 0 || (_cell$column2 = cell.column) === null || _cell$column2 === void 0 ? void 0 : _cell$column2.id) === selectionColumnId) {
146
147
  // directly render component without the wrapping TableCell
147
148
  return cell.render('Cell', {
148
149
  key: cell.column.id
@@ -153,7 +154,7 @@ var DatagridRow = function DatagridRow(datagridState) {
153
154
  return h.id === cell.column.id;
154
155
  });
155
156
  return /*#__PURE__*/React__default.createElement(TableCell, _extends({
156
- className: cx("".concat(blockClass, "__cell"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__expandable-row-cell"), row.canExpand && index === 0), "".concat(blockClass, "__expandable-row-cell--is-expanded"), row.isExpanded && index === 0), "".concat(blockClass, "__slug--cell"), associatedHeader && associatedHeader.length && /*#__PURE__*/isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)))
157
+ className: cx("".concat(blockClass, "__cell"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__expandable-row-cell"), row.canExpand && index === 0), "".concat(blockClass, "__expandable-row-cell--is-expanded"), row.isExpanded && index === 0), "".concat(blockClass, "__slug--cell"), associatedHeader && associatedHeader.length && /*#__PURE__*/isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)), columnClassname)
157
158
  }, restProps, {
158
159
  key: cell.column.id,
159
160
  title: title
@@ -166,9 +166,10 @@ var DraggableItemsList = function DraggableItemsList(_ref) {
166
166
  var firstWord = res !== null ? res[0] === '' ? res[1].charAt(0).toUpperCase() + res[1].substring(1) : res[0].charAt(0).toUpperCase() + res[0].substring(1) : null;
167
167
  var highlightedText = res !== null ? res[0] === '' ? "<strong>".concat(firstWord, "</strong>") + res[2] : firstWord + "<strong>".concat(res[1], "</strong>") + res[2] : colHeaderTitle;
168
168
  var isFrozenColumn = !!colDef.sticky;
169
+ var isDisabled = colDef.disabled;
169
170
  var listContents = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Checkbox, {
170
171
  checked: isColumnVisible(colDef),
171
- disabled: isFrozenColumn,
172
+ disabled: isDisabled || isFrozenColumn,
172
173
  onChange: function onChange(_, _ref2) {
173
174
  var checked = _ref2.checked;
174
175
  return onSelectColumn(colDef, checked);