@carbon/ibm-products 2.44.0-rc.2 → 2.45.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/index-full-carbon.css +118 -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 +203 -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 +118 -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 +118 -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 +35 -22
- package/es/components/ConditionBuilder/ConditionBuilder.js +17 -7
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +58 -36
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +23 -11
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +4 -1
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +14 -4
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +8 -4
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +17 -9
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +29 -16
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +12 -6
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +20 -7
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +23 -20
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +37 -39
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +37 -38
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +49 -23
- 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 +12 -9
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +9 -4
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +10 -5
- 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 +70 -17
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +31 -14
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -1
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +120 -28
- 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.js +1 -9
- package/es/components/CreateFullPage/CreateFullPage.js +2 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +8 -0
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +25 -7
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +13 -3
- package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
- package/es/components/Datagrid/Datagrid/Datagrid.js +2 -8
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -7
- package/es/components/Datagrid/Datagrid/DatagridRow.js +8 -6
- 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/FilterProvider.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -2
- package/es/components/Datagrid/types/index.d.ts +28 -6
- 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/useNestedRowExpander.js +1 -3
- 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/EditInPlace/EditInPlace.d.ts +4 -0
- package/es/components/EditInPlace/EditInPlace.js +21 -10
- package/es/components/EditTearsheet/EditTearsheet.d.ts +2 -1
- package/es/components/EditTearsheet/EditTearsheet.js +44 -9
- 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/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/Tearsheet/TearsheetShell.js +3 -1
- package/es/components/WebTerminal/WebTerminal.js +10 -12
- 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/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 +34 -21
- package/lib/components/ConditionBuilder/ConditionBuilder.js +17 -7
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +56 -33
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +22 -10
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +4 -1
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +13 -3
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +6 -2
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +16 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +28 -15
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +12 -6
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +20 -7
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +22 -20
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +37 -39
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +37 -38
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +48 -22
- 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 +11 -8
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +8 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +9 -4
- 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 +68 -15
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +30 -13
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +119 -27
- 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.js +0 -9
- package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +8 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +25 -7
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +13 -3
- package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
- package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -8
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -7
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +8 -6
- 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/FilterProvider.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -2
- package/lib/components/Datagrid/types/index.d.ts +28 -6
- 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/useNestedRowExpander.js +1 -3
- 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/EditInPlace/EditInPlace.d.ts +4 -0
- package/lib/components/EditInPlace/EditInPlace.js +21 -10
- package/lib/components/EditTearsheet/EditTearsheet.d.ts +2 -1
- package/lib/components/EditTearsheet/EditTearsheet.js +43 -8
- 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/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/Tearsheet/TearsheetShell.js +3 -1
- package/lib/components/WebTerminal/WebTerminal.js +10 -12
- 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/settings.d.ts +1 -1
- package/package.json +4 -4
- package/scss/components/ConditionBuilder/_condition-builder.scss +1 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +5 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +8 -4
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +9 -2
- package/scss/components/Datagrid/_datagrid.scss +0 -4
- 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/_index-released-only.scss +1 -0
- package/telemetry.yml +12 -2
- package/es/global/js/utils/window.d.ts +0 -2
- package/es/global/js/utils/window.js +0 -12
- package/lib/global/js/utils/window.d.ts +0 -2
- package/lib/global/js/utils/window.js +0 -16
@@ -19,6 +19,7 @@ var settings = require('../../settings.js');
|
|
19
19
|
var react = require('@carbon/react');
|
20
20
|
var icons = require('@carbon/react/icons');
|
21
21
|
var carbonMotion = require('@carbon/motion');
|
22
|
+
var usePrefersReducedMotion = require('../../global/js/hooks/usePrefersReducedMotion.js');
|
22
23
|
var useControllableState = require('../../global/js/hooks/useControllableState.js');
|
23
24
|
|
24
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
@@ -99,9 +100,7 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
99
100
|
var isInvalid = invalid;
|
100
101
|
var isWarn = !isInvalid && warn;
|
101
102
|
var isLocked = !isInvalid && !isWarn && locked;
|
102
|
-
var
|
103
|
-
matches: true
|
104
|
-
};
|
103
|
+
var shouldReduceMotion = usePrefersReducedMotion["default"]();
|
105
104
|
if (open !== prevIsOpen) {
|
106
105
|
if (isOpen && !open) {
|
107
106
|
collapse();
|
@@ -111,7 +110,7 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
111
110
|
setPrevIsOpen(open);
|
112
111
|
}
|
113
112
|
function expand() {
|
114
|
-
if (detailsRef.current && contentRef.current && !
|
113
|
+
if (detailsRef.current && contentRef.current && !shouldReduceMotion) {
|
115
114
|
setIsOpen(true);
|
116
115
|
detailsRef.current.open = true;
|
117
116
|
var _getComputedStyle = getComputedStyle(contentRef.current),
|
@@ -140,7 +139,7 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
140
139
|
}
|
141
140
|
}
|
142
141
|
function collapse() {
|
143
|
-
if (contentRef.current && !
|
142
|
+
if (contentRef.current && !shouldReduceMotion) {
|
144
143
|
setClosing(true);
|
145
144
|
var _getComputedStyle2 = getComputedStyle(contentRef.current),
|
146
145
|
paddingTop = _getComputedStyle2.paddingTop,
|
@@ -192,6 +191,12 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
192
191
|
var Icon = null;
|
193
192
|
var text = summary;
|
194
193
|
var summaryClasses = ["".concat(blockClass, "__summary")];
|
194
|
+
if (closing) {
|
195
|
+
summaryClasses.push("".concat(blockClass, "__summary--closing"));
|
196
|
+
}
|
197
|
+
if (isOpen) {
|
198
|
+
summaryClasses.push("".concat(blockClass, "__summary--open"));
|
199
|
+
}
|
195
200
|
if (invalid) {
|
196
201
|
Icon = icons.WarningFilled;
|
197
202
|
text = invalidText;
|
@@ -255,7 +260,7 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
255
260
|
onClick: toggle
|
256
261
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ChevronDown, {
|
257
262
|
size: 16,
|
258
|
-
className: "".concat(blockClass, "__chevron")
|
263
|
+
className: cx__default["default"]("".concat(blockClass, "__chevron"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__chevron--open"), isOpen), "".concat(blockClass, "__chevron--closing"), closing))
|
259
264
|
}), renderTitle()), /*#__PURE__*/React__default["default"].createElement("div", {
|
260
265
|
className: "".concat(blockClass, "__content"),
|
261
266
|
ref: contentRef
|
@@ -36,6 +36,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
36
36
|
|
37
37
|
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"];
|
38
38
|
var componentName = 'PageHeader';
|
39
|
+
settings.pkg._silenceWarnings(true);
|
39
40
|
settings.pkg.component.ActionBar = true;
|
40
41
|
|
41
42
|
// Default values for props
|
@@ -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. */
|
@@ -144,7 +144,7 @@ exports.SearchBar = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
144
144
|
})) : null, /*#__PURE__*/React__default["default"].createElement(react.Search, {
|
145
145
|
className: "".concat(blockClass, "__input"),
|
146
146
|
closeButtonLabelText: clearButtonLabelText,
|
147
|
-
labelText: labelText
|
147
|
+
labelText: labelText,
|
148
148
|
name: "search-input",
|
149
149
|
onChange: handleInputChange,
|
150
150
|
placeholder: placeholderText,
|
@@ -197,7 +197,7 @@ exports.SearchBar.propTypes = _rollupPluginBabelHelpers.objectSpread2({
|
|
197
197
|
*/
|
198
198
|
hideScopesLabel: index["default"].bool,
|
199
199
|
/** @type {string} The label text for the search text input. */
|
200
|
-
labelText: index["default"].string,
|
200
|
+
labelText: index["default"].string.isRequired,
|
201
201
|
/** @type {Function} Function handler for when the user changes their query search. */
|
202
202
|
onChange: index["default"].func,
|
203
203
|
/** @type {Function} Function handler for when the user submits a search. */
|
@@ -23,6 +23,7 @@ var react = require('@carbon/react');
|
|
23
23
|
var icons = require('@carbon/react/icons');
|
24
24
|
var variants = require('./motion/variants.js');
|
25
25
|
var pconsole = require('../../global/js/utils/pconsole.js');
|
26
|
+
var usePrefersReducedMotion = require('../../global/js/hooks/usePrefersReducedMotion.js');
|
26
27
|
var ActionSet = require('../ActionSet/ActionSet.js');
|
27
28
|
var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
|
28
29
|
var useFocus = require('../../global/js/hooks/useFocus.js');
|
@@ -53,7 +54,6 @@ var defaults = {
|
|
53
54
|
* Side panels keep users in-context of a page while performing tasks like navigating, editing, viewing details, or configuring something new.
|
54
55
|
*/
|
55
56
|
exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
56
|
-
var _window;
|
57
57
|
var actionToolbarButtons = _ref.actionToolbarButtons,
|
58
58
|
actions = _ref.actions,
|
59
59
|
_ref$animateTitle = _ref.animateTitle,
|
@@ -120,7 +120,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
120
120
|
keyDownListener = _useFocus.keyDownListener;
|
121
121
|
var panelRefValue = sidePanelRef.current;
|
122
122
|
var previousOpen = usePreviousValue.usePreviousValue(open);
|
123
|
-
var shouldReduceMotion =
|
123
|
+
var shouldReduceMotion = usePrefersReducedMotion["default"]();
|
124
124
|
|
125
125
|
// Title animation on scroll related state
|
126
126
|
var _useState7 = React.useState(0),
|
@@ -163,9 +163,6 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
163
163
|
titleItemsStyles(animationProgress);
|
164
164
|
}
|
165
165
|
}, [doAnimateTitle, panelRefValue === null || panelRefValue === void 0 ? void 0 : panelRefValue.style, scrollAnimationDistance, titleItemsStyles]);
|
166
|
-
var reducedMotion = typeof document !== 'undefined' && (_window = window) !== null && _window !== void 0 && _window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : {
|
167
|
-
matches: true
|
168
|
-
};
|
169
166
|
|
170
167
|
// scroll panel to top going between steps
|
171
168
|
React.useEffect(function () {
|
@@ -202,7 +199,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
202
199
|
}, [launcherButtonRef, open, previousOpen]);
|
203
200
|
var checkSetDoAnimateTitle = function checkSetDoAnimateTitle() {
|
204
201
|
var canDoAnimateTitle = false;
|
205
|
-
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !
|
202
|
+
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !shouldReduceMotion) {
|
206
203
|
var _labelTextRef$current3, _labelTextRef$current4, _subtitleRef$current$, _subtitleRef$current;
|
207
204
|
var titleEl = titleRef.current;
|
208
205
|
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;
|
@@ -218,8 +215,8 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
218
215
|
panelRefValue === null || panelRefValue === void 0 || panelRefValue.style.setProperty("--".concat(blockClass, "--scroll-animation-distance"), _scrollAnimationDistance.toString());
|
219
216
|
var scrollEl = innerContentRef.current;
|
220
217
|
if (scrollEl) {
|
221
|
-
var
|
222
|
-
var innerComputed = (
|
218
|
+
var _window;
|
219
|
+
var innerComputed = (_window = window) === null || _window === void 0 ? void 0 : _window.getComputedStyle(innerContentRef.current);
|
223
220
|
var innerPaddingHeight = innerComputed ? parseFloat(innerComputed === null || innerComputed === void 0 ? void 0 : innerComputed.paddingTop) + parseFloat(innerComputed === null || innerComputed === void 0 ? void 0 : innerComputed.paddingBottom) : 0;
|
224
221
|
canDoAnimateTitle = (!!labelText || !!actionToolbarButtons || !!subtitle) && scrollEl.scrollHeight - scrollEl.clientHeight >= _scrollAnimationDistance + innerPaddingHeight;
|
225
222
|
}
|
@@ -237,12 +234,12 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
237
234
|
|
238
235
|
// Calculate scroll distances
|
239
236
|
React.useEffect(function () {
|
240
|
-
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !
|
237
|
+
if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !shouldReduceMotion) {
|
241
238
|
checkSetDoAnimateTitle();
|
242
239
|
}
|
243
240
|
|
244
241
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
245
|
-
}, [open, doAnimateTitle /* use do instead of animateTitle directly */, animationComplete, handleScroll, title, size,
|
242
|
+
}, [open, doAnimateTitle /* use do instead of animateTitle directly */, animationComplete, handleScroll, title, size, shouldReduceMotion, id]);
|
246
243
|
|
247
244
|
// click outside functionality if `includeOverlay` prop is set
|
248
245
|
React.useEffect(function () {
|
@@ -278,10 +275,10 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
278
275
|
// Set the internal state `animationComplete` to true if
|
279
276
|
// prefers reduced motion is true
|
280
277
|
React.useEffect(function () {
|
281
|
-
if (
|
278
|
+
if (shouldReduceMotion) {
|
282
279
|
setAnimationComplete(true);
|
283
280
|
}
|
284
|
-
}, [
|
281
|
+
}, [shouldReduceMotion]);
|
285
282
|
|
286
283
|
// initializes the side panel to open
|
287
284
|
var onAnimationStart = function onAnimationStart() {
|
@@ -300,10 +297,10 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
300
297
|
}
|
301
298
|
}, [open, placement, selectorPageContent, slideIn]);
|
302
299
|
React.useEffect(function () {
|
303
|
-
if (!open && previousState && previousState['open'] &&
|
300
|
+
if (!open && previousState && previousState['open'] && shouldReduceMotion) {
|
304
301
|
onUnmount === null || onUnmount === void 0 || onUnmount();
|
305
302
|
}
|
306
|
-
}, [open, onUnmount,
|
303
|
+
}, [open, onUnmount, shouldReduceMotion, previousState]);
|
307
304
|
|
308
305
|
// used to set margins of content for slide in panel version
|
309
306
|
React.useEffect(function () {
|
@@ -316,15 +313,15 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
316
313
|
}
|
317
314
|
if (placement && placement === 'right' && pageContentElement) {
|
318
315
|
pageContentElement.style.marginInlineEnd = '0';
|
319
|
-
pageContentElement.style.transition = !
|
316
|
+
pageContentElement.style.transition = !shouldReduceMotion ? "margin-inline-end ".concat(carbonMotion.moderate02) : '';
|
320
317
|
pageContentElement.style.marginInlineEnd = constants.SIDE_PANEL_SIZES[size];
|
321
318
|
} else if (pageContentElement) {
|
322
319
|
pageContentElement.style.marginInlineStart = '0';
|
323
|
-
pageContentElement.style.transition = !
|
320
|
+
pageContentElement.style.transition = !shouldReduceMotion ? "margin-inline-start ".concat(carbonMotion.moderate02) : '';
|
324
321
|
pageContentElement.style.marginInlineStart = constants.SIDE_PANEL_SIZES[size];
|
325
322
|
}
|
326
323
|
}
|
327
|
-
}, [slideIn, selectorPageContent, placement, size,
|
324
|
+
}, [slideIn, selectorPageContent, placement, size, shouldReduceMotion, open]);
|
328
325
|
React.useEffect(function () {
|
329
326
|
if (open) {
|
330
327
|
setTimeout(function () {
|
@@ -350,7 +347,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
350
347
|
className: "".concat(blockClass, "__title-text"),
|
351
348
|
title: title,
|
352
349
|
"aria-hidden": false
|
353
|
-
}, title), doAnimateTitle && !
|
350
|
+
}, title), doAnimateTitle && !shouldReduceMotion && /*#__PURE__*/React__default["default"].createElement("h2", {
|
354
351
|
className: "".concat(blockClass, "__collapsed-title-text"),
|
355
352
|
title: title,
|
356
353
|
"aria-hidden": true
|
@@ -367,10 +364,9 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
367
364
|
});
|
368
365
|
}
|
369
366
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
370
|
-
className: cx__default["default"]("".concat(blockClass, "__header"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__header--on-detail-step"), currentStep > 0), "".concat(blockClass, "__header--no-title-animation"), !animateTitle), "".concat(blockClass, "__header--reduced-motion"),
|
367
|
+
className: cx__default["default"]("".concat(blockClass, "__header"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.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)),
|
371
368
|
ref: headerRef
|
372
369
|
}, currentStep > 0 && /*#__PURE__*/React__default["default"].createElement(react.Button, {
|
373
|
-
"aria-label": navigationBackIconDescription,
|
374
370
|
kind: "ghost",
|
375
371
|
size: slugCloseSize,
|
376
372
|
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
|
}
|
@@ -27,35 +27,34 @@ var overlayVariants = {
|
|
27
27
|
}
|
28
28
|
};
|
29
29
|
var panelVariants = {
|
30
|
-
visible: function visible(
|
31
|
-
var shouldReduceMotion = _ref.shouldReduceMotion;
|
30
|
+
visible: function visible() {
|
32
31
|
return {
|
33
32
|
x: 0,
|
34
33
|
transition: {
|
35
34
|
duration: motionConstants.DURATIONS.moderate02,
|
36
35
|
ease: motionConstants.EASINGS.productive.standard
|
37
36
|
},
|
38
|
-
opacity:
|
37
|
+
opacity: 1
|
39
38
|
};
|
40
39
|
},
|
41
|
-
hidden: function hidden(
|
42
|
-
var placement =
|
43
|
-
shouldReduceMotion =
|
40
|
+
hidden: function hidden(_ref) {
|
41
|
+
var placement = _ref.placement,
|
42
|
+
shouldReduceMotion = _ref.shouldReduceMotion;
|
44
43
|
return {
|
45
44
|
x: placement === 'right' ? shouldReduceMotion ? 0 : '100%' : shouldReduceMotion ? 0 : -320,
|
46
|
-
opacity: shouldReduceMotion
|
45
|
+
opacity: shouldReduceMotion ? 0 : 1
|
47
46
|
};
|
48
47
|
},
|
49
|
-
exit: function exit(
|
50
|
-
var placement =
|
51
|
-
shouldReduceMotion =
|
48
|
+
exit: function exit(_ref2) {
|
49
|
+
var placement = _ref2.placement,
|
50
|
+
shouldReduceMotion = _ref2.shouldReduceMotion;
|
52
51
|
return {
|
53
52
|
x: placement === 'right' ? shouldReduceMotion ? 0 : '100%' : shouldReduceMotion ? 0 : -320,
|
54
53
|
transition: {
|
55
54
|
duration: motionConstants.DURATIONS.moderate01,
|
56
55
|
ease: motionConstants.EASINGS.productive.exit
|
57
56
|
},
|
58
|
-
opacity: shouldReduceMotion
|
57
|
+
opacity: shouldReduceMotion ? 0 : 1
|
59
58
|
};
|
60
59
|
}
|
61
60
|
};
|
@@ -322,7 +322,9 @@ var TearsheetShell = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
322
322
|
// The display name of the component, used by React. Note that displayName
|
323
323
|
// is used in preference to relying on function.name.
|
324
324
|
TearsheetShell.displayName = componentName;
|
325
|
-
var portalType = typeof Element === 'undefined' ? index["default"].object :
|
325
|
+
var portalType = typeof Element === 'undefined' ? index["default"].object :
|
326
|
+
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
327
|
+
index["default"].instanceOf(Element);
|
326
328
|
var deprecatedProps = {
|
327
329
|
/**
|
328
330
|
* **Deprecated**
|
@@ -19,6 +19,7 @@ var react = require('@carbon/react');
|
|
19
19
|
var carbonMotion = require('@carbon/motion');
|
20
20
|
var index = require('./hooks/index.js');
|
21
21
|
var devtools = require('../../global/js/utils/devtools.js');
|
22
|
+
var usePrefersReducedMotion = require('../../global/js/hooks/usePrefersReducedMotion.js');
|
22
23
|
|
23
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
24
25
|
|
@@ -65,10 +66,7 @@ exports.WebTerminal = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
65
66
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
66
67
|
shouldRender = _useState2[0],
|
67
68
|
setRender = _useState2[1];
|
68
|
-
var
|
69
|
-
matches: true
|
70
|
-
},
|
71
|
-
prefersReducedMotion = _ref2.matches;
|
69
|
+
var shouldReduceMotion = usePrefersReducedMotion["default"]();
|
72
70
|
var webTerminalAnimationName = "".concat(open ? 'web-terminal-entrance' : 'web-terminal-exit forwards', " ").concat(carbonMotion.moderate02);
|
73
71
|
var showDocumentationLinks = React.useMemo(function () {
|
74
72
|
return documentationLinks.length > 0;
|
@@ -101,7 +99,7 @@ exports.WebTerminal = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
101
99
|
If the user prefers reduced motion, we have to manually set render to false
|
102
100
|
because onAnimationEnd will never be called.
|
103
101
|
*/
|
104
|
-
if (
|
102
|
+
if (shouldReduceMotion) {
|
105
103
|
setRender(false);
|
106
104
|
}
|
107
105
|
closeWebTerminal === null || closeWebTerminal === void 0 || closeWebTerminal();
|
@@ -110,7 +108,7 @@ exports.WebTerminal = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
110
108
|
ref: ref,
|
111
109
|
className: cx__default["default"]([blockClass, className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--open"), open), "".concat(blockClass, "--closed"), !open)]),
|
112
110
|
style: {
|
113
|
-
animation: !
|
111
|
+
animation: !shouldReduceMotion ? webTerminalAnimationName : ''
|
114
112
|
},
|
115
113
|
onAnimationEnd: onAnimationEnd
|
116
114
|
}), /*#__PURE__*/React__default["default"].createElement("header", {
|
@@ -128,15 +126,15 @@ exports.WebTerminal = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
128
126
|
"aria-label": documentationLinksIconDescription,
|
129
127
|
menuOptionsClass: "".concat(blockClass, "__documentation-overflow"),
|
130
128
|
size: "lg"
|
131
|
-
}, documentationLinks.map(function (
|
132
|
-
var rest = _rollupPluginBabelHelpers["extends"]({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(
|
129
|
+
}, documentationLinks.map(function (_ref3, i) {
|
130
|
+
var rest = _rollupPluginBabelHelpers["extends"]({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_ref3), _ref3));
|
133
131
|
return /*#__PURE__*/React__default["default"].createElement(react.OverflowMenuItem, _rollupPluginBabelHelpers["extends"]({
|
134
132
|
key: i
|
135
133
|
}, rest));
|
136
|
-
})), actions.map(function (
|
137
|
-
var renderIcon =
|
138
|
-
onClick =
|
139
|
-
iconDescription =
|
134
|
+
})), actions.map(function (_ref4) {
|
135
|
+
var renderIcon = _ref4.renderIcon,
|
136
|
+
onClick = _ref4.onClick,
|
137
|
+
iconDescription = _ref4.iconDescription;
|
140
138
|
return /*#__PURE__*/React__default["default"].createElement(react.Button, {
|
141
139
|
key: iconDescription,
|
142
140
|
hasIconOnly: true,
|
@@ -11,19 +11,25 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
13
|
var React = require('react');
|
14
|
-
var
|
14
|
+
var useIsomorphicEffect = require('./useIsomorphicEffect.js');
|
15
15
|
|
16
16
|
var usePrefersReducedMotion = function usePrefersReducedMotion() {
|
17
17
|
var _useState = React.useState(false),
|
18
18
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
19
19
|
prefersReducedMotion = _useState2[0],
|
20
20
|
setPrefersReducedMotion = _useState2[1];
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
useIsomorphicEffect.useIsomorphicEffect(function () {
|
22
|
+
var mediaQueryList = window.matchMedia('(prefers-reduced-motion: no-preference)');
|
23
|
+
var _window$matchMedia = window.matchMedia('(prefers-reduced-motion: no-preference)'),
|
24
|
+
matches = _window$matchMedia.matches;
|
25
|
+
setPrefersReducedMotion(!matches);
|
26
|
+
var listener = function listener(event) {
|
27
|
+
setPrefersReducedMotion(!event.matches);
|
28
|
+
};
|
29
|
+
mediaQueryList.addEventListener('change', listener);
|
30
|
+
return function () {
|
31
|
+
mediaQueryList.removeEventListener('change', listener);
|
32
|
+
};
|
27
33
|
}, []);
|
28
34
|
return prefersReducedMotion;
|
29
35
|
};
|
@@ -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;
|
@@ -41,6 +41,7 @@ var defaults = {
|
|
41
41
|
ErrorEmptyState: true,
|
42
42
|
ExportModal: true,
|
43
43
|
ExpressiveCard: true,
|
44
|
+
FullPageError: true,
|
44
45
|
HTTPError403: true,
|
45
46
|
HTTPError404: true,
|
46
47
|
HTTPErrorOther: true,
|
@@ -83,7 +84,6 @@ var defaults = {
|
|
83
84
|
BigNumbers: false,
|
84
85
|
TruncatedList: false,
|
85
86
|
DelimitedList: false,
|
86
|
-
FullPageError: false,
|
87
87
|
ScrollGradient: false,
|
88
88
|
StringFormatter: false,
|
89
89
|
StatusIndicator: false,
|
package/lib/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;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.
|
4
|
+
"version": "2.45.0-rc.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"fs-extra": "^11.2.0",
|
82
82
|
"glob": "^10.3.10",
|
83
83
|
"jest": "^29.7.0",
|
84
|
-
"jest-config-ibm-cloud-cognitive": "^1.
|
84
|
+
"jest-config-ibm-cloud-cognitive": "^1.4.0-rc.0",
|
85
85
|
"jest-environment-jsdom": "^29.7.0",
|
86
86
|
"namor": "^1.1.2",
|
87
87
|
"npm-check-updates": "^16.14.12",
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"dependencies": {
|
97
97
|
"@babel/runtime": "^7.23.9",
|
98
98
|
"@carbon/feature-flags": "^0.20.0",
|
99
|
-
"@carbon/ibm-products-styles": "^2.
|
99
|
+
"@carbon/ibm-products-styles": "^2.41.0-rc.0",
|
100
100
|
"@carbon/telemetry": "^0.1.0",
|
101
101
|
"@dnd-kit/core": "^6.0.8",
|
102
102
|
"@dnd-kit/modifiers": "^7.0.0",
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
121
121
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
122
122
|
},
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "b058433727cb9c2aafc7863fe5d59a19ba84f749"
|
124
124
|
}
|
@@ -30,7 +30,8 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
|
|
30
30
|
.#{$block-class}__condition__deletion-preview
|
31
31
|
.#{$block-class}__button:not(
|
32
32
|
.#{$block-class}__statement-button,
|
33
|
-
.#{$block-class}__connector-button
|
33
|
+
.#{$block-class}__connector-button,
|
34
|
+
.#{$block-class}__add-button
|
34
35
|
) {
|
35
36
|
background-color: $tag-background-red;
|
36
37
|
color: $tag-color-red;
|
@@ -56,6 +57,9 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
|
|
56
57
|
opacity: 0;
|
57
58
|
pointer-events: none;
|
58
59
|
transition: all $duration-moderate-02 motion(exit, expressive);
|
60
|
+
.#{$block-class}__preview-condition {
|
61
|
+
display: flex;
|
62
|
+
}
|
59
63
|
}
|
60
64
|
.#{$block-class}__group-preview-animate {
|
61
65
|
height: auto;
|
@@ -96,7 +96,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
|
|
96
96
|
.#{$block-class}__item-date,
|
97
97
|
.#{$block-class}__item-text,
|
98
98
|
.#{$block-class}__item-number,
|
99
|
-
|
99
|
+
.#{$block-class}__item-time {
|
100
100
|
padding-block-end: $spacing-05;
|
101
101
|
padding-inline: $spacing-05;
|
102
102
|
}
|
@@ -216,7 +216,7 @@ $colors: (
|
|
216
216
|
> :nth-child(2)
|
217
217
|
.#{$block-class}__button:not(
|
218
218
|
.#{$block-class}__add-button,
|
219
|
-
.#{$block-class}
|
219
|
+
.#{$block-class}__add-condition-sub-group
|
220
220
|
) {
|
221
221
|
/* stylelint-disable-next-line carbon/theme-token-use */
|
222
222
|
box-shadow: inset 0 #{$spacing-01} 0 0 var(--#{$block-class}__condition-wrapper-color);
|
@@ -234,16 +234,18 @@ $colors: (
|
|
234
234
|
align-self: center;
|
235
235
|
margin-left: auto;
|
236
236
|
}
|
237
|
-
.#{$block-class}
|
237
|
+
.#{$block-class}__add-condition-sub-group-wrapper {
|
238
238
|
z-index: -1;
|
239
|
+
width: 0;
|
239
240
|
margin-left: -50%;
|
240
241
|
opacity: 0;
|
241
242
|
pointer-events: none;
|
242
243
|
// stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
|
243
244
|
transition: all linear $duration-fast-02;
|
244
245
|
}
|
245
|
-
.#{$block-class}
|
246
|
+
.#{$block-class}__add-condition-sub-group-wrapper--show {
|
246
247
|
z-index: 0;
|
248
|
+
width: auto;
|
247
249
|
margin-left: 0;
|
248
250
|
opacity: 1;
|
249
251
|
pointer-events: all;
|
@@ -252,5 +254,7 @@ $colors: (
|
|
252
254
|
}
|
253
255
|
.#{$block-class}__invalid-input {
|
254
256
|
display: flex;
|
257
|
+
}
|
258
|
+
.#{$block-class}__invalid-input > svg {
|
255
259
|
color: $support-warning;
|
256
260
|
}
|
@@ -259,7 +259,9 @@ $header-cell-background: $layer-accent-01;
|
|
259
259
|
background-color: $background-inverse;
|
260
260
|
}
|
261
261
|
}
|
262
|
-
.#{$block-class}__th--selected-header.#{$block-class}__th
|
262
|
+
.#{$block-class}__th--selected-header.#{$block-class}__th:not(
|
263
|
+
.#{$block-class}__th--active-header-disabledSwapping
|
264
|
+
) {
|
263
265
|
cursor: grab;
|
264
266
|
}
|
265
267
|
.#{$block-class}__th--selected-header-reorder-active.#{$block-class}__th {
|
@@ -275,6 +277,9 @@ $header-cell-background: $layer-accent-01;
|
|
275
277
|
width: $spacing-01;
|
276
278
|
background-color: $background-brand;
|
277
279
|
}
|
280
|
+
.#{$block-class}__th--active-header-disabledSwapping {
|
281
|
+
cursor: pointer;
|
282
|
+
}
|
278
283
|
.#{$block-class}__th--active-header,
|
279
284
|
.#{$block-class}__td-th--active-header.#{$block-class}__td {
|
280
285
|
background-color: $background-selected-hover;
|
@@ -290,7 +295,9 @@ $header-cell-background: $layer-accent-01;
|
|
290
295
|
background-color: $background-inverse;
|
291
296
|
}
|
292
297
|
}
|
293
|
-
.#{$block-class}__th--selected-header.#{$block-class}__th
|
298
|
+
.#{$block-class}__th--selected-header.#{$block-class}__th:not(
|
299
|
+
.#{$block-class}__th--active-header-disabledSwapping
|
300
|
+
) {
|
294
301
|
cursor: grab;
|
295
302
|
}
|
296
303
|
.#{$block-class}__th--selected-header-reorder-active.#{$block-class}__th {
|