@carbon/ibm-products 2.52.0 → 2.53.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/README.md +3 -3
- package/css/index-full-carbon.css +306 -298
- 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 +94 -27
- 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 +110 -44
- 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 +179 -118
- 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/APIKeyDownloader.d.ts +2 -1
- package/es/components/APIKeyModal/APIKeyModal.js +1 -1
- package/es/components/AboutModal/AboutModal.js +2 -4
- package/es/components/ActionBar/ActionBarOverflowItems.d.ts +2 -2
- package/es/components/AddSelect/AddSelectBody.js +8 -1
- package/es/components/AddSelect/AddSelectBreadcrumbs.d.ts +2 -1
- package/es/components/AddSelect/AddSelectColumn.d.ts +2 -1
- package/es/components/AddSelect/AddSelectFilter.d.ts +2 -1
- package/es/components/AddSelect/AddSelectFilter.js +5 -5
- package/es/components/AddSelect/AddSelectFormControl.d.ts +2 -1
- package/es/components/AddSelect/AddSelectList.d.ts +2 -1
- package/es/components/AddSelect/AddSelectMetaPanel.d.ts +2 -1
- package/es/components/AddSelect/AddSelectRow.d.ts +2 -1
- package/es/components/AddSelect/AddSelectSidebar.d.ts +2 -1
- package/es/components/AddSelect/AddSelectSidebar.js +1 -1
- package/es/components/AddSelect/AddSelectSort.d.ts +2 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +2 -1
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.d.ts +2 -1
- package/es/components/Card/Card.d.ts +5 -1
- package/es/components/Card/Card.js +9 -2
- package/es/components/Card/CardFooter.d.ts +1 -1
- package/es/components/Card/CardHeader.d.ts +12 -2
- package/es/components/Card/CardHeader.js +17 -9
- package/es/components/Carousel/Carousel.js +17 -8
- package/es/components/Checklist/ChecklistChart.js +22 -6
- package/es/components/Coachmark/Coachmark.js +18 -11
- package/es/components/Coachmark/CoachmarkOverlay.js +30 -19
- package/es/components/Coachmark/utils/hooks.js +1 -1
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +2 -2
- package/es/components/CoachmarkStack/CoachmarkStack.js +1 -1
- package/es/components/ComboButton/ComboButtonItem/index.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -6
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -8
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +0 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +5 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +2 -1
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +65 -61
- package/es/components/ConditionBuilder/utils/util.js +0 -2
- package/es/components/CreateInfluencer/CreateInfluencer.d.ts +2 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +4 -4
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +5 -1
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.d.ts +2 -2
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -4
- package/es/components/Datagrid/Datagrid/DatagridHead.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +13 -10
- package/es/components/Datagrid/Datagrid/DatagridRefBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +14 -10
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.d.ts +2 -2
- package/es/components/Datagrid/Datagrid/addons/{Slug/DatagridSlug.d.ts → AiLabel/DatagridAiLabel.d.ts} +3 -3
- package/es/components/Datagrid/Datagrid/addons/AiLabel/DatagridAiLabel.js +29 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/es/components/Datagrid/index.d.ts +29 -22
- package/es/components/Datagrid/types/index.d.ts +7 -7
- package/es/components/Datagrid/useActionsColumn.js +1 -2
- package/es/components/Datagrid/useColumnCenterAlign.js +1 -2
- package/es/components/Datagrid/useColumnRightAlign.js +1 -2
- package/es/components/Datagrid/useCustomizeColumns.js +1 -2
- package/es/components/Datagrid/useDatagrid.js +1 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +3 -3
- package/es/components/Datagrid/useDisableSelectRows.js +1 -2
- package/es/components/Datagrid/useExpandedRow.js +1 -2
- package/es/components/Datagrid/useFiltering.js +1 -2
- package/es/components/Datagrid/useFlexResize.js +1 -1
- package/es/components/Datagrid/useInfiniteScroll.js +1 -2
- package/es/components/Datagrid/useInlineEdit.js +1 -2
- package/es/components/Datagrid/useNestedRowExpander.js +2 -2
- package/es/components/Datagrid/useNestedRows.js +1 -2
- package/es/components/Datagrid/useOnRowClick.js +1 -2
- package/es/components/Datagrid/useParentDimensions.js +5 -5
- package/es/components/Datagrid/useRowExpander.js +6 -7
- package/es/components/Datagrid/useRowIsMouseOver.js +1 -2
- package/es/components/Datagrid/useSelectAllToggle.js +1 -2
- package/es/components/Datagrid/useSelectRows.js +1 -2
- package/es/components/Datagrid/useSortableColumns.js +7 -8
- package/es/components/Datagrid/useStickyColumn.js +4 -5
- package/es/components/EmptyStates/EmptyState.d.ts +1 -1
- package/es/components/EmptyStates/EmptyState.js +8 -2
- package/es/components/EmptyStates/EmptyStateContent.d.ts +2 -1
- package/es/components/EmptyStates/EmptyStateIllustration.d.ts +2 -1
- package/es/components/EmptyStates/EmptyStateV2.d.ts +1 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/es/components/EmptyStates/ErrorEmptyState/index.d.ts +8 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/index.d.ts +8 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/index.d.ts +8 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/index.d.ts +8 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -2
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/index.d.ts +8 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/index.d.ts +8 -1
- package/es/components/EmptyStates/assets/ErrorIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NoDataIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NoDataIllustration.js +5 -5
- package/es/components/EmptyStates/assets/NoTagsIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NotFoundIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NotificationsIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +8 -8
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.d.ts +2 -1
- package/es/components/EmptyStates/index.d.ts +22 -8
- package/es/components/ExportModal/ExportModal.js +1 -3
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +5 -0
- package/es/components/ExpressiveCard/ExpressiveCard.js +5 -0
- package/es/components/FeatureFlags/index.d.ts +5 -4
- package/es/components/FeatureFlags/index.js +17 -10
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/es/components/FullPageError/assets/Error403SVG.d.ts +2 -1
- package/es/components/FullPageError/assets/Error404SVG.d.ts +2 -1
- package/es/components/FullPageError/assets/ErrorGenericSVG.d.ts +2 -1
- package/es/components/HTTPErrors/HTTPErrorContent.d.ts +2 -1
- package/es/components/HTTPErrors/assets/HTTPErrorSvg403.d.ts +2 -1
- package/es/components/HTTPErrors/assets/HTTPErrorSvg404.d.ts +2 -1
- package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.d.ts +2 -1
- package/es/components/InterstitialScreen/InterstitialScreen.js +4 -4
- package/es/components/Nav/NavItem.d.ts +2 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +8 -1
- package/es/components/PageHeader/PageHeader.d.ts +2 -0
- package/es/components/PageHeader/PageHeader.js +4 -1
- package/es/components/PageHeader/PageHeaderTitle.d.ts +3 -1
- package/es/components/PageHeader/PageHeaderTitle.js +42 -8
- package/es/components/ProductiveCard/ProductiveCard.d.ts +5 -0
- package/es/components/ProductiveCard/ProductiveCard.js +4 -0
- package/es/components/ScrollGradient/ScrollGradient.js +2 -2
- package/es/components/SidePanel/SidePanel.d.ts +5 -0
- package/es/components/SidePanel/SidePanel.js +30 -16
- package/es/components/SimpleHeader/SimpleHeader.d.ts +2 -1
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
- package/es/components/TagOverflow/TagOverflow.d.ts +3 -0
- package/es/components/TagOverflow/TagOverflow.js +9 -4
- package/es/components/TagOverflow/TagOverflowModal.d.ts +6 -1
- package/es/components/TagOverflow/TagOverflowModal.js +17 -6
- package/es/components/TagOverflow/TagOverflowPopover.js +17 -9
- package/es/components/TagSet/TagSet.d.ts +4 -0
- package/es/components/TagSet/TagSet.js +20 -8
- package/es/components/TagSet/TagSetModal.js +0 -1
- package/es/components/Tearsheet/TearsheetShell.d.ts +13 -4
- package/es/components/Tearsheet/TearsheetShell.js +31 -20
- package/es/components/Toolbar/Toolbar.js +1 -1
- package/es/components/TooltipTrigger/TooltipTrigger.d.ts +2 -1
- package/es/components/TruncatedList/TruncatedList.js +1 -1
- package/es/components/_Canary/Canary.d.ts +2 -1
- package/es/global/js/hooks/usePreviousValue.js +1 -1
- package/es/index.js +29 -29
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +742 -740
- package/lib/components/APIKeyModal/APIKeyDownloader.d.ts +2 -1
- package/lib/components/APIKeyModal/APIKeyModal.js +1 -1
- package/lib/components/AboutModal/AboutModal.js +2 -4
- package/lib/components/ActionBar/ActionBarOverflowItems.d.ts +2 -2
- package/lib/components/AddSelect/AddSelectBody.js +8 -1
- package/lib/components/AddSelect/AddSelectBreadcrumbs.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectColumn.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectFilter.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectFilter.js +4 -4
- package/lib/components/AddSelect/AddSelectFormControl.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectList.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectMetaPanel.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectRow.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectSidebar.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectSidebar.js +1 -1
- package/lib/components/AddSelect/AddSelectSort.d.ts +2 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +2 -1
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.d.ts +2 -1
- package/lib/components/Card/Card.d.ts +5 -1
- package/lib/components/Card/Card.js +9 -2
- package/lib/components/Card/CardFooter.d.ts +1 -1
- package/lib/components/Card/CardHeader.d.ts +12 -2
- package/lib/components/Card/CardHeader.js +17 -9
- package/lib/components/Carousel/Carousel.js +17 -8
- package/lib/components/Checklist/ChecklistChart.js +20 -4
- package/lib/components/Coachmark/Coachmark.js +17 -10
- package/lib/components/Coachmark/CoachmarkOverlay.js +29 -18
- package/lib/components/Coachmark/utils/hooks.js +1 -1
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +2 -2
- package/lib/components/CoachmarkStack/CoachmarkStack.js +1 -1
- package/lib/components/ComboButton/ComboButtonItem/index.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -6
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -8
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +0 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +5 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +2 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +65 -61
- package/lib/components/ConditionBuilder/utils/util.js +0 -2
- package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +4 -4
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +5 -1
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.d.ts +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -4
- package/lib/components/Datagrid/Datagrid/DatagridHead.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +13 -10
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +14 -10
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DraggableElement.d.ts +2 -2
- package/lib/components/Datagrid/Datagrid/addons/{Slug/DatagridSlug.d.ts → AiLabel/DatagridAiLabel.d.ts} +3 -3
- package/lib/components/Datagrid/Datagrid/addons/AiLabel/DatagridAiLabel.js +31 -0
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +5 -5
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +5 -5
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/lib/components/Datagrid/index.d.ts +29 -22
- package/lib/components/Datagrid/types/index.d.ts +7 -7
- package/lib/components/Datagrid/useActionsColumn.js +1 -2
- package/lib/components/Datagrid/useColumnCenterAlign.js +1 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +1 -2
- package/lib/components/Datagrid/useCustomizeColumns.js +1 -2
- package/lib/components/Datagrid/useDatagrid.js +1 -2
- package/lib/components/Datagrid/useDefaultStringRenderer.js +3 -3
- package/lib/components/Datagrid/useDisableSelectRows.js +1 -2
- package/lib/components/Datagrid/useExpandedRow.js +1 -2
- package/lib/components/Datagrid/useFiltering.js +1 -2
- package/lib/components/Datagrid/useFlexResize.js +1 -1
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -2
- package/lib/components/Datagrid/useInlineEdit.js +1 -2
- package/lib/components/Datagrid/useNestedRowExpander.js +2 -2
- package/lib/components/Datagrid/useNestedRows.js +1 -2
- package/lib/components/Datagrid/useOnRowClick.js +1 -2
- package/lib/components/Datagrid/useParentDimensions.js +5 -5
- package/lib/components/Datagrid/useRowExpander.js +6 -7
- package/lib/components/Datagrid/useRowIsMouseOver.js +1 -2
- package/lib/components/Datagrid/useSelectAllToggle.js +1 -2
- package/lib/components/Datagrid/useSelectRows.js +1 -2
- package/lib/components/Datagrid/useSortableColumns.js +7 -8
- package/lib/components/Datagrid/useStickyColumn.js +4 -5
- package/lib/components/EmptyStates/EmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/EmptyState.js +7 -1
- package/lib/components/EmptyStates/EmptyStateContent.d.ts +2 -1
- package/lib/components/EmptyStates/EmptyStateIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/EmptyStateV2.d.ts +1 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -2
- package/lib/components/EmptyStates/ErrorEmptyState/index.d.ts +8 -1
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -2
- package/lib/components/EmptyStates/NoDataEmptyState/index.d.ts +8 -1
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/index.d.ts +8 -1
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/index.d.ts +8 -1
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -2
- package/lib/components/EmptyStates/NotificationsEmptyState/index.d.ts +8 -1
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -2
- package/lib/components/EmptyStates/UnauthorizedEmptyState/index.d.ts +8 -1
- package/lib/components/EmptyStates/assets/ErrorIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NoDataIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +5 -5
- package/lib/components/EmptyStates/assets/NoTagsIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NotFoundIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NotificationsIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +8 -8
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/index.d.ts +22 -8
- package/lib/components/ExportModal/ExportModal.js +1 -3
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +5 -0
- package/lib/components/ExpressiveCard/ExpressiveCard.js +5 -0
- package/lib/components/FeatureFlags/index.d.ts +5 -4
- package/lib/components/FeatureFlags/index.js +16 -9
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/lib/components/FullPageError/assets/Error403SVG.d.ts +2 -1
- package/lib/components/FullPageError/assets/Error404SVG.d.ts +2 -1
- package/lib/components/FullPageError/assets/ErrorGenericSVG.d.ts +2 -1
- package/lib/components/HTTPErrors/HTTPErrorContent.d.ts +2 -1
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.d.ts +2 -1
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.d.ts +2 -1
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.d.ts +2 -1
- package/lib/components/InterstitialScreen/InterstitialScreen.js +4 -4
- package/lib/components/Nav/NavItem.d.ts +2 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +8 -1
- package/lib/components/PageHeader/PageHeader.d.ts +2 -0
- package/lib/components/PageHeader/PageHeader.js +4 -1
- package/lib/components/PageHeader/PageHeaderTitle.d.ts +3 -1
- package/lib/components/PageHeader/PageHeaderTitle.js +39 -5
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +5 -0
- package/lib/components/ProductiveCard/ProductiveCard.js +4 -0
- package/lib/components/ScrollGradient/ScrollGradient.js +2 -2
- package/lib/components/SidePanel/SidePanel.d.ts +5 -0
- package/lib/components/SidePanel/SidePanel.js +30 -16
- package/lib/components/SimpleHeader/SimpleHeader.d.ts +2 -1
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +3 -0
- package/lib/components/TagOverflow/TagOverflow.js +8 -3
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +6 -1
- package/lib/components/TagOverflow/TagOverflowModal.js +16 -5
- package/lib/components/TagOverflow/TagOverflowPopover.js +16 -8
- package/lib/components/TagSet/TagSet.d.ts +4 -0
- package/lib/components/TagSet/TagSet.js +19 -7
- package/lib/components/TagSet/TagSetModal.js +0 -1
- package/lib/components/Tearsheet/TearsheetShell.d.ts +13 -4
- package/lib/components/Tearsheet/TearsheetShell.js +31 -20
- package/lib/components/Toolbar/Toolbar.js +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.d.ts +2 -1
- package/lib/components/TruncatedList/TruncatedList.js +1 -1
- package/lib/components/_Canary/Canary.d.ts +2 -1
- package/lib/global/js/hooks/usePreviousValue.js +1 -1
- package/lib/index.js +88 -88
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +742 -740
- package/package.json +11 -11
- package/scss/components/Card/_card.scss +14 -6
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +4 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +82 -2
- package/scss/components/PageHeader/_page-header.scss +16 -3
- package/scss/components/SidePanel/_side-panel.scss +12 -6
- package/scss/components/Tearsheet/_tearsheet.scss +13 -3
- package/telemetry.yml +1 -0
- package/es/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.js +0 -29
- package/lib/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.js +0 -31
@@ -11,6 +11,10 @@ interface TagOverflowModalProps {
|
|
11
11
|
className?: string;
|
12
12
|
modalAriaLabel?: string;
|
13
13
|
onClose?: () => void;
|
14
|
+
onTagClose?: (params: {
|
15
|
+
label: string;
|
16
|
+
id: any;
|
17
|
+
}) => void;
|
14
18
|
open?: boolean;
|
15
19
|
overflowType?: 'default' | 'tag';
|
16
20
|
portalTarget?: ReactNode;
|
@@ -19,13 +23,14 @@ interface TagOverflowModalProps {
|
|
19
23
|
title?: string;
|
20
24
|
}
|
21
25
|
export declare const TagOverflowModal: {
|
22
|
-
({ allTags, className, title, modalAriaLabel, onClose, open, overflowType, portalTarget: portalTargetIn, searchLabel, searchPlaceholder, ...rest }: TagOverflowModalProps): any;
|
26
|
+
({ allTags, className, title, modalAriaLabel, onClose, onTagClose, open, overflowType, portalTarget: portalTargetIn, searchLabel, searchPlaceholder, ...rest }: TagOverflowModalProps): any;
|
23
27
|
propTypes: {
|
24
28
|
allTags: PropTypes.Requireable<(PropTypes.InferProps<{
|
25
29
|
label: PropTypes.Validator<string>;
|
26
30
|
}> | null | undefined)[]>;
|
27
31
|
className: PropTypes.Requireable<string>;
|
28
32
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
33
|
+
onTagClose: PropTypes.Requireable<(...args: any[]) => any>;
|
29
34
|
open: PropTypes.Requireable<boolean>;
|
30
35
|
overflowType: PropTypes.Requireable<string>;
|
31
36
|
portalTarget: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
@@ -16,7 +16,7 @@ var settings = require('../../settings.js');
|
|
16
16
|
var propsHelper = require('../../global/js/utils/props-helper.js');
|
17
17
|
var usePortalTarget = require('../../global/js/hooks/usePortalTarget.js');
|
18
18
|
|
19
|
-
var _excluded = ["allTags", "className", "title", "modalAriaLabel", "onClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"];
|
19
|
+
var _excluded = ["allTags", "className", "title", "modalAriaLabel", "onClose", "onTagClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"];
|
20
20
|
var componentName = 'TagOverflowModal';
|
21
21
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-overflow-modal");
|
22
22
|
|
@@ -34,6 +34,7 @@ var TagOverflowModal = function TagOverflowModal(_ref) {
|
|
34
34
|
_ref$modalAriaLabel = _ref.modalAriaLabel,
|
35
35
|
modalAriaLabel = _ref$modalAriaLabel === void 0 ? defaults.modalAriaLabel : _ref$modalAriaLabel,
|
36
36
|
onClose = _ref.onClose,
|
37
|
+
onTagClose = _ref.onTagClose,
|
37
38
|
open = _ref.open,
|
38
39
|
overflowType = _ref.overflowType,
|
39
40
|
portalTargetIn = _ref.portalTarget,
|
@@ -84,11 +85,20 @@ var TagOverflowModal = function TagOverflowModal(_ref) {
|
|
84
85
|
}, getFilteredItems().map(function (_ref2) {
|
85
86
|
var label = _ref2.label,
|
86
87
|
id = _ref2.id,
|
87
|
-
filter = _ref2.filter
|
88
|
-
|
89
|
-
|
88
|
+
filter = _ref2.filter,
|
89
|
+
onClose = _ref2.onClose;
|
90
|
+
var isFilterable = overflowType === 'tag' && (typeof onClose === 'function' || filter);
|
91
|
+
return isFilterable ? /*#__PURE__*/React.createElement(react.DismissibleTag, {
|
90
92
|
key: id,
|
91
|
-
|
93
|
+
text: label,
|
94
|
+
onClose: function onClose() {
|
95
|
+
return onTagClose === null || onTagClose === void 0 ? void 0 : onTagClose({
|
96
|
+
label: label,
|
97
|
+
id: id
|
98
|
+
});
|
99
|
+
}
|
100
|
+
}) : /*#__PURE__*/React.createElement(react.Tag, {
|
101
|
+
key: id
|
92
102
|
}, label);
|
93
103
|
}), /*#__PURE__*/React.createElement("div", {
|
94
104
|
className: "".concat(blockClass, "__fade")
|
@@ -100,6 +110,7 @@ TagOverflowModal.propTypes = {
|
|
100
110
|
}))),
|
101
111
|
className: index.default.string,
|
102
112
|
onClose: index.default.func,
|
113
|
+
onTagClose: index.default.func,
|
103
114
|
open: index.default.bool,
|
104
115
|
overflowType: index.default.oneOf(['default', 'tag']),
|
105
116
|
portalTarget: index.default.node,
|
@@ -90,17 +90,25 @@ var TagOverflowPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
90
90
|
_onClose = _ref.onClose,
|
91
91
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded2);
|
92
92
|
var typeValue = overflowType === 'tag' ? 'high-contrast' : tagType;
|
93
|
-
var isFilterable = overflowType === 'tag'
|
93
|
+
var isFilterable = overflowType === 'tag' && (typeof _onClose === 'function' || filter);
|
94
|
+
var tag;
|
95
|
+
if (isFilterable) {
|
96
|
+
tag = /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
97
|
+
onClose: function onClose() {
|
98
|
+
return _onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
99
|
+
},
|
100
|
+
type: typeValue,
|
101
|
+
text: label
|
102
|
+
}));
|
103
|
+
} else {
|
104
|
+
tag = /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
105
|
+
type: typeValue
|
106
|
+
}), label);
|
107
|
+
}
|
94
108
|
return /*#__PURE__*/React.createElement("li", {
|
95
109
|
className: cx("".concat(blockClass, "__tag-item"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__tag-item--default"), overflowType === 'default'), "".concat(blockClass, "__tag-item--tag"), overflowType === 'tag')),
|
96
110
|
key: id
|
97
|
-
}, overflowType === 'tag' ?
|
98
|
-
onClose: function onClose() {
|
99
|
-
return _onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
100
|
-
},
|
101
|
-
type: typeValue,
|
102
|
-
filter: isFilterable
|
103
|
-
}), label) : label);
|
111
|
+
}, overflowType === 'tag' ? tag : label);
|
104
112
|
})), ((_overflowTags$length = overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length) !== null && _overflowTags$length !== void 0 ? _overflowTags$length : 0) > (allTagsModalSearchThreshold !== null && allTagsModalSearchThreshold !== void 0 ? allTagsModalSearchThreshold : 0) && /*#__PURE__*/React.createElement(react.Link, {
|
105
113
|
className: "".concat(blockClass, "__show-all-tags-link"),
|
106
114
|
href: "",
|
@@ -6,6 +6,10 @@ type OverflowType = 'default' | 'tag';
|
|
6
6
|
type TagType = {
|
7
7
|
label: string;
|
8
8
|
type?: keyof typeof tagTypes;
|
9
|
+
/**
|
10
|
+
* @deprecated Use the `onClose` function instead to render as a DismissibleTag
|
11
|
+
*/
|
12
|
+
filter?: boolean;
|
9
13
|
} & TagBaseProps;
|
10
14
|
export interface TagSetProps extends PropsWithChildren {
|
11
15
|
/**
|
@@ -20,8 +20,8 @@ var settings = require('../../settings.js');
|
|
20
20
|
var useResizeObserver = require('../../global/js/hooks/useResizeObserver.js');
|
21
21
|
|
22
22
|
var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalAriaLabel", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "onOverflowClick", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
|
23
|
-
_excluded2 = ["label", "id"],
|
24
|
-
_excluded3 = ["label", "onClose"];
|
23
|
+
_excluded2 = ["label", "id", "filter", "onClose"],
|
24
|
+
_excluded3 = ["label", "onClose", "filter"];
|
25
25
|
var componentName = 'TagSet';
|
26
26
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-set");
|
27
27
|
var allTagsModalSearchThreshold = 10;
|
@@ -110,6 +110,8 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
110
110
|
setHiddenSizingTags(tags && tags.length > 0 ? tags.map(function (_ref2, index) {
|
111
111
|
var label = _ref2.label,
|
112
112
|
id = _ref2.id,
|
113
|
+
filter = _ref2.filter,
|
114
|
+
onClose = _ref2.onClose,
|
113
115
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
114
116
|
return /*#__PURE__*/React.createElement("div", {
|
115
117
|
key: index,
|
@@ -119,7 +121,10 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
119
121
|
newSizingTags[index] = el;
|
120
122
|
}
|
121
123
|
}
|
122
|
-
}, /*#__PURE__*/React.createElement(react.
|
124
|
+
}, typeof onClose === 'function' || filter ? /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
125
|
+
"data-original-id": id,
|
126
|
+
text: label
|
127
|
+
})) : /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
123
128
|
// ensure id is not duplicated
|
124
129
|
"data-original-id": id
|
125
130
|
}), label));
|
@@ -138,15 +143,22 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
138
143
|
var newDisplayedTags = tags && tags.length > 0 ? tags.map(function (_ref3, index) {
|
139
144
|
var label = _ref3.label,
|
140
145
|
_onClose = _ref3.onClose,
|
146
|
+
filter = _ref3.filter,
|
141
147
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded3);
|
142
148
|
if (index == tags.length - 1 && other.size) {
|
143
149
|
size = other.size;
|
144
150
|
}
|
151
|
+
if (typeof _onClose === 'function' || filter) {
|
152
|
+
return /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
153
|
+
key: "displayed-tag-".concat(index),
|
154
|
+
onClose: function onClose() {
|
155
|
+
return handleTagOnClose(_onClose, index);
|
156
|
+
},
|
157
|
+
text: label
|
158
|
+
}));
|
159
|
+
}
|
145
160
|
return /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
146
|
-
key: "displayed-tag-".concat(index)
|
147
|
-
onClose: function onClose() {
|
148
|
-
return handleTagOnClose(_onClose, index);
|
149
|
-
}
|
161
|
+
key: "displayed-tag-".concat(index)
|
150
162
|
}), label);
|
151
163
|
}) : [];
|
152
164
|
|
@@ -98,7 +98,6 @@ var TagSetModal = function TagSetModal(_ref) {
|
|
98
98
|
var label = _ref2.label,
|
99
99
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
100
100
|
return /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
101
|
-
filter: false,
|
102
101
|
key: "all-tags-".concat(index)
|
103
102
|
}), label);
|
104
103
|
}), /*#__PURE__*/React.createElement("div", {
|
@@ -10,6 +10,11 @@ import PropTypes from 'prop-types';
|
|
10
10
|
import { type ButtonProps } from '@carbon/react';
|
11
11
|
interface TearsheetShellProps extends PropsWithChildren {
|
12
12
|
actions?: ButtonProps<'button'>[];
|
13
|
+
/**
|
14
|
+
* Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency,
|
15
|
+
* accountability, and explainability at the UI level.
|
16
|
+
*/
|
17
|
+
aiLabel?: ReactNode;
|
13
18
|
ariaLabel?: string;
|
14
19
|
/**
|
15
20
|
* An optional class or classes to be added to the outermost element.
|
@@ -96,15 +101,15 @@ interface TearsheetShellProps extends PropsWithChildren {
|
|
96
101
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
97
102
|
*/
|
98
103
|
size: 'narrow' | 'wide';
|
99
|
-
/**
|
100
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `Tearsheet` component
|
101
|
-
*/
|
102
|
-
slug?: ReactNode;
|
103
104
|
/**
|
104
105
|
* The main title of the tearsheet, displayed in the header area.
|
105
106
|
*/
|
106
107
|
title?: ReactNode;
|
107
108
|
verticalPosition?: 'normal' | 'lower';
|
109
|
+
/**
|
110
|
+
* @deprecated Property replaced by `aiLabel`
|
111
|
+
*/
|
112
|
+
slug?: ReactNode;
|
108
113
|
}
|
109
114
|
export type CloseIconDescriptionTypes = {
|
110
115
|
hasCloseIcon?: false;
|
@@ -126,6 +131,10 @@ export declare const tearsheetHasCloseIcon: (actions: any, hasCloseIcon: any) =>
|
|
126
131
|
export declare const TearsheetShell: React.ForwardRefExoticComponent<(TearsheetShellProps & CloseIconDescriptionTypes) & React.RefAttributes<HTMLDivElement>>;
|
127
132
|
export declare const portalType: PropTypes.Requireable<object>;
|
128
133
|
export declare const deprecatedProps: {
|
134
|
+
/**
|
135
|
+
* @deprecated Property replaced by `aiLabel`
|
136
|
+
*/
|
137
|
+
slug: (props: any, propName: any, comp: any, loc: any, propFullName: any, secret: any) => any;
|
129
138
|
/**
|
130
139
|
* **Deprecated**
|
131
140
|
*
|
@@ -15,6 +15,7 @@ var cx = require('classnames');
|
|
15
15
|
var settings = require('../../settings.js');
|
16
16
|
var pconsole = require('../../global/js/utils/pconsole.js');
|
17
17
|
var getNodeTextContent = require('../../global/js/utils/getNodeTextContent.js');
|
18
|
+
var propsHelper = require('../../global/js/utils/props-helper.js');
|
18
19
|
var react = require('@carbon/react');
|
19
20
|
var ActionSet = require('../ActionSet/ActionSet.js');
|
20
21
|
var Wrap = require('../../global/js/utils/Wrap.js');
|
@@ -22,7 +23,7 @@ var usePortalTarget = require('../../global/js/hooks/usePortalTarget.js');
|
|
22
23
|
var useFocus = require('../../global/js/hooks/useFocus.js');
|
23
24
|
var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
|
24
25
|
|
25
|
-
var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
26
|
+
var _excluded = ["actions", "aiLabel", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
26
27
|
|
27
28
|
// The block part of our conventional BEM class names (bc__E--M).
|
28
29
|
var bc = "".concat(settings.pkg.prefix, "--tearsheet");
|
@@ -65,6 +66,7 @@ var tearsheetHasCloseIcon = function tearsheetHasCloseIcon(actions, hasCloseIcon
|
|
65
66
|
* */
|
66
67
|
var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
67
68
|
var actions = _ref.actions,
|
69
|
+
aiLabel = _ref.aiLabel,
|
68
70
|
ariaLabel = _ref.ariaLabel,
|
69
71
|
children = _ref.children,
|
70
72
|
className = _ref.className,
|
@@ -84,7 +86,7 @@ var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
84
86
|
_ref$selectorsFloatin = _ref.selectorsFloatingMenus,
|
85
87
|
selectorsFloatingMenus = _ref$selectorsFloatin === void 0 ? [] : _ref$selectorsFloatin,
|
86
88
|
size = _ref.size,
|
87
|
-
|
89
|
+
deprecated_slug = _ref.slug,
|
88
90
|
title = _ref.title,
|
89
91
|
verticalPosition = _ref.verticalPosition,
|
90
92
|
launcherButtonRef = _ref.launcherButtonRef,
|
@@ -92,7 +94,7 @@ var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
92
94
|
var carbonPrefix = react.usePrefix();
|
93
95
|
var bcModalHeader = "".concat(carbonPrefix, "--modal-header");
|
94
96
|
var renderPortalUse = usePortalTarget.usePortalTarget(portalTargetIn);
|
95
|
-
var localRef = React.useRef();
|
97
|
+
var localRef = React.useRef(undefined);
|
96
98
|
var resizer = React.useRef(null);
|
97
99
|
var modalBodyRef = React.useRef(null);
|
98
100
|
var modalRef = ref || localRef;
|
@@ -123,7 +125,7 @@ var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
123
125
|
setPosition = _useState4[1];
|
124
126
|
|
125
127
|
// Keep a record of the previous value of depth.
|
126
|
-
var prevDepth = React.useRef();
|
128
|
+
var prevDepth = React.useRef(undefined);
|
127
129
|
React.useEffect(function () {
|
128
130
|
prevDepth.current = depth;
|
129
131
|
});
|
@@ -161,15 +163,21 @@ var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
161
163
|
React.useEffect(function () {
|
162
164
|
if (open) {
|
163
165
|
// Focusing the first element or selectorPrimaryFocus element
|
164
|
-
|
165
|
-
|
166
|
-
|
166
|
+
if (selectorPrimaryFocus && useFocus.getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus)) {
|
167
|
+
var _window2;
|
168
|
+
var specifiedEl = useFocus.getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus);
|
169
|
+
if (specifiedEl && ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.getComputedStyle(specifiedEl)) === null || _window2 === void 0 ? void 0 : _window2.display) !== 'none') {
|
170
|
+
setTimeout(function () {
|
171
|
+
return specifiedEl.focus();
|
172
|
+
}, 0);
|
173
|
+
return;
|
167
174
|
}
|
168
|
-
|
175
|
+
}
|
176
|
+
setTimeout(function () {
|
177
|
+
return firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
169
178
|
}, 0);
|
170
179
|
}
|
171
|
-
|
172
|
-
}, [open]);
|
180
|
+
}, [firstElement, modalRef, open, selectorPrimaryFocus]);
|
173
181
|
React.useEffect(function () {
|
174
182
|
if (prevOpen && !open && launcherButtonRef) {
|
175
183
|
setTimeout(function () {
|
@@ -254,15 +262,13 @@ var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
254
262
|
return _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width);
|
255
263
|
};
|
256
264
|
return renderPortalUse( /*#__PURE__*/React.createElement(react.unstable_FeatureFlags, {
|
257
|
-
|
258
|
-
'enable-experimental-focus-wrap-without-sentinels': true
|
259
|
-
}
|
265
|
+
enableExperimentalFocusWrapWithoutSentinels: true
|
260
266
|
}, /*#__PURE__*/React.createElement(react.ComposedModal, _rollupPluginBabelHelpers.extends({}, rest, {
|
261
267
|
"aria-label": ariaLabel || getNodeTextContent.getNodeTextContent(title),
|
262
|
-
className: cx(bc, className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
|
268
|
+
className: cx(bc, className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
|
263
269
|
// Don't apply this on the initial open of a single tearsheet.
|
264
|
-
depth > 1 || depth === 1 && ((_prevDepth$current = prevDepth === null || prevDepth === void 0 ? void 0 : prevDepth.current) !== null && _prevDepth$current !== void 0 ? _prevDepth$current : 0) > 1), "".concat(bc, "--wide"), wide), "".concat(bc, "--narrow"), !wide), "".concat(bc, "--has-slug"),
|
265
|
-
slug:
|
270
|
+
depth > 1 || depth === 1 && ((_prevDepth$current = prevDepth === null || prevDepth === void 0 ? void 0 : prevDepth.current) !== null && _prevDepth$current !== void 0 ? _prevDepth$current : 0) > 1), "".concat(bc, "--wide"), wide), "".concat(bc, "--narrow"), !wide), "".concat(bc, "--has-slug"), deprecated_slug), "".concat(bc, "--has-ai-label"), aiLabel), "".concat(bc, "--has-close"), effectiveHasCloseIcon)),
|
271
|
+
slug: aiLabel || deprecated_slug,
|
266
272
|
style: setScaleValues(),
|
267
273
|
containerClassName: cx("".concat(bc, "__container"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(bc, "__container--lower"), verticalPosition === 'lower'), "".concat(bc, "__container--mixed-size-stacking"), !areAllSameSizeVariant())),
|
268
274
|
onClose: onClose,
|
@@ -340,6 +346,10 @@ var portalType = typeof Element === 'undefined' ? index.default.object :
|
|
340
346
|
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
341
347
|
index.default.instanceOf(Element);
|
342
348
|
var deprecatedProps = {
|
349
|
+
/**
|
350
|
+
* @deprecated Property replaced by `aiLabel`
|
351
|
+
*/
|
352
|
+
slug: propsHelper.deprecateProp(index.default.node, 'Property replaced by `aiLabel`'),
|
343
353
|
/**
|
344
354
|
* **Deprecated**
|
345
355
|
*
|
@@ -384,6 +394,11 @@ TearsheetShell.propTypes = _rollupPluginBabelHelpers.objectSpread2({
|
|
384
394
|
/**@ts-ignore*/
|
385
395
|
onClick: react.Button.propTypes.onClick
|
386
396
|
}))),
|
397
|
+
/**
|
398
|
+
* Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency,
|
399
|
+
* accountability, and explainability at the UI level.
|
400
|
+
*/
|
401
|
+
aiLabel: index.default.oneOfType([index.default.node, index.default.bool]),
|
387
402
|
/**
|
388
403
|
* The main content of the tearsheet.
|
389
404
|
*/
|
@@ -490,10 +505,6 @@ TearsheetShell.propTypes = _rollupPluginBabelHelpers.objectSpread2({
|
|
490
505
|
*/
|
491
506
|
/**@ts-ignore*/
|
492
507
|
size: index.default.oneOf(['narrow', 'wide']).isRequired,
|
493
|
-
/**
|
494
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `Tearsheet` component
|
495
|
-
*/
|
496
|
-
slug: index.default.node,
|
497
508
|
/**
|
498
509
|
* The main title of the tearsheet, displayed in the header area.
|
499
510
|
*/
|
@@ -27,7 +27,7 @@ exports.Toolbar = /*#__PURE__*/React.forwardRef(function (_ref, r) {
|
|
27
27
|
className = _ref.className,
|
28
28
|
vertical = _ref.vertical,
|
29
29
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
30
|
-
var focusableElements = React.useRef();
|
30
|
+
var focusableElements = React.useRef(undefined);
|
31
31
|
var getFocusableElements$1 = React.useCallback(function () {
|
32
32
|
return focusableElements.current;
|
33
33
|
}, [focusableElements]);
|
@@ -2,7 +2,7 @@ export function TooltipTrigger({ children, className, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
3
3
|
children: any;
|
4
4
|
className: any;
|
5
|
-
}):
|
5
|
+
}): React.JSX.Element;
|
6
6
|
export namespace TooltipTrigger {
|
7
7
|
export { componentName as displayName };
|
8
8
|
export namespace propTypes {
|
@@ -10,6 +10,7 @@ export namespace TooltipTrigger {
|
|
10
10
|
let className: PropTypes.Requireable<string>;
|
11
11
|
}
|
12
12
|
}
|
13
|
+
import React from 'react';
|
13
14
|
declare const componentName: "TooltipTrigger";
|
14
15
|
import PropTypes from 'prop-types';
|
15
16
|
export {};
|
@@ -69,7 +69,7 @@ exports.TruncatedList = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
69
69
|
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
70
70
|
listHeight = _useState4[0],
|
71
71
|
setListHeight = _useState4[1];
|
72
|
-
var listRef = React.useRef();
|
72
|
+
var listRef = React.useRef(undefined);
|
73
73
|
var handleToggle = function handleToggle() {
|
74
74
|
setIsCollapsed(function (prev) {
|
75
75
|
return !prev;
|
@@ -2,11 +2,12 @@ export function Canary({ className, componentName, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
3
3
|
className: any;
|
4
4
|
componentName: any;
|
5
|
-
}):
|
5
|
+
}): React.JSX.Element;
|
6
6
|
export namespace Canary {
|
7
7
|
namespace propTypes {
|
8
8
|
let className: PropTypes.Requireable<string>;
|
9
9
|
let componentName: PropTypes.Validator<string>;
|
10
10
|
}
|
11
11
|
}
|
12
|
+
import React from 'react';
|
12
13
|
import PropTypes from 'prop-types';
|
@@ -15,7 +15,7 @@ var React = require('react');
|
|
15
15
|
* @returns {T | undefined} - The previous value of the same type, or undefined if there is none
|
16
16
|
*/
|
17
17
|
var usePreviousValue = function usePreviousValue(value) {
|
18
|
-
var ref = React.useRef();
|
18
|
+
var ref = React.useRef(undefined);
|
19
19
|
React.useEffect(function () {
|
20
20
|
ref.current = value;
|
21
21
|
});
|