@carbon/ibm-products 2.43.2-canary.7 → 2.43.2-canary.72
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/index-full-carbon.css +167 -15
- 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 +215 -5
- 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 +167 -15
- 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 +167 -15
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Coachmark/Coachmark.js +12 -7
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
- package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +57 -42
- package/es/components/ConditionBuilder/ConditionBuilder.js +81 -24
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +151 -0
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +27 -13
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +29 -7
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +10 -6
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +19 -11
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -11
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +58 -41
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +12 -7
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +26 -8
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +35 -24
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +37 -36
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +37 -36
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +4 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +67 -33
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +27 -9
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +114 -0
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +66 -36
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +19 -7
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +74 -23
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +45 -19
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -1
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +120 -29
- package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
- package/es/components/ConditionBuilder/utils/util.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/util.js +8 -1
- package/es/components/CreateFullPage/CreateFullPage.js +2 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +20 -0
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +58 -19
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +12 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +22 -6
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +16 -3
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
- package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
- package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
- package/es/components/Datagrid/Datagrid/Datagrid.js +4 -9
- package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
- package/es/components/Datagrid/Datagrid/DatagridRow.js +21 -8
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +21 -16
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
- package/es/components/Datagrid/types/index.d.ts +44 -8
- package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
- package/es/components/Datagrid/useActionsColumn.js +7 -6
- package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
- package/es/components/Datagrid/useColumnRightAlign.js +4 -3
- package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
- package/es/components/Datagrid/useCustomizeColumns.js +4 -3
- package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
- package/es/components/Datagrid/useInlineEdit.js +12 -2
- package/es/components/Datagrid/useNestedRowExpander.js +1 -3
- package/es/components/Datagrid/useNestedRows.js +32 -13
- package/es/components/Datagrid/useRowExpander.js +1 -3
- package/es/components/Datagrid/useSelectRows.js +2 -1
- package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
- package/es/components/Datagrid/useStickyColumn.js +12 -9
- package/es/components/Decorator/Decorator.js +2 -1
- package/es/components/DecoratorBase/DecoratorBase.js +3 -5
- package/es/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
- package/es/components/DecoratorLink/DecoratorLink.js +2 -1
- package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
- package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
- package/es/components/EditInPlace/EditInPlace.js +21 -10
- package/es/components/EditTearsheet/EditTearsheet.d.ts +7 -2
- package/es/components/EditTearsheet/EditTearsheet.js +44 -10
- package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
- package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
- package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
- package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
- package/es/components/Nav/NavItem.js +12 -3
- package/es/components/OptionsTile/OptionsTile.js +11 -6
- package/es/components/PageHeader/PageHeader.js +1 -0
- package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
- package/es/components/RemoveModal/RemoveModal.js +7 -1
- package/es/components/SearchBar/SearchBar.d.ts +1 -1
- package/es/components/SearchBar/SearchBar.js +2 -2
- package/es/components/SidePanel/SidePanel.js +17 -21
- package/es/components/SidePanel/motion/variants.d.ts +4 -6
- package/es/components/SidePanel/motion/variants.js +10 -11
- package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
- package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
- package/es/components/Tearsheet/Tearsheet.js +9 -1
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
- package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
- package/es/components/Tearsheet/TearsheetShell.d.ts +11 -1
- package/es/components/Tearsheet/TearsheetShell.js +24 -6
- package/es/components/Toolbar/ToolbarButton.js +1 -1
- package/es/components/WebTerminal/WebTerminal.js +10 -12
- package/es/components/index.d.ts +1 -1
- package/es/global/js/hooks/useFocus.d.ts +1 -0
- package/es/global/js/hooks/useFocus.js +5 -2
- package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
- package/es/global/js/package-settings.d.ts +1 -1
- package/es/global/js/package-settings.js +1 -1
- package/es/index.js +1 -0
- package/es/settings.d.ts +1 -1
- package/lib/components/Coachmark/Coachmark.js +12 -7
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
- package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +56 -41
- package/lib/components/ConditionBuilder/ConditionBuilder.js +81 -24
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +160 -0
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +26 -11
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +28 -6
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +8 -4
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +18 -10
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -11
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +57 -40
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +12 -7
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +26 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +34 -24
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +37 -36
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +37 -36
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +4 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +66 -32
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +28 -10
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +122 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +63 -33
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +18 -6
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +72 -21
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +44 -17
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +120 -29
- package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
- package/lib/components/ConditionBuilder/utils/util.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/util.js +8 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +20 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +58 -19
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +12 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +22 -6
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +16 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
- package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
- package/lib/components/Datagrid/Datagrid/Datagrid.js +4 -9
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -8
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +21 -16
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +73 -10
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
- package/lib/components/Datagrid/types/index.d.ts +44 -8
- package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
- package/lib/components/Datagrid/useActionsColumn.js +7 -6
- package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
- package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
- package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
- package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
- package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
- package/lib/components/Datagrid/useInlineEdit.js +12 -2
- package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
- package/lib/components/Datagrid/useNestedRows.js +32 -13
- package/lib/components/Datagrid/useRowExpander.js +1 -3
- package/lib/components/Datagrid/useSelectRows.js +2 -1
- package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
- package/lib/components/Datagrid/useStickyColumn.js +12 -9
- package/lib/components/Decorator/Decorator.js +2 -1
- package/lib/components/DecoratorBase/DecoratorBase.js +3 -5
- package/lib/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
- package/lib/components/DecoratorLink/DecoratorLink.js +2 -1
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
- package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
- package/lib/components/EditInPlace/EditInPlace.js +21 -10
- package/lib/components/EditTearsheet/EditTearsheet.d.ts +7 -2
- package/lib/components/EditTearsheet/EditTearsheet.js +43 -9
- package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
- package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
- package/lib/components/Nav/NavItem.js +10 -1
- package/lib/components/OptionsTile/OptionsTile.js +11 -6
- package/lib/components/PageHeader/PageHeader.js +1 -0
- package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
- package/lib/components/RemoveModal/RemoveModal.js +7 -1
- package/lib/components/SearchBar/SearchBar.d.ts +1 -1
- package/lib/components/SearchBar/SearchBar.js +2 -2
- package/lib/components/SidePanel/SidePanel.js +16 -20
- package/lib/components/SidePanel/motion/variants.d.ts +4 -6
- package/lib/components/SidePanel/motion/variants.js +10 -11
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
- package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
- package/lib/components/Tearsheet/Tearsheet.js +9 -1
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
- package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
- package/lib/components/Tearsheet/TearsheetShell.d.ts +11 -1
- package/lib/components/Tearsheet/TearsheetShell.js +22 -4
- package/lib/components/Toolbar/ToolbarButton.js +1 -1
- package/lib/components/WebTerminal/WebTerminal.js +10 -12
- package/lib/components/index.d.ts +1 -1
- package/lib/global/js/hooks/useFocus.d.ts +1 -0
- package/lib/global/js/hooks/useFocus.js +5 -1
- package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
- package/lib/global/js/package-settings.d.ts +1 -1
- package/lib/global/js/package-settings.js +1 -1
- package/lib/index.js +5 -0
- package/lib/settings.d.ts +1 -1
- package/package.json +7 -6
- package/scss/components/ConditionBuilder/_condition-builder.scss +1 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +14 -2
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +31 -2
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +17 -2
- package/scss/components/Datagrid/_datagrid.scss +0 -4
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +13 -0
- package/scss/components/HTTPErrors/_http-errors.scss +77 -0
- package/scss/components/OptionsTile/_options-tile.scss +6 -6
- package/scss/components/SidePanel/_side-panel.scss +1 -1
- package/scss/components/StatusIcon/_status-icon.scss +4 -4
- package/scss/components/StringFormatter/_string-formatter.scss +2 -2
- package/scss/components/UserProfileImage/_user-profile-image.scss +6 -2
- package/scss/components/_index-released-only.scss +1 -0
- package/telemetry.yml +27 -5
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
- package/es/global/js/utils/window.d.ts +0 -2
- package/es/global/js/utils/window.js +0 -12
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
- package/lib/global/js/utils/window.d.ts +0 -2
- package/lib/global/js/utils/window.js +0 -16
@@ -15,6 +15,7 @@ import { pkg } from '../../settings.js';
|
|
15
15
|
import { Toggle, Layer } from '@carbon/react';
|
16
16
|
import { ChevronDown, Locked, WarningFilled, WarningAltFilled } from '@carbon/react/icons';
|
17
17
|
import * as carbonMotion from '@carbon/motion';
|
18
|
+
import usePrefersReducedMotion from '../../global/js/hooks/usePrefersReducedMotion.js';
|
18
19
|
import { useControllableState } from '../../global/js/hooks/useControllableState.js';
|
19
20
|
|
20
21
|
var _Locked;
|
@@ -71,9 +72,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
71
72
|
var isInvalid = invalid;
|
72
73
|
var isWarn = !isInvalid && warn;
|
73
74
|
var isLocked = !isInvalid && !isWarn && locked;
|
74
|
-
var
|
75
|
-
matches: true
|
76
|
-
};
|
75
|
+
var shouldReduceMotion = usePrefersReducedMotion();
|
77
76
|
if (open !== prevIsOpen) {
|
78
77
|
if (isOpen && !open) {
|
79
78
|
collapse();
|
@@ -83,7 +82,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
83
82
|
setPrevIsOpen(open);
|
84
83
|
}
|
85
84
|
function expand() {
|
86
|
-
if (detailsRef.current && contentRef.current && !
|
85
|
+
if (detailsRef.current && contentRef.current && !shouldReduceMotion) {
|
87
86
|
setIsOpen(true);
|
88
87
|
detailsRef.current.open = true;
|
89
88
|
var _getComputedStyle = getComputedStyle(contentRef.current),
|
@@ -112,7 +111,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
112
111
|
}
|
113
112
|
}
|
114
113
|
function collapse() {
|
115
|
-
if (contentRef.current && !
|
114
|
+
if (contentRef.current && !shouldReduceMotion) {
|
116
115
|
setClosing(true);
|
117
116
|
var _getComputedStyle2 = getComputedStyle(contentRef.current),
|
118
117
|
paddingTop = _getComputedStyle2.paddingTop,
|
@@ -164,6 +163,12 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
164
163
|
var Icon = null;
|
165
164
|
var text = summary;
|
166
165
|
var summaryClasses = ["".concat(blockClass, "__summary")];
|
166
|
+
if (closing) {
|
167
|
+
summaryClasses.push("".concat(blockClass, "__summary--closing"));
|
168
|
+
}
|
169
|
+
if (isOpen) {
|
170
|
+
summaryClasses.push("".concat(blockClass, "__summary--open"));
|
171
|
+
}
|
167
172
|
if (invalid) {
|
168
173
|
Icon = WarningFilled;
|
169
174
|
text = invalidText;
|
@@ -227,7 +232,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
227
232
|
onClick: toggle
|
228
233
|
}, /*#__PURE__*/React__default.createElement(ChevronDown, {
|
229
234
|
size: 16,
|
230
|
-
className: "".concat(blockClass, "__chevron")
|
235
|
+
className: cx("".concat(blockClass, "__chevron"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__chevron--open"), isOpen), "".concat(blockClass, "__chevron--closing"), closing))
|
231
236
|
}), renderTitle()), /*#__PURE__*/React__default.createElement("div", {
|
232
237
|
className: "".concat(blockClass, "__content"),
|
233
238
|
ref: contentRef
|
@@ -27,6 +27,7 @@ import { ButtonSetWithOverflow } from '../ButtonSetWithOverflow/ButtonSetWithOve
|
|
27
27
|
|
28
28
|
var _excluded = ["actionBarItems", "actionBarMenuOptionsClass", "actionBarOverflowAriaLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTitle", "hasBackgroundAlways", "breadcrumbOverflowAriaLabel", "breadcrumbs", "children", "className", "collapseHeader", "collapseHeaderIconDescription", "collapseTitle", "disableBreadcrumbScroll", "enableBreadcrumbScroll", "expandHeaderIconDescription", "fullWidthGrid", "hasCollapseHeaderToggle", "narrowGrid", "navigation", "pageActions", "pageActionsOverflowLabel", "pageActionsMenuOptionsClass", "showAllTagsLabel", "subtitle", "tags", "title", "withoutBackground", "breadcrumbOverflowTooltipAlign"];
|
29
29
|
var componentName = 'PageHeader';
|
30
|
+
pkg._silenceWarnings(true);
|
30
31
|
pkg.component.ActionBar = true;
|
31
32
|
|
32
33
|
// Default values for props
|
@@ -58,6 +58,10 @@ interface RemoveModalProps extends React.ComponentProps<typeof ComposedModal> {
|
|
58
58
|
* Specify the text for the primary button
|
59
59
|
*/
|
60
60
|
primaryButtonText?: string;
|
61
|
+
/**
|
62
|
+
* Specify the danger description on the primary button
|
63
|
+
*/
|
64
|
+
primaryDangerDescription?: string;
|
61
65
|
/**
|
62
66
|
* The name of the resource being acted upon
|
63
67
|
*/
|
@@ -16,7 +16,7 @@ import { pkg } from '../../settings.js';
|
|
16
16
|
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
17
17
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
18
18
|
|
19
|
-
var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "portalTarget", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
|
19
|
+
var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "portalTarget", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "primaryDangerDescription", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
|
20
20
|
var componentName = 'RemoveModal';
|
21
21
|
|
22
22
|
/**
|
@@ -40,6 +40,7 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
40
40
|
preventCloseOnClickOutside = _ref.preventCloseOnClickOutside,
|
41
41
|
primaryButtonDisabled = _ref.primaryButtonDisabled,
|
42
42
|
primaryButtonText = _ref.primaryButtonText,
|
43
|
+
primaryDangerDescription = _ref.primaryDangerDescription,
|
43
44
|
resourceName = _ref.resourceName,
|
44
45
|
secondaryButtonText = _ref.secondaryButtonText,
|
45
46
|
textConfirmation = _ref.textConfirmation,
|
@@ -109,6 +110,7 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
109
110
|
}, secondaryButtonText), /*#__PURE__*/React__default.createElement(Button, {
|
110
111
|
type: "submit",
|
111
112
|
kind: "danger",
|
113
|
+
dangerDescription: primaryDangerDescription,
|
112
114
|
onClick: onRequestSubmit,
|
113
115
|
disabled: primaryButtonStatus
|
114
116
|
}, primaryButtonText))));
|
@@ -173,6 +175,10 @@ RemoveModal.propTypes = {
|
|
173
175
|
* Specify the text for the primary button
|
174
176
|
*/
|
175
177
|
primaryButtonText: PropTypes.string,
|
178
|
+
/**
|
179
|
+
* Specify the danger description on the primary button
|
180
|
+
*/
|
181
|
+
primaryDangerDescription: PropTypes.string,
|
176
182
|
/**
|
177
183
|
* The name of the resource being acted upon
|
178
184
|
*/
|
@@ -17,7 +17,7 @@ interface SearchBarProps extends PropsWithChildren {
|
|
17
17
|
*/
|
18
18
|
hideScopesLabel?: boolean;
|
19
19
|
/** @type {string} The label text for the search text input. */
|
20
|
-
labelText
|
20
|
+
labelText: string;
|
21
21
|
/** @type {Function} Function handler for when the user changes their query search. */
|
22
22
|
onChange?: (event: any) => void;
|
23
23
|
/** @type {Function} Function handler for when the user submits a search. */
|
@@ -135,7 +135,7 @@ var SearchBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
135
135
|
})) : null, /*#__PURE__*/React__default.createElement(Search, {
|
136
136
|
className: "".concat(blockClass, "__input"),
|
137
137
|
closeButtonLabelText: clearButtonLabelText,
|
138
|
-
labelText: labelText
|
138
|
+
labelText: labelText,
|
139
139
|
name: "search-input",
|
140
140
|
onChange: handleInputChange,
|
141
141
|
placeholder: placeholderText,
|
@@ -188,7 +188,7 @@ SearchBar.propTypes = _objectSpread2({
|
|
188
188
|
*/
|
189
189
|
hideScopesLabel: PropTypes.bool,
|
190
190
|
/** @type {string} The label text for the search text input. */
|
191
|
-
labelText: PropTypes.string,
|
191
|
+
labelText: PropTypes.string.isRequired,
|
192
192
|
/** @type {Function} Function handler for when the user changes their query search. */
|
193
193
|
onChange: PropTypes.func,
|
194
194
|
/** @type {Function} Function handler for when the user submits a search. */
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { useState, useRef, useEffect, useCallback } from 'react';
|
10
|
-
import { motion,
|
10
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
11
11
|
import PropTypes from '../../node_modules/prop-types/index.js';
|
12
12
|
import cx from 'classnames';
|
13
13
|
import { moderate02 } from '@carbon/motion';
|
@@ -19,6 +19,7 @@ import { Button, IconButton } from '@carbon/react';
|
|
19
19
|
import { ArrowLeft, Close } from '@carbon/react/icons';
|
20
20
|
import { actionSetVariants, overlayVariants, panelVariants } from './motion/variants.js';
|
21
21
|
import pconsole from '../../global/js/utils/pconsole.js';
|
22
|
+
import usePrefersReducedMotion from '../../global/js/hooks/usePrefersReducedMotion.js';
|
22
23
|
import { ActionSet } from '../ActionSet/ActionSet.js';
|
23
24
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
24
25
|
import { useFocus } from '../../global/js/hooks/useFocus.js';
|
@@ -44,7 +45,6 @@ var defaults = {
|
|
44
45
|
* Side panels keep users in-context of a page while performing tasks like navigating, editing, viewing details, or configuring something new.
|
45
46
|
*/
|
46
47
|
var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
47
|
-
var _window;
|
48
48
|
var actionToolbarButtons = _ref.actionToolbarButtons,
|
49
49
|
actions = _ref.actions,
|
50
50
|
_ref$animateTitle = _ref.animateTitle,
|
@@ -111,7 +111,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
111
111
|
keyDownListener = _useFocus.keyDownListener;
|
112
112
|
var panelRefValue = sidePanelRef.current;
|
113
113
|
var previousOpen = usePreviousValue(open);
|
114
|
-
var shouldReduceMotion =
|
114
|
+
var shouldReduceMotion = usePrefersReducedMotion();
|
115
115
|
|
116
116
|
// Title animation on scroll related state
|
117
117
|
var _useState7 = useState(0),
|
@@ -154,9 +154,6 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
154
154
|
titleItemsStyles(animationProgress);
|
155
155
|
}
|
156
156
|
}, [doAnimateTitle, panelRefValue === null || panelRefValue === void 0 ? void 0 : panelRefValue.style, scrollAnimationDistance, titleItemsStyles]);
|
157
|
-
var reducedMotion = typeof document !== 'undefined' && (_window = window) !== null && _window !== void 0 && _window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : {
|
158
|
-
matches: true
|
159
|
-
};
|
160
157
|
|
161
158
|
// scroll panel to top going between steps
|
162
159
|
useEffect(function () {
|
@@ -193,7 +190,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
193
190
|
}, [launcherButtonRef, open, previousOpen]);
|
194
191
|
var checkSetDoAnimateTitle = function checkSetDoAnimateTitle() {
|
195
192
|
var canDoAnimateTitle = false;
|
196
|
-
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !
|
193
|
+
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !shouldReduceMotion) {
|
197
194
|
var _labelTextRef$current3, _labelTextRef$current4, _subtitleRef$current$, _subtitleRef$current;
|
198
195
|
var titleEl = titleRef.current;
|
199
196
|
var labelHeight = (_labelTextRef$current3 = labelTextRef === null || labelTextRef === void 0 || (_labelTextRef$current4 = labelTextRef.current) === null || _labelTextRef$current4 === void 0 ? void 0 : _labelTextRef$current4.offsetHeight) !== null && _labelTextRef$current3 !== void 0 ? _labelTextRef$current3 : 0;
|
@@ -209,8 +206,8 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
209
206
|
panelRefValue === null || panelRefValue === void 0 || panelRefValue.style.setProperty("--".concat(blockClass, "--scroll-animation-distance"), _scrollAnimationDistance.toString());
|
210
207
|
var scrollEl = innerContentRef.current;
|
211
208
|
if (scrollEl) {
|
212
|
-
var
|
213
|
-
var innerComputed = (
|
209
|
+
var _window;
|
210
|
+
var innerComputed = (_window = window) === null || _window === void 0 ? void 0 : _window.getComputedStyle(innerContentRef.current);
|
214
211
|
var innerPaddingHeight = innerComputed ? parseFloat(innerComputed === null || innerComputed === void 0 ? void 0 : innerComputed.paddingTop) + parseFloat(innerComputed === null || innerComputed === void 0 ? void 0 : innerComputed.paddingBottom) : 0;
|
215
212
|
canDoAnimateTitle = (!!labelText || !!actionToolbarButtons || !!subtitle) && scrollEl.scrollHeight - scrollEl.clientHeight >= _scrollAnimationDistance + innerPaddingHeight;
|
216
213
|
}
|
@@ -228,12 +225,12 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
228
225
|
|
229
226
|
// Calculate scroll distances
|
230
227
|
useEffect(function () {
|
231
|
-
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !
|
228
|
+
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !shouldReduceMotion) {
|
232
229
|
checkSetDoAnimateTitle();
|
233
230
|
}
|
234
231
|
|
235
232
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
236
|
-
}, [open, doAnimateTitle /* use do instead of animateTitle directly */, animationComplete, handleScroll, title, size,
|
233
|
+
}, [open, doAnimateTitle /* use do instead of animateTitle directly */, animationComplete, handleScroll, title, size, shouldReduceMotion, id]);
|
237
234
|
|
238
235
|
// click outside functionality if `includeOverlay` prop is set
|
239
236
|
useEffect(function () {
|
@@ -269,10 +266,10 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
269
266
|
// Set the internal state `animationComplete` to true if
|
270
267
|
// prefers reduced motion is true
|
271
268
|
useEffect(function () {
|
272
|
-
if (
|
269
|
+
if (shouldReduceMotion) {
|
273
270
|
setAnimationComplete(true);
|
274
271
|
}
|
275
|
-
}, [
|
272
|
+
}, [shouldReduceMotion]);
|
276
273
|
|
277
274
|
// initializes the side panel to open
|
278
275
|
var onAnimationStart = function onAnimationStart() {
|
@@ -291,10 +288,10 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
291
288
|
}
|
292
289
|
}, [open, placement, selectorPageContent, slideIn]);
|
293
290
|
useEffect(function () {
|
294
|
-
if (!open && previousState && previousState['open'] &&
|
291
|
+
if (!open && previousState && previousState['open'] && shouldReduceMotion) {
|
295
292
|
onUnmount === null || onUnmount === void 0 || onUnmount();
|
296
293
|
}
|
297
|
-
}, [open, onUnmount,
|
294
|
+
}, [open, onUnmount, shouldReduceMotion, previousState]);
|
298
295
|
|
299
296
|
// used to set margins of content for slide in panel version
|
300
297
|
useEffect(function () {
|
@@ -307,15 +304,15 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
307
304
|
}
|
308
305
|
if (placement && placement === 'right' && pageContentElement) {
|
309
306
|
pageContentElement.style.marginInlineEnd = '0';
|
310
|
-
pageContentElement.style.transition = !
|
307
|
+
pageContentElement.style.transition = !shouldReduceMotion ? "margin-inline-end ".concat(moderate02) : '';
|
311
308
|
pageContentElement.style.marginInlineEnd = SIDE_PANEL_SIZES[size];
|
312
309
|
} else if (pageContentElement) {
|
313
310
|
pageContentElement.style.marginInlineStart = '0';
|
314
|
-
pageContentElement.style.transition = !
|
311
|
+
pageContentElement.style.transition = !shouldReduceMotion ? "margin-inline-start ".concat(moderate02) : '';
|
315
312
|
pageContentElement.style.marginInlineStart = SIDE_PANEL_SIZES[size];
|
316
313
|
}
|
317
314
|
}
|
318
|
-
}, [slideIn, selectorPageContent, placement, size,
|
315
|
+
}, [slideIn, selectorPageContent, placement, size, shouldReduceMotion, open]);
|
319
316
|
useEffect(function () {
|
320
317
|
if (open) {
|
321
318
|
setTimeout(function () {
|
@@ -341,7 +338,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
341
338
|
className: "".concat(blockClass, "__title-text"),
|
342
339
|
title: title,
|
343
340
|
"aria-hidden": false
|
344
|
-
}, title), doAnimateTitle && !
|
341
|
+
}, title), doAnimateTitle && !shouldReduceMotion && /*#__PURE__*/React__default.createElement("h2", {
|
345
342
|
className: "".concat(blockClass, "__collapsed-title-text"),
|
346
343
|
title: title,
|
347
344
|
"aria-hidden": true
|
@@ -358,10 +355,9 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
358
355
|
});
|
359
356
|
}
|
360
357
|
return /*#__PURE__*/React__default.createElement("div", {
|
361
|
-
className: cx("".concat(blockClass, "__header"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__header--on-detail-step"), currentStep > 0), "".concat(blockClass, "__header--no-title-animation"), !animateTitle), "".concat(blockClass, "__header--reduced-motion"),
|
358
|
+
className: cx("".concat(blockClass, "__header"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__header--on-detail-step"), currentStep > 0), "".concat(blockClass, "__header--no-title-animation"), !animateTitle), "".concat(blockClass, "__header--reduced-motion"), shouldReduceMotion), "".concat(blockClass, "__header--has-title"), title)),
|
362
359
|
ref: headerRef
|
363
360
|
}, currentStep > 0 && /*#__PURE__*/React__default.createElement(Button, {
|
364
|
-
"aria-label": navigationBackIconDescription,
|
365
361
|
kind: "ghost",
|
366
362
|
size: slugCloseSize,
|
367
363
|
disabled: false,
|
@@ -16,15 +16,13 @@ export namespace overlayVariants {
|
|
16
16
|
}
|
17
17
|
}
|
18
18
|
export namespace panelVariants {
|
19
|
-
export function visible_1(
|
20
|
-
shouldReduceMotion: any;
|
21
|
-
}): {
|
19
|
+
export function visible_1(): {
|
22
20
|
x: number;
|
23
21
|
transition: {
|
24
22
|
duration: number;
|
25
23
|
ease: number[];
|
26
24
|
};
|
27
|
-
opacity:
|
25
|
+
opacity: number;
|
28
26
|
};
|
29
27
|
export { visible_1 as visible };
|
30
28
|
export function hidden_1({ placement, shouldReduceMotion }: {
|
@@ -32,7 +30,7 @@ export namespace panelVariants {
|
|
32
30
|
shouldReduceMotion: any;
|
33
31
|
}): {
|
34
32
|
x: string | number;
|
35
|
-
opacity:
|
33
|
+
opacity: number;
|
36
34
|
};
|
37
35
|
export { hidden_1 as hidden };
|
38
36
|
export function exit_1({ placement, shouldReduceMotion }: {
|
@@ -44,7 +42,7 @@ export namespace panelVariants {
|
|
44
42
|
duration: number;
|
45
43
|
ease: number[];
|
46
44
|
};
|
47
|
-
opacity:
|
45
|
+
opacity: number;
|
48
46
|
};
|
49
47
|
export { exit_1 as exit };
|
50
48
|
}
|
@@ -23,35 +23,34 @@ var overlayVariants = {
|
|
23
23
|
}
|
24
24
|
};
|
25
25
|
var panelVariants = {
|
26
|
-
visible: function visible(
|
27
|
-
var shouldReduceMotion = _ref.shouldReduceMotion;
|
26
|
+
visible: function visible() {
|
28
27
|
return {
|
29
28
|
x: 0,
|
30
29
|
transition: {
|
31
30
|
duration: DURATIONS.moderate02,
|
32
31
|
ease: EASINGS.productive.standard
|
33
32
|
},
|
34
|
-
opacity:
|
33
|
+
opacity: 1
|
35
34
|
};
|
36
35
|
},
|
37
|
-
hidden: function hidden(
|
38
|
-
var placement =
|
39
|
-
shouldReduceMotion =
|
36
|
+
hidden: function hidden(_ref) {
|
37
|
+
var placement = _ref.placement,
|
38
|
+
shouldReduceMotion = _ref.shouldReduceMotion;
|
40
39
|
return {
|
41
40
|
x: placement === 'right' ? shouldReduceMotion ? 0 : '100%' : shouldReduceMotion ? 0 : -320,
|
42
|
-
opacity: shouldReduceMotion
|
41
|
+
opacity: shouldReduceMotion ? 0 : 1
|
43
42
|
};
|
44
43
|
},
|
45
|
-
exit: function exit(
|
46
|
-
var placement =
|
47
|
-
shouldReduceMotion =
|
44
|
+
exit: function exit(_ref2) {
|
45
|
+
var placement = _ref2.placement,
|
46
|
+
shouldReduceMotion = _ref2.shouldReduceMotion;
|
48
47
|
return {
|
49
48
|
x: placement === 'right' ? shouldReduceMotion ? 0 : '100%' : shouldReduceMotion ? 0 : -320,
|
50
49
|
transition: {
|
51
50
|
duration: DURATIONS.moderate01,
|
52
51
|
ease: EASINGS.productive.exit
|
53
52
|
},
|
54
|
-
opacity: shouldReduceMotion
|
53
|
+
opacity: shouldReduceMotion ? 0 : 1
|
55
54
|
};
|
56
55
|
}
|
57
56
|
};
|
@@ -0,0 +1,87 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 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
|
+
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
+
import React__default from 'react';
|
10
|
+
import PropTypes from '../../node_modules/prop-types/index.js';
|
11
|
+
import cx from 'classnames';
|
12
|
+
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
13
|
+
import { pkg } from '../../settings.js';
|
14
|
+
import { InlineLoading } from '@carbon/react';
|
15
|
+
import { CircleStroke, ErrorOutline, CheckmarkOutline } from '@carbon/react/icons';
|
16
|
+
|
17
|
+
var _CircleStroke, _InlineLoading, _ErrorOutline, _CheckmarkOutline;
|
18
|
+
var _excluded = ["className", "description", "errorMessage", "status"];
|
19
|
+
|
20
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
|
+
var blockClass = "".concat(pkg.prefix, "--status-indicator-step");
|
22
|
+
var componentName = 'StatusIndicatorStep';
|
23
|
+
var defaults = {
|
24
|
+
status: 'inactive'
|
25
|
+
};
|
26
|
+
|
27
|
+
/**
|
28
|
+
* An icon/description pair that describes one step of the `StatusIndicator`.
|
29
|
+
*/
|
30
|
+
var StatusIndicatorStep = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
31
|
+
var className = _ref.className,
|
32
|
+
description = _ref.description,
|
33
|
+
errorMessage = _ref.errorMessage,
|
34
|
+
_ref$status = _ref.status,
|
35
|
+
status = _ref$status === void 0 ? defaults.status : _ref$status,
|
36
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
37
|
+
return /*#__PURE__*/React__default.createElement("li", _extends({}, rest, {
|
38
|
+
className: cx(blockClass, className, "".concat(blockClass, "--").concat(status)),
|
39
|
+
ref: ref
|
40
|
+
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
|
41
|
+
className: "".concat(blockClass, "__details")
|
42
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
43
|
+
className: "".concat(blockClass, "__icon")
|
44
|
+
}, status === 'inactive' && (_CircleStroke || (_CircleStroke = /*#__PURE__*/React__default.createElement(CircleStroke, {
|
45
|
+
size: 16,
|
46
|
+
viewBox: "1 1 14 14"
|
47
|
+
}))), status === 'active' && (_InlineLoading || (_InlineLoading = /*#__PURE__*/React__default.createElement(InlineLoading, null))), status === 'error' && (_ErrorOutline || (_ErrorOutline = /*#__PURE__*/React__default.createElement(ErrorOutline, {
|
48
|
+
size: 16
|
49
|
+
}))), status === 'finished' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default.createElement(CheckmarkOutline, {
|
50
|
+
size: 16
|
51
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
52
|
+
className: "".concat(blockClass, "__text")
|
53
|
+
}, description)), status === 'error' && errorMessage && /*#__PURE__*/React__default.createElement("div", {
|
54
|
+
className: "".concat(blockClass, "__error-message")
|
55
|
+
}, errorMessage));
|
56
|
+
});
|
57
|
+
|
58
|
+
// Return a placeholder if not released and not enabled by feature flag
|
59
|
+
StatusIndicatorStep = pkg.checkComponentEnabled(StatusIndicatorStep, componentName);
|
60
|
+
|
61
|
+
// The display name of the component, used by React. Note that displayName
|
62
|
+
// is used in preference to relying on function.name.
|
63
|
+
StatusIndicatorStep.displayName = componentName;
|
64
|
+
|
65
|
+
// The types and DocGen commentary for the component props,
|
66
|
+
// in alphabetical order (for consistency).
|
67
|
+
// See https://www.npmjs.com/package/prop-types#usage.
|
68
|
+
StatusIndicatorStep.propTypes = {
|
69
|
+
/**
|
70
|
+
* Provide an optional class to be applied to the containing node.
|
71
|
+
*/
|
72
|
+
className: PropTypes.string,
|
73
|
+
/**
|
74
|
+
* The text associated with the icon.
|
75
|
+
*/
|
76
|
+
description: PropTypes.string.isRequired,
|
77
|
+
/**
|
78
|
+
* This message will appear below the description if the `status` is "error".
|
79
|
+
*/
|
80
|
+
errorMessage: PropTypes.string,
|
81
|
+
/**
|
82
|
+
* Each `status` represents a different icon..
|
83
|
+
*/
|
84
|
+
status: PropTypes.oneOf(['inactive', 'active', 'error', 'finished']).isRequired
|
85
|
+
};
|
86
|
+
|
87
|
+
export { StatusIndicatorStep };
|
@@ -99,9 +99,16 @@ interface TearsheetProps extends PropsWithChildren {
|
|
99
99
|
*/
|
100
100
|
portalTarget: ReactNode;
|
101
101
|
/**
|
102
|
-
* Specify a CSS selector that matches the DOM element that should be
|
102
|
+
* Specify a CSS selector that matches the DOM element that should be
|
103
|
+
* focused when the Modal opens.
|
103
104
|
*/
|
104
105
|
selectorPrimaryFocus?: string;
|
106
|
+
/**
|
107
|
+
* Specify the CSS selectors that match the floating menus.
|
108
|
+
*
|
109
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
110
|
+
*/
|
111
|
+
selectorsFloatingMenus?: string[];
|
105
112
|
/**
|
106
113
|
* The main title of the tearsheet, displayed in the header area.
|
107
114
|
*/
|
@@ -190,9 +190,17 @@ Tearsheet.propTypes = _objectSpread2({
|
|
190
190
|
/**@ts-ignore */
|
191
191
|
portalTarget: portalType,
|
192
192
|
/**
|
193
|
-
* Specify a CSS selector that matches the DOM element that should be
|
193
|
+
* Specify a CSS selector that matches the DOM element that should be
|
194
|
+
* focused when the Modal opens.
|
194
195
|
*/
|
195
196
|
selectorPrimaryFocus: PropTypes.string,
|
197
|
+
/**
|
198
|
+
* Specify the CSS selectors that match the floating menus.
|
199
|
+
*
|
200
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
201
|
+
*/
|
202
|
+
/**@ts-ignore*/
|
203
|
+
selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
|
196
204
|
/**
|
197
205
|
* The main title of the tearsheet, displayed in the header area.
|
198
206
|
*/
|
@@ -64,6 +64,17 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
|
|
64
64
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
65
65
|
*/
|
66
66
|
portalTarget?: ReactNode;
|
67
|
+
/**
|
68
|
+
* Specify a CSS selector that matches the DOM element that should be
|
69
|
+
* focused when the Modal opens.
|
70
|
+
*/
|
71
|
+
selectorPrimaryFocus?: string;
|
72
|
+
/**
|
73
|
+
* Specify the CSS selectors that match the floating menus.
|
74
|
+
*
|
75
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
76
|
+
*/
|
77
|
+
selectorsFloatingMenus?: string[];
|
67
78
|
/**
|
68
79
|
* The main title of the tearsheet, displayed in the header area.
|
69
80
|
*/
|
@@ -148,6 +148,18 @@ TearsheetNarrow.propTypes = _objectSpread2({
|
|
148
148
|
*/
|
149
149
|
/**@ts-ignore */
|
150
150
|
portalTarget: portalType,
|
151
|
+
/**
|
152
|
+
* Specify a CSS selector that matches the DOM element that should be
|
153
|
+
* focused when the Modal opens.
|
154
|
+
*/
|
155
|
+
selectorPrimaryFocus: PropTypes.string,
|
156
|
+
/**
|
157
|
+
* Specify the CSS selectors that match the floating menus.
|
158
|
+
*
|
159
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
160
|
+
*/
|
161
|
+
/**@ts-ignore*/
|
162
|
+
selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
|
151
163
|
/**
|
152
164
|
* The main title of the tearsheet, displayed in the header area.
|
153
165
|
*/
|
@@ -9,7 +9,7 @@ import React, { PropsWithChildren, ReactNode, RefObject } from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
10
10
|
import { type ButtonProps } from '@carbon/react';
|
11
11
|
interface TearsheetShellProps extends PropsWithChildren {
|
12
|
-
actions?: ButtonProps[];
|
12
|
+
actions?: ButtonProps<any>[];
|
13
13
|
ariaLabel?: string;
|
14
14
|
/**
|
15
15
|
* An optional class or classes to be added to the outermost element.
|
@@ -81,7 +81,17 @@ interface TearsheetShellProps extends PropsWithChildren {
|
|
81
81
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
82
82
|
*/
|
83
83
|
portalTarget?: ReactNode;
|
84
|
+
/**
|
85
|
+
* Specify a CSS selector that matches the DOM element that should be
|
86
|
+
* focused when the Modal opens.
|
87
|
+
*/
|
84
88
|
selectorPrimaryFocus?: string;
|
89
|
+
/**
|
90
|
+
* Specify the CSS selectors that match the floating menus.
|
91
|
+
*
|
92
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
93
|
+
*/
|
94
|
+
selectorsFloatingMenus?: string[];
|
85
95
|
/**
|
86
96
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
87
97
|
*/
|