@carbon/ibm-products 1.69.0 → 1.70.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +17 -5
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +4 -4
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +16 -5
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +3 -3
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +17 -5
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +4 -4
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +17 -5
- package/css/index.css.map +1 -1
- package/css/index.min.css +4 -4
- package/css/index.min.css.map +1 -1
- package/es/components/ButtonMenu/ButtonMenu.js +11 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +9 -8
- package/es/components/Datagrid/Datagrid/DatagridRow.js +6 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +14 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +21 -10
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +6 -8
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -6
- package/es/components/Datagrid/useActionsColumn.js +18 -14
- package/es/components/Datagrid/useFiltering.js +3 -1
- package/es/components/Datagrid/useNestedRowExpander.js +2 -2
- package/es/components/Datagrid/useRowIsMouseOver.js +3 -1
- package/es/components/Datagrid/utils/filterPropsForTesting.js +150 -0
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +9 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +8 -3
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +8 -3
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +8 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +8 -3
- package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -6
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -6
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -6
- package/es/components/FilterSummary/FilterSummary.js +19 -15
- package/es/components/InterstitialScreen/InterstitialScreen.js +8 -7
- package/lib/components/ButtonMenu/ButtonMenu.js +11 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +9 -8
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +6 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +14 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +21 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -6
- package/lib/components/Datagrid/useActionsColumn.js +17 -13
- package/lib/components/Datagrid/useFiltering.js +2 -0
- package/lib/components/Datagrid/useNestedRowExpander.js +1 -1
- package/lib/components/Datagrid/useRowIsMouseOver.js +3 -1
- package/lib/components/Datagrid/utils/filterPropsForTesting.js +159 -0
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +9 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +8 -3
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +8 -3
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +8 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +8 -3
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -6
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -6
- package/lib/components/FilterSummary/FilterSummary.js +18 -14
- package/lib/components/InterstitialScreen/InterstitialScreen.js +8 -6
- package/package.json +2 -2
- package/scss/components/Datagrid/_datagrid.scss +9 -1
- package/scss/components/Datagrid/styles/_datagrid.scss +10 -4
- package/scss/components/InterstitialScreen/_interstitial-screen.scss +1 -0
- package/scss/components/SidePanel/_side-panel.scss +5 -1
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
7
7
|
});
|
8
8
|
exports.default = void 0;
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
11
12
|
var _carbonComponentsReact = require("carbon-components-react");
|
@@ -15,7 +16,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
16
|
var _TagSet = require("../TagSet");
|
16
17
|
var _settings = require("../../settings");
|
17
18
|
var _uuidv = _interopRequireDefault(require("../../global/js/utils/uuidv4"));
|
18
|
-
var
|
19
|
+
var _devtools = require("../../global/js/utils/devtools");
|
20
|
+
var _excluded = ["className", "clearFiltersText", "clearFilters", "filters", "renderLabel", "overflowType", "clearButtonInline"],
|
21
|
+
_excluded2 = ["key", "value"];
|
19
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
20
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
21
24
|
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; }
|
@@ -27,35 +30,36 @@ var FilterSummary = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
|
|
27
30
|
className = _ref$className === void 0 ? '' : _ref$className,
|
28
31
|
_ref$clearFiltersText = _ref.clearFiltersText,
|
29
32
|
clearFiltersText = _ref$clearFiltersText === void 0 ? 'Clear filters' : _ref$clearFiltersText,
|
30
|
-
|
31
|
-
|
32
|
-
_ref$filters = _ref.filters,
|
33
|
-
filters = _ref$filters === void 0 ? [] : _ref$filters,
|
33
|
+
clearFilters = _ref.clearFilters,
|
34
|
+
filters = _ref.filters,
|
34
35
|
_ref$renderLabel = _ref.renderLabel,
|
35
36
|
renderLabel = _ref$renderLabel === void 0 ? null : _ref$renderLabel,
|
36
37
|
_ref$overflowType = _ref.overflowType,
|
37
38
|
overflowType = _ref$overflowType === void 0 ? 'default' : _ref$overflowType,
|
38
39
|
_ref$clearButtonInlin = _ref.clearButtonInline,
|
39
|
-
clearButtonInline = _ref$clearButtonInlin === void 0 ? true : _ref$clearButtonInlin
|
40
|
+
clearButtonInline = _ref$clearButtonInlin === void 0 ? true : _ref$clearButtonInlin,
|
41
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
40
42
|
var filterSummaryId = "".concat(blockClass, "__").concat((0, _uuidv.default)());
|
41
43
|
var tagFilters = filters.map(function (_ref2) {
|
42
44
|
var _renderLabel;
|
43
45
|
var key = _ref2.key,
|
44
46
|
value = _ref2.value,
|
45
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2,
|
47
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
46
48
|
return _objectSpread(_objectSpread({}, rest), {}, {
|
47
49
|
type: 'gray',
|
48
|
-
label: (_renderLabel = renderLabel === null || renderLabel === void 0 ? void 0 : renderLabel(key, value)) !== null && _renderLabel !== void 0 ? _renderLabel : "".concat(key, ": ").concat(value)
|
50
|
+
label: (_renderLabel = renderLabel === null || renderLabel === void 0 ? void 0 : renderLabel(key, value)) !== null && _renderLabel !== void 0 ? _renderLabel : "".concat(key, ": ").concat(value),
|
51
|
+
title: clearFiltersText
|
49
52
|
});
|
50
53
|
});
|
51
54
|
var filterSummaryClearButton = (0, _react.useRef)();
|
52
55
|
var filterSummaryRef = (0, _react.useRef)();
|
53
|
-
var localRef =
|
54
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
55
|
-
ref: localRef,
|
56
|
-
className: (0, _classnames.default)([blockClass, className]),
|
56
|
+
var localRef = ref || filterSummaryRef;
|
57
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, (0, _devtools.getDevtoolsProps)(componentName), {
|
57
58
|
id: filterSummaryId
|
58
|
-
},
|
59
|
+
}, rest, {
|
60
|
+
ref: localRef,
|
61
|
+
className: (0, _classnames.default)([blockClass, className])
|
62
|
+
}), /*#__PURE__*/_react.default.createElement(_TagSet.TagSet, {
|
59
63
|
allTagsModalSearchLabel: "Search all tags",
|
60
64
|
allTagsModalSearchPlaceholderText: "Search all tags",
|
61
65
|
allTagsModalTitle: "All tags",
|
@@ -76,7 +80,7 @@ var componentName = 'FilterSummary';
|
|
76
80
|
FilterSummary.displayName = componentName;
|
77
81
|
FilterSummary.propTypes = {
|
78
82
|
className: _propTypes.default.string,
|
79
|
-
clearButtonInline: _propTypes.default.
|
83
|
+
clearButtonInline: _propTypes.default.bool,
|
80
84
|
clearFilters: _propTypes.default.func.isRequired,
|
81
85
|
clearFiltersText: _propTypes.default.string,
|
82
86
|
filters: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
@@ -57,7 +57,10 @@ var defaults = {
|
|
57
57
|
};
|
58
58
|
|
59
59
|
/**
|
60
|
-
*
|
60
|
+
* InterstitialScreen can be a full page or an overlay, and are
|
61
|
+
* shown on the first time a user accesses a new experience
|
62
|
+
* (e.g. upon first login or first time opening a page where a
|
63
|
+
* newly purchased capability is presented).
|
61
64
|
*/
|
62
65
|
var InterstitialScreen = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
63
66
|
var _media$breakpoints, _media$breakpoints2;
|
@@ -151,7 +154,7 @@ var InterstitialScreen = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
151
154
|
}, [isOpen, progStep]);
|
152
155
|
(0, _react.useEffect)(function () {
|
153
156
|
var _nextButtonRef$curren;
|
154
|
-
//for modal only, "is-visible" triggers animation
|
157
|
+
// for modal only, "is-visible" triggers animation
|
155
158
|
setIsVisibleClass(!isFullScreen && isOpen ? 'is-visible' : null);
|
156
159
|
nextButtonRef === null || nextButtonRef === void 0 ? void 0 : (_nextButtonRef$curren = nextButtonRef.current) === null || _nextButtonRef$curren === void 0 ? void 0 : _nextButtonRef$curren.focus();
|
157
160
|
}, [isFullScreen, isOpen]);
|
@@ -175,11 +178,10 @@ var InterstitialScreen = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
175
178
|
var domainProductDelimiter = domainName !== '' && productName !== '' ? ' | ' : '';
|
176
179
|
var renderModal = function renderModal(childElements) {
|
177
180
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ComposedModal, (0, _extends2.default)({}, rest, {
|
178
|
-
|
179
|
-
|
181
|
+
preventCloseOnClickOutside: true,
|
182
|
+
className: (0, _classnames.default)(blockClass,
|
183
|
+
// Apply the block class to the main HTML element
|
180
184
|
className // Apply any supplied class names to the main HTML element.
|
181
|
-
// variantClass,
|
182
|
-
// isVisibleClass
|
183
185
|
),
|
184
186
|
|
185
187
|
size: "lg",
|
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.
|
4
|
+
"version": "1.70.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -97,5 +97,5 @@
|
|
97
97
|
"react": "^16.8.6 || ^17.0.1",
|
98
98
|
"react-dom": "^16.8.6 || ^17.0.1"
|
99
99
|
},
|
100
|
-
"gitHead": "
|
100
|
+
"gitHead": "6d7df818e1c885de18818e6a173eab60209186d8"
|
101
101
|
}
|
@@ -50,10 +50,18 @@
|
|
50
50
|
}
|
51
51
|
}
|
52
52
|
|
53
|
-
|
53
|
+
.#{$carbon-prefix}--overflow-menu-options
|
54
|
+
> .c4p--datagrid__row-size-dropdown {
|
54
55
|
left: $spacing-01;
|
55
56
|
width: 112px;
|
56
57
|
}
|
58
|
+
|
59
|
+
.#{$block-class} .#{$carbon-prefix}--pagination,
|
60
|
+
.#{$block-class}
|
61
|
+
.#{$carbon-prefix}--pagination
|
62
|
+
.#{$carbon-prefix}--select-input {
|
63
|
+
background-color: $ui-02;
|
64
|
+
}
|
57
65
|
}
|
58
66
|
|
59
67
|
@include exports('datagrid') {
|
@@ -182,6 +182,12 @@
|
|
182
182
|
overflow-x: auto;
|
183
183
|
}
|
184
184
|
|
185
|
+
.#{$block-class}-filter-panel
|
186
|
+
+ .#{$block-class}__table-container-inner
|
187
|
+
.#{$carbon-prefix}--data-table-content {
|
188
|
+
height: fit-content;
|
189
|
+
}
|
190
|
+
|
185
191
|
table.#{$block-class}__table-simple {
|
186
192
|
display: flex;
|
187
193
|
overflow: auto;
|
@@ -353,22 +359,22 @@
|
|
353
359
|
.#{$block-class}
|
354
360
|
.#{$block-class}__carbon-row
|
355
361
|
.#{$block-class}__actions-column-cell-non-sticky
|
356
|
-
.#{$carbon-prefix}--
|
362
|
+
.#{$carbon-prefix}--btn--icon-only {
|
357
363
|
opacity: 0;
|
358
364
|
}
|
359
365
|
|
360
366
|
.#{$block-class}
|
361
367
|
.#{$block-class}__carbon-row:hover
|
362
368
|
.#{$block-class}__actions-column-cell-non-sticky
|
363
|
-
.#{$carbon-prefix}--
|
369
|
+
.#{$carbon-prefix}--btn--icon-only,
|
364
370
|
.#{$block-class}
|
365
371
|
.#{$block-class}__carbon-row
|
366
372
|
.#{$block-class}__actions-column-cell-non-sticky
|
367
|
-
.#{$carbon-prefix}--
|
373
|
+
.#{$carbon-prefix}--btn--icon-only:focus,
|
368
374
|
.#{$block-class}
|
369
375
|
.#{$block-class}__carbon-row
|
370
376
|
.#{$block-class}__actions-column-cell-non-sticky
|
371
|
-
.#{$carbon-prefix}--
|
377
|
+
.#{$carbon-prefix}--btn--icon-only[aria-expanded='true'] {
|
372
378
|
opacity: 1;
|
373
379
|
}
|
374
380
|
|
@@ -112,9 +112,13 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
|
|
112
112
|
var(--#{$block-class}--title-container-height) -
|
113
113
|
var(--#{$block-class}--label-text-height)
|
114
114
|
);
|
115
|
-
padding: $spacing-05
|
115
|
+
padding: $spacing-05;
|
116
116
|
background-color: $ui-01;
|
117
117
|
|
118
|
+
&:has(~ .#{$block-class}__subtitle-text) {
|
119
|
+
padding-bottom: $spacing-03;
|
120
|
+
}
|
121
|
+
|
118
122
|
&::before {
|
119
123
|
@include setDividerStyles();
|
120
124
|
}
|