@carbon/ibm-products 2.46.0 → 2.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/config-dev.css +6 -1
- package/css/config-dev.css.map +1 -1
- package/css/config.css +6 -1
- package/css/config.css.map +1 -1
- package/css/index-full-carbon.css +1323 -264
- 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 +49 -60
- 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 +1323 -264
- 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 +1323 -264
- 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/APIKeyModal/APIKeyModal.types.d.ts +6 -0
- package/es/components/ActionBar/ActionBar.d.ts +58 -2
- package/es/components/ActionBar/ActionBar.js +14 -9
- package/es/components/ActionBar/ActionBarItem.d.ts +36 -2
- package/es/components/ActionBar/ActionBarItem.js +7 -4
- package/es/components/ActionBar/ActionBarOverflowItems.d.ts +55 -16
- package/es/components/ActionBar/ActionBarOverflowItems.js +8 -4
- package/es/components/AddSelect/types/index.d.ts +6 -0
- package/es/components/Card/Card.d.ts +68 -2
- package/es/components/Card/Card.js +28 -35
- package/es/components/Card/CardFooter.d.ts +51 -48
- package/es/components/Card/CardFooter.js +4 -2
- package/es/components/Card/CardHeader.d.ts +67 -49
- package/es/components/Card/CardHeader.js +4 -2
- package/es/components/Coachmark/utils/enums.d.ts +6 -0
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -0
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +17 -4
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +6 -4
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +4 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +8 -2
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +3 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +5 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +20 -4
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +15 -7
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +9 -3
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +19 -6
- package/es/components/DataSpreadsheet/types/index.d.ts +6 -0
- package/es/components/Datagrid/Datagrid/DatagridBody.d.ts +6 -0
- package/es/components/Datagrid/Datagrid/DatagridContent.js +3 -2
- package/es/components/Datagrid/Datagrid/DatagridRefBody.d.ts +6 -0
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -5
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +6 -0
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.d.ts +6 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +13 -8
- package/es/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +7 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +1 -1
- package/es/components/Datagrid/common-column-ids.d.ts +6 -0
- package/es/components/Datagrid/types/index.d.ts +6 -0
- package/es/components/Datagrid/useDatagrid.d.ts +6 -0
- package/es/components/Datagrid/useDisableSelectRows.d.ts +6 -0
- package/es/components/Datagrid/useInitialColumnSort.js +4 -0
- package/es/components/Datagrid/useRowIsMouseOver.d.ts +6 -0
- package/es/components/Datagrid/useSortableColumns.d.ts +5 -4
- package/es/components/Datagrid/useSortableColumns.js +18 -13
- package/es/components/EmptyStates/EmptyState.d.ts +72 -5
- package/es/components/EmptyStates/EmptyState.js +8 -5
- package/es/components/EmptyStates/EmptyStateV2.d.ts +63 -2
- package/es/components/EmptyStates/EmptyStateV2.js +3 -2
- package/es/components/FullPageError/FullPageError.d.ts +36 -2
- package/es/components/FullPageError/FullPageError.js +0 -3
- package/es/components/GetStartedCard/GetStartedCard.d.ts +60 -2
- package/es/components/GetStartedCard/GetStartedCard.js +11 -10
- package/es/components/PageHeader/PageHeaderUtils.js +1 -1
- package/es/components/StringFormatter/utils/enums.js +7 -0
- package/es/components/TagOverflow/TagOverflow.d.ts +35 -4
- package/es/components/TagOverflow/TagOverflow.js +47 -64
- package/es/components/TagOverflow/TagOverflowModal.js +4 -6
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
- package/es/components/TagOverflow/TagOverflowPopover.js +38 -41
- package/es/components/Tearsheet/TearsheetShell.js +4 -1
- package/es/components/UserAvatar/UserAvatar.d.ts +59 -1
- package/es/components/UserAvatar/UserAvatar.js +7 -23
- package/es/global/js/utils/scrollableAncestor.js +7 -0
- package/es/global/js/utils/uuidv4.d.ts +6 -0
- package/es/global/js/utils/uuidv4.js +2 -0
- package/es/global/js/utils/wait.d.ts +6 -0
- package/es/global/js/utils/wait.js +2 -0
- package/flags.js +7 -0
- package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +6 -0
- package/lib/components/ActionBar/ActionBar.d.ts +58 -2
- package/lib/components/ActionBar/ActionBar.js +14 -9
- package/lib/components/ActionBar/ActionBarItem.d.ts +36 -2
- package/lib/components/ActionBar/ActionBarItem.js +6 -3
- package/lib/components/ActionBar/ActionBarOverflowItems.d.ts +55 -16
- package/lib/components/ActionBar/ActionBarOverflowItems.js +8 -4
- package/lib/components/AddSelect/types/index.d.ts +6 -0
- package/lib/components/Card/Card.d.ts +68 -2
- package/lib/components/Card/Card.js +28 -35
- package/lib/components/Card/CardFooter.d.ts +51 -48
- package/lib/components/Card/CardFooter.js +4 -2
- package/lib/components/Card/CardHeader.d.ts +67 -49
- package/lib/components/Card/CardHeader.js +4 -2
- package/lib/components/Coachmark/utils/enums.d.ts +6 -0
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -0
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +16 -3
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +5 -3
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +4 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +8 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +3 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +5 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +20 -4
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +15 -7
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +9 -3
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +19 -6
- package/lib/components/DataSpreadsheet/types/index.d.ts +6 -0
- package/lib/components/Datagrid/Datagrid/DatagridBody.d.ts +6 -0
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +3 -2
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.d.ts +6 -0
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -5
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +6 -0
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/DraggableElement.d.ts +6 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +13 -8
- package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +7 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +1 -1
- package/lib/components/Datagrid/common-column-ids.d.ts +6 -0
- package/lib/components/Datagrid/types/index.d.ts +6 -0
- package/lib/components/Datagrid/useDatagrid.d.ts +6 -0
- package/lib/components/Datagrid/useDisableSelectRows.d.ts +6 -0
- package/lib/components/Datagrid/useInitialColumnSort.js +4 -0
- package/lib/components/Datagrid/useRowIsMouseOver.d.ts +6 -0
- package/lib/components/Datagrid/useSortableColumns.d.ts +5 -4
- package/lib/components/Datagrid/useSortableColumns.js +18 -13
- package/lib/components/EmptyStates/EmptyState.d.ts +72 -5
- package/lib/components/EmptyStates/EmptyState.js +8 -5
- package/lib/components/EmptyStates/EmptyStateV2.d.ts +63 -2
- package/lib/components/EmptyStates/EmptyStateV2.js +3 -2
- package/lib/components/FullPageError/FullPageError.d.ts +36 -2
- package/lib/components/FullPageError/FullPageError.js +0 -3
- package/lib/components/GetStartedCard/GetStartedCard.d.ts +60 -2
- package/lib/components/GetStartedCard/GetStartedCard.js +10 -9
- package/lib/components/PageHeader/PageHeaderUtils.js +1 -1
- package/lib/components/StringFormatter/utils/enums.js +7 -0
- package/lib/components/TagOverflow/TagOverflow.d.ts +35 -4
- package/lib/components/TagOverflow/TagOverflow.js +46 -63
- package/lib/components/TagOverflow/TagOverflowModal.js +4 -6
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
- package/lib/components/TagOverflow/TagOverflowPopover.js +37 -40
- package/lib/components/Tearsheet/TearsheetShell.js +4 -1
- package/lib/components/UserAvatar/UserAvatar.d.ts +59 -1
- package/lib/components/UserAvatar/UserAvatar.js +7 -23
- package/lib/global/js/utils/scrollableAncestor.js +7 -0
- package/lib/global/js/utils/uuidv4.d.ts +6 -0
- package/lib/global/js/utils/uuidv4.js +2 -0
- package/lib/global/js/utils/wait.d.ts +6 -0
- package/lib/global/js/utils/wait.js +2 -0
- package/package.json +4 -4
- package/scss/components/ConditionBuilder/_condition-builder.scss +3 -0
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +18 -2
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +48 -31
- package/scss/components/ConditionBuilder/styles/_index.scss +7 -0
- package/scss/components/CreateModal/_create-modal.scss +0 -4
- package/scss/components/Datagrid/styles/_datagrid.scss +1 -0
- package/scss/components/Datagrid/styles/_useActionsColumn.scss +6 -7
- package/scss/components/Datagrid/styles/_useColumnRightAlign.scss +6 -7
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +6 -7
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +6 -7
- package/scss/components/Datagrid/styles/_useNestedRows.scss +6 -7
- package/scss/components/Datagrid/styles/_useNestedTable.scss +6 -7
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +6 -7
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +6 -7
- package/scss/config-dev.scss +7 -0
- package/scss/config.scss +7 -0
- package/telemetry.yml +2 -0
@@ -1,6 +1,67 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2023, 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
|
+
import '../../global/js/utils/props-helper';
|
9
|
+
interface EmptyStateV2Props {
|
10
|
+
/**
|
11
|
+
* Props for the action button. Refer to the Carbon Components button documentation for full list of props.
|
12
|
+
*/
|
13
|
+
action?: {
|
14
|
+
text?: string;
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* Provide an optional class to be applied to the containing node.
|
18
|
+
*/
|
19
|
+
className?: string;
|
20
|
+
/**
|
21
|
+
* Source for the illustration image if you choose to use your own custom image. Passing an illustration prop will supersede the kind option.
|
22
|
+
*/
|
23
|
+
illustration?: string;
|
24
|
+
/**
|
25
|
+
* The alt text for the illustration
|
26
|
+
*/
|
27
|
+
illustrationDescription?: string;
|
28
|
+
/**
|
29
|
+
* Designates the position of the illustration relative to the content
|
30
|
+
*/
|
31
|
+
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
32
|
+
/**
|
33
|
+
* Empty state illustration theme variations.
|
34
|
+
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
35
|
+
* based on your app's current theme value. Example:
|
36
|
+
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
37
|
+
*/
|
38
|
+
illustrationTheme?: 'light' | 'dark';
|
39
|
+
/**
|
40
|
+
* Determines which predefined illustration will be displayed
|
41
|
+
*/
|
42
|
+
kind?: 'error' | 'noData' | 'noTags' | 'notFound' | 'notifications' | 'unauthorized';
|
43
|
+
/**
|
44
|
+
* Props for the link. Refer to the Carbon Components link documentation for full list of props.
|
45
|
+
*/
|
46
|
+
link?: {
|
47
|
+
text?: string | ReactNode;
|
48
|
+
};
|
49
|
+
/**
|
50
|
+
* Empty state size
|
51
|
+
*/
|
52
|
+
size?: 'sm' | 'lg';
|
53
|
+
/**
|
54
|
+
* Empty state subtext
|
55
|
+
*/
|
56
|
+
subtitle?: string | ReactNode;
|
57
|
+
/**
|
58
|
+
* Empty state heading
|
59
|
+
*/
|
60
|
+
title: string | ReactNode;
|
61
|
+
}
|
1
62
|
/**
|
2
63
|
* This is the V2 version of the `EmptyState` component. To use you must pass the `v2` prop to the V1 version of the component `EmptyState` and use the props below.
|
3
64
|
* In order to avoid breaking changes in the future `EmptyStateV2` is not actually directly importable.
|
4
65
|
*/
|
5
|
-
export let EmptyStateV2: React.ForwardRefExoticComponent<React.RefAttributes<
|
6
|
-
|
66
|
+
export declare let EmptyStateV2: React.ForwardRefExoticComponent<EmptyStateV2Props & React.RefAttributes<HTMLDivElement>>;
|
67
|
+
export {};
|
@@ -18,7 +18,6 @@ import EmptyStateIllustration from './EmptyStateIllustration.js';
|
|
18
18
|
var _excluded = ["action", "className", "illustration", "illustrationDescription", "illustrationPosition", "illustrationTheme", "kind", "link", "size", "subtitle", "title"];
|
19
19
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
20
20
|
var componentName = 'EmptyStateV2';
|
21
|
-
|
22
21
|
/**
|
23
22
|
* This is the V2 version of the `EmptyState` component. To use you must pass the `v2` prop to the V1 version of the component `EmptyState` and use the props below.
|
24
23
|
* In order to avoid breaking changes in the future `EmptyStateV2` is not actually directly importable.
|
@@ -72,6 +71,7 @@ EmptyStateV2.propTypes = {
|
|
72
71
|
/**
|
73
72
|
* Props for the action button. Refer to the Carbon Components button documentation for full list of props.
|
74
73
|
*/
|
74
|
+
/**@ts-ignore*/
|
75
75
|
action: PropTypes.PropTypes.shape({
|
76
76
|
text: PropTypes.string
|
77
77
|
}),
|
@@ -105,8 +105,9 @@ EmptyStateV2.propTypes = {
|
|
105
105
|
/**
|
106
106
|
* Props for the link. Refer to the Carbon Components link documentation for full list of props.
|
107
107
|
*/
|
108
|
+
/**@ts-ignore*/
|
108
109
|
link: PropTypes.shape({
|
109
|
-
text: PropTypes.string
|
110
|
+
text: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
110
111
|
}),
|
111
112
|
/**
|
112
113
|
* Empty state size
|
@@ -1,6 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { ReactNode } from 'react';
|
8
|
+
interface FullPageErrorProps {
|
9
|
+
/**
|
10
|
+
* Provide the contents of the FullPageError.
|
11
|
+
*/
|
12
|
+
children?: ReactNode;
|
13
|
+
/**
|
14
|
+
* Provide an optional class to be applied to the containing node.
|
15
|
+
*/
|
16
|
+
className?: string;
|
17
|
+
/**
|
18
|
+
* String that will provide the description for the error code. <br/>
|
19
|
+
* This is optional for 403 and 404 kinds, and passing this would override their default descriptions.
|
20
|
+
*/
|
21
|
+
description: string;
|
22
|
+
/**
|
23
|
+
* The kind of error page to be displayed, default is custom
|
24
|
+
*/
|
25
|
+
kind?: 'custom' | '403' | '404';
|
26
|
+
/**
|
27
|
+
* String that will describe the error that occurred
|
28
|
+
*/
|
29
|
+
label: string;
|
30
|
+
/**
|
31
|
+
* This will be for the main title of the FullPageError component
|
32
|
+
*/
|
33
|
+
title: string;
|
34
|
+
}
|
1
35
|
/**
|
2
36
|
* Display a full-page error when the requested page is unavailable to the user.
|
3
37
|
* This is typically caused by issues with the requested URL or access permissions.
|
4
38
|
*/
|
5
|
-
export let FullPageError: React.ForwardRefExoticComponent<React.RefAttributes<
|
6
|
-
|
39
|
+
export declare let FullPageError: React.ForwardRefExoticComponent<FullPageErrorProps & React.RefAttributes<HTMLDivElement>>;
|
40
|
+
export {};
|
@@ -21,9 +21,6 @@ var _excluded = ["children", "className", "description", "label", "kind", "title
|
|
21
21
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
22
|
var blockClass = "".concat(pkg.prefix, "--full-page-error");
|
23
23
|
var componentName = 'FullPageError';
|
24
|
-
|
25
|
-
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
26
|
-
|
27
24
|
// Default values for props
|
28
25
|
var defaults = {
|
29
26
|
kind: 'custom'
|
@@ -1,5 +1,63 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
8
|
+
type MetaData = {
|
9
|
+
id?: string;
|
10
|
+
icon?: () => ReactNode;
|
11
|
+
iconDescription?: string;
|
12
|
+
};
|
13
|
+
interface GetStartedCardProps extends PropsWithChildren {
|
14
|
+
/**
|
15
|
+
* Provide an optional class to be applied to the containing node.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* Optional if the card should be disabled
|
20
|
+
*/
|
21
|
+
disabled?: boolean;
|
22
|
+
/**
|
23
|
+
* Provides the action icon that's displayed at the footer of the card
|
24
|
+
*/
|
25
|
+
footerActionIcon: React.ElementType;
|
26
|
+
/**
|
27
|
+
* Optional label for the top of the card
|
28
|
+
*/
|
29
|
+
label?: ReactNode;
|
30
|
+
/**
|
31
|
+
* Optional media content like an image to be placed in the card
|
32
|
+
*/
|
33
|
+
media?: ReactNode;
|
34
|
+
/**
|
35
|
+
* Icons that are displayed on the card showing the time and skill needed
|
36
|
+
*/
|
37
|
+
metadata: readonly MetaData[];
|
38
|
+
/**
|
39
|
+
* Provides the callback for a clickable card
|
40
|
+
*/
|
41
|
+
onClick?: () => void;
|
42
|
+
/**
|
43
|
+
* Provides the icon that's displayed at the top of the card
|
44
|
+
*/
|
45
|
+
pictogram?: () => ReactNode;
|
46
|
+
/**
|
47
|
+
* Provides number for card for tasks in a sequential order
|
48
|
+
*/
|
49
|
+
sequence?: number;
|
50
|
+
/**
|
51
|
+
* Provides the status that's displayed at the top of the card
|
52
|
+
*/
|
53
|
+
status?: 'complete' | 'incomplete';
|
54
|
+
/**
|
55
|
+
* Title that's displayed at the top of the card
|
56
|
+
*/
|
57
|
+
title?: ReactNode;
|
58
|
+
}
|
1
59
|
/**
|
2
60
|
* GetStartedCard a card with icon, number, and media variants
|
3
61
|
*/
|
4
|
-
export let GetStartedCard: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
62
|
+
export declare let GetStartedCard: React.ForwardRefExoticComponent<GetStartedCardProps & React.RefAttributes<HTMLDivElement>>;
|
63
|
+
export {};
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { extends as _extends,
|
8
|
+
import { extends as _extends, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default from 'react';
|
10
10
|
import PropTypes from '../../node_modules/prop-types/index.js';
|
11
11
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
@@ -13,16 +13,14 @@ import { pkg } from '../../settings.js';
|
|
13
13
|
import { Card } from '../Card/Card.js';
|
14
14
|
|
15
15
|
var componentName = 'GetStartedCard';
|
16
|
-
|
17
16
|
/**
|
18
17
|
* GetStartedCard a card with icon, number, and media variants
|
19
18
|
*/
|
20
|
-
var GetStartedCard = /*#__PURE__*/React__default.forwardRef(function (
|
21
|
-
|
22
|
-
|
23
|
-
getStarted: true
|
24
|
-
|
25
|
-
}, rest, getDevtoolsProps(componentName)));
|
19
|
+
var GetStartedCard = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
20
|
+
return /*#__PURE__*/React__default.createElement(Card, _extends({}, _objectSpread2(_objectSpread2({}, props), {}, {
|
21
|
+
ref: ref,
|
22
|
+
getStarted: true
|
23
|
+
}), getDevtoolsProps(componentName)));
|
26
24
|
});
|
27
25
|
|
28
26
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -40,11 +38,12 @@ GetStartedCard.propTypes = {
|
|
40
38
|
/**
|
41
39
|
* Provides the action icon that's displayed at the footer of the card
|
42
40
|
*/
|
41
|
+
/**@ts-ignore */
|
43
42
|
footerActionIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
44
43
|
/**
|
45
44
|
* Optional label for the top of the card
|
46
45
|
*/
|
47
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.
|
46
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
48
47
|
/**
|
49
48
|
* Optional media content like an image to be placed in the card
|
50
49
|
*/
|
@@ -52,6 +51,7 @@ GetStartedCard.propTypes = {
|
|
52
51
|
/**
|
53
52
|
* Icons that are displayed on the card showing the time and skill needed
|
54
53
|
*/
|
54
|
+
/**@ts-ignore */
|
55
55
|
metadata: PropTypes.arrayOf(PropTypes.shape({
|
56
56
|
id: PropTypes.string,
|
57
57
|
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
@@ -64,6 +64,7 @@ GetStartedCard.propTypes = {
|
|
64
64
|
/**
|
65
65
|
* Provides the icon that's displayed at the top of the card
|
66
66
|
*/
|
67
|
+
/**@ts-ignore */
|
67
68
|
pictogram: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
68
69
|
/**
|
69
70
|
* Provides number for card for tasks in a sequential order
|
@@ -76,7 +77,7 @@ GetStartedCard.propTypes = {
|
|
76
77
|
/**
|
77
78
|
* Title that's displayed at the top of the card
|
78
79
|
*/
|
79
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.
|
80
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
80
81
|
};
|
81
82
|
|
82
83
|
export { GetStartedCard };
|
@@ -72,7 +72,7 @@ var utilCheckUpdateVerticalSpace = function utilCheckUpdateVerticalSpace(headerR
|
|
72
72
|
|
73
73
|
// The header offset calculation is either going to work out at 0 if we have no gap between scrolling container
|
74
74
|
// top and the measuring ref top, or the difference between.
|
75
|
-
update.headerOffset = offsetMeasuringTop
|
75
|
+
update.headerOffset = offsetMeasuringTop !== 0 ? offsetMeasuringTop - scrollableContainerTop : 0;
|
76
76
|
|
77
77
|
/* istanbul ignore next */
|
78
78
|
update.breadcrumbRowHeight = breadcrumbRowEl ? breadcrumbRowEl.clientHeight : 0;
|
@@ -7,6 +7,13 @@
|
|
7
7
|
|
8
8
|
import { defineProperty as _defineProperty } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
|
10
|
+
/**
|
11
|
+
* Copyright IBM Corp. 2024
|
12
|
+
*
|
13
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
15
|
+
*/
|
16
|
+
|
10
17
|
var deprecated_StringFormatterAlignment = {
|
11
18
|
TOP: 'top',
|
12
19
|
TOP_LEFT: 'top-left',
|
@@ -1,10 +1,41 @@
|
|
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
|
-
|
7
|
+
import React, { RefObject, ReactNode } from 'react';
|
8
|
+
export interface TagOverflowItem {
|
9
|
+
className?: string;
|
10
|
+
filter?: string;
|
11
|
+
id: string;
|
12
|
+
label: string;
|
13
|
+
onClose: () => void;
|
14
|
+
tagType?: 'red' | 'magenta' | 'purple' | 'blue' | 'cyan' | 'teal' | 'green' | 'gray' | 'cool-gray' | 'warm-gray' | 'high-contrast' | 'outline';
|
15
|
+
type?: string;
|
16
|
+
}
|
17
|
+
export interface Props {
|
18
|
+
align?: 'start' | 'center' | 'end';
|
19
|
+
allTagsModalSearchLabel?: string;
|
20
|
+
allTagsModalSearchPlaceholderText?: string;
|
21
|
+
allTagsModalTarget?: ReactNode;
|
22
|
+
allTagsModalTitle?: string;
|
23
|
+
className?: string;
|
24
|
+
containingElementRef?: RefObject<HTMLElement>;
|
25
|
+
items: TagOverflowItem[];
|
26
|
+
maxVisible?: number;
|
27
|
+
measurementOffset?: number;
|
28
|
+
multiline?: boolean;
|
29
|
+
overflowAlign?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'left-bottom' | 'left-top' | 'right' | 'right-bottom' | 'right-top';
|
30
|
+
overflowClassName?: string;
|
31
|
+
overflowType?: 'default' | 'tag';
|
32
|
+
onOverflowTagChange?: (arr: TagOverflowItem[]) => void;
|
33
|
+
showAllTagsLabel?: string;
|
34
|
+
tagComponent?: string;
|
35
|
+
}
|
36
|
+
export declare let TagOverflow: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
5
37
|
/**
|
6
38
|
* The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
|
7
39
|
* @returns null if no problems
|
8
40
|
*/
|
9
|
-
export const string_required_if_more_than_10_tags: (props: any, propName: any, componentName: any, location: any, propFullName: any, secret: any) => any;
|
10
|
-
import React from 'react';
|
41
|
+
export declare const string_required_if_more_than_10_tags: (props: any, propName: any, componentName: any, location: any, propFullName: any, secret: any) => any;
|
@@ -6,7 +6,7 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
-
import React__default, { useRef, useState, useCallback, useEffect } from 'react';
|
9
|
+
import React__default, { forwardRef, useRef, useState, useCallback, useEffect, createElement } from 'react';
|
10
10
|
import PropTypes from '../../node_modules/prop-types/index.js';
|
11
11
|
import cx from 'classnames';
|
12
12
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
@@ -18,52 +18,36 @@ import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
|
|
18
18
|
import { TagOverflowPopover } from './TagOverflowPopover.js';
|
19
19
|
import { TagOverflowModal } from './TagOverflowModal.js';
|
20
20
|
|
21
|
-
var _excluded = ["
|
21
|
+
var _excluded = ["align", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
|
22
22
|
_excluded2 = ["className", "id"],
|
23
23
|
_excluded3 = ["tagType"],
|
24
24
|
_excluded4 = ["id", "label", "tagType", "onClose"];
|
25
25
|
var blockClass = "".concat(pkg.prefix, "--tag-overflow");
|
26
26
|
var componentName = 'TagOverflow';
|
27
27
|
var allTagsModalSearchThreshold = 10;
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
showAllTagsLabel =
|
49
|
-
|
50
|
-
|
51
|
-
allTagsModalTarget = _ref.allTagsModalTarget,
|
52
|
-
allTagsModalTitle = _ref.allTagsModalTitle,
|
53
|
-
className = _ref.className,
|
54
|
-
containingElementRef = _ref.containingElementRef,
|
55
|
-
_ref$measurementOffse = _ref.measurementOffset,
|
56
|
-
measurementOffset = _ref$measurementOffse === void 0 ? defaults.measurementOffset : _ref$measurementOffse,
|
57
|
-
maxVisible = _ref.maxVisible,
|
58
|
-
multiline = _ref.multiline,
|
59
|
-
_ref$overflowAlign = _ref.overflowAlign,
|
60
|
-
overflowAlign = _ref$overflowAlign === void 0 ? defaults.overflowAlign : _ref$overflowAlign,
|
61
|
-
overflowClassName = _ref.overflowClassName,
|
62
|
-
_ref$overflowType = _ref.overflowType,
|
63
|
-
overflowType = _ref$overflowType === void 0 ? defaults.overflowType : _ref$overflowType,
|
64
|
-
_ref$onOverflowTagCha = _ref.onOverflowTagChange,
|
65
|
-
onOverflowTagChange = _ref$onOverflowTagCha === void 0 ? defaults.onOverflowTagChange : _ref$onOverflowTagCha,
|
66
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
28
|
+
var TagOverflow = /*#__PURE__*/forwardRef(function (props, ref) {
|
29
|
+
var _props$align = props.align,
|
30
|
+
align = _props$align === void 0 ? 'start' : _props$align,
|
31
|
+
allTagsModalSearchLabel = props.allTagsModalSearchLabel,
|
32
|
+
allTagsModalSearchPlaceholderText = props.allTagsModalSearchPlaceholderText,
|
33
|
+
allTagsModalTarget = props.allTagsModalTarget,
|
34
|
+
allTagsModalTitle = props.allTagsModalTitle,
|
35
|
+
className = props.className,
|
36
|
+
containingElementRef = props.containingElementRef,
|
37
|
+
items = props.items,
|
38
|
+
maxVisible = props.maxVisible,
|
39
|
+
_props$measurementOff = props.measurementOffset,
|
40
|
+
measurementOffset = _props$measurementOff === void 0 ? 0 : _props$measurementOff,
|
41
|
+
multiline = props.multiline,
|
42
|
+
_props$overflowAlign = props.overflowAlign,
|
43
|
+
overflowAlign = _props$overflowAlign === void 0 ? 'bottom' : _props$overflowAlign,
|
44
|
+
overflowClassName = props.overflowClassName,
|
45
|
+
_props$overflowType = props.overflowType,
|
46
|
+
overflowType = _props$overflowType === void 0 ? 'default' : _props$overflowType,
|
47
|
+
onOverflowTagChange = props.onOverflowTagChange,
|
48
|
+
showAllTagsLabel = props.showAllTagsLabel,
|
49
|
+
tagComponent = props.tagComponent,
|
50
|
+
rest = _objectWithoutProperties(props, _excluded);
|
67
51
|
var localContainerRef = useRef(null);
|
68
52
|
var containerRef = ref || localContainerRef;
|
69
53
|
var itemRefs = useRef(null);
|
@@ -100,7 +84,9 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
100
84
|
setShowAllModalOpen(false);
|
101
85
|
};
|
102
86
|
var handleResize = function handleResize() {
|
103
|
-
|
87
|
+
if (typeof resizeElm !== 'function' && resizeElm.current) {
|
88
|
+
setContainerWidth(resizeElm.current.offsetWidth);
|
89
|
+
}
|
104
90
|
};
|
105
91
|
useResizeObserver(resizeElm, handleResize);
|
106
92
|
var getMap = function getMap() {
|
@@ -116,7 +102,6 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
116
102
|
}
|
117
103
|
};
|
118
104
|
var getVisibleItems = useCallback(function () {
|
119
|
-
var _overflowRef$current;
|
120
105
|
if (!itemRefs.current) {
|
121
106
|
return items;
|
122
107
|
}
|
@@ -128,13 +113,13 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
128
113
|
var optionalContainingElement = containingElementRef === null || containingElementRef === void 0 ? void 0 : containingElementRef.current;
|
129
114
|
var measurementOffsetValue = typeof measurementOffset === 'number' ? measurementOffset : 0;
|
130
115
|
var spaceAvailable = optionalContainingElement ? optionalContainingElement.offsetWidth - measurementOffsetValue : containerWidth;
|
131
|
-
var overflowContainerWidth =
|
116
|
+
var overflowContainerWidth = overflowRef && overflowRef.current && overflowRef.current.offsetWidth > overflowIndicatorWidth ? overflowRef.current.offsetWidth : overflowIndicatorWidth;
|
132
117
|
var maxWidth = spaceAvailable - overflowContainerWidth;
|
133
118
|
var childrenWidth = 0;
|
134
119
|
var maxReached = false;
|
135
120
|
return items.reduce(function (prev, cur) {
|
136
121
|
if (!maxReached) {
|
137
|
-
var itemWidth = map.get(cur.id) + itemOffset;
|
122
|
+
var itemWidth = (map ? Number(map.get(cur.id)) : 0) + itemOffset;
|
138
123
|
var fits = itemWidth + childrenWidth < maxWidth;
|
139
124
|
if (fits) {
|
140
125
|
childrenWidth += itemWidth;
|
@@ -145,12 +130,13 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
145
130
|
}
|
146
131
|
return prev;
|
147
132
|
}, []);
|
148
|
-
}, [
|
149
|
-
var getCustomComponent = function getCustomComponent(item) {
|
133
|
+
}, [containerWidth, containingElementRef, items, maxVisible, measurementOffset, multiline]);
|
134
|
+
var getCustomComponent = function getCustomComponent(item, tagComponent) {
|
150
135
|
var className = item.className,
|
151
136
|
id = item.id,
|
152
137
|
other = _objectWithoutProperties(item, _excluded2);
|
153
|
-
return /*#__PURE__*/
|
138
|
+
return /*#__PURE__*/createElement(tagComponent, _objectSpread2(_objectSpread2({}, other), {}, {
|
139
|
+
key: id,
|
154
140
|
className: cx("".concat(blockClass, "__item"), className),
|
155
141
|
ref: function ref(node) {
|
156
142
|
return itemRefHandler(id, node);
|
@@ -164,9 +150,9 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
164
150
|
visibleItemsArr = (_visibleItemsArr = visibleItemsArr) === null || _visibleItemsArr === void 0 ? void 0 : _visibleItemsArr.slice(0, maxVisible);
|
165
151
|
}
|
166
152
|
var hiddenItems = items === null || items === void 0 ? void 0 : items.slice(visibleItemsArr.length);
|
167
|
-
var overflowItemsArr = hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.map(function (
|
168
|
-
var tagType =
|
169
|
-
other = _objectWithoutProperties(
|
153
|
+
var overflowItemsArr = hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.map(function (_ref) {
|
154
|
+
var tagType = _ref.tagType,
|
155
|
+
other = _objectWithoutProperties(_ref, _excluded3);
|
170
156
|
return _objectSpread2({
|
171
157
|
type: tagType
|
172
158
|
}, other);
|
@@ -174,10 +160,10 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
174
160
|
setVisibleItems(visibleItemsArr);
|
175
161
|
setOverflowItems(overflowItemsArr);
|
176
162
|
onOverflowTagChange === null || onOverflowTagChange === void 0 || onOverflowTagChange(overflowItemsArr);
|
177
|
-
}, [
|
163
|
+
}, [getVisibleItems, items, maxVisible, onOverflowTagChange]);
|
178
164
|
var handleTagOnClose = useCallback(function (onClose, index) {
|
179
165
|
onClose === null || onClose === void 0 || onClose();
|
180
|
-
if (index <= visibleItems.length - 1) {
|
166
|
+
if (index <= (visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length) - 1) {
|
181
167
|
setPopoverOpen(false);
|
182
168
|
}
|
183
169
|
}, [visibleItems]);
|
@@ -185,10 +171,10 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
185
171
|
className: cx(blockClass, className, "".concat(blockClass, "--align-").concat(align), _defineProperty({}, "".concat(blockClass, "--multiline"), multiline)),
|
186
172
|
ref: containerRef,
|
187
173
|
role: "main"
|
188
|
-
}, getDevtoolsProps(componentName)), visibleItems.length > 0 && visibleItems.map(function (item, index) {
|
174
|
+
}, getDevtoolsProps(componentName)), (visibleItems === null || visibleItems === void 0 ? void 0 : visibleItems.length) > 0 && visibleItems.map(function (item, index) {
|
189
175
|
// Render custom components
|
190
176
|
if (tagComponent) {
|
191
|
-
return getCustomComponent(item);
|
177
|
+
return getCustomComponent(item, tagComponent);
|
192
178
|
} else {
|
193
179
|
var id = item.id,
|
194
180
|
label = item.label,
|
@@ -215,7 +201,7 @@ var TagOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
215
201
|
}), /*#__PURE__*/React__default.createElement("span", {
|
216
202
|
className: "".concat(blockClass, "__indicator"),
|
217
203
|
ref: overflowRef
|
218
|
-
}, overflowItems.length > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TagOverflowPopover, {
|
204
|
+
}, (overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TagOverflowPopover, {
|
219
205
|
allTagsModalSearchThreshold: allTagsModalSearchThreshold,
|
220
206
|
className: overflowClassName,
|
221
207
|
onShowAllClick: handleShowAllClick,
|
@@ -251,9 +237,9 @@ var tagTypes = Object.keys(TYPES);
|
|
251
237
|
* The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
|
252
238
|
* @returns null if no problems
|
253
239
|
*/
|
254
|
-
var string_required_if_more_than_10_tags = isRequiredIf(PropTypes.string, function (
|
255
|
-
var items =
|
256
|
-
return items
|
240
|
+
var string_required_if_more_than_10_tags = isRequiredIf(PropTypes.string, function (_ref2) {
|
241
|
+
var items = _ref2.items;
|
242
|
+
return (items === null || items === void 0 ? void 0 : items.length) > allTagsModalSearchThreshold;
|
257
243
|
});
|
258
244
|
|
259
245
|
// The types and DocGen commentary for the component props,
|
@@ -284,11 +270,6 @@ TagOverflow.propTypes = {
|
|
284
270
|
* Provide an optional class to be applied to the containing node.
|
285
271
|
*/
|
286
272
|
className: PropTypes.string,
|
287
|
-
/**
|
288
|
-
* Optional ref for custom resize container to measure available space
|
289
|
-
* Default will measure the available space of the TagSet container itself.
|
290
|
-
*/
|
291
|
-
containingElementRef: PropTypes.object,
|
292
273
|
/**
|
293
274
|
* The items to be shown in the TagOverflow. Each item is specified as an object with properties:
|
294
275
|
* **label**\* (required) to supply the content,
|
@@ -299,6 +280,7 @@ TagOverflow.propTypes = {
|
|
299
280
|
* If you want to render a custom component, pass it as tagComponent prop and
|
300
281
|
* then pass the props required for your custom component as the properties of item object
|
301
282
|
*/
|
283
|
+
//@ts-ignore
|
302
284
|
items: PropTypes.arrayOf(PropTypes.shape({
|
303
285
|
id: PropTypes.string.isRequired,
|
304
286
|
label: PropTypes.string.isRequired,
|
@@ -342,6 +324,7 @@ TagOverflow.propTypes = {
|
|
342
324
|
/** Component definition of the items to be rendered inside TagOverflow.
|
343
325
|
* If this is not passed, items will be rendered as Tag component
|
344
326
|
*/
|
327
|
+
//@ts-ignore
|
345
328
|
tagComponent: PropTypes.elementType
|
346
329
|
};
|
347
330
|
|
@@ -14,8 +14,7 @@ import { pkg } from '../../settings.js';
|
|
14
14
|
import { prepareProps } from '../../global/js/utils/props-helper.js';
|
15
15
|
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
16
16
|
|
17
|
-
var _excluded = ["allTags", "className", "title", "onClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"]
|
18
|
-
_excluded2 = ["label", "id", "filter"];
|
17
|
+
var _excluded = ["allTags", "className", "title", "onClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"];
|
19
18
|
var componentName = 'TagOverflowModal';
|
20
19
|
var blockClass = "".concat(pkg.prefix, "--tag-overflow-modal");
|
21
20
|
|
@@ -77,13 +76,12 @@ var TagOverflowModal = function TagOverflowModal(_ref) {
|
|
77
76
|
}, getFilteredItems().map(function (_ref2) {
|
78
77
|
var label = _ref2.label,
|
79
78
|
id = _ref2.id,
|
80
|
-
filter = _ref2.filter
|
81
|
-
other = _objectWithoutProperties(_ref2, _excluded2);
|
79
|
+
filter = _ref2.filter;
|
82
80
|
var isFilterable = overflowType === 'tag' ? filter : false;
|
83
|
-
return /*#__PURE__*/React__default.createElement(Tag,
|
81
|
+
return /*#__PURE__*/React__default.createElement(Tag, {
|
84
82
|
key: id,
|
85
83
|
filter: isFilterable
|
86
|
-
}
|
84
|
+
}, label);
|
87
85
|
})), /*#__PURE__*/React__default.createElement("div", {
|
88
86
|
className: "".concat(blockClass, "__fade")
|
89
87
|
})));
|
@@ -1,2 +1,14 @@
|
|
1
|
-
export const TagOverflowPopover: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
2
1
|
import React from 'react';
|
2
|
+
import { TagOverflowItem } from './TagOverflow';
|
3
|
+
export interface Props {
|
4
|
+
allTagsModalSearchThreshold?: number;
|
5
|
+
className?: string;
|
6
|
+
onShowAllClick: () => void;
|
7
|
+
overflowAlign?: string;
|
8
|
+
overflowTags: TagOverflowItem[];
|
9
|
+
overflowType?: string;
|
10
|
+
popoverOpen?: boolean;
|
11
|
+
setPopoverOpen?: (x: boolean) => void;
|
12
|
+
showAllTagsLabel?: string;
|
13
|
+
}
|
14
|
+
export declare const TagOverflowPopover: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|