@carbon/ibm-products 2.25.0 → 2.27.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +556 -63
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +50 -16
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +556 -63
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +527 -55
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/BigNumbers/BigNumbers.d.ts +11 -0
- package/es/components/BigNumbers/BigNumbers.js +238 -0
- package/es/components/BigNumbers/constants.d.ts +13 -0
- package/es/components/BigNumbers/constants.js +67 -0
- package/es/components/BigNumbers/index.d.ts +1 -0
- package/es/components/Cascade/Cascade.d.ts +19 -2
- package/es/components/Cascade/Cascade.js +12 -9
- package/es/components/Coachmark/CoachmarkTagline.js +1 -2
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +4 -3
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +3 -2
- package/es/components/DataSpreadsheet/utils/checkForHoldingKey.d.ts +1 -0
- package/es/components/DataSpreadsheet/utils/checkForHoldingKey.js +17 -0
- package/es/components/Datagrid/Datagrid/Datagrid.js +9 -2
- package/es/components/Datagrid/Datagrid/DatagridContent.d.ts +3 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +6 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +21 -8
- package/es/components/Datagrid/Datagrid/DatagridRow.js +15 -2
- package/es/components/Datagrid/Datagrid/DatagridToolbar.d.ts +10 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +21 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +32 -9
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.d.ts +3 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +4 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +35 -3
- package/es/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.d.ts +2 -0
- package/es/components/Datagrid/Datagrid/addons/Slug/{ColumnHeaderSlug.js → DatagridSlug.js} +4 -4
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +3 -3
- package/es/components/Datagrid/useSelectAllToggle.js +5 -3
- package/es/components/Datagrid/useSortableColumns.js +2 -2
- package/es/components/EmptyStates/EmptyStateContent.d.ts +1 -1
- package/es/components/FullPageError/FullPageError.js +41 -15
- package/es/components/FullPageError/assets/Error403SVG.d.ts +9 -0
- package/es/components/FullPageError/assets/Error403SVG.js +714 -0
- package/es/components/FullPageError/assets/Error404SVG.d.ts +9 -0
- package/es/components/FullPageError/assets/Error404SVG.js +623 -0
- package/es/components/HTTPErrors/HTTPErrorContent.d.ts +1 -1
- package/es/components/InterstitialScreen/InterstitialScreen.js +1 -1
- package/es/components/SidePanel/SidePanel.js +13 -6
- package/es/components/SidePanel/motion/variants.d.ts +39 -12
- package/es/components/SidePanel/motion/variants.js +42 -11
- package/es/components/StringFormatter/StringFormatter.d.ts +6 -0
- package/es/components/StringFormatter/StringFormatter.js +79 -0
- package/es/components/StringFormatter/index.d.ts +1 -0
- package/es/components/StringFormatter/utils/enums.d.ts +14 -0
- package/es/components/StringFormatter/utils/enums.js +23 -0
- package/es/components/Tearsheet/TearsheetShell.js +26 -8
- package/es/components/UserAvatar/UserAvatar.js +59 -44
- package/es/components/index.d.ts +2 -0
- package/es/global/js/hooks/index.d.ts +2 -0
- package/es/global/js/hooks/useFocus.d.ts +11 -0
- package/es/global/js/hooks/useFocus.js +76 -0
- package/es/global/js/hooks/useIsomorphicEffect.d.ts +2 -0
- package/es/global/js/hooks/useIsomorphicEffect.js +14 -0
- package/es/global/js/package-settings.d.ts +2 -0
- package/es/global/js/package-settings.js +2 -0
- package/es/index.js +2 -0
- package/es/settings.d.ts +2 -0
- package/lib/components/BigNumbers/BigNumbers.d.ts +11 -0
- package/lib/components/BigNumbers/BigNumbers.js +244 -0
- package/lib/components/BigNumbers/constants.d.ts +13 -0
- package/lib/components/BigNumbers/constants.js +76 -0
- package/lib/components/BigNumbers/index.d.ts +1 -0
- package/lib/components/Cascade/Cascade.d.ts +19 -2
- package/lib/components/Cascade/Cascade.js +12 -9
- package/lib/components/Coachmark/CoachmarkTagline.js +3 -4
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +4 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +3 -2
- package/lib/components/DataSpreadsheet/utils/checkForHoldingKey.d.ts +1 -0
- package/lib/components/DataSpreadsheet/utils/checkForHoldingKey.js +21 -0
- package/lib/components/Datagrid/Datagrid/Datagrid.js +9 -2
- package/lib/components/Datagrid/Datagrid/DatagridContent.d.ts +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +6 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +20 -7
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +14 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.d.ts +10 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +20 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +30 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.d.ts +3 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +4 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +33 -1
- package/lib/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.d.ts +2 -0
- package/lib/components/Datagrid/Datagrid/addons/Slug/{ColumnHeaderSlug.js → DatagridSlug.js} +4 -4
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +3 -3
- package/lib/components/Datagrid/useSelectAllToggle.js +4 -2
- package/lib/components/Datagrid/useSortableColumns.js +2 -2
- package/lib/components/EmptyStates/EmptyStateContent.d.ts +1 -1
- package/lib/components/FullPageError/FullPageError.js +41 -15
- package/lib/components/FullPageError/assets/Error403SVG.d.ts +9 -0
- package/lib/components/FullPageError/assets/Error403SVG.js +722 -0
- package/lib/components/FullPageError/assets/Error404SVG.d.ts +9 -0
- package/lib/components/FullPageError/assets/Error404SVG.js +631 -0
- package/lib/components/HTTPErrors/HTTPErrorContent.d.ts +1 -1
- package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -3
- package/lib/components/SidePanel/SidePanel.js +11 -4
- package/lib/components/SidePanel/motion/variants.d.ts +39 -12
- package/lib/components/SidePanel/motion/variants.js +42 -10
- package/lib/components/StringFormatter/StringFormatter.d.ts +6 -0
- package/lib/components/StringFormatter/StringFormatter.js +85 -0
- package/lib/components/StringFormatter/index.d.ts +1 -0
- package/lib/components/StringFormatter/utils/enums.d.ts +14 -0
- package/lib/components/StringFormatter/utils/enums.js +27 -0
- package/lib/components/Tearsheet/TearsheetShell.js +26 -8
- package/lib/components/UserAvatar/UserAvatar.js +59 -44
- package/lib/components/index.d.ts +2 -0
- package/lib/global/js/hooks/index.d.ts +2 -0
- package/lib/global/js/hooks/useFocus.d.ts +11 -0
- package/lib/global/js/hooks/useFocus.js +80 -0
- package/lib/global/js/hooks/useIsomorphicEffect.d.ts +2 -0
- package/lib/global/js/hooks/useIsomorphicEffect.js +18 -0
- package/lib/global/js/package-settings.d.ts +2 -0
- package/lib/global/js/package-settings.js +2 -0
- package/lib/index.js +10 -0
- package/lib/settings.d.ts +2 -0
- package/package.json +7 -7
- package/scss/components/BigNumbers/_big-numbers.scss +151 -0
- package/scss/components/BigNumbers/_carbon-imports.scss +11 -0
- package/scss/components/BigNumbers/_index-with-carbon.scss +9 -0
- package/scss/components/BigNumbers/_index.scss +8 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +19 -0
- package/scss/components/FilterSummary/_filter-summary.scss +1 -1
- package/scss/components/FullPageError/_full-page-error.scss +20 -2
- package/scss/components/ProductiveCard/_productive-card.scss +1 -1
- package/scss/components/SidePanel/_side-panel.scss +1 -1
- package/scss/components/StringFormatter/_carbon-imports.scss +10 -0
- package/scss/components/StringFormatter/_index-with-carbon.scss +9 -0
- package/scss/components/StringFormatter/_index.scss +8 -0
- package/scss/components/StringFormatter/_string-formatter.scss +97 -0
- package/scss/components/Tearsheet/_tearsheet.scss +34 -2
- package/scss/components/UserAvatar/_user-avatar.scss +47 -4
- package/scss/components/_index-with-carbon.scss +2 -0
- package/scss/components/_index.scss +2 -0
- package/es/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.d.ts +0 -2
- package/es/node_modules/@carbon/icon-helpers/es/index.js +0 -140
- package/es/node_modules/@carbon/icons-react/es/Icon.js +0 -73
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-0.js +0 -2985
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -2900
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-8.js +0 -3004
- package/es/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -14
- package/lib/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.d.ts +0 -2
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +0 -145
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +0 -81
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-0.js +0 -3117
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -3032
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-8.js +0 -3136
- package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -18
@@ -9,4 +9,6 @@ export { useRetrieveStepData } from "./useRetrieveStepData";
|
|
9
9
|
export { useValidCreateStepCount } from "./useValidCreateStepCount";
|
10
10
|
export { useControllableState } from "./useControllableState";
|
11
11
|
export { usePrefix } from "./usePrefix";
|
12
|
+
export { useFocus } from "./useFocus";
|
13
|
+
export { useIsomorphicEffect } from "./useIsomorphicEffect";
|
12
14
|
export { useNearestScroll, useWindowScroll } from "./useWindowScroll";
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 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
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
var react = require('@carbon/react');
|
13
|
+
var settings = require('../../../settings.js');
|
14
|
+
var React = require('react');
|
15
|
+
|
16
|
+
var useFocus = function useFocus(modalRef) {
|
17
|
+
var carbonPrefix = react.usePrefix();
|
18
|
+
var tearsheetBaseClass = "".concat(settings.pkg.prefix, "--tearsheet");
|
19
|
+
// Querying focusable element in the modal
|
20
|
+
// Query to exclude hidden elements in the modal from querySelectorAll() method
|
21
|
+
// feel free to include more if needed :)
|
22
|
+
var notQuery = ":not(.".concat(carbonPrefix, "--visually-hidden,.").concat(tearsheetBaseClass, "__header--no-close-icon,.").concat(carbonPrefix, "--btn--disabled,[aria-hidden=\"true\"],[tabindex=\"-1\"])");
|
23
|
+
// Queries to include element types button, input, select, textarea
|
24
|
+
var queryButton = "button".concat(notQuery);
|
25
|
+
var queryInput = "input".concat(notQuery);
|
26
|
+
var querySelect = "select".concat(notQuery);
|
27
|
+
var queryTextarea = "textarea".concat(notQuery);
|
28
|
+
var queryLink = "[href]".concat(notQuery);
|
29
|
+
// Final query
|
30
|
+
var query = "".concat(queryButton, ",").concat(queryLink, ",").concat(queryInput, ",").concat(querySelect, ",").concat(queryTextarea);
|
31
|
+
var modalEl = modalRef === null || modalRef === void 0 ? void 0 : modalRef.current;
|
32
|
+
var getFocusable = React.useCallback(function () {
|
33
|
+
// Selecting all focusable elements based on the above conditions
|
34
|
+
var focusableElements = modalEl === null || modalEl === void 0 ? void 0 : modalEl.querySelectorAll("".concat(query));
|
35
|
+
var first = focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements[0];
|
36
|
+
var last = focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements[(focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) - 1];
|
37
|
+
var all = focusableElements;
|
38
|
+
return {
|
39
|
+
first: first,
|
40
|
+
last: last,
|
41
|
+
all: all
|
42
|
+
};
|
43
|
+
}, [modalEl, query]);
|
44
|
+
React.useEffect(function () {
|
45
|
+
getFocusable();
|
46
|
+
}, [getFocusable]);
|
47
|
+
var handleKeyDown = function handleKeyDown(event) {
|
48
|
+
// Checking whether the key is tab or not
|
49
|
+
if (event.key === 'Tab') {
|
50
|
+
// updating the focusable elements list
|
51
|
+
var _getFocusable = getFocusable(),
|
52
|
+
first = _getFocusable.first,
|
53
|
+
last = _getFocusable.last,
|
54
|
+
all = _getFocusable.all;
|
55
|
+
setTimeout(function () {
|
56
|
+
var _document, _document2;
|
57
|
+
if (event.shiftKey && !Array.prototype.includes.call(all, (_document = document) === null || _document === void 0 ? void 0 : _document.activeElement)) {
|
58
|
+
// Prevents the default "Tab" behavior
|
59
|
+
event.preventDefault();
|
60
|
+
// if the user press shift+tab and the current element not in focusable items
|
61
|
+
last === null || last === void 0 || last.focus();
|
62
|
+
} else if (!Array.prototype.includes.call(all, (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.activeElement)) {
|
63
|
+
event.preventDefault();
|
64
|
+
// user pressing tab key only then
|
65
|
+
// focusing the first element if the current element is not in focusable items
|
66
|
+
first === null || first === void 0 || first.focus();
|
67
|
+
}
|
68
|
+
}, 0);
|
69
|
+
}
|
70
|
+
};
|
71
|
+
return {
|
72
|
+
firstElement: getFocusable().first,
|
73
|
+
lastElement: getFocusable().last,
|
74
|
+
allElements: getFocusable().all,
|
75
|
+
keyDownListener: handleKeyDown,
|
76
|
+
getFocusable: getFocusable
|
77
|
+
};
|
78
|
+
};
|
79
|
+
|
80
|
+
exports.useFocus = useFocus;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 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
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
var React = require('react');
|
13
|
+
|
14
|
+
// Originally from `@carbon/react`, https://github.com/carbon-design-system/carbon/blob/main/packages/react/src/internal/useIsomorphicEffect.js
|
15
|
+
// useLayoutEffect on the client, useEffect on the server
|
16
|
+
var useIsomorphicEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
17
|
+
|
18
|
+
exports.useIsomorphicEffect = useIsomorphicEffect;
|
@@ -75,9 +75,11 @@ declare namespace defaults {
|
|
75
75
|
let EditTearsheetNarrow: boolean;
|
76
76
|
let EditFullPage: boolean;
|
77
77
|
let EditUpdateCards: boolean;
|
78
|
+
let BigNumbers: boolean;
|
78
79
|
let TruncatedList: boolean;
|
79
80
|
let DelimitedList: boolean;
|
80
81
|
let FullPageError: boolean;
|
82
|
+
let StringFormatter: boolean;
|
81
83
|
let Coachmark: boolean;
|
82
84
|
let CoachmarkBeacon: boolean;
|
83
85
|
let CoachmarkButton: boolean;
|
@@ -78,9 +78,11 @@ var defaults = {
|
|
78
78
|
EditTearsheetNarrow: false,
|
79
79
|
EditFullPage: false,
|
80
80
|
EditUpdateCards: false,
|
81
|
+
BigNumbers: false,
|
81
82
|
TruncatedList: false,
|
82
83
|
DelimitedList: false,
|
83
84
|
FullPageError: false,
|
85
|
+
StringFormatter: false,
|
84
86
|
/* new component flags here - comment used by generate CLI */
|
85
87
|
|
86
88
|
// Novice to pro components not yet reviewed and released:
|
package/lib/index.js
CHANGED
@@ -103,6 +103,7 @@ var InlineTip = require('./components/InlineTip/InlineTip.js');
|
|
103
103
|
var InlineTipButton = require('./components/InlineTip/InlineTipButton.js');
|
104
104
|
var InlineTipLink = require('./components/InlineTip/InlineTipLink.js');
|
105
105
|
var NonLinearReading = require('./components/NonLinearReading/NonLinearReading.js');
|
106
|
+
var BigNumbers = require('./components/BigNumbers/BigNumbers.js');
|
106
107
|
var TruncatedList = require('./components/TruncatedList/TruncatedList.js');
|
107
108
|
var InterstitialScreen = require('./components/InterstitialScreen/InterstitialScreen.js');
|
108
109
|
var InterstitialScreenView = require('./components/InterstitialScreenView/InterstitialScreenView.js');
|
@@ -110,6 +111,7 @@ var InterstitialScreenViewModule = require('./components/InterstitialScreenViewM
|
|
110
111
|
var DelimitedList = require('./components/DelimitedList/DelimitedList.js');
|
111
112
|
var FullPageError = require('./components/FullPageError/FullPageError.js');
|
112
113
|
var SearchBar = require('./components/SearchBar/SearchBar.js');
|
114
|
+
var StringFormatter = require('./components/StringFormatter/StringFormatter.js');
|
113
115
|
var UserAvatar = require('./components/UserAvatar/UserAvatar.js');
|
114
116
|
|
115
117
|
|
@@ -422,6 +424,10 @@ Object.defineProperty(exports, 'NonLinearReading', {
|
|
422
424
|
enumerable: true,
|
423
425
|
get: function () { return NonLinearReading.NonLinearReading; }
|
424
426
|
});
|
427
|
+
Object.defineProperty(exports, 'BigNumbers', {
|
428
|
+
enumerable: true,
|
429
|
+
get: function () { return BigNumbers.BigNumbers; }
|
430
|
+
});
|
425
431
|
Object.defineProperty(exports, 'TruncatedList', {
|
426
432
|
enumerable: true,
|
427
433
|
get: function () { return TruncatedList.TruncatedList; }
|
@@ -450,6 +456,10 @@ Object.defineProperty(exports, 'SearchBar', {
|
|
450
456
|
enumerable: true,
|
451
457
|
get: function () { return SearchBar.SearchBar; }
|
452
458
|
});
|
459
|
+
Object.defineProperty(exports, 'StringFormatter', {
|
460
|
+
enumerable: true,
|
461
|
+
get: function () { return StringFormatter.StringFormatter; }
|
462
|
+
});
|
453
463
|
Object.defineProperty(exports, 'UserAvatar', {
|
454
464
|
enumerable: true,
|
455
465
|
get: function () { return UserAvatar.UserAvatar; }
|
package/lib/settings.d.ts
CHANGED
@@ -61,9 +61,11 @@ export const pkg: {
|
|
61
61
|
EditTearsheetNarrow: boolean;
|
62
62
|
EditFullPage: boolean;
|
63
63
|
EditUpdateCards: boolean;
|
64
|
+
BigNumbers: boolean;
|
64
65
|
TruncatedList: boolean;
|
65
66
|
DelimitedList: boolean;
|
66
67
|
FullPageError: boolean;
|
68
|
+
StringFormatter: boolean;
|
67
69
|
Coachmark: boolean;
|
68
70
|
CoachmarkBeacon: boolean;
|
69
71
|
CoachmarkButton: boolean;
|
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.
|
4
|
+
"version": "2.27.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -75,7 +75,7 @@
|
|
75
75
|
"fs-extra": "^11.2.0",
|
76
76
|
"glob": "^10.3.10",
|
77
77
|
"jest": "^29.7.0",
|
78
|
-
"jest-config-ibm-cloud-cognitive": "^1.1.
|
78
|
+
"jest-config-ibm-cloud-cognitive": "^1.1.4",
|
79
79
|
"jest-environment-jsdom": "^29.7.0",
|
80
80
|
"namor": "^1.1.2",
|
81
81
|
"npm-check-updates": "^16.14.12",
|
@@ -84,12 +84,12 @@
|
|
84
84
|
"rollup": "^2.79.1",
|
85
85
|
"rollup-plugin-strip-banner": "^3.0.0",
|
86
86
|
"sass": "^1.70.0",
|
87
|
-
"typescript-config-carbon": "^0.2.
|
87
|
+
"typescript-config-carbon": "^0.2.1",
|
88
88
|
"yargs": "^17.7.2"
|
89
89
|
},
|
90
90
|
"dependencies": {
|
91
91
|
"@babel/runtime": "^7.23.9",
|
92
|
-
"@carbon/ibm-products-styles": "^2.
|
92
|
+
"@carbon/ibm-products-styles": "^2.26.0",
|
93
93
|
"@carbon/telemetry": "^0.1.0",
|
94
94
|
"@dnd-kit/core": "^6.0.8",
|
95
95
|
"@dnd-kit/sortable": "^8.0.0",
|
@@ -106,11 +106,11 @@
|
|
106
106
|
"@carbon/grid": "^11.21.1",
|
107
107
|
"@carbon/layout": "^11.20.1",
|
108
108
|
"@carbon/motion": "^11.16.1",
|
109
|
-
"@carbon/react": "^1.
|
110
|
-
"@carbon/themes": "^11.
|
109
|
+
"@carbon/react": "^1.50.0",
|
110
|
+
"@carbon/themes": "^11.31.0",
|
111
111
|
"@carbon/type": "^11.25.1",
|
112
112
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
113
113
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
114
114
|
},
|
115
|
-
"gitHead": "
|
115
|
+
"gitHead": "c42c0c622d6ad2a1dfc2e2122d0dd53337780243"
|
116
116
|
}
|
@@ -0,0 +1,151 @@
|
|
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
|
+
|
8
|
+
// Standard imports.
|
9
|
+
@use '../../global/styles/project-settings' as c4p-settings;
|
10
|
+
@use '@carbon/styles/scss/theme' as *;
|
11
|
+
@use '@carbon/styles/scss/type' as *;
|
12
|
+
@use '../../global/styles/mixins';
|
13
|
+
@use '@carbon/react/scss/spacing' as *;
|
14
|
+
@use '@carbon/styles/scss/utilities';
|
15
|
+
|
16
|
+
// Other Carbon settings if needed
|
17
|
+
// TODO: @use '@carbon/styles/scss/grid';
|
18
|
+
// or
|
19
|
+
// TODO: @use '@carbon/react/scss/grid';
|
20
|
+
// BigNumbers uses the following Carbon for IBM Products components:
|
21
|
+
// TODO: @use(s) of IBM Products component styles used by BigNumbers
|
22
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
23
|
+
$block-class: #{c4p-settings.$pkg-prefix}--big-numbers;
|
24
|
+
$skeleton-block-class: #{c4p-settings.$pkg-prefix}--big-numbers-skeleton;
|
25
|
+
|
26
|
+
.#{$block-class}__label {
|
27
|
+
@include type-style('label-01');
|
28
|
+
|
29
|
+
display: block;
|
30
|
+
margin: 0;
|
31
|
+
color: $text-secondary;
|
32
|
+
}
|
33
|
+
|
34
|
+
.#{$block-class}__value {
|
35
|
+
@include type-style('heading-04');
|
36
|
+
|
37
|
+
margin-bottom: 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
.#{$block-class}__total {
|
41
|
+
@include type-style('body-compact-01');
|
42
|
+
}
|
43
|
+
|
44
|
+
.#{$block-class}__total,
|
45
|
+
.#{$block-class}__percentage-mark {
|
46
|
+
margin-top: auto;
|
47
|
+
margin-bottom: $spacing-02;
|
48
|
+
}
|
49
|
+
|
50
|
+
.#{$block-class}__info {
|
51
|
+
vertical-align: top;
|
52
|
+
}
|
53
|
+
|
54
|
+
.#{$block-class}__trend {
|
55
|
+
margin-top: $spacing-03;
|
56
|
+
vertical-align: top;
|
57
|
+
}
|
58
|
+
|
59
|
+
.#{$block-class}__row {
|
60
|
+
display: flex;
|
61
|
+
}
|
62
|
+
|
63
|
+
.#{$block-class}__info {
|
64
|
+
padding-left: $spacing-03;
|
65
|
+
}
|
66
|
+
|
67
|
+
.#{$block-class}__percentage {
|
68
|
+
@include type-style('heading-04');
|
69
|
+
}
|
70
|
+
|
71
|
+
.#{$block-class}__percentage-mark {
|
72
|
+
@include type-style('body-compact-01');
|
73
|
+
}
|
74
|
+
|
75
|
+
.#{$block-class}--lg .#{$block-class}__value,
|
76
|
+
.#{$block-class}--lg .#{$block-class}__percentage {
|
77
|
+
@include type-style('heading-06');
|
78
|
+
}
|
79
|
+
|
80
|
+
.#{$block-class}--lg .#{$block-class}__total,
|
81
|
+
.#{$block-class}--lg .#{$block-class}__percentage-mark {
|
82
|
+
@include type-style('heading-03');
|
83
|
+
}
|
84
|
+
|
85
|
+
.#{$block-class}--xl .#{$block-class}__label {
|
86
|
+
@include type-style('body-compact-01');
|
87
|
+
}
|
88
|
+
|
89
|
+
.#{$block-class}--xl .#{$block-class}__value,
|
90
|
+
.#{$block-class}--xl .#{$block-class}__percentage {
|
91
|
+
@include type-style('heading-07');
|
92
|
+
}
|
93
|
+
|
94
|
+
.#{$block-class}--xl .#{$block-class}__total,
|
95
|
+
.#{$block-class}--xl .#{$block-class}__percentage-mark {
|
96
|
+
@include type-style('heading-04');
|
97
|
+
}
|
98
|
+
|
99
|
+
.#{$block-class}--xl .#{$block-class}__trend {
|
100
|
+
margin-top: $spacing-04;
|
101
|
+
}
|
102
|
+
|
103
|
+
.#{$skeleton-block-class} {
|
104
|
+
width: 4rem;
|
105
|
+
}
|
106
|
+
|
107
|
+
.#{$skeleton-block-class}__label {
|
108
|
+
height: $spacing-04;
|
109
|
+
margin-top: 0;
|
110
|
+
margin-bottom: $spacing-03;
|
111
|
+
}
|
112
|
+
|
113
|
+
.#{$skeleton-block-class}__value {
|
114
|
+
/* stylelint-disable-next-line declaration-no-important */
|
115
|
+
height: $spacing-08 !important;
|
116
|
+
margin: 0;
|
117
|
+
}
|
118
|
+
|
119
|
+
.#{$skeleton-block-class}--lg {
|
120
|
+
width: 5rem;
|
121
|
+
}
|
122
|
+
|
123
|
+
.#{$skeleton-block-class}--xl {
|
124
|
+
width: 6rem;
|
125
|
+
}
|
126
|
+
|
127
|
+
.#{$skeleton-block-class}.#{$skeleton-block-class}--lg
|
128
|
+
.#{$skeleton-block-class}__label {
|
129
|
+
height: $spacing-04;
|
130
|
+
}
|
131
|
+
|
132
|
+
.#{$skeleton-block-class}.#{$skeleton-block-class}--lg
|
133
|
+
.#{$skeleton-block-class}__value {
|
134
|
+
/* stylelint-disable-next-line declaration-no-important */
|
135
|
+
height: $spacing-09 !important;
|
136
|
+
}
|
137
|
+
|
138
|
+
.#{$skeleton-block-class}.#{$skeleton-block-class}--xl
|
139
|
+
.#{$skeleton-block-class}__label {
|
140
|
+
height: $spacing-04;
|
141
|
+
}
|
142
|
+
|
143
|
+
.#{$skeleton-block-class}.#{$skeleton-block-class}--xl
|
144
|
+
.#{$skeleton-block-class}__value {
|
145
|
+
/* stylelint-disable-next-line declaration-no-important */
|
146
|
+
height: $spacing-10 !important;
|
147
|
+
}
|
148
|
+
|
149
|
+
.#{$block-class} .#{$block-class}__tooltip-trigger:focus {
|
150
|
+
outline: 1px solid $focus;
|
151
|
+
}
|
@@ -0,0 +1,11 @@
|
|
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
|
+
|
8
|
+
// Import any Carbon component styles used from BigNumbers in this file.
|
9
|
+
// BigNumbers uses the following Carbon components:
|
10
|
+
@use '@carbon/react/scss/components/skeleton-styles';
|
11
|
+
@use '@carbon/react/scss/components/tooltip';
|
@@ -162,6 +162,15 @@
|
|
162
162
|
@include ai-gradient('top', 100%);
|
163
163
|
}
|
164
164
|
|
165
|
+
.#{$block-class}
|
166
|
+
.#{c4p-settings.$carbon-prefix}--data-table
|
167
|
+
tbody
|
168
|
+
tr:has(> .#{$block-class}__table-row-ai-enabled) {
|
169
|
+
@include ai-gradient('left', 50%);
|
170
|
+
|
171
|
+
background-attachment: fixed;
|
172
|
+
}
|
173
|
+
|
165
174
|
.#{$block-class}
|
166
175
|
th.#{$block-class}__with-slug
|
167
176
|
.#{c4p-settings.$carbon-prefix}--slug {
|
@@ -791,3 +800,13 @@
|
|
791
800
|
.#{$block-class} .#{$block-class}__col-resizer-range::-moz-range-thumb {
|
792
801
|
visibility: hidden;
|
793
802
|
}
|
803
|
+
|
804
|
+
.#{$block-class} .#{$block-class}__table-row-ai-enabled {
|
805
|
+
display: flex;
|
806
|
+
align-items: center;
|
807
|
+
}
|
808
|
+
|
809
|
+
.#{$block-class} .#{$block-class}__table-row-ai-spacer,
|
810
|
+
.#{$block-class} .#{$block-class}__table-row-ai-enabled {
|
811
|
+
width: $spacing-05;
|
812
|
+
}
|
@@ -17,7 +17,7 @@ $block-class: #{$pkg-prefix}--filter-summary;
|
|
17
17
|
width: 100%;
|
18
18
|
/* stylelint-disable-next-line -- to-rem carbon replacement for rem */
|
19
19
|
height: to-rem(48px);
|
20
|
-
align-items: start;
|
20
|
+
align-items: flex-start;
|
21
21
|
padding: $spacing-03;
|
22
22
|
border-top: 1px solid $border-subtle-01;
|
23
23
|
background: $layer-01;
|
@@ -43,8 +43,14 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
43
43
|
padding: 0 $spacing-07 0 0;
|
44
44
|
}
|
45
45
|
}
|
46
|
-
|
47
|
-
|
46
|
+
|
47
|
+
.#{$block-class}__error-svg-container {
|
48
|
+
display: flex;
|
49
|
+
height: 100%;
|
50
|
+
padding: $spacing-03 $spacing-03 $spacing-11 $spacing-03;
|
51
|
+
@include breakpoint(md) {
|
52
|
+
padding: auto $spacing-03 $spacing-11 $spacing-03;
|
53
|
+
}
|
48
54
|
}
|
49
55
|
|
50
56
|
.#{$block-class}__error-label,
|
@@ -53,6 +59,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
53
59
|
}
|
54
60
|
|
55
61
|
.#{$block-class}__error-label {
|
62
|
+
display: block;
|
56
63
|
color: $text-error;
|
57
64
|
}
|
58
65
|
.#{$block-class}__error-title {
|
@@ -64,3 +71,14 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
64
71
|
|
65
72
|
margin-bottom: $spacing-07;
|
66
73
|
}
|
74
|
+
|
75
|
+
// safari rendering fix
|
76
|
+
.#{$block-class}__error-svg-container svg.#{$block-class}__error-svg {
|
77
|
+
width: 100%;
|
78
|
+
}
|
79
|
+
|
80
|
+
// svg theme styles
|
81
|
+
.#{$block-class}__error-svg-container svg.#{$block-class}__error-svg path {
|
82
|
+
fill: $background;
|
83
|
+
stroke: $border-inverse;
|
84
|
+
}
|
@@ -353,7 +353,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
353
353
|
}
|
354
354
|
|
355
355
|
.#{$block-class}__slug-and-close {
|
356
|
-
position:
|
356
|
+
position: absolute;
|
357
357
|
z-index: 10; /* must be higher than title container border bottom */
|
358
358
|
top: 0;
|
359
359
|
right: 0;
|
@@ -0,0 +1,10 @@
|
|
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
|
+
|
8
|
+
// Import any Carbon component styles used from StringFormatter in this file.
|
9
|
+
// StringFormatter uses the following Carbon components:
|
10
|
+
@use '@carbon/react/scss/components/tooltip';
|
@@ -0,0 +1,97 @@
|
|
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
|
+
|
8
|
+
// Standard imports.
|
9
|
+
@use '../../global/styles/project-settings' as c4p-settings;
|
10
|
+
@use '../../global/styles/mixins';
|
11
|
+
@use '@carbon/styles/scss/type';
|
12
|
+
@use '@carbon/styles/scss/spacing' as *;
|
13
|
+
// Other Carbon settings if needed
|
14
|
+
// TODO: @use '@carbon/styles/scss/grid';
|
15
|
+
// or
|
16
|
+
// TODO: @use '@carbon/react/scss/grid';
|
17
|
+
|
18
|
+
// StringFormatter uses the following Carbon for IBM Products components:
|
19
|
+
// TODO: @use(s) of IBM Products component styles used by StringFormatter
|
20
|
+
|
21
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
|
+
$block-class: #{c4p-settings.$pkg-prefix}--string-formatter;
|
23
|
+
$popover-block-class: #{c4p-settings.$carbon-prefix}--popover;
|
24
|
+
|
25
|
+
.#{$block-class} {
|
26
|
+
display: inline-block;
|
27
|
+
text-align: left;
|
28
|
+
}
|
29
|
+
|
30
|
+
.#{$block-class}--content {
|
31
|
+
display: inline-block;
|
32
|
+
text-align: left;
|
33
|
+
}
|
34
|
+
|
35
|
+
.#{$block-class}--truncate {
|
36
|
+
display: -webkit-box;
|
37
|
+
overflow: hidden;
|
38
|
+
max-width: 80ch;
|
39
|
+
-webkit-box-orient: vertical;
|
40
|
+
-webkit-line-clamp: 1;
|
41
|
+
}
|
42
|
+
|
43
|
+
.#{$block-class}__tooltip > button {
|
44
|
+
border-width: 0;
|
45
|
+
color: currentColor;
|
46
|
+
font-size: inherit;
|
47
|
+
font-weight: inherit;
|
48
|
+
line-height: inherit;
|
49
|
+
}
|
50
|
+
|
51
|
+
.#{$popover-block-class} {
|
52
|
+
max-width: $spacing-05;
|
53
|
+
margin: 0 auto;
|
54
|
+
}
|
55
|
+
|
56
|
+
.#{$block-class} .#{$popover-block-class}-content {
|
57
|
+
max-inline-size: 20rem;
|
58
|
+
}
|
59
|
+
|
60
|
+
.#{$block-class} .#{$popover-block-class}--left .#{$popover-block-class},
|
61
|
+
.#{$block-class} .#{$popover-block-class}--left-bottom .#{$popover-block-class},
|
62
|
+
.#{$block-class} .#{$popover-block-class}--left-top .#{$popover-block-class} {
|
63
|
+
margin: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
.#{$block-class} .#{$popover-block-class}--right .#{$popover-block-class},
|
67
|
+
.#{$block-class}
|
68
|
+
.#{$popover-block-class}--right-bottom
|
69
|
+
.#{$popover-block-class},
|
70
|
+
.#{$block-class} .#{$popover-block-class}--right-top .#{$popover-block-class} {
|
71
|
+
margin-right: 0;
|
72
|
+
margin-left: auto;
|
73
|
+
}
|
74
|
+
|
75
|
+
.#{$block-class} .#{$popover-block-class}--top .#{$popover-block-class}-caret,
|
76
|
+
.#{$block-class}
|
77
|
+
.#{$popover-block-class}--top-left
|
78
|
+
.#{$popover-block-class}-caret,
|
79
|
+
.#{$block-class}
|
80
|
+
.#{$popover-block-class}--top-right
|
81
|
+
.#{$popover-block-class}-caret {
|
82
|
+
/* stylelint-disable-next-line declaration-no-important */
|
83
|
+
inset-block-start: -1px !important;
|
84
|
+
}
|
85
|
+
|
86
|
+
.#{$block-class}
|
87
|
+
.#{$popover-block-class}--bottom
|
88
|
+
.#{$popover-block-class}-caret,
|
89
|
+
.#{$block-class}
|
90
|
+
.#{$popover-block-class}--bottom-left
|
91
|
+
.#{$popover-block-class}-caret,
|
92
|
+
.#{$block-class}
|
93
|
+
.#{$popover-block-class}--bottom-right
|
94
|
+
.#{$popover-block-class}-caret {
|
95
|
+
/* stylelint-disable-next-line declaration-no-important */
|
96
|
+
inset-block-end: -1px !important;
|
97
|
+
}
|