@carbon/ibm-products 2.34.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 +32448 -32421
- 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 +105 -91
- 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 +765 -24496
- 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 +2543 -18127
- 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/ActionSet/ActionSet.d.ts +38 -2
- package/es/components/ActionSet/ActionSet.js +3 -5
- 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/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/es/components/ConditionBuilder/index.d.ts +1 -0
- package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/es/components/CreateFullPage/CreateFullPage.js +14 -26
- package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
- package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- 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/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/es/components/Datagrid/useEditableCell.js +15 -0
- package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/es/components/DelimitedList/DelimitedList.js +0 -1
- package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/es/components/EditFullPage/EditFullPage.js +3 -3
- package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/es/components/EditInPlace/EditInPlace.js +10 -6
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.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/ExportModal/ExportModal.d.ts +110 -2
- package/es/components/ExportModal/ExportModal.js +10 -4
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
- package/es/components/FilterPanel/index.d.ts +1 -0
- package/es/components/FullPageError/FullPageError.d.ts +2 -1
- package/es/components/FullPageError/FullPageError.js +24 -49
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/es/components/ImportModal/ImportModal.d.ts +136 -2
- package/es/components/ImportModal/ImportModal.js +3 -2
- package/es/components/InlineTip/InlineTip.d.ts +90 -2
- package/es/components/InlineTip/InlineTip.js +3 -2
- 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/Nav/Nav.js +1 -1
- package/es/components/Nav/NavList.js +7 -7
- package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/es/components/NonLinearReading/NonLinearReading.js +2 -7
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/PageHeader/PageHeader.js +3 -3
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -3
- package/es/components/SearchBar/SearchBar.d.ts +51 -3
- package/es/components/SearchBar/SearchBar.js +5 -6
- package/es/components/SidePanel/SidePanel.js +62 -41
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +209 -0
- package/es/components/TagOverflow/constants.d.ts +14 -0
- package/es/components/TagOverflow/constants.js +30 -0
- package/es/components/TagOverflow/index.d.ts +1 -0
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/es/components/Toolbar/Toolbar.d.ts +23 -5
- package/es/components/Toolbar/Toolbar.js +30 -26
- package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/es/components/TruncatedList/TruncatedList.js +5 -4
- package/es/components/UserAvatar/UserAvatar.js +4 -2
- package/es/components/index.d.ts +4 -2
- package/es/global/js/package-settings.d.ts +3 -0
- package/es/global/js/package-settings.js +3 -0
- package/es/index.js +4 -0
- package/es/settings.d.ts +3 -0
- package/lib/components/ActionSet/ActionSet.d.ts +38 -2
- package/lib/components/ActionSet/ActionSet.js +3 -5
- 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/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/lib/components/ConditionBuilder/index.d.ts +1 -0
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +13 -25
- package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
- package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- 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/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/lib/components/Datagrid/useEditableCell.js +19 -0
- package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/lib/components/DelimitedList/DelimitedList.js +0 -1
- package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/lib/components/EditFullPage/EditFullPage.js +3 -3
- package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/lib/components/EditInPlace/EditInPlace.js +10 -6
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.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/ExportModal/ExportModal.d.ts +110 -2
- package/lib/components/ExportModal/ExportModal.js +10 -4
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
- package/lib/components/FilterPanel/index.d.ts +1 -0
- package/lib/components/FullPageError/FullPageError.d.ts +2 -1
- package/lib/components/FullPageError/FullPageError.js +24 -49
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/lib/components/ImportModal/ImportModal.d.ts +136 -2
- package/lib/components/ImportModal/ImportModal.js +3 -2
- package/lib/components/InlineTip/InlineTip.d.ts +90 -2
- package/lib/components/InlineTip/InlineTip.js +3 -2
- 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/Nav/Nav.js +1 -1
- package/lib/components/Nav/NavList.js +7 -7
- package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
- package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/lib/components/PageHeader/PageHeader.js +3 -3
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
- package/lib/components/SearchBar/SearchBar.d.ts +51 -3
- package/lib/components/SearchBar/SearchBar.js +5 -6
- package/lib/components/SidePanel/SidePanel.js +62 -41
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +216 -0
- package/lib/components/TagOverflow/constants.d.ts +14 -0
- package/lib/components/TagOverflow/constants.js +34 -0
- package/lib/components/TagOverflow/index.d.ts +1 -0
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/lib/components/Toolbar/Toolbar.d.ts +23 -5
- package/lib/components/Toolbar/Toolbar.js +30 -26
- package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/lib/components/TruncatedList/TruncatedList.js +5 -4
- package/lib/components/UserAvatar/UserAvatar.js +4 -2
- package/lib/components/index.d.ts +4 -2
- package/lib/global/js/package-settings.d.ts +3 -0
- package/lib/global/js/package-settings.js +3 -0
- package/lib/index.js +17 -0
- package/lib/settings.d.ts +3 -0
- package/package.json +5 -5
- package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
- package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
- package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
- package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
- package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
- package/scss/components/ConditionBuilder/_index.scss +8 -0
- package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
- package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
- package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
- package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +1 -3
- package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +0 -2
- package/scss/components/FilterPanel/_filter-panel-checkbox.scss +0 -1
- package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
- package/scss/components/FilterPanel/_index-with-carbon.scss +1 -0
- package/scss/components/FilterPanel/_index.scss +1 -0
- package/scss/components/FullPageError/_full-page-error.scss +10 -10
- package/scss/components/Guidebanner/_guidebanner.scss +1 -1
- package/scss/components/InlineTip/_inline-tip.scss +1 -1
- package/scss/components/ProductiveCard/_productive-card.scss +13 -0
- package/scss/components/SidePanel/_side-panel.scss +9 -9
- package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
- package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
- package/scss/components/TagOverflow/_index.scss +8 -0
- package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
- package/scss/components/Tearsheet/_tearsheet.scss +10 -0
- package/scss/components/UserAvatar/_user-avatar.scss +7 -3
- package/scss/components/_index-with-carbon.scss +2 -0
- package/scss/components/_index.scss +2 -0
@@ -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 {};
|
@@ -19,7 +19,6 @@ var _excluded = ["className", "description", "errorCodeLabel", "links", "title"]
|
|
19
19
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
20
20
|
var blockClass = "".concat(pkg.prefix, "--http-errors");
|
21
21
|
var componentName = 'HTTPErrorOther';
|
22
|
-
|
23
22
|
/**
|
24
23
|
* HTTP errors are used in an attempt to access something that isn’t available or
|
25
24
|
the user doesn’t have permission for. This HTTPError component is generic so you
|
@@ -71,6 +70,7 @@ HTTPErrorOther.propTypes = {
|
|
71
70
|
/**
|
72
71
|
* Links that will display for extra context when receiving particular errors
|
73
72
|
*/
|
73
|
+
/**@ts-ignore */
|
74
74
|
links: propTypesExports.arrayOf(propTypesExports.shape({
|
75
75
|
/**
|
76
76
|
* The text to display for the link
|
@@ -1,2 +1,136 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 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
|
+
import React, { ReactNode } from 'react';
|
8
|
+
type FileType = {
|
9
|
+
fetchError?: undefined | boolean;
|
10
|
+
fileData?: File;
|
11
|
+
fileSize?: number;
|
12
|
+
iconDescription?: string;
|
13
|
+
invalidFileType?: boolean;
|
14
|
+
name: string;
|
15
|
+
status?: string;
|
16
|
+
uuid?: string;
|
17
|
+
invalid?: boolean;
|
18
|
+
errorBody?: string;
|
19
|
+
errorSubject?: string;
|
20
|
+
};
|
21
|
+
interface ImportModalProps {
|
22
|
+
/**
|
23
|
+
* Specifies the file types that are valid for importing
|
24
|
+
*/
|
25
|
+
accept?: string[];
|
26
|
+
/**
|
27
|
+
* Optional class name
|
28
|
+
*/
|
29
|
+
className?: string;
|
30
|
+
/**
|
31
|
+
* The default message shown for an import error
|
32
|
+
*/
|
33
|
+
defaultErrorBody: string;
|
34
|
+
/**
|
35
|
+
* The default header that is displayed to show an error message
|
36
|
+
*/
|
37
|
+
defaultErrorHeader: string;
|
38
|
+
/**
|
39
|
+
* Content that is displayed inside the modal
|
40
|
+
*/
|
41
|
+
description?: string;
|
42
|
+
/**
|
43
|
+
* Optional error body to display specifically for a fetch error
|
44
|
+
*/
|
45
|
+
fetchErrorBody?: string;
|
46
|
+
/**
|
47
|
+
* Optional error header to display specifically for a fetch error
|
48
|
+
*/
|
49
|
+
fetchErrorHeader?: string;
|
50
|
+
/**
|
51
|
+
* Header for the drag and drop box
|
52
|
+
*/
|
53
|
+
fileDropHeader?: string;
|
54
|
+
/**
|
55
|
+
* Label for the drag and drop box
|
56
|
+
*/
|
57
|
+
fileDropLabel?: string;
|
58
|
+
/**
|
59
|
+
* Label that appears when a file is uploaded to show number of files (1 / 1)
|
60
|
+
*/
|
61
|
+
fileUploadLabel?: string;
|
62
|
+
/**
|
63
|
+
* Button icon for import by url button
|
64
|
+
*/
|
65
|
+
inputButtonIcon?: boolean;
|
66
|
+
/**
|
67
|
+
* Button text for import by url button
|
68
|
+
*/
|
69
|
+
inputButtonText: string;
|
70
|
+
/**
|
71
|
+
* ID for text input
|
72
|
+
*/
|
73
|
+
inputId?: string;
|
74
|
+
/**
|
75
|
+
* Header to display above import by url
|
76
|
+
*/
|
77
|
+
inputLabel?: string;
|
78
|
+
/**
|
79
|
+
* Placeholder for text input
|
80
|
+
*/
|
81
|
+
inputPlaceholder?: string;
|
82
|
+
/**
|
83
|
+
* Optional error message to display specifically for a invalid file type error
|
84
|
+
*/
|
85
|
+
invalidFileTypeErrorBody?: string;
|
86
|
+
/**
|
87
|
+
* Optional error header to display specifically for a invalid file type error
|
88
|
+
*/
|
89
|
+
invalidFileTypeErrorHeader?: string;
|
90
|
+
/**
|
91
|
+
* Description for delete file icon
|
92
|
+
*/
|
93
|
+
invalidIconDescription?: string;
|
94
|
+
/**
|
95
|
+
* File size limit in bytes
|
96
|
+
*/
|
97
|
+
maxFileSize?: number;
|
98
|
+
/**
|
99
|
+
* Optional error message to display specifically for a max file size error
|
100
|
+
*/
|
101
|
+
maxFileSizeErrorBody?: string;
|
102
|
+
/**
|
103
|
+
* Optional error header to display specifically for a max file size error
|
104
|
+
*/
|
105
|
+
maxFileSizeErrorHeader?: string;
|
106
|
+
/**
|
107
|
+
* Specify a handler for closing modal
|
108
|
+
*/
|
109
|
+
onClose?(): void;
|
110
|
+
/**
|
111
|
+
* Specify a handler for "submitting" modal. Access the imported file via `file => {}`
|
112
|
+
*/
|
113
|
+
onRequestSubmit(files: FileType[]): void;
|
114
|
+
/**
|
115
|
+
* Specify whether the Modal is currently open
|
116
|
+
*/
|
117
|
+
open: boolean;
|
118
|
+
/**
|
119
|
+
* The DOM node the tearsheet should be rendered within. Defaults to document.body.
|
120
|
+
*/
|
121
|
+
portalTarget?: ReactNode;
|
122
|
+
/**
|
123
|
+
* Specify the text for the primary button
|
124
|
+
*/
|
125
|
+
primaryButtonText: string;
|
126
|
+
/**
|
127
|
+
* Specify the text for the secondary button
|
128
|
+
*/
|
129
|
+
secondaryButtonText: string;
|
130
|
+
/**
|
131
|
+
* The text displayed at the top of the modal
|
132
|
+
*/
|
133
|
+
title: string;
|
134
|
+
}
|
135
|
+
export declare let ImportModal: React.FC<ImportModalProps>;
|
136
|
+
export {};
|
@@ -76,6 +76,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
76
76
|
};
|
77
77
|
var updateFiles = function updateFiles(newFiles) {
|
78
78
|
var updatedFiles = newFiles.map(function (file) {
|
79
|
+
var _newFile$fileSize;
|
79
80
|
var newFile = {
|
80
81
|
uuid: file.uuid || uuidv4(),
|
81
82
|
status: 'edit',
|
@@ -94,7 +95,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
94
95
|
newFile.errorBody = invalidFileTypeErrorBody || defaultErrorBody;
|
95
96
|
newFile.errorSubject = invalidFileTypeErrorHeader || defaultErrorHeader;
|
96
97
|
newFile.invalid = true;
|
97
|
-
} else if (maxFileSize && newFile.fileSize > maxFileSize) {
|
98
|
+
} else if (maxFileSize && ((_newFile$fileSize = newFile === null || newFile === void 0 ? void 0 : newFile.fileSize) !== null && _newFile$fileSize !== void 0 ? _newFile$fileSize : 0) > maxFileSize) {
|
98
99
|
newFile.errorBody = maxFileSizeErrorBody || defaultErrorBody;
|
99
100
|
newFile.errorSubject = maxFileSizeErrorHeader || defaultErrorHeader;
|
100
101
|
newFile.invalid = true;
|
@@ -127,7 +128,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
127
128
|
_context.next = 10;
|
128
129
|
break;
|
129
130
|
}
|
130
|
-
throw new Error(response.status);
|
131
|
+
throw new Error("".concat(response.status));
|
131
132
|
case 10:
|
132
133
|
_context.next = 12;
|
133
134
|
return response.blob();
|
@@ -1,7 +1,95 @@
|
|
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 MediaType = {
|
9
|
+
render?: () => ReactNode;
|
10
|
+
filePaths?: string[];
|
11
|
+
};
|
12
|
+
interface InlineTipProps {
|
13
|
+
/**
|
14
|
+
* Optional "call to action" ghost button or link that can appear
|
15
|
+
* directly below the content. This component comes with pre-styled
|
16
|
+
* elements available to use: `InlineTipLink` and `InlineTipButton`.
|
17
|
+
*/
|
18
|
+
action?: ReactNode;
|
19
|
+
/**
|
20
|
+
* Provide the contents of the InlineTip.
|
21
|
+
*/
|
22
|
+
children: ReactNode;
|
23
|
+
/**
|
24
|
+
* Provide an optional class to be applied to the containing node.
|
25
|
+
*/
|
26
|
+
className?: string;
|
27
|
+
/**
|
28
|
+
* Tooltip text and aria label for the Close button icon.
|
29
|
+
*/
|
30
|
+
closeIconDescription?: string;
|
31
|
+
/**
|
32
|
+
* The label for the collapse button.
|
33
|
+
* This button is not visible if `media` is specified.
|
34
|
+
*/
|
35
|
+
collapseButtonLabel?: string;
|
36
|
+
/**
|
37
|
+
* If set to `true`, it will truncate the body text to
|
38
|
+
* one line and expose an expand/collapse button toggle.
|
39
|
+
*
|
40
|
+
* This feature is disabled if `media` is specified.
|
41
|
+
*/
|
42
|
+
collapsible?: boolean;
|
43
|
+
/**
|
44
|
+
* The label for the expand button.
|
45
|
+
* This button is not visible if `media` is specified.
|
46
|
+
*/
|
47
|
+
expandButtonLabel?: string;
|
48
|
+
/**
|
49
|
+
* The object describing an image in one of two shapes.
|
50
|
+
* - If a single media element is required, use `{render}`.
|
51
|
+
* - If a stepped animation is required, use `{filePaths}`.
|
52
|
+
*
|
53
|
+
* Enabling `media` disables the `collapsible` feature.
|
54
|
+
*/
|
55
|
+
media: MediaType;
|
56
|
+
/**
|
57
|
+
* Set to `true` to arrange the information in a format
|
58
|
+
* that is easier to read in a limited space.
|
59
|
+
*/
|
60
|
+
narrow?: boolean;
|
61
|
+
/**
|
62
|
+
* Function to call when the tertiary button is clicked.
|
63
|
+
*/
|
64
|
+
onClick?: () => void;
|
65
|
+
/**
|
66
|
+
* Function to call when the InlineTip is closed via the "X" button.
|
67
|
+
*/
|
68
|
+
onClose?: () => void;
|
69
|
+
/**
|
70
|
+
* Defining the label will show a the tertiary button with the crossroads icon.
|
71
|
+
* You will still need to define the `onClose` method to trigger a callback.
|
72
|
+
*/
|
73
|
+
tertiaryButtonLabel?: string;
|
74
|
+
/**
|
75
|
+
* The title of the InlineTip.
|
76
|
+
*/
|
77
|
+
title: string;
|
78
|
+
/**
|
79
|
+
* If true, insert 1 rem of "space" on the left of the component.
|
80
|
+
* This will allow the component's content to line up with other
|
81
|
+
* content on the page under special circumstances.
|
82
|
+
*
|
83
|
+
* This will only be applied when `narrow` is false.
|
84
|
+
*/
|
85
|
+
withLeftGutter?: boolean;
|
86
|
+
}
|
1
87
|
/**
|
2
88
|
* Inline tips are messages embedded within other components that
|
3
89
|
* provide an ambient way to deliver learning content without
|
4
90
|
* distracting the user from their flow.
|
5
91
|
*/
|
6
|
-
export let InlineTip: React.ForwardRefExoticComponent<
|
7
|
-
|
92
|
+
export declare let InlineTip: React.ForwardRefExoticComponent<InlineTipProps & {
|
93
|
+
children?: React.ReactNode;
|
94
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
95
|
+
export {};
|
@@ -35,9 +35,9 @@ var defaults = {
|
|
35
35
|
narrow: false,
|
36
36
|
withLeftGutter: false,
|
37
37
|
onClick: function onClick() {},
|
38
|
-
onClose: function onClose() {}
|
38
|
+
onClose: function onClose() {},
|
39
|
+
title: 'Use case-specific heading'
|
39
40
|
};
|
40
|
-
|
41
41
|
/**
|
42
42
|
* Inline tips are messages embedded within other components that
|
43
43
|
* provide an ambient way to deliver learning content without
|
@@ -187,6 +187,7 @@ InlineTip.propTypes = {
|
|
187
187
|
*
|
188
188
|
* Enabling `media` disables the `collapsible` feature.
|
189
189
|
*/
|
190
|
+
/**@ts-ignore*/
|
190
191
|
media: PropTypes.oneOfType([PropTypes.shape({
|
191
192
|
render: PropTypes.func
|
192
193
|
}), PropTypes.shape({
|
@@ -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 {};
|
@@ -20,7 +20,6 @@ var _excluded = ["children", "className", "stepTitle"];
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--interstitial-screen-view");
|
22
22
|
var componentName = 'InterstitialScreenView';
|
23
|
-
|
24
23
|
/**
|
25
24
|
* A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
|
26
25
|
*/
|
@@ -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 {};
|
package/es/components/Nav/Nav.js
CHANGED
@@ -102,7 +102,7 @@ var Nav = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
102
102
|
*/
|
103
103
|
var handleListClick = function handleListClick(id) {
|
104
104
|
Object.keys(navigationLists.current).forEach(function (key) {
|
105
|
-
if (key !== id && !navigationLists.current[key].
|
105
|
+
if (key !== id && !navigationLists.current[key].isExpandedOnPageLoad) {
|
106
106
|
navigationLists.current[key].close();
|
107
107
|
}
|
108
108
|
});
|
@@ -22,7 +22,7 @@ var defaults = {
|
|
22
22
|
className: '',
|
23
23
|
children: null,
|
24
24
|
id: '',
|
25
|
-
|
25
|
+
isExpandedOnPageLoad: false,
|
26
26
|
onItemClick: function onItemClick() {},
|
27
27
|
onListClick: function onListClick() {},
|
28
28
|
tabIndex: 0,
|
@@ -41,8 +41,8 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
41
41
|
icon = _ref$icon === void 0 ? defaults.icon : _ref$icon,
|
42
42
|
_ref$id = _ref.id,
|
43
43
|
id = _ref$id === void 0 ? defaults.id : _ref$id,
|
44
|
-
_ref$isExpandedOnPage = _ref.
|
45
|
-
|
44
|
+
_ref$isExpandedOnPage = _ref.isExpandedOnPageLoad,
|
45
|
+
isExpandedOnPageLoad = _ref$isExpandedOnPage === void 0 ? defaults.isExpandedOnPageLoad : _ref$isExpandedOnPage,
|
46
46
|
_ref$navigationItemTi = _ref.navigationItemTitle,
|
47
47
|
navigationItemTitle = _ref$navigationItemTi === void 0 ? defaults.navigationItemTitle : _ref$navigationItemTi,
|
48
48
|
_ref$onItemClick = _ref.onItemClick,
|
@@ -53,7 +53,7 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
53
53
|
tabIndex = _ref$tabIndex === void 0 ? defaults.tabIndex : _ref$tabIndex,
|
54
54
|
_ref$title = _ref.title,
|
55
55
|
title = _ref$title === void 0 ? defaults.title : _ref$title;
|
56
|
-
var _useState = useState(
|
56
|
+
var _useState = useState(isExpandedOnPageLoad),
|
57
57
|
_useState2 = _slicedToArray(_useState, 2),
|
58
58
|
open = _useState2[0],
|
59
59
|
setOpen = _useState2[1];
|
@@ -65,7 +65,7 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
65
65
|
var childProps = _ref3.props;
|
66
66
|
return childProps.href;
|
67
67
|
});
|
68
|
-
setOpen(hrefs.includes(activeHref) ||
|
68
|
+
setOpen(hrefs.includes(activeHref) || isExpandedOnPageLoad);
|
69
69
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
70
70
|
}, []);
|
71
71
|
|
@@ -99,7 +99,7 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
99
99
|
useImperativeHandle(ref, function () {
|
100
100
|
return {
|
101
101
|
close: close,
|
102
|
-
|
102
|
+
isExpandedOnPageLoad: isExpandedOnPageLoad
|
103
103
|
};
|
104
104
|
});
|
105
105
|
var newChildren = React__default.Children.map(children, function (child, index) {
|
@@ -150,7 +150,7 @@ NavList.propTypes = {
|
|
150
150
|
/** @type {string} ID of a list. */
|
151
151
|
id: propTypesExports.string,
|
152
152
|
/** @type {boolean} State of a list. */
|
153
|
-
|
153
|
+
isExpandedOnPageLoad: propTypesExports.bool,
|
154
154
|
/** @type {boolean} Title of nav. */
|
155
155
|
navigationItemTitle: propTypesExports.string,
|
156
156
|
/** @type {Function} Click handler for an item. */
|
@@ -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 {};
|
@@ -20,12 +20,6 @@ var _excluded = ["children", "className", "definition", "theme"];
|
|
20
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
21
|
var blockClass = "".concat(pkg.prefix, "--non-linear-reading");
|
22
22
|
var componentName = 'NonLinearReading';
|
23
|
-
|
24
|
-
// Default values for props
|
25
|
-
var defaults = {
|
26
|
-
theme: 'light'
|
27
|
-
};
|
28
|
-
|
29
23
|
/**
|
30
24
|
* Use non-linear reading when space is limited to share a
|
31
25
|
* brief, at-a-glance, summary of a concept that may require
|
@@ -36,7 +30,7 @@ var NonLinearReading = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
36
30
|
className = _ref.className,
|
37
31
|
definition = _ref.definition,
|
38
32
|
_ref$theme = _ref.theme,
|
39
|
-
theme = _ref$theme === void 0 ?
|
33
|
+
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
40
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
41
35
|
var _useState = useState(false),
|
42
36
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -73,6 +67,7 @@ NonLinearReading.propTypes = {
|
|
73
67
|
/**
|
74
68
|
* The keyword of the component appears as a pill.
|
75
69
|
*/
|
70
|
+
|
76
71
|
children: PropTypes.node.isRequired,
|
77
72
|
/**
|
78
73
|
* Provide an optional class to be applied to the containing node.
|
@@ -317,7 +317,7 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
317
317
|
id: blockClass,
|
318
318
|
className: cx(blockClass, className, "".concat(blockClass, "__container")),
|
319
319
|
style: {
|
320
|
-
animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out 250ms') : null
|
320
|
+
animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out forwards 250ms') : null
|
321
321
|
},
|
322
322
|
onAnimationEnd: onAnimationEnd,
|
323
323
|
ref: ref || notificationPanelRef
|
@@ -186,7 +186,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
186
186
|
checkUpdateVerticalSpace();
|
187
187
|
};
|
188
188
|
var handleCollapseToggle = function handleCollapseToggle() {
|
189
|
-
utilSetCollapsed(!fullyCollapsed, metrics.headerOffset, metrics.headerTopValue);
|
189
|
+
utilSetCollapsed(!fullyCollapsed, headerRef, metrics.headerOffset, metrics.headerTopValue);
|
190
190
|
};
|
191
191
|
|
192
192
|
// use effects
|
@@ -305,9 +305,9 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
305
305
|
};
|
306
306
|
useEffect(function () {
|
307
307
|
if (collapseHeader === true) {
|
308
|
-
utilSetCollapsed(collapseHeader, metrics.headerOffset, metrics.headerTopValue);
|
308
|
+
utilSetCollapsed(collapseHeader, headerRef, metrics.headerOffset, metrics.headerTopValue);
|
309
309
|
}
|
310
|
-
}, [collapseHeader, metrics.headerOffset, metrics.headerTopValue]);
|
310
|
+
}, [collapseHeader, metrics.headerOffset, metrics.headerTopValue, headerRef]);
|
311
311
|
useResizeObserver(sizingContainerRef, handleResizeActionBarColumn);
|
312
312
|
useResizeObserver(headerRef, handleResize);
|
313
313
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export const blockClass: string;
|
2
2
|
export function utilCheckUpdateVerticalSpace(headerRef: {}, offsetTopMeasuringRef: {}, navigation: {}, enableBreadcrumbScroll: boolean, hasActionBar: boolean, widthIsNarrow: boolean, setMetrics: () => any): void;
|
3
|
-
export function utilSetCollapsed(collapse: any, headerOffset: any, headerTopValue: any): void;
|
3
|
+
export function utilSetCollapsed(collapse: any, headerRef: any, headerOffset: any, headerTopValue: any): void;
|
4
4
|
export function utilGetBreadcrumbItemForTitle(blockClass: any, collapseTitle: any, title: any): {
|
5
5
|
label: any;
|
6
6
|
title: any;
|
@@ -139,16 +139,17 @@ var utilCheckUpdateVerticalSpace = function utilCheckUpdateVerticalSpace(headerR
|
|
139
139
|
};
|
140
140
|
|
141
141
|
// Trigger a window scroll, if necessary, to set the collapsed state.
|
142
|
-
var utilSetCollapsed = function utilSetCollapsed(collapse, headerOffset, headerTopValue) {
|
142
|
+
var utilSetCollapsed = function utilSetCollapsed(collapse, headerRef, headerOffset, headerTopValue) {
|
143
143
|
/* don't know how to test resize */
|
144
144
|
/* istanbul ignore else */
|
145
|
+
var scrollableTarget = scrollableAncestor(headerRef.current);
|
145
146
|
if (collapse) {
|
146
|
-
|
147
|
+
scrollableTarget.scrollTo({
|
147
148
|
top: headerOffset - headerTopValue,
|
148
149
|
behavior: 'smooth'
|
149
150
|
});
|
150
151
|
} else {
|
151
|
-
|
152
|
+
scrollableTarget.scrollTo({
|
152
153
|
top: 0,
|
153
154
|
behavior: 'smooth'
|
154
155
|
});
|