@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
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
8
|
+
import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { useRef, useState, useEffect } from 'react';
|
10
10
|
import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
|
11
11
|
import PropTypes from '../../node_modules/prop-types/index.js';
|
@@ -16,11 +16,11 @@ import { getNodeTextContent } from '../../global/js/utils/getNodeTextContent.js'
|
|
16
16
|
import { Button, usePrefix, ComposedModal, ModalHeader, Layer } from '@carbon/react';
|
17
17
|
import { Wrap } from '../../global/js/utils/Wrap.js';
|
18
18
|
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
19
|
-
import { useFocus } from '../../global/js/hooks/useFocus.js';
|
19
|
+
import { useFocus, getSpecificElement } from '../../global/js/hooks/useFocus.js';
|
20
20
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
21
21
|
import { ActionSet } from '../ActionSet/ActionSet.js';
|
22
22
|
|
23
|
-
var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
23
|
+
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"];
|
24
24
|
|
25
25
|
// The block part of our conventional BEM class names (bc__E--M).
|
26
26
|
var bc = "".concat(pkg.prefix, "--tearsheet");
|
@@ -79,6 +79,8 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
79
79
|
open = _ref.open,
|
80
80
|
portalTargetIn = _ref.portalTarget,
|
81
81
|
selectorPrimaryFocus = _ref.selectorPrimaryFocus,
|
82
|
+
_ref$selectorsFloatin = _ref.selectorsFloatingMenus,
|
83
|
+
selectorsFloatingMenus = _ref$selectorsFloatin === void 0 ? [] : _ref$selectorsFloatin,
|
82
84
|
size = _ref.size,
|
83
85
|
slug = _ref.slug,
|
84
86
|
title = _ref.title,
|
@@ -138,7 +140,8 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
138
140
|
// Callback to give the tearsheet the opportunity to claim focus
|
139
141
|
handleStackChange.claimFocus = function () {
|
140
142
|
if (selectorPrimaryFocus) {
|
141
|
-
|
143
|
+
var _getSpecificElement;
|
144
|
+
return (_getSpecificElement = getSpecificElement(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current, selectorPrimaryFocus)) === null || _getSpecificElement === void 0 ? void 0 : _getSpecificElement.focus();
|
142
145
|
}
|
143
146
|
firstElement === null || firstElement === void 0 || firstElement.focus();
|
144
147
|
};
|
@@ -249,7 +252,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
249
252
|
onKeyDown: keyDownListener,
|
250
253
|
preventCloseOnClickOutside: !isPassive,
|
251
254
|
ref: modalRef,
|
252
|
-
selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")],
|
255
|
+
selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")].concat(_toConsumableArray(selectorsFloatingMenus)),
|
253
256
|
size: "sm"
|
254
257
|
}), includeHeader && /*#__PURE__*/React__default.createElement(ModalHeader, {
|
255
258
|
className: cx("".concat(bc, "__header"), _defineProperty(_defineProperty({}, "".concat(bc, "__header--with-close-icon"), effectiveHasCloseIcon), "".concat(bc, "__header--with-nav"), navigation)),
|
@@ -311,7 +314,9 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
311
314
|
// The display name of the component, used by React. Note that displayName
|
312
315
|
// is used in preference to relying on function.name.
|
313
316
|
TearsheetShell.displayName = componentName;
|
314
|
-
var portalType = typeof Element === 'undefined' ? PropTypes.object :
|
317
|
+
var portalType = typeof Element === 'undefined' ? PropTypes.object :
|
318
|
+
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
319
|
+
PropTypes.instanceOf(Element);
|
315
320
|
var deprecatedProps = {
|
316
321
|
/**
|
317
322
|
* **Deprecated**
|
@@ -354,6 +359,7 @@ TearsheetShell.propTypes = _objectSpread2({
|
|
354
359
|
label: PropTypes.string,
|
355
360
|
loading: PropTypes.bool,
|
356
361
|
// we duplicate this Button prop to improve the DocGen here
|
362
|
+
/**@ts-ignore*/
|
357
363
|
onClick: Button.propTypes.onClick
|
358
364
|
}))),
|
359
365
|
/**
|
@@ -445,6 +451,18 @@ TearsheetShell.propTypes = _objectSpread2({
|
|
445
451
|
*/
|
446
452
|
/**@ts-ignore*/
|
447
453
|
portalTarget: portalType,
|
454
|
+
/**
|
455
|
+
* Specify a CSS selector that matches the DOM element that should be
|
456
|
+
* focused when the Modal opens.
|
457
|
+
*/
|
458
|
+
selectorPrimaryFocus: PropTypes.string,
|
459
|
+
/**
|
460
|
+
* Specify the CSS selectors that match the floating menus.
|
461
|
+
*
|
462
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
463
|
+
*/
|
464
|
+
/**@ts-ignore*/
|
465
|
+
selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
|
448
466
|
/**
|
449
467
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
450
468
|
*/
|
@@ -28,7 +28,7 @@ var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
29
29
|
var Icon = renderIcon;
|
30
30
|
return /*#__PURE__*/React__default.createElement(IconButton, _extends({
|
31
|
-
align: (
|
31
|
+
align: (_useContext = useContext(ToolbarContext)) !== null && _useContext !== void 0 && _useContext.vertical ? 'right' : 'top'
|
32
32
|
}, rest, {
|
33
33
|
label: iconDescription,
|
34
34
|
ref: ref,
|
@@ -15,6 +15,7 @@ import { OverflowMenu, OverflowMenuItem, Button, Theme } from '@carbon/react';
|
|
15
15
|
import { moderate02 } from '@carbon/motion';
|
16
16
|
import { useWebTerminal } from './hooks/index.js';
|
17
17
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
18
|
+
import usePrefersReducedMotion from '../../global/js/hooks/usePrefersReducedMotion.js';
|
18
19
|
|
19
20
|
var _excluded = ["actions", "children", "className", "closeIconDescription", "documentationLinks", "documentationLinksIconDescription", "isInitiallyOpen", "webTerminalAriaLabel"];
|
20
21
|
|
@@ -56,10 +57,7 @@ var WebTerminal = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
56
57
|
_useState2 = _slicedToArray(_useState, 2),
|
57
58
|
shouldRender = _useState2[0],
|
58
59
|
setRender = _useState2[1];
|
59
|
-
var
|
60
|
-
matches: true
|
61
|
-
},
|
62
|
-
prefersReducedMotion = _ref2.matches;
|
60
|
+
var shouldReduceMotion = usePrefersReducedMotion();
|
63
61
|
var webTerminalAnimationName = "".concat(open ? 'web-terminal-entrance' : 'web-terminal-exit forwards', " ").concat(moderate02);
|
64
62
|
var showDocumentationLinks = useMemo(function () {
|
65
63
|
return documentationLinks.length > 0;
|
@@ -92,7 +90,7 @@ var WebTerminal = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
92
90
|
If the user prefers reduced motion, we have to manually set render to false
|
93
91
|
because onAnimationEnd will never be called.
|
94
92
|
*/
|
95
|
-
if (
|
93
|
+
if (shouldReduceMotion) {
|
96
94
|
setRender(false);
|
97
95
|
}
|
98
96
|
closeWebTerminal === null || closeWebTerminal === void 0 || closeWebTerminal();
|
@@ -101,7 +99,7 @@ var WebTerminal = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
101
99
|
ref: ref,
|
102
100
|
className: cx([blockClass, className, _defineProperty(_defineProperty({}, "".concat(blockClass, "--open"), open), "".concat(blockClass, "--closed"), !open)]),
|
103
101
|
style: {
|
104
|
-
animation: !
|
102
|
+
animation: !shouldReduceMotion ? webTerminalAnimationName : ''
|
105
103
|
},
|
106
104
|
onAnimationEnd: onAnimationEnd
|
107
105
|
}), /*#__PURE__*/React__default.createElement("header", {
|
@@ -119,15 +117,15 @@ var WebTerminal = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
119
117
|
"aria-label": documentationLinksIconDescription,
|
120
118
|
menuOptionsClass: "".concat(blockClass, "__documentation-overflow"),
|
121
119
|
size: "lg"
|
122
|
-
}, documentationLinks.map(function (
|
123
|
-
var rest = _extends({}, (_objectDestructuringEmpty(
|
120
|
+
}, documentationLinks.map(function (_ref3, i) {
|
121
|
+
var rest = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
|
124
122
|
return /*#__PURE__*/React__default.createElement(OverflowMenuItem, _extends({
|
125
123
|
key: i
|
126
124
|
}, rest));
|
127
|
-
})), actions.map(function (
|
128
|
-
var renderIcon =
|
129
|
-
onClick =
|
130
|
-
iconDescription =
|
125
|
+
})), actions.map(function (_ref4) {
|
126
|
+
var renderIcon = _ref4.renderIcon,
|
127
|
+
onClick = _ref4.onClick,
|
128
|
+
iconDescription = _ref4.iconDescription;
|
131
129
|
return /*#__PURE__*/React__default.createElement(Button, {
|
132
130
|
key: iconDescription,
|
133
131
|
hasIconOnly: true,
|
package/es/components/index.d.ts
CHANGED
@@ -50,7 +50,6 @@ export { Nav } from "./Nav";
|
|
50
50
|
export { StringFormatter } from "./StringFormatter";
|
51
51
|
export { UserAvatar } from "./UserAvatar";
|
52
52
|
export { ScrollGradient } from "./ScrollGradient";
|
53
|
-
export { StatusIndicator } from "./StatusIndicator";
|
54
53
|
export { TagOverflow } from "./TagOverflow";
|
55
54
|
export { ActionBar } from "./ActionBar";
|
56
55
|
export { ConditionBuilder } from "./ConditionBuilder";
|
@@ -68,5 +67,6 @@ export { EditTearsheet, EditTearsheetForm } from "./EditTearsheet";
|
|
68
67
|
export { Guidebanner, GuidebannerElement, GuidebannerElementButton, GuidebannerElementLink } from "./Guidebanner";
|
69
68
|
export { InlineTip, InlineTipButton, InlineTipLink } from "./InlineTip";
|
70
69
|
export { DescriptionList, DescriptionListBody, DescriptionListCell, DescriptionListRow } from "./DescriptionList";
|
70
|
+
export { StatusIndicator, StatusIndicatorStep } from "./StatusIndicator";
|
71
71
|
export { FilterPanel, FilterPanelAccordion, FilterPanelAccordionItem, FilterPanelCheckbox, FilterPanelCheckboxWithOverflow, FilterPanelGroup, FilterPanelLabel, FilterPanelSearch } from "./FilterPanel";
|
72
72
|
export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from "./FeatureFlags";
|
@@ -9,6 +9,9 @@ import { usePrefix } from '@carbon/react';
|
|
9
9
|
import { pkg } from '../../../settings.js';
|
10
10
|
import { useCallback, useEffect } from 'react';
|
11
11
|
|
12
|
+
var getSpecificElement = function getSpecificElement(parentEl, elementId) {
|
13
|
+
return elementId ? parentEl === null || parentEl === void 0 ? void 0 : parentEl.querySelector(elementId) : null;
|
14
|
+
};
|
12
15
|
var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
13
16
|
var carbonPrefix = usePrefix();
|
14
17
|
var tearsheetBaseClass = "".concat(pkg.prefix, "--tearsheet");
|
@@ -39,7 +42,7 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
|
39
42
|
var first = (_focusableElements2 = focusableElements) === null || _focusableElements2 === void 0 ? void 0 : _focusableElements2[0];
|
40
43
|
var last = (_focusableElements3 = focusableElements) === null || _focusableElements3 === void 0 ? void 0 : _focusableElements3[((_focusableElements4 = focusableElements) === null || _focusableElements4 === void 0 ? void 0 : _focusableElements4.length) - 1];
|
41
44
|
var all = focusableElements;
|
42
|
-
var specifiedElement =
|
45
|
+
var specifiedElement = getSpecificElement(modalEl, selectorPrimaryFocus);
|
43
46
|
return {
|
44
47
|
first: first,
|
45
48
|
last: last,
|
@@ -84,4 +87,4 @@ var useFocus = function useFocus(modalRef, selectorPrimaryFocus) {
|
|
84
87
|
};
|
85
88
|
};
|
86
89
|
|
87
|
-
export { useFocus };
|
90
|
+
export { getSpecificElement, useFocus };
|
@@ -6,20 +6,26 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
-
import { useState
|
10
|
-
import {
|
9
|
+
import { useState } from 'react';
|
10
|
+
import { useIsomorphicEffect } from './useIsomorphicEffect.js';
|
11
11
|
|
12
12
|
var usePrefersReducedMotion = function usePrefersReducedMotion() {
|
13
13
|
var _useState = useState(false),
|
14
14
|
_useState2 = _slicedToArray(_useState, 2),
|
15
15
|
prefersReducedMotion = _useState2[0],
|
16
16
|
setPrefersReducedMotion = _useState2[1];
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
useIsomorphicEffect(function () {
|
18
|
+
var mediaQueryList = window.matchMedia('(prefers-reduced-motion: no-preference)');
|
19
|
+
var _window$matchMedia = window.matchMedia('(prefers-reduced-motion: no-preference)'),
|
20
|
+
matches = _window$matchMedia.matches;
|
21
|
+
setPrefersReducedMotion(!matches);
|
22
|
+
var listener = function listener(event) {
|
23
|
+
setPrefersReducedMotion(!event.matches);
|
24
|
+
};
|
25
|
+
mediaQueryList.addEventListener('change', listener);
|
26
|
+
return function () {
|
27
|
+
mediaQueryList.removeEventListener('change', listener);
|
28
|
+
};
|
23
29
|
}, []);
|
24
30
|
return prefersReducedMotion;
|
25
31
|
};
|
@@ -39,6 +39,7 @@ declare namespace defaults {
|
|
39
39
|
let ErrorEmptyState: boolean;
|
40
40
|
let ExportModal: boolean;
|
41
41
|
let ExpressiveCard: boolean;
|
42
|
+
let FullPageError: boolean;
|
42
43
|
let HTTPError403: boolean;
|
43
44
|
let HTTPError404: boolean;
|
44
45
|
let HTTPErrorOther: boolean;
|
@@ -80,7 +81,6 @@ declare namespace defaults {
|
|
80
81
|
let BigNumbers: boolean;
|
81
82
|
let TruncatedList: boolean;
|
82
83
|
let DelimitedList: boolean;
|
83
|
-
let FullPageError: boolean;
|
84
84
|
let ScrollGradient: boolean;
|
85
85
|
let StringFormatter: boolean;
|
86
86
|
let StatusIndicator: boolean;
|
@@ -37,6 +37,7 @@ var defaults = {
|
|
37
37
|
ErrorEmptyState: true,
|
38
38
|
ExportModal: true,
|
39
39
|
ExpressiveCard: true,
|
40
|
+
FullPageError: true,
|
40
41
|
HTTPError403: true,
|
41
42
|
HTTPError404: true,
|
42
43
|
HTTPErrorOther: true,
|
@@ -79,7 +80,6 @@ var defaults = {
|
|
79
80
|
BigNumbers: false,
|
80
81
|
TruncatedList: false,
|
81
82
|
DelimitedList: false,
|
82
|
-
FullPageError: false,
|
83
83
|
ScrollGradient: false,
|
84
84
|
StringFormatter: false,
|
85
85
|
StatusIndicator: false,
|
package/es/index.js
CHANGED
@@ -122,6 +122,7 @@ export { StringFormatter } from './components/StringFormatter/StringFormatter.js
|
|
122
122
|
export { UserAvatar } from './components/UserAvatar/UserAvatar.js';
|
123
123
|
export { ScrollGradient } from './components/ScrollGradient/ScrollGradient.js';
|
124
124
|
export { StatusIndicator } from './components/StatusIndicator/StatusIndicator.js';
|
125
|
+
export { StatusIndicatorStep } from './components/StatusIndicator/StatusIndicatorStep.js';
|
125
126
|
export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
|
126
127
|
export { ActionBar } from './components/ActionBar/ActionBar.js';
|
127
128
|
export { FilterPanel } from './components/FilterPanel/FilterPanel.js';
|
package/es/settings.d.ts
CHANGED
@@ -25,6 +25,7 @@ export const pkg: {
|
|
25
25
|
ErrorEmptyState: boolean;
|
26
26
|
ExportModal: boolean;
|
27
27
|
ExpressiveCard: boolean;
|
28
|
+
FullPageError: boolean;
|
28
29
|
HTTPError403: boolean;
|
29
30
|
HTTPError404: boolean;
|
30
31
|
HTTPErrorOther: boolean;
|
@@ -66,7 +67,6 @@ export const pkg: {
|
|
66
67
|
BigNumbers: boolean;
|
67
68
|
TruncatedList: boolean;
|
68
69
|
DelimitedList: boolean;
|
69
|
-
FullPageError: boolean;
|
70
70
|
ScrollGradient: boolean;
|
71
71
|
StringFormatter: boolean;
|
72
72
|
StatusIndicator: boolean;
|
@@ -21,6 +21,7 @@ var hooks = require('./utils/hooks.js');
|
|
21
21
|
var devtools = require('../../global/js/utils/devtools.js');
|
22
22
|
var settings = require('../../settings.js');
|
23
23
|
var lodash = require('lodash');
|
24
|
+
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
24
25
|
|
25
26
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
26
27
|
|
@@ -45,7 +46,6 @@ var defaults = {
|
|
45
46
|
*/
|
46
47
|
|
47
48
|
exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
48
|
-
var _document$querySelect;
|
49
49
|
var _ref$align = _ref.align,
|
50
50
|
align = _ref$align === void 0 ? defaults.align : _ref$align,
|
51
51
|
children = _ref.children,
|
@@ -64,7 +64,6 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
64
64
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
65
65
|
var isBeacon = overlayKind === enums.COACHMARK_OVERLAY_KIND.TOOLTIP;
|
66
66
|
var isStacked = overlayKind === enums.COACHMARK_OVERLAY_KIND.STACKED;
|
67
|
-
var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
|
68
67
|
var _useState = React.useState(isStacked),
|
69
68
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
70
69
|
isOpen = _useState2[0],
|
@@ -88,6 +87,11 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
88
87
|
var backupRef = React.useRef();
|
89
88
|
var _coachmarkRef = ref || backupRef;
|
90
89
|
var _overlayRef = overlayRef || overlayBackupRef;
|
90
|
+
var portalNode = React.useRef(null);
|
91
|
+
useIsomorphicEffect.useIsomorphicEffect(function () {
|
92
|
+
var _document$querySelect, _document, _document2, _document3;
|
93
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
94
|
+
}, [portalTarget]);
|
91
95
|
var closeOverlay = function closeOverlay() {
|
92
96
|
setIsOpen(false);
|
93
97
|
};
|
@@ -178,18 +182,19 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
178
182
|
}, /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
179
183
|
className: cx__default["default"](blockClass, "".concat(blockClass, "__").concat(theme), className),
|
180
184
|
ref: _coachmarkRef
|
181
|
-
}, rest, devtools.getDevtoolsProps(componentName)), target, isOpen && /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement(CoachmarkOverlay.CoachmarkOverlay, {
|
185
|
+
}, rest, devtools.getDevtoolsProps(componentName)), target, isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement(CoachmarkOverlay.CoachmarkOverlay, {
|
182
186
|
ref: _overlayRef,
|
183
187
|
fixedIsVisible: false,
|
184
188
|
kind: overlayKind,
|
185
189
|
onClose: handleClose,
|
186
190
|
theme: theme,
|
187
191
|
className: cx__default["default"](overlayClassName, "".concat(overlayBlockClass, "--is-visible"))
|
188
|
-
}, children),
|
189
|
-
|
190
|
-
portalNode || document.body)));
|
192
|
+
}, children), // Default to `document.body` when `portalNode` is `null`
|
193
|
+
portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)));
|
191
194
|
});
|
192
|
-
var overlayRefType = typeof HTMLElement === 'undefined' ? index["default"].object :
|
195
|
+
var overlayRefType = typeof HTMLElement === 'undefined' ? index["default"].object :
|
196
|
+
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
197
|
+
index["default"].instanceOf(HTMLElement);
|
193
198
|
|
194
199
|
// Return a placeholder if not released and not enabled by feature flag
|
195
200
|
exports.Coachmark = settings.pkg.checkComponentEnabled(exports.Coachmark, componentName);
|
@@ -20,6 +20,8 @@ var CoachmarkOverlay = require('../Coachmark/CoachmarkOverlay.js');
|
|
20
20
|
var CoachmarkTagline = require('../Coachmark/CoachmarkTagline.js');
|
21
21
|
var context = require('../Coachmark/utils/context.js');
|
22
22
|
var enums = require('../Coachmark/utils/enums.js');
|
23
|
+
var framerMotion = require('framer-motion');
|
24
|
+
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
23
25
|
|
24
26
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
25
27
|
|
@@ -48,7 +50,6 @@ var defaults = {
|
|
48
50
|
* This variant allows the a coachmark overlay to be displayed by interacting with the tagline.
|
49
51
|
*/
|
50
52
|
exports.CoachmarkFixed = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
51
|
-
var _document$querySelect;
|
52
53
|
var children = _ref.children,
|
53
54
|
className = _ref.className,
|
54
55
|
_ref$onClose = _ref.onClose,
|
@@ -60,7 +61,7 @@ exports.CoachmarkFixed = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
60
61
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
61
62
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
62
63
|
var overlayRef = React.useRef(null);
|
63
|
-
var portalNode =
|
64
|
+
var portalNode = React.useRef(null);
|
64
65
|
var _useState = React.useState(false),
|
65
66
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
66
67
|
isOpen = _useState2[0],
|
@@ -84,17 +85,19 @@ exports.CoachmarkFixed = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
84
85
|
_useState10 = _rollupPluginBabelHelpers.slicedToArray(_useState9, 2),
|
85
86
|
fixedIsVisible = _useState10[0],
|
86
87
|
setFixedIsVisible = _useState10[1];
|
87
|
-
var
|
88
|
+
var shouldReduceMotion = framerMotion.useReducedMotion();
|
89
|
+
useIsomorphicEffect.useIsomorphicEffect(function () {
|
90
|
+
var _document$querySelect, _document, _document2, _document3;
|
91
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
92
|
+
}, [portalTarget]);
|
88
93
|
var handleClose = React.useCallback(function () {
|
89
|
-
|
90
|
-
if (prefersReducedMotion.matches) {
|
94
|
+
if (shouldReduceMotion) {
|
91
95
|
setIsOpen(false);
|
92
96
|
} else {
|
93
97
|
setFixedIsVisible(false);
|
94
98
|
}
|
95
|
-
}, [
|
99
|
+
}, [shouldReduceMotion]);
|
96
100
|
var handleTransitionEnd = function handleTransitionEnd(e) {
|
97
|
-
console.log('Here at transition end... ', e.propertyName === 'transform' && !fixedIsVisible);
|
98
101
|
if (e.propertyName === 'transform' && !fixedIsVisible) {
|
99
102
|
setIsOpen(false);
|
100
103
|
onClose();
|
@@ -173,7 +176,7 @@ exports.CoachmarkFixed = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
173
176
|
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(CoachmarkTagline.CoachmarkTagline, {
|
174
177
|
title: tagline,
|
175
178
|
onClose: onClose
|
176
|
-
}), isOpen && /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement(CoachmarkOverlay.CoachmarkOverlay, {
|
179
|
+
}), isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement(CoachmarkOverlay.CoachmarkOverlay, {
|
177
180
|
ref: overlayRef,
|
178
181
|
fixedIsVisible: fixedIsVisible,
|
179
182
|
kind: enums.COACHMARK_OVERLAY_KIND.FIXED,
|
@@ -181,9 +184,8 @@ exports.CoachmarkFixed = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
181
184
|
onTransitionEnd: handleTransitionEnd,
|
182
185
|
theme: theme,
|
183
186
|
className: cx__default["default"](fixedIsVisible && "".concat(overlayBlockClass, "--is-visible"), overlayBlockClass)
|
184
|
-
}, children),
|
185
|
-
|
186
|
-
portalNode || document.body)));
|
187
|
+
}, children), // Default to `document.body` when `portalNode` is `null`
|
188
|
+
portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)));
|
187
189
|
});
|
188
190
|
|
189
191
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -21,6 +21,7 @@ var CoachmarkStackHome = require('./CoachmarkStackHome.js');
|
|
21
21
|
var CoachmarkTagline = require('../Coachmark/CoachmarkTagline.js');
|
22
22
|
var context = require('../Coachmark/utils/context.js');
|
23
23
|
var enums = require('../Coachmark/utils/enums.js');
|
24
|
+
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
24
25
|
|
25
26
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
26
27
|
|
@@ -56,7 +57,6 @@ var defaults = {
|
|
56
57
|
* This variant allows the stacking of multiple coachmark overlays to be displayed by interacting with the tagline.
|
57
58
|
*/
|
58
59
|
exports.CoachmarkStack = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
59
|
-
var _document$querySelect;
|
60
60
|
var children = _ref.children,
|
61
61
|
className = _ref.className,
|
62
62
|
_ref$onClose = _ref.onClose,
|
@@ -72,7 +72,11 @@ exports.CoachmarkStack = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
72
72
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
73
73
|
title = _ref.title,
|
74
74
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
75
|
-
var portalNode =
|
75
|
+
var portalNode = React.useRef();
|
76
|
+
useIsomorphicEffect.useIsomorphicEffect(function () {
|
77
|
+
var _document$querySelect, _document, _document2, _document3;
|
78
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
79
|
+
}, [portalTarget]);
|
76
80
|
var stackHomeRef = React.useRef();
|
77
81
|
var stackedCoachmarkRefs = React.useRef([]);
|
78
82
|
var _useState = React.useState(false),
|
@@ -215,7 +219,7 @@ exports.CoachmarkStack = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
215
219
|
portalTarget: portalTarget,
|
216
220
|
closeButtonLabel: closeButtonLabel,
|
217
221
|
title: title
|
218
|
-
}), /*#__PURE__*/reactDom.createPortal(wrappedChildren, portalNode)));
|
222
|
+
}), portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/reactDom.createPortal(wrappedChildren, portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null));
|
219
223
|
});
|
220
224
|
|
221
225
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -20,6 +20,7 @@ var devtools = require('../../global/js/utils/devtools.js');
|
|
20
20
|
var settings = require('../../settings.js');
|
21
21
|
var reactDom = require('react-dom');
|
22
22
|
var CoachmarkHeader = require('../Coachmark/CoachmarkHeader.js');
|
23
|
+
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
23
24
|
var SteppedAnimatedMedia = require('../SteppedAnimatedMedia/SteppedAnimatedMedia.js');
|
24
25
|
|
25
26
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
@@ -42,7 +43,6 @@ var componentName = 'CoachmarkStackHome';
|
|
42
43
|
* of other Onboarding components.
|
43
44
|
*/
|
44
45
|
exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
45
|
-
var _document$querySelect;
|
46
46
|
var className = _ref.className,
|
47
47
|
description = _ref.description,
|
48
48
|
isOpen = _ref.isOpen,
|
@@ -66,11 +66,15 @@ exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
66
66
|
}
|
67
67
|
}, 100);
|
68
68
|
}, [isOpen]);
|
69
|
+
var portalNode = React.useRef();
|
70
|
+
useIsomorphicEffect.useIsomorphicEffect(function () {
|
71
|
+
var _document$querySelect, _document, _document2, _document3;
|
72
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
73
|
+
}, [portalTarget]);
|
69
74
|
if (!navLinkLabels) {
|
70
75
|
return pconsole["default"].warn("".concat(componentName, " is an Onboarding internal component and is not intended for general use."));
|
71
76
|
}
|
72
|
-
|
73
|
-
return /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
77
|
+
return portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
74
78
|
className: cx__default["default"](blockClass, className),
|
75
79
|
ref: ref,
|
76
80
|
role: "main"
|
@@ -112,7 +116,7 @@ exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
112
116
|
setLinkFocusIndex(0);
|
113
117
|
_onClose();
|
114
118
|
}
|
115
|
-
}, closeButtonLabel))))), portalNode);
|
119
|
+
}, closeButtonLabel))))), portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null;
|
116
120
|
function renderNavLink(index, label) {
|
117
121
|
var ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
118
122
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|