@carbon/ibm-products 2.35.0 → 2.36.0-alpha.27
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +957 -567
- 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 +67 -74
- 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 +227 -206
- 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 +443 -247
- 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/Coachmark/utils/enums.d.ts +36 -22
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
- package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/es/components/CreateFullPage/CreateFullPage.js +12 -8
- package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/es/components/EditFullPage/EditFullPage.js +3 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/es/components/FullPageError/FullPageError.d.ts +2 -1
- package/es/components/FullPageError/FullPageError.js +24 -49
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/es/components/NonLinearReading/NonLinearReading.js +2 -7
- package/es/components/SearchBar/SearchBar.d.ts +51 -3
- package/es/components/SearchBar/SearchBar.js +5 -6
- package/es/components/SidePanel/SidePanel.js +10 -5
- package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/es/components/TruncatedList/TruncatedList.js +5 -4
- package/lib/components/Coachmark/utils/enums.d.ts +36 -22
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +12 -8
- package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/lib/components/EditFullPage/EditFullPage.js +3 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/lib/components/FullPageError/FullPageError.d.ts +2 -1
- package/lib/components/FullPageError/FullPageError.js +24 -49
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
- package/lib/components/SearchBar/SearchBar.d.ts +51 -3
- package/lib/components/SearchBar/SearchBar.js +5 -6
- package/lib/components/SidePanel/SidePanel.js +10 -5
- package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/lib/components/TruncatedList/TruncatedList.js +5 -4
- package/package.json +4 -4
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
- package/scss/components/FullPageError/_full-page-error.scss +10 -10
- package/scss/components/UserAvatar/_user-avatar.scss +6 -3
@@ -1,5 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2021
|
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
|
+
/// <reference path="../../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React, { ReactNode } from 'react';
|
9
|
+
import { ButtonProps } from '@carbon/react';
|
10
|
+
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
11
|
+
interface UnauthorizedEmptyStateProps {
|
12
|
+
/**
|
13
|
+
* Empty state action button
|
14
|
+
*/
|
15
|
+
action?: {
|
16
|
+
kind?: 'primary' | 'secondary' | 'tertiary';
|
17
|
+
renderIcon?: CarbonIconType;
|
18
|
+
onClick?: ButtonProps['onClick'];
|
19
|
+
text?: string;
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Provide an optional class to be applied to the containing node.
|
23
|
+
*/
|
24
|
+
className?: string;
|
25
|
+
/**
|
26
|
+
* The alt text for empty state svg images. If not provided , title will be used.
|
27
|
+
*/
|
28
|
+
illustrationDescription?: string;
|
29
|
+
/**
|
30
|
+
* Designates the position of the illustration relative to the content
|
31
|
+
*/
|
32
|
+
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
33
|
+
/**
|
34
|
+
* Empty state illustration theme variations.
|
35
|
+
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
36
|
+
* based on your app's current theme value. Example:
|
37
|
+
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
38
|
+
*/
|
39
|
+
illustrationTheme?: 'light' | 'dark';
|
40
|
+
/**
|
41
|
+
* Empty state link object
|
42
|
+
*/
|
43
|
+
link?: {
|
44
|
+
text?: string | ReactNode;
|
45
|
+
href?: string;
|
46
|
+
};
|
47
|
+
/**
|
48
|
+
* Empty state size
|
49
|
+
*/
|
50
|
+
size?: 'lg' | 'sm';
|
51
|
+
/**
|
52
|
+
* Empty state subtitle
|
53
|
+
*/
|
54
|
+
subtitle: string | ReactNode;
|
55
|
+
/**
|
56
|
+
* Empty state title
|
57
|
+
*/
|
58
|
+
title: string | ReactNode;
|
59
|
+
}
|
1
60
|
/**
|
2
61
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
3
62
|
*/
|
4
|
-
export let UnauthorizedEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
63
|
+
export declare let UnauthorizedEmptyState: React.ForwardRefExoticComponent<UnauthorizedEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
64
|
+
export {};
|
@@ -30,7 +30,6 @@ var _excluded = ["action", "className", "illustrationPosition", "illustrationThe
|
|
30
30
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
31
31
|
var blockClass = "".concat(settings.pkg.prefix, "--empty-state");
|
32
32
|
var componentName = 'UnauthorizedEmptyState';
|
33
|
-
|
34
33
|
/**
|
35
34
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
36
35
|
*/
|
@@ -59,7 +58,7 @@ exports.UnauthorizedEmptyState = /*#__PURE__*/React__default["default"].forwardR
|
|
59
58
|
link: link,
|
60
59
|
size: size,
|
61
60
|
subtitle: subtitle,
|
62
|
-
title: title
|
61
|
+
title: title || ''
|
63
62
|
}));
|
64
63
|
});
|
65
64
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Display a full-page error when the requested page is unavailable to the user.
|
3
|
+
* This is typically caused by issues with the requested URL or access permissions.
|
3
4
|
*/
|
4
5
|
export let FullPageError: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
6
|
import React from 'react';
|
@@ -13,22 +13,19 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
13
13
|
var React = require('react');
|
14
14
|
var index = require('../../node_modules/prop-types/index.js');
|
15
15
|
var cx = require('classnames');
|
16
|
-
var react = require('@carbon/react');
|
17
|
-
var ErrorGenericSVG = require('./assets/ErrorGenericSVG.js');
|
18
16
|
var devtools = require('../../global/js/utils/devtools.js');
|
19
17
|
var settings = require('../../settings.js');
|
18
|
+
var ErrorGenericSVG = require('./assets/ErrorGenericSVG.js');
|
20
19
|
var Error404SVG = require('./assets/Error404SVG.js');
|
21
20
|
var Error403SVG = require('./assets/Error403SVG.js');
|
21
|
+
var react = require('@carbon/react');
|
22
22
|
|
23
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
24
24
|
|
25
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
26
26
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
27
27
|
|
28
|
-
var _excluded = ["children", "className", "description", "
|
29
|
-
|
30
|
-
// Carbon and package components we use.
|
31
|
-
/* TODO: @import(s) of carbon components and other package components. */
|
28
|
+
var _excluded = ["children", "className", "description", "label", "kind", "title"];
|
32
29
|
|
33
30
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
34
31
|
var blockClass = "".concat(settings.pkg.prefix, "--full-page-error");
|
@@ -36,88 +33,68 @@ var componentName = 'FullPageError';
|
|
36
33
|
|
37
34
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
38
35
|
|
39
|
-
// Default values can be included here and then assigned to the prop params,
|
40
|
-
// e.g. prop = defaults.prop,
|
41
|
-
// This gathers default values together neatly and ensures non-primitive
|
42
|
-
// values are initialized early to avoid react making unnecessary re-renders.
|
43
|
-
// Note that default values are not required for props that are 'required',
|
44
|
-
// nor for props where the component can apply undefined values reasonably.
|
45
|
-
// Default values should be provided when the component needs to make a choice
|
46
|
-
// or assumption when a prop is not supplied.
|
47
|
-
|
48
36
|
// Default values for props
|
49
37
|
var defaults = {
|
50
38
|
kind: 'custom'
|
51
39
|
};
|
52
40
|
|
53
41
|
/**
|
54
|
-
*
|
42
|
+
* Display a full-page error when the requested page is unavailable to the user.
|
43
|
+
* This is typically caused by issues with the requested URL or access permissions.
|
55
44
|
*/
|
56
45
|
exports.FullPageError = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
57
46
|
var children = _ref.children,
|
58
47
|
className = _ref.className,
|
59
48
|
description = _ref.description,
|
60
|
-
|
49
|
+
label = _ref.label,
|
61
50
|
_ref$kind = _ref.kind,
|
62
51
|
kind = _ref$kind === void 0 ? defaults.kind : _ref$kind,
|
63
52
|
title = _ref.title,
|
64
53
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
65
54
|
var errorData = {
|
66
55
|
403: {
|
67
|
-
title: 'Access denied',
|
68
|
-
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.',
|
69
56
|
svg: /*#__PURE__*/React__default["default"].createElement(Error403SVG.Error403SVG, {
|
70
|
-
className:
|
57
|
+
className: "".concat(blockClass, "__svg ").concat(blockClass, "__403")
|
71
58
|
})
|
72
59
|
},
|
73
60
|
404: {
|
74
|
-
title: 'Page not found',
|
75
|
-
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.',
|
76
61
|
svg: /*#__PURE__*/React__default["default"].createElement(Error404SVG.Error404SVG, {
|
77
|
-
className:
|
62
|
+
className: "".concat(blockClass, "__svg ").concat(blockClass, "__404")
|
78
63
|
})
|
79
64
|
},
|
80
65
|
custom: {
|
81
|
-
title: title,
|
82
|
-
description: description,
|
83
66
|
svg: /*#__PURE__*/React__default["default"].createElement(ErrorGenericSVG.ErrorGenericSVG, {
|
84
|
-
className:
|
67
|
+
className: "".concat(blockClass, "__svg ").concat(blockClass, "__custom")
|
85
68
|
})
|
86
69
|
}
|
87
70
|
};
|
88
71
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
89
|
-
className: cx__default["default"](blockClass,
|
90
|
-
// Apply the block class to the main HTML element
|
91
|
-
className,
|
92
|
-
// Apply any supplied class names to the main HTML element.
|
93
|
-
// example: `${blockClass}__template-string-class-${kind}-n-${size}`,
|
94
|
-
{
|
95
|
-
// switched classes dependant on props or state
|
96
|
-
// example: [`${blockClass}__here-if-small`]: size === 'sm',
|
97
|
-
}),
|
72
|
+
className: cx__default["default"](blockClass, className),
|
98
73
|
ref: ref,
|
99
74
|
role: "main"
|
100
75
|
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement("div", {
|
101
|
-
className: "".concat(blockClass, "
|
76
|
+
className: "".concat(blockClass, "__container")
|
102
77
|
}, /*#__PURE__*/React__default["default"].createElement(react.Grid, {
|
103
|
-
className: "".concat(blockClass, "
|
78
|
+
className: "".concat(blockClass, "__grid")
|
104
79
|
}, /*#__PURE__*/React__default["default"].createElement(react.Column, {
|
105
80
|
sm: 4,
|
106
81
|
md: 3,
|
107
82
|
lg: 6,
|
108
|
-
className: "".concat(blockClass, "
|
83
|
+
className: "".concat(blockClass, "__column")
|
109
84
|
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
110
|
-
className: "".concat(blockClass, "
|
85
|
+
className: "".concat(blockClass, "__title")
|
111
86
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
112
|
-
className: "".concat(blockClass, "
|
113
|
-
}, "\u21B3 ",
|
87
|
+
className: "".concat(blockClass, "__label")
|
88
|
+
}, "\u21B3 ", label), /*#__PURE__*/React__default["default"].createElement("span", null, title)), /*#__PURE__*/React__default["default"].createElement("p", {
|
114
89
|
className: "".concat(blockClass, "__description")
|
115
|
-
}, description
|
90
|
+
}, description), /*#__PURE__*/React__default["default"].createElement("div", {
|
91
|
+
className: "".concat(blockClass, "__body")
|
92
|
+
}, children)), /*#__PURE__*/React__default["default"].createElement(react.Column, {
|
116
93
|
sm: 4,
|
117
94
|
md: 5,
|
118
95
|
lg: 10
|
119
96
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
120
|
-
className: "".concat(blockClass, "
|
97
|
+
className: "".concat(blockClass, "__svg-container")
|
121
98
|
}, errorData[kind].svg)))));
|
122
99
|
});
|
123
100
|
|
@@ -145,18 +122,16 @@ exports.FullPageError.propTypes = {
|
|
145
122
|
* This is optional for 403 and 404 kinds, and passing this would override their default descriptions.
|
146
123
|
*/
|
147
124
|
description: index["default"].string.isRequired,
|
148
|
-
/**
|
149
|
-
* String that will describe the error that occurred
|
150
|
-
*/
|
151
|
-
errorLabel: index["default"].string.isRequired,
|
152
125
|
/**
|
153
126
|
* The kind of error page to be displayed, default is custom
|
154
127
|
*/
|
155
128
|
kind: index["default"].oneOf(['custom', '403', '404']),
|
129
|
+
/**
|
130
|
+
* String that will describe the error that occurred
|
131
|
+
*/
|
132
|
+
label: index["default"].string.isRequired,
|
156
133
|
/**
|
157
134
|
* This will be for the main title of the FullPageError component
|
158
135
|
*/
|
159
136
|
title: index["default"].string.isRequired
|
160
|
-
|
161
|
-
/* TODO: add types and DocGen for all props. */
|
162
137
|
};
|
@@ -1,7 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2021
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { PropsWithChildren } from 'react';
|
8
|
+
interface HTTPErrorOtherProps extends PropsWithChildren {
|
9
|
+
/**
|
10
|
+
* Provide an optional class to be applied to the containing node
|
11
|
+
*/
|
12
|
+
className?: string;
|
13
|
+
/**
|
14
|
+
* String that will provide the description for the HTTP error code
|
15
|
+
*/
|
16
|
+
description: string;
|
17
|
+
/**
|
18
|
+
* String that will describe the error that occurred
|
19
|
+
*/
|
20
|
+
errorCodeLabel: string;
|
21
|
+
/**
|
22
|
+
* Links that will display for extra context when receiving particular errors
|
23
|
+
*/
|
24
|
+
links?: Array<{
|
25
|
+
/**
|
26
|
+
* The text to display for the link
|
27
|
+
*/
|
28
|
+
text: string;
|
29
|
+
/**
|
30
|
+
* The link's destination
|
31
|
+
*/
|
32
|
+
href: string;
|
33
|
+
}>;
|
34
|
+
/**
|
35
|
+
* This will be for the main title of the HTTP error component
|
36
|
+
*/
|
37
|
+
title: string;
|
38
|
+
}
|
1
39
|
/**
|
2
40
|
* HTTP errors are used in an attempt to access something that isn’t available or
|
3
41
|
the user doesn’t have permission for. This HTTPError component is generic so you
|
4
42
|
can use it when you receive an error code that isn't provided.
|
5
43
|
*/
|
6
|
-
export let HTTPErrorOther: React.ForwardRefExoticComponent<React.RefAttributes<
|
7
|
-
|
44
|
+
export declare let HTTPErrorOther: React.ForwardRefExoticComponent<HTTPErrorOtherProps & React.RefAttributes<HTMLDivElement>>;
|
45
|
+
export {};
|
@@ -28,7 +28,6 @@ var _excluded = ["className", "description", "errorCodeLabel", "links", "title"]
|
|
28
28
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
29
29
|
var blockClass = "".concat(settings.pkg.prefix, "--http-errors");
|
30
30
|
var componentName = 'HTTPErrorOther';
|
31
|
-
|
32
31
|
/**
|
33
32
|
* HTTP errors are used in an attempt to access something that isn’t available or
|
34
33
|
the user doesn’t have permission for. This HTTPError component is generic so you
|
@@ -80,6 +79,7 @@ exports.HTTPErrorOther.propTypes = {
|
|
80
79
|
/**
|
81
80
|
* Links that will display for extra context when receiving particular errors
|
82
81
|
*/
|
82
|
+
/**@ts-ignore */
|
83
83
|
links: index.propTypesExports.arrayOf(index.propTypesExports.shape({
|
84
84
|
/**
|
85
85
|
* The text to display for the link
|
@@ -1,5 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2023, 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
8
|
+
interface InlineTipLinkProps extends PropsWithChildren {
|
9
|
+
/**
|
10
|
+
* Provide the contents of the InlineTipLink.
|
11
|
+
*/
|
12
|
+
children: ReactNode;
|
13
|
+
/**
|
14
|
+
* Provide an optional class to be applied to the containing node.
|
15
|
+
*/
|
16
|
+
className?: string;
|
17
|
+
}
|
1
18
|
/**
|
2
19
|
* This is a standard Carbon link, styled specifically for use inside InlineTip.
|
3
20
|
*/
|
4
|
-
export let InlineTipLink: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
21
|
+
export declare let InlineTipLink: React.ForwardRefExoticComponent<InlineTipLinkProps & React.RefAttributes<HTMLDivElement>>;
|
22
|
+
export {};
|
@@ -1,5 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2023, 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
8
|
+
interface InterstitialScreenViewProps extends PropsWithChildren {
|
9
|
+
/**
|
10
|
+
* Provide the contents of the InterstitialScreenView.
|
11
|
+
*/
|
12
|
+
children?: ReactNode;
|
13
|
+
/**
|
14
|
+
* Optional class name for this component.
|
15
|
+
*/
|
16
|
+
className?: string;
|
17
|
+
/**
|
18
|
+
* The label to pass to the ProgressStep component.
|
19
|
+
*/
|
20
|
+
stepTitle: string;
|
21
|
+
}
|
1
22
|
/**
|
2
23
|
* A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
|
3
24
|
*/
|
4
|
-
export let InterstitialScreenView: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
25
|
+
export declare let InterstitialScreenView: React.ForwardRefExoticComponent<InterstitialScreenViewProps & React.RefAttributes<HTMLDivElement>>;
|
26
|
+
export {};
|
@@ -29,7 +29,6 @@ var _excluded = ["children", "className", "stepTitle"];
|
|
29
29
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
30
30
|
var blockClass = "".concat(settings.pkg.prefix, "--interstitial-screen-view");
|
31
31
|
var componentName = 'InterstitialScreenView';
|
32
|
-
|
33
32
|
/**
|
34
33
|
* A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
|
35
34
|
*/
|
@@ -1,5 +1,26 @@
|
|
1
1
|
/**
|
2
|
-
*
|
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.
|
3
6
|
*/
|
4
|
-
export let InterstitialScreenViewModule: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
7
|
import React from 'react';
|
8
|
+
interface InterstitialScreenViewModuleProps {
|
9
|
+
/**
|
10
|
+
* Provide an optional class to be applied to the containing node.
|
11
|
+
*/
|
12
|
+
className?: string;
|
13
|
+
/**
|
14
|
+
* The description of this component.
|
15
|
+
*/
|
16
|
+
description: string;
|
17
|
+
/**
|
18
|
+
* The title of this component.
|
19
|
+
*/
|
20
|
+
title: string;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* View module to help in building interstitial screen views.
|
24
|
+
*/
|
25
|
+
export declare let InterstitialScreenViewModule: React.ForwardRefExoticComponent<InterstitialScreenViewModuleProps & React.RefAttributes<HTMLElement>>;
|
26
|
+
export {};
|
@@ -1,7 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2023, 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { ReactNode } from 'react';
|
8
|
+
type Theme = 'light' | 'dark';
|
9
|
+
interface NonLinearReadingProps {
|
10
|
+
/**
|
11
|
+
* The keyword of the component appears as a pill.
|
12
|
+
*/
|
13
|
+
children: ReactNode;
|
14
|
+
/**
|
15
|
+
* Provide an optional class to be applied to the containing node.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* The content that appears when the keyword is toggled open.
|
20
|
+
*/
|
21
|
+
definition: ReactNode;
|
22
|
+
/**
|
23
|
+
* Determines the theme of the component.
|
24
|
+
*/
|
25
|
+
theme?: Theme;
|
26
|
+
}
|
1
27
|
/**
|
2
28
|
* Use non-linear reading when space is limited to share a
|
3
29
|
* brief, at-a-glance, summary of a concept that may require
|
4
30
|
* more explanation for some users.
|
5
31
|
*/
|
6
|
-
export let NonLinearReading: React.ForwardRefExoticComponent<React.RefAttributes<
|
7
|
-
|
32
|
+
export declare let NonLinearReading: React.ForwardRefExoticComponent<NonLinearReadingProps & React.RefAttributes<HTMLSpanElement>>;
|
33
|
+
export {};
|
@@ -29,12 +29,6 @@ var _excluded = ["children", "className", "definition", "theme"];
|
|
29
29
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
30
30
|
var blockClass = "".concat(settings.pkg.prefix, "--non-linear-reading");
|
31
31
|
var componentName = 'NonLinearReading';
|
32
|
-
|
33
|
-
// Default values for props
|
34
|
-
var defaults = {
|
35
|
-
theme: 'light'
|
36
|
-
};
|
37
|
-
|
38
32
|
/**
|
39
33
|
* Use non-linear reading when space is limited to share a
|
40
34
|
* brief, at-a-glance, summary of a concept that may require
|
@@ -45,7 +39,7 @@ exports.NonLinearReading = /*#__PURE__*/React__default["default"].forwardRef(fun
|
|
45
39
|
className = _ref.className,
|
46
40
|
definition = _ref.definition,
|
47
41
|
_ref$theme = _ref.theme,
|
48
|
-
theme = _ref$theme === void 0 ?
|
42
|
+
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
49
43
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
50
44
|
var _useState = React.useState(false),
|
51
45
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -82,6 +76,7 @@ exports.NonLinearReading.propTypes = {
|
|
82
76
|
/**
|
83
77
|
* The keyword of the component appears as a pill.
|
84
78
|
*/
|
79
|
+
|
85
80
|
children: index["default"].node.isRequired,
|
86
81
|
/**
|
87
82
|
* Provide an optional class to be applied to the containing node.
|
@@ -1,5 +1,53 @@
|
|
1
1
|
/**
|
2
|
-
*
|
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.
|
3
6
|
*/
|
4
|
-
|
5
|
-
|
7
|
+
import React, { PropsWithChildren } from 'react';
|
8
|
+
type Scopes = string[] | object[];
|
9
|
+
interface SearchBarProps extends PropsWithChildren {
|
10
|
+
/** @type {string} Optional additional class name. */
|
11
|
+
className?: string;
|
12
|
+
/** @type {string} The label text for the search text input. */
|
13
|
+
clearButtonLabelText: string;
|
14
|
+
/**
|
15
|
+
* Whether or not the scopes MultiSelect label is visually hidden.
|
16
|
+
*/
|
17
|
+
hideScopesLabel?: boolean;
|
18
|
+
/** @type {string} The label text for the search text input. */
|
19
|
+
labelText?: string;
|
20
|
+
/** @type {Function} Function handler for when the user changes their query search. */
|
21
|
+
onChange?: (event: any) => void;
|
22
|
+
/** @type {Function} Function handler for when the user submits a search. */
|
23
|
+
onSubmit?: (event: any) => void;
|
24
|
+
/** @type {string} Placeholder text to be displayed in the search input. */
|
25
|
+
placeHolderText: string;
|
26
|
+
/** @type {Function} Function to get the text for each scope to display in dropdown. */
|
27
|
+
scopeToString?: () => void;
|
28
|
+
/** @type {Array<any>} Array of allowed search scopes. */
|
29
|
+
scopes?: Scopes;
|
30
|
+
/** @type {string} The name text for the search scope type. */
|
31
|
+
scopesTypeLabel?: typeof conditionalScopePropValidator;
|
32
|
+
/** @type {Array<any> Array of initially selected search scopes. */
|
33
|
+
selectedScopes?: Scopes;
|
34
|
+
/**
|
35
|
+
* Optional custom sorting algorithm for an array of scope items.
|
36
|
+
* By default, scope items are sorted in ascending alphabetical order,
|
37
|
+
* with "selected" items moved to the start of the scope items array.
|
38
|
+
*/
|
39
|
+
sortItems?: () => void;
|
40
|
+
/** @type {string} The label text for the search submit button. */
|
41
|
+
submitLabel: string;
|
42
|
+
/**
|
43
|
+
* Provide accessible label text for the scopes MultiSelect.
|
44
|
+
*/
|
45
|
+
titleText?: string;
|
46
|
+
/** @type {func} Callback function for translating MultiSelect's child ListBoxMenuIcon SVG title. */
|
47
|
+
translateWithId?: () => void;
|
48
|
+
/** @type {string} Search query value. */
|
49
|
+
value?: string;
|
50
|
+
}
|
51
|
+
export declare let SearchBar: React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLFormElement>>;
|
52
|
+
declare const conditionalScopePropValidator: (props: any, propName: any, componentName: any, ...rest: any[]) => Error | null;
|
53
|
+
export {};
|
@@ -38,10 +38,6 @@ var defaults = {
|
|
38
38
|
selectedScopes: [],
|
39
39
|
hideScopesLabel: true
|
40
40
|
};
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Search bar with input field and search button
|
44
|
-
*/
|
45
41
|
exports.SearchBar = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
46
42
|
var className = _ref.className,
|
47
43
|
clearButtonLabelText = _ref.clearButtonLabelText,
|
@@ -54,11 +50,11 @@ exports.SearchBar = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
54
50
|
onSubmit = _ref$onSubmit === void 0 ? defaults.onSubmit : _ref$onSubmit,
|
55
51
|
placeHolderText = _ref.placeHolderText,
|
56
52
|
_ref$scopes = _ref.scopes,
|
57
|
-
scopes = _ref$scopes === void 0 ?
|
53
|
+
scopes = _ref$scopes === void 0 ? [] : _ref$scopes,
|
58
54
|
scopesTypeLabel = _ref.scopesTypeLabel,
|
59
55
|
scopeToString = _ref.scopeToString,
|
60
56
|
_ref$selectedScopes = _ref.selectedScopes,
|
61
|
-
selectedScopes = _ref$selectedScopes === void 0 ?
|
57
|
+
selectedScopes = _ref$selectedScopes === void 0 ? [] : _ref$selectedScopes,
|
62
58
|
sortItems = _ref.sortItems,
|
63
59
|
submitLabel = _ref.submitLabel,
|
64
60
|
translateWithId = _ref.translateWithId,
|
@@ -171,6 +167,7 @@ var conditionalScopePropValidator = function conditionalScopePropValidator(props
|
|
171
167
|
if (props.scopes && props.scopes.length > 0 && !props[propName]) {
|
172
168
|
return new Error("Required `".concat(propName, "` when `scopes` prop type is supplied to `").concat(componentName, "`. Validation failed."));
|
173
169
|
}
|
170
|
+
/**@ts-ignore */
|
174
171
|
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
175
172
|
rest[_key - 3] = arguments[_key];
|
176
173
|
}
|
@@ -200,11 +197,13 @@ exports.SearchBar.propTypes = {
|
|
200
197
|
/** @type {Function} Function to get the text for each scope to display in dropdown. */
|
201
198
|
scopeToString: index["default"].func,
|
202
199
|
/** @type {Array<any>} Array of allowed search scopes. */
|
200
|
+
/**@ts-ignore */
|
203
201
|
scopes: index["default"].arrayOf(index["default"].oneOfType([index["default"].string, index["default"].object])),
|
204
202
|
/** @type {string} The name text for the search scope type. */
|
205
203
|
// eslint-disable-next-line react/require-default-props
|
206
204
|
scopesTypeLabel: conditionalScopePropValidator,
|
207
205
|
/** @type {Array<any> Array of initially selected search scopes. */
|
206
|
+
/**@ts-ignore */
|
208
207
|
selectedScopes: index["default"].arrayOf(index["default"].oneOfType([index["default"].string, index["default"].object])),
|
209
208
|
/**
|
210
209
|
* Optional custom sorting algorithm for an array of scope items.
|
@@ -33,7 +33,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
33
33
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
34
34
|
|
35
35
|
var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "id", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "slug", "subtitle", "title"],
|
36
|
-
_excluded2 = ["label", "kind", "icon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
|
36
|
+
_excluded2 = ["label", "kind", "hasIconOnly", "icon", "renderIcon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
|
37
37
|
var blockClass = "".concat(settings.pkg.prefix, "--side-panel");
|
38
38
|
var componentName = 'SidePanel';
|
39
39
|
// `any` is a work around until ActionSet is migrated to TS
|
@@ -396,7 +396,10 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
396
396
|
}, actionToolbarButtons.map(function (_ref4) {
|
397
397
|
var label = _ref4.label,
|
398
398
|
kind = _ref4.kind,
|
399
|
+
_ref4$hasIconOnly = _ref4.hasIconOnly,
|
400
|
+
hasIconOnly = _ref4$hasIconOnly === void 0 ? false : _ref4$hasIconOnly,
|
399
401
|
icon = _ref4.icon,
|
402
|
+
renderIcon = _ref4.renderIcon,
|
400
403
|
tooltipPosition = _ref4.tooltipPosition,
|
401
404
|
tooltipAlignment = _ref4.tooltipAlignment,
|
402
405
|
leading = _ref4.leading,
|
@@ -408,11 +411,13 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
408
411
|
key: label,
|
409
412
|
kind: kind || 'ghost',
|
410
413
|
size: "sm",
|
411
|
-
renderIcon: icon,
|
412
|
-
iconDescription: label
|
414
|
+
renderIcon: renderIcon || icon,
|
415
|
+
iconDescription: label
|
416
|
+
}, hasIconOnly && {
|
413
417
|
tooltipPosition: tooltipPosition || 'bottom',
|
414
|
-
tooltipAlignment: tooltipAlignment || 'start'
|
415
|
-
|
418
|
+
tooltipAlignment: tooltipAlignment || 'start'
|
419
|
+
}, {
|
420
|
+
hasIconOnly: hasIconOnly,
|
416
421
|
disabled: disabled,
|
417
422
|
className: cx__default["default"](["".concat(blockClass, "__action-toolbar-button"), className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__action-toolbar-leading-button"), leading)]),
|
418
423
|
onClick: onClick
|