@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
@@ -17,13 +17,14 @@ var react = require('@carbon/react');
|
|
17
17
|
var ErrorGenericSVG = require('./assets/ErrorGenericSVG.js');
|
18
18
|
var devtools = require('../../global/js/utils/devtools.js');
|
19
19
|
var settings = require('../../settings.js');
|
20
|
+
var Error404SVG = require('./assets/Error404SVG.js');
|
21
|
+
var Error403SVG = require('./assets/Error403SVG.js');
|
20
22
|
|
21
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
22
24
|
|
23
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
24
26
|
|
25
|
-
var
|
26
|
-
var _excluded = ["children", "className", "description", "errorLabel", "title"];
|
27
|
+
var _excluded = ["children", "className", "description", "errorLabel", "kind", "title"];
|
27
28
|
|
28
29
|
// Carbon and package components we use.
|
29
30
|
/* TODO: @import(s) of carbon components and other package components. */
|
@@ -44,9 +45,9 @@ var componentName = 'FullPageError';
|
|
44
45
|
// or assumption when a prop is not supplied.
|
45
46
|
|
46
47
|
// Default values for props
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
var defaults = {
|
49
|
+
kind: 'custom'
|
50
|
+
};
|
50
51
|
|
51
52
|
/**
|
52
53
|
* TODO: A description of the component.
|
@@ -56,8 +57,33 @@ exports.FullPageError = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
56
57
|
className = _ref.className,
|
57
58
|
description = _ref.description,
|
58
59
|
errorLabel = _ref.errorLabel,
|
60
|
+
_ref$kind = _ref.kind,
|
61
|
+
kind = _ref$kind === void 0 ? defaults.kind : _ref$kind,
|
59
62
|
title = _ref.title,
|
60
63
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
64
|
+
var errorData = {
|
65
|
+
403: {
|
66
|
+
title: 'Access denied',
|
67
|
+
description: 'You are not authorized to access the requested page. Please verify that you are logged in to the hosting environment and your access permissions are correct.',
|
68
|
+
svg: /*#__PURE__*/React__default["default"].createElement(Error403SVG.Error403SVG, {
|
69
|
+
className: index["default"]("".concat(blockClass, "__error-svg"), "".concat(blockClass, "__error-403"))
|
70
|
+
})
|
71
|
+
},
|
72
|
+
404: {
|
73
|
+
title: 'Page not found',
|
74
|
+
description: 'The page you requested has moved or is unavailable, or the specified URL is not valid. Please check the URL or search the site for the requested content.',
|
75
|
+
svg: /*#__PURE__*/React__default["default"].createElement(Error404SVG.Error404SVG, {
|
76
|
+
className: index["default"]("".concat(blockClass, "__error-svg"), "".concat(blockClass, "__error-404"))
|
77
|
+
})
|
78
|
+
},
|
79
|
+
custom: {
|
80
|
+
title: title,
|
81
|
+
description: description,
|
82
|
+
svg: /*#__PURE__*/React__default["default"].createElement(ErrorGenericSVG.ErrorGenericSVG, {
|
83
|
+
className: index["default"]("".concat(blockClass, "__error-svg"), "".concat(blockClass, "__error-custom"))
|
84
|
+
})
|
85
|
+
}
|
86
|
+
};
|
61
87
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
62
88
|
className: index["default"](blockClass,
|
63
89
|
// Apply the block class to the main HTML element
|
@@ -83,20 +109,15 @@ exports.FullPageError = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
83
109
|
className: "".concat(blockClass, "__error-title")
|
84
110
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
85
111
|
className: "".concat(blockClass, "__error-label")
|
86
|
-
}, "\u21B3 ",
|
112
|
+
}, "\u21B3 ", kind === 'custom' ? errorLabel : "Error ".concat(kind)), /*#__PURE__*/React__default["default"].createElement("span", null, errorData[kind].title)), /*#__PURE__*/React__default["default"].createElement("p", {
|
87
113
|
className: "".concat(blockClass, "__description")
|
88
|
-
}, description), children), /*#__PURE__*/React__default["default"].createElement(react.Column, {
|
114
|
+
}, description || errorData[kind].description), children), /*#__PURE__*/React__default["default"].createElement(react.Column, {
|
89
115
|
sm: 4,
|
90
116
|
md: 5,
|
91
117
|
lg: 10
|
92
118
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
93
|
-
|
94
|
-
|
95
|
-
height: '100%'
|
96
|
-
}
|
97
|
-
}, /*#__PURE__*/React__default["default"].createElement(ErrorGenericSVG.ErrorGenericSVG, {
|
98
|
-
className: "".concat(blockClass, "__error-svg")
|
99
|
-
}))))));
|
119
|
+
className: "".concat(blockClass, "__error-svg-container")
|
120
|
+
}, errorData[kind].svg)))));
|
100
121
|
});
|
101
122
|
|
102
123
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -119,13 +140,18 @@ exports.FullPageError.propTypes = {
|
|
119
140
|
*/
|
120
141
|
className: index$1["default"].string,
|
121
142
|
/**
|
122
|
-
* String that will provide the description for the error code
|
143
|
+
* String that will provide the description for the error code. <br/>
|
144
|
+
* This is optional for 403 and 404 kinds, and passing this would override their default descriptions.
|
123
145
|
*/
|
124
146
|
description: index$1["default"].string.isRequired,
|
125
147
|
/**
|
126
148
|
* String that will describe the error that occurred
|
127
149
|
*/
|
128
150
|
errorLabel: index$1["default"].string.isRequired,
|
151
|
+
/**
|
152
|
+
* The kind of error page to be displayed, default is custom
|
153
|
+
*/
|
154
|
+
kind: index$1["default"].oneOf(['custom', '403', '404']),
|
129
155
|
/**
|
130
156
|
* This will be for the main title of the FullPageError component
|
131
157
|
*/
|