@carbon/ibm-products 1.61.1 → 1.62.1
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +172 -70
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +3 -3
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1768 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +3 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +172 -70
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +3 -3
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +172 -70
- package/css/index.css.map +1 -1
- package/css/index.min.css +3 -3
- package/css/index.min.css.map +1 -1
- package/es/components/Carousel/Carousel.js +194 -119
- package/es/components/Carousel/CarouselItem.js +8 -21
- package/es/components/Coachmark/Coachmark.js +17 -5
- package/es/components/Coachmark/CoachmarkDragbar.js +12 -5
- package/es/components/Coachmark/CoachmarkHeader.js +2 -1
- package/es/components/Coachmark/CoachmarkOverlay.js +105 -9
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +26 -6
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +34 -10
- package/es/components/CoachmarkStack/CoachmarkStack.js +19 -4
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +45 -11
- package/es/components/Datagrid/Datagrid/DatagridContent.js +12 -9
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -4
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +42 -25
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +23 -11
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +31 -12
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +43 -23
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +93 -14
- package/es/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
- package/es/components/Datagrid/useActionsColumn.js +9 -9
- package/es/components/Datagrid/useDatagrid.js +13 -1
- package/es/components/Datagrid/useExpandedRow.js +3 -6
- package/es/components/Datagrid/useFlexResize.js +19 -9
- package/es/components/Datagrid/useFocusRowExpander.js +40 -0
- package/es/components/Datagrid/useInfiniteScroll.js +10 -9
- package/es/components/Datagrid/useNestedRowExpander.js +9 -0
- package/es/components/Datagrid/useNestedRows.js +0 -4
- package/es/components/Datagrid/useOnRowClick.js +6 -7
- package/es/components/Datagrid/useParentDimensions.js +6 -6
- package/es/components/Datagrid/useResizeTable.js +7 -7
- package/es/components/Datagrid/useRowExpander.js +9 -0
- package/es/components/Datagrid/useSelectAllToggle.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +52 -30
- package/es/components/Datagrid/useSkeletonRows.js +6 -6
- package/es/components/Datagrid/useSortableColumns.js +4 -5
- package/es/components/Datagrid/useStickyColumn.js +13 -6
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
- package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
- package/es/components/Guidebanner/Guidebanner.js +9 -12
- package/es/global/js/hooks/index.js +3 -2
- package/es/global/js/hooks/usePrefix.js +11 -0
- package/es/global/js/package-settings.js +1 -4
- package/lib/components/Carousel/Carousel.js +190 -114
- package/lib/components/Carousel/CarouselItem.js +9 -25
- package/lib/components/Coachmark/Coachmark.js +16 -4
- package/lib/components/Coachmark/CoachmarkDragbar.js +12 -5
- package/lib/components/Coachmark/CoachmarkHeader.js +2 -1
- package/lib/components/Coachmark/CoachmarkOverlay.js +105 -8
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +25 -5
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +34 -10
- package/lib/components/CoachmarkStack/CoachmarkStack.js +18 -3
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +44 -10
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +12 -9
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -4
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +42 -32
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +17 -4
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +25 -5
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +43 -23
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +12 -12
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +96 -15
- package/lib/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
- package/lib/components/Datagrid/useActionsColumn.js +9 -12
- package/lib/components/Datagrid/useDatagrid.js +13 -1
- package/lib/components/Datagrid/useExpandedRow.js +2 -5
- package/lib/components/Datagrid/useFlexResize.js +19 -9
- package/lib/components/Datagrid/useFocusRowExpander.js +46 -0
- package/lib/components/Datagrid/useInfiniteScroll.js +9 -9
- package/lib/components/Datagrid/useNestedRowExpander.js +9 -0
- package/lib/components/Datagrid/useNestedRows.js +0 -4
- package/lib/components/Datagrid/useOnRowClick.js +6 -7
- package/lib/components/Datagrid/useParentDimensions.js +5 -6
- package/lib/components/Datagrid/useResizeTable.js +6 -7
- package/lib/components/Datagrid/useRowExpander.js +9 -0
- package/lib/components/Datagrid/useSelectAllToggle.js +2 -2
- package/lib/components/Datagrid/useSelectRows.js +46 -23
- package/lib/components/Datagrid/useSkeletonRows.js +6 -6
- package/lib/components/Datagrid/useSortableColumns.js +4 -5
- package/lib/components/Datagrid/useStickyColumn.js +8 -0
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
- package/lib/components/Guidebanner/Guidebanner.js +9 -12
- package/lib/global/js/hooks/index.js +8 -1
- package/lib/global/js/hooks/usePrefix.js +19 -0
- package/lib/global/js/package-settings.js +1 -4
- package/package.json +2 -2
- package/scss/components/Carousel/_carousel.scss +1 -2
- package/scss/components/Checklist/_checklist.scss +13 -25
- package/scss/components/Coachmark/styles/_coachmark-dragbar.scss +1 -45
- package/scss/components/Coachmark/styles/_coachmark-header.scss +0 -33
- package/scss/components/Coachmark/styles/_coachmark-overlay.scss +113 -5
- package/scss/components/Coachmark/styles/_coachmark-tagline.scss +18 -0
- package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +19 -1
- package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +2 -0
- package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +1 -0
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +3 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +31 -5
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +21 -0
- package/scss/components/Datagrid/styles/_useNestedRows.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +9 -0
- package/scss/components/_index-released-only.scss +1 -0
- package/es/components/Carousel/utils.js +0 -98
- package/lib/components/Carousel/utils.js +0 -108
@@ -2,12 +2,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
5
|
-
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
5
|
+
/**
|
6
|
+
* Copyright IBM Corp. 2021, 2023
|
7
|
+
*
|
8
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
11
10
|
*/
|
12
11
|
|
13
12
|
import { useEffect, useRef, useLayoutEffect, useState } from 'react';
|
@@ -29,9 +28,11 @@ var useStickyColumn = function useStickyColumn(hooks) {
|
|
29
28
|
setWindowSize(window.innerWidth);
|
30
29
|
}, []);
|
31
30
|
useLayoutEffect(function () {
|
31
|
+
/* istanbul ignore next */
|
32
32
|
function updateSize() {
|
33
33
|
setWindowSize(window.innerWidth);
|
34
34
|
}
|
35
|
+
/* istanbul ignore next */
|
35
36
|
window.addEventListener('resize', updateSize);
|
36
37
|
return function () {
|
37
38
|
return window.removeEventListener('resize', updateSize);
|
@@ -52,14 +53,17 @@ var useStickyColumn = function useStickyColumn(hooks) {
|
|
52
53
|
useEffect(function () {
|
53
54
|
var tableBodyElement = tableBodyRef.current;
|
54
55
|
var headerCellElement = stickyHeaderCellRef.current;
|
56
|
+
/* istanbul ignore next */
|
55
57
|
if (hasVertScroll(tableBodyElement) && headerCellElement) {
|
56
58
|
headerCellElement.classList.add(OFFSET_SCROLL_CLASS);
|
57
59
|
}
|
58
60
|
var boundListener = debounce(onBodyResize.bind(null, tableBodyElement, headerCellElement), 250);
|
61
|
+
/* istanbul ignore next */
|
59
62
|
if (typeof window !== 'undefined') {
|
60
63
|
window.addEventListener('resize', boundListener);
|
61
64
|
}
|
62
65
|
return function () {
|
66
|
+
/* istanbul ignore next */
|
63
67
|
if (typeof window !== 'undefined') {
|
64
68
|
window.removeEventListener('resize', boundListener);
|
65
69
|
}
|
@@ -158,6 +162,7 @@ var changeProps = function changeProps(elementName, headerCellRef, windowSize, p
|
|
158
162
|
};
|
159
163
|
var onBodyResize = function onBodyResize(tableBodyEle, headerCellEle) {
|
160
164
|
if (headerCellEle) {
|
165
|
+
/* istanbul ignore next */
|
161
166
|
if (hasVertScroll(tableBodyEle)) {
|
162
167
|
headerCellEle.classList.add(OFFSET_SCROLL_CLASS);
|
163
168
|
} else {
|
@@ -167,6 +172,7 @@ var onBodyResize = function onBodyResize(tableBodyEle, headerCellEle) {
|
|
167
172
|
}
|
168
173
|
};
|
169
174
|
var toggleStickyShadow = function toggleStickyShadow(tableBodyEle, headerCellEle) {
|
175
|
+
/* istanbul ignore next */
|
170
176
|
if (tableBodyEle && headerCellEle) {
|
171
177
|
var isScrolledToRight = tableBodyEle.scrollLeft + tableBodyEle.clientWidth === tableBodyEle.scrollWidth;
|
172
178
|
if (isScrolledToRight) {
|
@@ -179,6 +185,7 @@ var toggleStickyShadow = function toggleStickyShadow(tableBodyEle, headerCellEle
|
|
179
185
|
}
|
180
186
|
};
|
181
187
|
var hasVertScroll = function hasVertScroll(element) {
|
188
|
+
/* istanbul ignore next */
|
182
189
|
if (!element) {
|
183
190
|
return false;
|
184
191
|
}
|
@@ -41,6 +41,7 @@ export var ErrorEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
41
41
|
className: cx(blockClass, className, "".concat(blockClass, "-type--error")),
|
42
42
|
ref: ref
|
43
43
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(ErrorIllustration, {
|
44
|
+
title: title,
|
44
45
|
theme: illustrationTheme,
|
45
46
|
size: size
|
46
47
|
}), /*#__PURE__*/React.createElement(EmptyStateContent, {
|
@@ -41,6 +41,7 @@ export var NoDataEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
41
41
|
className: cx(blockClass, className, "".concat(blockClass, "-type--noData")),
|
42
42
|
ref: ref
|
43
43
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NoDataIllustration, {
|
44
|
+
title: title,
|
44
45
|
theme: illustrationTheme,
|
45
46
|
size: size
|
46
47
|
}), /*#__PURE__*/React.createElement(EmptyStateContent, {
|
@@ -41,6 +41,7 @@ export var NoTagsEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
41
41
|
className: cx(blockClass, className, "".concat(blockClass, "-type--noTags")),
|
42
42
|
ref: ref
|
43
43
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NoTagsIllustration, {
|
44
|
+
title: title,
|
44
45
|
theme: illustrationTheme,
|
45
46
|
size: size
|
46
47
|
}), /*#__PURE__*/React.createElement(EmptyStateContent, {
|
@@ -41,6 +41,7 @@ export var NotFoundEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, re
|
|
41
41
|
className: cx(blockClass, className, "".concat(blockClass, "-type--notFound")),
|
42
42
|
ref: ref
|
43
43
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NotFoundIllustration, {
|
44
|
+
title: title,
|
44
45
|
theme: illustrationTheme,
|
45
46
|
size: size
|
46
47
|
}), /*#__PURE__*/React.createElement(EmptyStateContent, {
|
@@ -42,6 +42,7 @@ export var NotificationsEmptyState = /*#__PURE__*/React.forwardRef(function (_re
|
|
42
42
|
ref: ref
|
43
43
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NotificationsIllustration, {
|
44
44
|
size: size,
|
45
|
+
title: title,
|
45
46
|
theme: illustrationTheme
|
46
47
|
}), /*#__PURE__*/React.createElement(EmptyStateContent, {
|
47
48
|
action: action,
|
@@ -42,6 +42,7 @@ export var UnauthorizedEmptyState = /*#__PURE__*/React.forwardRef(function (_ref
|
|
42
42
|
ref: ref
|
43
43
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(UnauthorizedIllustration, {
|
44
44
|
size: size,
|
45
|
+
title: title,
|
45
46
|
theme: illustrationTheme
|
46
47
|
}), /*#__PURE__*/React.createElement(EmptyStateContent, {
|
47
48
|
action: action,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["theme", "size"];
|
3
|
+
var _excluded = ["title", "theme", "size"];
|
4
4
|
/**
|
5
5
|
* Copyright IBM Corp. 2020, 2021
|
6
6
|
*
|
@@ -20,7 +20,8 @@ import uuidv4 from '../../../global/js/utils/uuidv4';
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
22
|
export var ErrorIllustration = function ErrorIllustration(_ref) {
|
23
|
-
var
|
23
|
+
var title = _ref.title,
|
24
|
+
theme = _ref.theme,
|
24
25
|
size = _ref.size,
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
27
|
var svgId = uuidv4();
|
@@ -31,7 +32,7 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
31
32
|
viewBox: "0 0 80 80",
|
32
33
|
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-error"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
34
|
role: "img"
|
34
|
-
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
|
+
}), /*#__PURE__*/React.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
36
|
id: "prefix__a_dark_".concat(svgId),
|
36
37
|
x1: 38.9,
|
37
38
|
y1: 77.08,
|
@@ -209,5 +210,6 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
209
210
|
};
|
210
211
|
ErrorIllustration.propTypes = {
|
211
212
|
size: PropTypes.oneOf(['lg', 'sm']),
|
212
|
-
theme: PropTypes.oneOf(['light', 'dark'])
|
213
|
+
theme: PropTypes.oneOf(['light', 'dark']),
|
214
|
+
title: PropTypes.string
|
213
215
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["theme", "size"];
|
3
|
+
var _excluded = ["title", "theme", "size"];
|
4
4
|
/**
|
5
5
|
* Copyright IBM Corp. 2020, 2021
|
6
6
|
*
|
@@ -20,7 +20,8 @@ import uuidv4 from '../../../global/js/utils/uuidv4';
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
22
|
export var NoDataIllustration = function NoDataIllustration(_ref) {
|
23
|
-
var
|
23
|
+
var title = _ref.title,
|
24
|
+
theme = _ref.theme,
|
24
25
|
size = _ref.size,
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
27
|
var svgId = uuidv4();
|
@@ -31,7 +32,7 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
31
32
|
viewBox: "0 0 80 80",
|
32
33
|
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noData"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
34
|
role: "img"
|
34
|
-
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
|
+
}), /*#__PURE__*/React.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
36
|
id: "prefix__a_dark_".concat(svgId),
|
36
37
|
x1: 11.12,
|
37
38
|
y1: 43.34,
|
@@ -172,5 +173,6 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
172
173
|
};
|
173
174
|
NoDataIllustration.propTypes = {
|
174
175
|
size: PropTypes.oneOf(['lg', 'sm']),
|
175
|
-
theme: PropTypes.oneOf(['light', 'dark'])
|
176
|
+
theme: PropTypes.oneOf(['light', 'dark']),
|
177
|
+
title: PropTypes.string
|
176
178
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["theme", "size"];
|
3
|
+
var _excluded = ["title", "theme", "size"];
|
4
4
|
/**
|
5
5
|
* Copyright IBM Corp. 2020, 2021
|
6
6
|
*
|
@@ -20,7 +20,8 @@ import uuidv4 from '../../../global/js/utils/uuidv4';
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
22
|
export var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
23
|
-
var
|
23
|
+
var title = _ref.title,
|
24
|
+
theme = _ref.theme,
|
24
25
|
size = _ref.size,
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
27
|
var svgId = uuidv4();
|
@@ -32,7 +33,7 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
32
33
|
viewBox: "0 0 80 80",
|
33
34
|
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noTags"), "".concat(blockClass, "__illustration--").concat(size)]),
|
34
35
|
role: "img"
|
35
|
-
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
36
|
+
}), /*#__PURE__*/React.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
36
37
|
id: "prefix__c_dark_".concat(svgId),
|
37
38
|
x1: 34.96,
|
38
39
|
y1: 5.37,
|
@@ -479,5 +480,6 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
479
480
|
};
|
480
481
|
NoTagsIllustration.propTypes = {
|
481
482
|
size: PropTypes.oneOf(['lg', 'sm']),
|
482
|
-
theme: PropTypes.oneOf(['light', 'dark'])
|
483
|
+
theme: PropTypes.oneOf(['light', 'dark']),
|
484
|
+
title: PropTypes.string
|
483
485
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["theme", "size"];
|
3
|
+
var _excluded = ["title", "theme", "size"];
|
4
4
|
/**
|
5
5
|
* Copyright IBM Corp. 2020, 2021
|
6
6
|
*
|
@@ -20,7 +20,8 @@ import uuidv4 from '../../../global/js/utils/uuidv4';
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
22
|
export var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
23
|
-
var
|
23
|
+
var title = _ref.title,
|
24
|
+
theme = _ref.theme,
|
24
25
|
size = _ref.size,
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
27
|
var svgId = uuidv4();
|
@@ -31,7 +32,7 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
31
32
|
viewBox: "0 0 80 80",
|
32
33
|
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notFound"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
34
|
role: "img"
|
34
|
-
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
|
+
}), /*#__PURE__*/React.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
36
|
id: "prefix__a_dark_".concat(svgId),
|
36
37
|
x1: 2.6,
|
37
38
|
y1: -12.81,
|
@@ -356,5 +357,6 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
356
357
|
};
|
357
358
|
NotFoundIllustration.propTypes = {
|
358
359
|
size: PropTypes.oneOf(['lg', 'sm']),
|
359
|
-
theme: PropTypes.oneOf(['light', 'dark'])
|
360
|
+
theme: PropTypes.oneOf(['light', 'dark']),
|
361
|
+
title: PropTypes.string
|
360
362
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["theme", "size"];
|
3
|
+
var _excluded = ["title", "theme", "size"];
|
4
4
|
/**
|
5
5
|
* Copyright IBM Corp. 2020, 2021
|
6
6
|
*
|
@@ -20,7 +20,8 @@ import uuidv4 from '../../../global/js/utils/uuidv4';
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
22
|
export var NotificationsIllustration = function NotificationsIllustration(_ref) {
|
23
|
-
var
|
23
|
+
var title = _ref.title,
|
24
|
+
theme = _ref.theme,
|
24
25
|
size = _ref.size,
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
27
|
var svgId = uuidv4();
|
@@ -31,7 +32,7 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
|
|
31
32
|
viewBox: "0 0 80 80",
|
32
33
|
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notification"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
34
|
role: "img"
|
34
|
-
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
|
+
}), /*#__PURE__*/React.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
36
|
id: "prefix__a_dark_".concat(svgId),
|
36
37
|
x1: 30.05,
|
37
38
|
y1: 54.31,
|
@@ -327,5 +328,6 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
|
|
327
328
|
};
|
328
329
|
NotificationsIllustration.propTypes = {
|
329
330
|
size: PropTypes.oneOf(['lg', 'sm']),
|
330
|
-
theme: PropTypes.oneOf(['light', 'dark'])
|
331
|
+
theme: PropTypes.oneOf(['light', 'dark']),
|
332
|
+
title: PropTypes.string
|
331
333
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["theme", "size"];
|
3
|
+
var _excluded = ["title", "theme", "size"];
|
4
4
|
/**
|
5
5
|
* Copyright IBM Corp. 2020, 2021
|
6
6
|
*
|
@@ -20,7 +20,8 @@ import uuidv4 from '../../../global/js/utils/uuidv4';
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
22
|
export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
23
|
-
var
|
23
|
+
var title = _ref.title,
|
24
|
+
theme = _ref.theme,
|
24
25
|
size = _ref.size,
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
27
|
var svgId = uuidv4();
|
@@ -32,7 +33,7 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
32
33
|
viewBox: "0 0 80 80",
|
33
34
|
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-unauthorized"), "".concat(blockClass, "__illustration--").concat(size)]),
|
34
35
|
role: "img"
|
35
|
-
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
36
|
+
}), /*#__PURE__*/React.createElement("title", null, title), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
36
37
|
id: "prefix__b_dark_".concat(svgId),
|
37
38
|
x1: 17.33,
|
38
39
|
y1: 40.68,
|
@@ -300,5 +301,6 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
300
301
|
};
|
301
302
|
UnauthorizedIllustration.propTypes = {
|
302
303
|
size: PropTypes.oneOf(['lg', 'sm']),
|
303
|
-
theme: PropTypes.oneOf(['light', 'dark'])
|
304
|
+
theme: PropTypes.oneOf(['light', 'dark']),
|
305
|
+
title: PropTypes.string
|
304
306
|
};
|
@@ -74,9 +74,6 @@ export var Guidebanner = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
74
74
|
_useState6 = _slicedToArray(_useState5, 2),
|
75
75
|
isCollapsed = _useState6[0],
|
76
76
|
setIsCollapsed = _useState6[1];
|
77
|
-
var handleScrollableChange = function handleScrollableChange(value) {
|
78
|
-
setShowNavigation(value);
|
79
|
-
};
|
80
77
|
var handleClickToggle = function handleClickToggle() {
|
81
78
|
setScrollPosition(0);
|
82
79
|
scrollRef.current.scrollToView(0);
|
@@ -101,9 +98,13 @@ export var Guidebanner = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
101
98
|
left: blue90,
|
102
99
|
right: purple70
|
103
100
|
},
|
104
|
-
|
105
|
-
|
106
|
-
|
101
|
+
onChangeIsScrollable: function onChangeIsScrollable(value) {
|
102
|
+
setShowNavigation(value);
|
103
|
+
},
|
104
|
+
onScroll: function onScroll(scrollPercent) {
|
105
|
+
setScrollPosition(scrollPercent);
|
106
|
+
},
|
107
|
+
ref: scrollRef
|
107
108
|
}, children), /*#__PURE__*/React.createElement("div", {
|
108
109
|
className: cx([collapsible || showNavigation ? "".concat(blockClass, "__navigation") : null])
|
109
110
|
}, collapsible && /*#__PURE__*/React.createElement(Button, {
|
@@ -122,9 +123,7 @@ export var Guidebanner = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
122
123
|
tooltipPosition: "top",
|
123
124
|
iconDescription: previousIconDescription,
|
124
125
|
onClick: function onClick() {
|
125
|
-
scrollRef.current.scrollPrev()
|
126
|
-
return setScrollPosition(scrollPercentage);
|
127
|
-
});
|
126
|
+
scrollRef.current.scrollPrev();
|
128
127
|
}
|
129
128
|
}), /*#__PURE__*/React.createElement(Button, {
|
130
129
|
kind: "ghost",
|
@@ -137,9 +136,7 @@ export var Guidebanner = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
137
136
|
tooltipAlignment: "end",
|
138
137
|
iconDescription: nextIconDescription,
|
139
138
|
onClick: function onClick() {
|
140
|
-
scrollRef.current.scrollNext()
|
141
|
-
return setScrollPosition(scrollPercentage);
|
142
|
-
});
|
139
|
+
scrollRef.current.scrollNext();
|
143
140
|
}
|
144
141
|
}))), onClose && /*#__PURE__*/React.createElement(Button, {
|
145
142
|
className: "".concat(blockClass, "__close-button"),
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright IBM Corp. 2020,
|
2
|
+
* Copyright IBM Corp. 2020, 2023
|
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.
|
@@ -15,4 +15,5 @@ export { usePreviousValue } from './usePreviousValue';
|
|
15
15
|
export { useResetCreateComponent } from './useResetCreateComponent';
|
16
16
|
export { useRetrieveStepData } from './useRetrieveStepData';
|
17
17
|
export { useValidCreateStepCount } from './useValidCreateStepCount';
|
18
|
-
export { useControllableState } from './useControllableState';
|
18
|
+
export { useControllableState } from './useControllableState';
|
19
|
+
export { usePrefix } from './usePrefix';
|
@@ -0,0 +1,11 @@
|
|
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
|
+
|
8
|
+
import pkg from '../package-settings';
|
9
|
+
export var usePrefix = function usePrefix() {
|
10
|
+
return pkg.prefix;
|
11
|
+
};
|
@@ -25,6 +25,7 @@ var defaults = {
|
|
25
25
|
CreateTearsheet: true,
|
26
26
|
CreateTearsheetStep: true,
|
27
27
|
CreateTearsheetDivider: true,
|
28
|
+
Datagrid: true,
|
28
29
|
EditInPlace: true,
|
29
30
|
EmptyState: true,
|
30
31
|
ErrorEmptyState: true,
|
@@ -65,7 +66,6 @@ var defaults = {
|
|
65
66
|
EditSidePanel: false,
|
66
67
|
CancelableTextEdit: false,
|
67
68
|
DataSpreadsheet: false,
|
68
|
-
Datagrid: false,
|
69
69
|
EditTearsheet: false,
|
70
70
|
EditTearsheetNarrow: false,
|
71
71
|
EditFullPage: false,
|
@@ -95,10 +95,7 @@ var defaults = {
|
|
95
95
|
feature: {
|
96
96
|
'a-new-feature': false,
|
97
97
|
'default-portal-target-body': true,
|
98
|
-
'Datagrid.useExpandedRow': false,
|
99
|
-
'Datagrid.useNestedRows': false,
|
100
98
|
'Datagrid.useInlineEdit': false,
|
101
|
-
'Datagrid.useActionsColumn': false,
|
102
99
|
'Datagrid.useFiltering': false,
|
103
100
|
'Datagrid.useCustomizeColumns': false,
|
104
101
|
'ExampleComponent.secondaryIcon': false,
|