@carbon/ibm-products 2.42.1-canary.2 → 2.42.1-canary.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. package/css/index-full-carbon.css +302 -9
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +302 -9
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +302 -9
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/Carousel/Carousel.d.ts +1 -1
  14. package/es/components/Carousel/Carousel.js +1 -1
  15. package/es/components/Coachmark/CoachmarkDragbar.d.ts +1 -1
  16. package/es/components/Coachmark/CoachmarkDragbar.js +1 -1
  17. package/es/components/Coachmark/CoachmarkHeader.d.ts +1 -1
  18. package/es/components/Coachmark/CoachmarkHeader.js +1 -1
  19. package/es/components/Coachmark/CoachmarkOverlay.d.ts +1 -1
  20. package/es/components/Coachmark/CoachmarkOverlay.js +1 -1
  21. package/es/components/Coachmark/CoachmarkTagline.d.ts +1 -1
  22. package/es/components/Coachmark/CoachmarkTagline.js +1 -1
  23. package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +1 -1
  24. package/es/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  25. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +6 -0
  26. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +74 -33
  27. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +15 -1
  28. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +95 -12
  29. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +11 -2
  30. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +27 -9
  31. package/es/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.js +38 -33
  32. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -0
  33. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +44 -0
  34. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +5 -0
  35. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +95 -14
  36. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
  37. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +1 -0
  38. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +7 -0
  39. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +8 -1
  40. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  41. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +197 -67
  42. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +10 -0
  43. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +69 -0
  44. package/es/components/ConditionBuilder/utils/util.d.ts +1 -0
  45. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  46. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +7 -4
  47. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +7 -1
  48. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +1 -0
  49. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +13 -3
  50. package/es/components/Datagrid/types/index.d.ts +2 -0
  51. package/es/components/Datagrid/useColumnOrder.d.ts +7 -1
  52. package/es/components/Datagrid/useNestedRows.js +24 -2
  53. package/es/components/Datagrid/useOnRowClick.d.ts +8 -1
  54. package/es/components/Datagrid/useOnRowClick.js +2 -1
  55. package/es/components/Datagrid/useRowIsMouseOver.d.ts +2 -1
  56. package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
  57. package/es/components/Datagrid/useSelectRows.d.ts +8 -1
  58. package/es/components/Datagrid/useSelectRows.js +3 -2
  59. package/es/components/Datagrid/useSortableColumns.d.ts +10 -3
  60. package/es/components/Datagrid/useSortableColumns.js +3 -2
  61. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +8 -1
  62. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +0 -7
  63. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +1 -1
  64. package/es/components/InterstitialScreenView/InterstitialScreenView.js +1 -1
  65. package/es/components/SidePanel/SidePanel.d.ts +2 -2
  66. package/es/components/SidePanel/SidePanel.js +5 -3
  67. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +1 -1
  68. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
  69. package/es/feature-flags.js +18 -0
  70. package/es/global/js/package-settings.js +2 -2
  71. package/es/index.d.ts +1 -0
  72. package/es/index.js +1 -0
  73. package/lib/components/Carousel/Carousel.d.ts +1 -1
  74. package/lib/components/Carousel/Carousel.js +1 -1
  75. package/lib/components/Coachmark/CoachmarkDragbar.d.ts +1 -1
  76. package/lib/components/Coachmark/CoachmarkDragbar.js +1 -1
  77. package/lib/components/Coachmark/CoachmarkHeader.d.ts +1 -1
  78. package/lib/components/Coachmark/CoachmarkHeader.js +1 -1
  79. package/lib/components/Coachmark/CoachmarkOverlay.d.ts +1 -1
  80. package/lib/components/Coachmark/CoachmarkOverlay.js +1 -1
  81. package/lib/components/Coachmark/CoachmarkTagline.d.ts +1 -1
  82. package/lib/components/Coachmark/CoachmarkTagline.js +1 -1
  83. package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +1 -1
  84. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  85. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +6 -0
  86. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +73 -32
  87. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +15 -1
  88. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +92 -9
  89. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +11 -2
  90. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +26 -8
  91. package/lib/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.js +36 -31
  92. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -0
  93. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +52 -0
  94. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +5 -0
  95. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -11
  96. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
  97. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +1 -0
  98. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +7 -0
  99. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +8 -1
  100. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  101. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +195 -64
  102. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +10 -0
  103. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +77 -0
  104. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -0
  105. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  106. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +7 -4
  107. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +7 -1
  108. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +1 -0
  109. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +13 -3
  110. package/lib/components/Datagrid/types/index.d.ts +2 -0
  111. package/lib/components/Datagrid/useColumnOrder.d.ts +7 -1
  112. package/lib/components/Datagrid/useNestedRows.js +24 -2
  113. package/lib/components/Datagrid/useOnRowClick.d.ts +8 -1
  114. package/lib/components/Datagrid/useOnRowClick.js +2 -1
  115. package/lib/components/Datagrid/useRowIsMouseOver.d.ts +2 -1
  116. package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
  117. package/lib/components/Datagrid/useSelectRows.d.ts +8 -1
  118. package/lib/components/Datagrid/useSelectRows.js +3 -2
  119. package/lib/components/Datagrid/useSortableColumns.d.ts +10 -3
  120. package/lib/components/Datagrid/useSortableColumns.js +3 -2
  121. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +8 -1
  122. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +0 -7
  123. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +1 -1
  124. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +1 -1
  125. package/lib/components/SidePanel/SidePanel.d.ts +2 -2
  126. package/lib/components/SidePanel/SidePanel.js +5 -3
  127. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +1 -1
  128. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
  129. package/lib/feature-flags.js +40 -0
  130. package/lib/global/js/package-settings.js +2 -2
  131. package/lib/index.d.ts +1 -0
  132. package/lib/index.js +1 -0
  133. package/package.json +3 -3
  134. package/scss/components/ConditionBuilder/_condition-builder.scss +21 -1
  135. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +22 -3
  136. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +58 -21
  137. package/scss/components/NonLinearReading/_non-linear-reading.scss +1 -1
  138. /package/es/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.d.ts +0 -0
  139. /package/lib/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.d.ts +0 -0
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useSelectRows: (hooks: Hooks) => void;
1
9
  export default useSelectRows;
2
- declare function useSelectRows(hooks: any): void;
@@ -117,7 +117,8 @@ var SelectRow = function SelectRow(datagridState) {
117
117
  dispatch: dispatch,
118
118
  rowData: row,
119
119
  isChecked: event.target.checked,
120
- getRowId: getRowId
120
+ getRowId: getRowId,
121
+ selectAll: null
121
122
  });
122
123
  };
123
124
  var selectDisabled = isFetching || row.getRowProps().disabled;
@@ -137,7 +138,7 @@ var SelectRow = function SelectRow(datagridState) {
137
138
  onSelect: onSelectHandler,
138
139
  id: rowId,
139
140
  name: "".concat(rowId, "-name"),
140
- className: cx__default["default"]([checkboxClass, cellProps.className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && windowSize > 671)]),
141
+ className: cx__default["default"]([checkboxClass, cellProps.className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && Number(windowSize) > 671)]),
141
142
  ariaLabel: title,
142
143
  disabled: selectDisabled
143
144
  }));
@@ -1,6 +1,13 @@
1
- export function getNewSortOrder(sortOrder: any): {
2
- newSortDesc: undefined;
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ export declare const getNewSortOrder: (sortOrder?: boolean | string) => {
9
+ newSortDesc: boolean;
3
10
  newOrder: string;
4
11
  };
12
+ declare const useSortableColumns: (hooks: Hooks) => void;
5
13
  export default useSortableColumns;
6
- declare function useSortableColumns(hooks: any): void;
@@ -31,7 +31,7 @@ var ordering = {
31
31
  };
32
32
  var getNewSortOrder = function getNewSortOrder(sortOrder) {
33
33
  var order = {
34
- newSortDesc: undefined,
34
+ newSortDesc: false,
35
35
  newOrder: ordering.NONE
36
36
  };
37
37
  if (sortOrder === false || sortOrder === ordering.DESC) {
@@ -146,7 +146,8 @@ var useSortableColumns = function useSortableColumns(hooks) {
146
146
  return (_instance$customizeCo = instance.customizeColumnsProps) !== null && _instance$customizeCo !== void 0 && _instance$customizeCo.isTearsheetOpen ? visibleColumns : _rollupPluginBabelHelpers.toConsumableArray(sortableColumns);
147
147
  };
148
148
  var sortInstanceProps = function sortInstanceProps(instance) {
149
- var onSort = instance.onSort;
149
+ var _ref3 = instance,
150
+ onSort = _ref3.onSort;
150
151
  Object.assign(instance, {
151
152
  manualSortBy: !!onSort,
152
153
  isTableSortable: true
@@ -1 +1,8 @@
1
- export function getAutoSizedColumnWidth(rows: Array<object>, accessor: string, headerText: string): number;
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Row } from 'react-table';
8
+ export declare const getAutoSizedColumnWidth: (rows: Array<Row<object>>, accessor: string, headerText: string) => number;
@@ -18,13 +18,6 @@ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHel
18
18
  * LICENSE file in the root directory of this source tree.
19
19
  */
20
20
 
21
- /**
22
- * Calculates the auto sized width of a column
23
- * @param {Array<object>} rows - The datagrid rows
24
- * @param {string} accessor - The accessor for the column
25
- * @param {string} headerText - The header text for the column
26
- */
27
-
28
21
  var getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, headerText) {
29
22
  var maxWidth = 400;
30
23
  var minWidth = 58;
@@ -20,7 +20,7 @@ interface InterstitialScreenViewProps extends PropsWithChildren {
20
20
  stepTitle: string;
21
21
  }
22
22
  /**
23
- * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
23
+ * An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
24
24
  */
25
25
  export declare let InterstitialScreenView: React.ForwardRefExoticComponent<InterstitialScreenViewProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export {};
@@ -30,7 +30,7 @@ var _excluded = ["children", "className", "stepTitle"];
30
30
  var blockClass = "".concat(settings.pkg.prefix, "--interstitial-screen-view");
31
31
  var componentName = 'InterstitialScreenView';
32
32
  /**
33
- * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
33
+ * An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
34
34
  */
35
35
  exports.InterstitialScreenView = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
36
36
  var children = _ref.children,
@@ -11,7 +11,7 @@ type SidePanelBaseProps = {
11
11
  /**
12
12
  * Sets the action toolbar buttons
13
13
  */
14
- actionToolbarButtons?: ButtonProps[];
14
+ actionToolbarButtons?: ButtonProps<any>[];
15
15
  /**
16
16
  * The primary actions to be shown in the side panel. Each action is
17
17
  * specified as an object that will render expressive Buttons. Any Button
@@ -20,7 +20,7 @@ type SidePanelBaseProps = {
20
20
  *
21
21
  * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
22
22
  */
23
- actions?: ButtonProps[];
23
+ actions?: ButtonProps<any>[];
24
24
  /**
25
25
  * Determines if the title will animate on scroll
26
26
  */
@@ -332,12 +332,12 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
332
332
  if (primeFocusEl) {
333
333
  primeFocusEl === null || primeFocusEl === void 0 || primeFocusEl.focus();
334
334
  }
335
- } else {
335
+ } else if (!slideIn) {
336
336
  firstElement === null || firstElement === void 0 || firstElement.focus();
337
337
  }
338
338
  }, 0);
339
339
  }
340
- }, [animationComplete, firstElement, open, selectorPrimaryFocus]);
340
+ }, [animationComplete, firstElement, open, selectorPrimaryFocus, slideIn]);
341
341
  var primaryActionContainerClassNames = cx__default["default"](["".concat(blockClass, "__actions-container"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__actions-container--condensed"), condensedActions)]);
342
342
  var mainPanelClassNames = cx__default["default"]([blockClass, className, "".concat(blockClass), "".concat(blockClass, "--").concat(size), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--right-placement"), placement === 'right'), "".concat(blockClass, "--left-placement"), placement === 'left'), "".concat(blockClass, "--slide-in"), slideIn), "".concat(blockClass, "--has-slug"), slug), "".concat(blockClass, "--condensed-actions"), condensedActions), "".concat(blockClass, "--has-overlay"), includeOverlay)]);
343
343
  var renderTitle = function renderTitle() {
@@ -457,7 +457,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
457
457
  placement: placement,
458
458
  shouldReduceMotion: shouldReduceMotion
459
459
  },
460
- onKeyDown: keyDownListener
460
+ onKeyDown: slideIn ? undefined : keyDownListener
461
461
  }), /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, renderHeader(), renderMain()), /*#__PURE__*/React__default["default"].createElement(MotionActionSet, {
462
462
  actions: actions !== null && actions !== void 0 ? actions : [],
463
463
  className: primaryActionContainerClassNames,
@@ -480,6 +480,7 @@ exports.SidePanel.propTypes = {
480
480
  /**
481
481
  * Sets the action toolbar buttons
482
482
  */
483
+ /**@ts-ignore */
483
484
  actionToolbarButtons: index["default"].arrayOf(index["default"].shape({
484
485
  label: index["default"].string,
485
486
  leading: index["default"].bool,
@@ -513,6 +514,7 @@ exports.SidePanel.propTypes = {
513
514
  label: index["default"].string,
514
515
  loading: index["default"].bool,
515
516
  // we duplicate this Button prop to improve the DocGen here
517
+ /**@ts-ignore */
516
518
  onClick: react.Button.propTypes.onClick
517
519
  })))]),
518
520
  /**
@@ -20,7 +20,7 @@ interface SteppedAnimatedMediaProps {
20
20
  playStep?: number;
21
21
  }
22
22
  /**
23
- * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
23
+ * The SteppedAnimatedMedia is an Onboarding internal component and is not intended for general use.
24
24
  */
25
25
  export declare const SteppedAnimatedMedia: React.ForwardRefExoticComponent<SteppedAnimatedMediaProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export {};
@@ -38,7 +38,7 @@ var defaults = {
38
38
  playStep: 0
39
39
  };
40
40
  /**
41
- * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
41
+ * The SteppedAnimatedMedia is an Onboarding internal component and is not intended for general use.
42
42
  */
43
43
  var SteppedAnimatedMedia = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
44
44
  var className = _ref.className,
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ var FeatureFlags = require('@carbon/feature-flags');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var FeatureFlags__namespace = /*#__PURE__*/_interopNamespace(FeatureFlags);
31
+
32
+ FeatureFlags__namespace.merge({
33
+ 'default-portal-target-body': true,
34
+ 'enable-datagrid-useInlineEdit': false,
35
+ 'enable-datagrid-useEditableCell': false,
36
+ 'enable-datagrid-useCustomizeColumns': false,
37
+ 'ExampleComponent.secondaryIcon': false,
38
+ 'ExampleComponent.useExample': false,
39
+ 'enable-example-flag': false
40
+ });
@@ -102,7 +102,7 @@ var defaults = {
102
102
  GetStartedCard: false,
103
103
  /* new component flags here - comment used by generate CLI */
104
104
 
105
- // Novice to pro components not yet reviewed and released:
105
+ // Onboarding components not yet reviewed and released:
106
106
  Coachmark: false,
107
107
  CoachmarkBeacon: false,
108
108
  CoachmarkButton: false,
@@ -122,7 +122,7 @@ var defaults = {
122
122
  UserAvatar: false,
123
123
  /* new component flags here - comment used by generate CLI */
124
124
 
125
- // Novice to pro components not yet reviewed and released:
125
+ // Onboarding components not yet reviewed and released:
126
126
  EmptyStateV2: false,
127
127
  Guidebanner: false,
128
128
  GuidebannerElement: false,
package/lib/index.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ import './feature-flags';
7
8
  export { pkg } from './settings';
8
9
  export { usePrefix } from './global/js/hooks';
9
10
  export * from './components';
package/lib/index.js CHANGED
@@ -9,6 +9,7 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
+ require('./feature-flags.js');
12
13
  var settings = require('./settings.js');
13
14
  var reactTable = require('react-table');
14
15
  var usePrefix = require('./global/js/hooks/usePrefix.js');
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.42.1-canary.2+254149c10",
4
+ "version": "2.42.1-canary.22+bf7c0c878",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -97,7 +97,7 @@
97
97
  "dependencies": {
98
98
  "@babel/runtime": "^7.23.9",
99
99
  "@carbon/feature-flags": "^0.20.0",
100
- "@carbon/ibm-products-styles": "^2.38.2-canary.2+254149c10",
100
+ "@carbon/ibm-products-styles": "^2.38.1",
101
101
  "@carbon/telemetry": "^0.1.0",
102
102
  "@dnd-kit/core": "^6.0.8",
103
103
  "@dnd-kit/modifiers": "^7.0.0",
@@ -121,5 +121,5 @@
121
121
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
122
122
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
123
123
  },
124
- "gitHead": "254149c106786ec59a59572b3fc2602fa63637f6"
124
+ "gitHead": "bf7c0c878d500b064d623355d607b75717f8a799"
125
125
  }
@@ -27,7 +27,9 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
27
27
  // .#{$block-class} {
28
28
  // // TODO: Styles.
29
29
  // }
30
-
30
+ .#{$block-class} {
31
+ padding: $spacing-06;
32
+ }
31
33
  .#{$block-class}__condition-builder__group {
32
34
  display: flex;
33
35
  }
@@ -47,5 +49,23 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
47
49
  }
48
50
  .#{$block-class}__condition-block {
49
51
  display: flex;
52
+ width: max-content;
50
53
  flex-direction: row;
51
54
  }
55
+ .#{$block-class}__content-container {
56
+ display: flex;
57
+ flex-direction: column;
58
+ row-gap: $spacing-02;
59
+ }
60
+ .#{$block-class}__heading {
61
+ margin-top: $spacing-03;
62
+ margin-bottom: $spacing-03;
63
+ }
64
+ .#{$block-class}__tree
65
+ .#{$block-class}__actions-container
66
+ .#{$block-class}__condition-wrapper {
67
+ flex-direction: column;
68
+ }
69
+ .#{$block-class}__group-separator {
70
+ margin-top: $spacing-02;
71
+ }
@@ -1,3 +1,4 @@
1
+ @use '@carbon/react/scss/theme' as *;
1
2
  @use '@carbon/react/scss/spacing' as *;
2
3
  @use '@carbon/react/scss/motion';
3
4
  @use '@carbon/styles/scss/components/tag' as *;
@@ -5,6 +6,7 @@
5
6
  @use '../../../global/styles/project-settings' as c4p-settings;
6
7
  @use '@carbon/styles/scss/type';
7
8
  @use '@carbon/styles/scss/type' as *;
9
+ @use '@carbon/react/scss/utilities';
8
10
 
9
11
  $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
10
12
 
@@ -14,12 +16,17 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
14
16
  display: inline-flex;
15
17
  }
16
18
 
17
- [role='row']:focus {
19
+ .#{$block-class} [role='row'] {
20
+ position: relative;
21
+ outline: none;
22
+ }
23
+ .#{$block-class} [role='row']:focus::after {
18
24
  @include focus-outline.focus-outline('outline');
19
25
 
20
- outline-offset: 0;
26
+ position: absolute;
27
+ content: '';
28
+ inset: 0;
21
29
  }
22
-
23
30
  .#{$block-class}__condition__deletion-preview
24
31
  .#{$block-class}__button:not(
25
32
  .#{$block-class}__statement-button,
@@ -44,3 +51,15 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
44
51
  text-overflow: ellipsis;
45
52
  text-wrap: nowrap;
46
53
  }
54
+ .#{$block-class}__group-preview {
55
+ opacity: 0.5;
56
+ pointer-events: none;
57
+ }
58
+ .#{$block-class}__connector-disabled {
59
+ display: flex;
60
+ min-width: $spacing-10;
61
+ align-items: center;
62
+ background-color: $layer;
63
+ color: $text-helper;
64
+ padding-inline: $spacing-03;
65
+ }
@@ -1,3 +1,5 @@
1
+ @use 'sass:list';
2
+ @use 'sass:string';
1
3
  @use '@carbon/react/scss/theme' as *;
2
4
  @use '../../../global/styles/project-settings' as c4p-settings;
3
5
  @use '@carbon/styles/scss/type';
@@ -8,10 +10,11 @@
8
10
  @use '@carbon/styles/scss/components/tag';
9
11
 
10
12
  @use '@carbon/styles/scss/type' as *;
13
+ @use '@carbon/react/scss/colors' as *;
11
14
 
12
15
  $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
13
16
 
14
- .#{$block-class}__content-container * {
17
+ .#{$block-class}__condition-wrapper * {
15
18
  @include type-style('body-01');
16
19
  }
17
20
 
@@ -120,7 +123,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
120
123
  }
121
124
  .#{$block-class}__condition-builder__group.hoveredConnector
122
125
  .#{$block-class}__condition-wrapper
123
- > .conditionBlockWrapper
126
+ > .#{$block-class}__condition-block
124
127
  .#{$block-class}__connector-button {
125
128
  background-color: $layer-hover;
126
129
  }
@@ -149,9 +152,6 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
149
152
  padding-right: $spacing-03;
150
153
  padding-left: $spacing-03;
151
154
  }
152
- .#{$block-class}__conditionWrapper {
153
- display: flex;
154
- }
155
155
 
156
156
  .#{$block-class}__multiselectSelectionStatusContainer {
157
157
  display: flex;
@@ -165,22 +165,59 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
165
165
  .#{$block-class}__item-option__option:focus {
166
166
  @include focus-outline.focus-outline('outline');
167
167
  }
168
- // .#{$block-class}__tree {
169
- // .#{$block-class}__condition-wrapper > :nth-child(n + 3) {
170
- // flex-basis: 100%;
171
- // }
172
- // .#{$block-class}__groupConnector {
173
- // background-color: $layer;
174
- // }
175
- // .#{$block-class}__condition-wrapper
176
- // > :nth-child(1)
177
- // .#{$block-class}__button,
178
- // .#{$block-class}__condition-wrapper
179
- // > :nth-child(2)
180
- // .#{$block-class}__button {
181
- // box-shadow: inset 0 #{$spacing-01} 0 0 var(--#{$block-class}__condition-wrapper-color);
182
- // }
183
- // }
168
+ //need to revamp to a simpler logic
169
+ $colors: (
170
+ ($purple-70, $purple-60, $purple-50, $purple-40, $purple-30, $purple-20),
171
+ ($cyan-70, $cyan-60, $cyan-50, $cyan-40, $cyan-30, $cyan-20),
172
+ ($teal-70, $teal-60, $teal-50, $teal-40, $teal-30, $teal-20),
173
+ (
174
+ $magenta-70,
175
+ $magenta-60,
176
+ $magenta-50,
177
+ $magenta-40,
178
+ $magenta-30,
179
+ $magenta-20
180
+ ),
181
+ ($red-70, $red-60, $red-50, $red-40, $red-30, $red-20),
182
+ ($orange-70, $orange-60, $orange-50, $orange-40, $orange-30, $orange-20),
183
+ ($yellow-70, $yellow-60, $yellow-50, $yellow-40, $yellow-30, $yellow-20),
184
+ ($green-70, $green-60, $green-50, $green-40, $green-30, $green-20)
185
+ );
186
+
187
+ @for $i from 1 through list.length($colors) {
188
+ $selector: (
189
+ string.unquote(
190
+ '.#{$block-class}__content-container > .#{$block-class}__group-wrapper:nth-of-type(#{list.length($colors)}n+#{$i})'
191
+ )
192
+ );
193
+ $group-colors: list.nth($colors, $i);
194
+ @each $color in $group-colors {
195
+ #{$selector} {
196
+ /* stylelint-disable-next-line carbon/theme-token-use */
197
+ --#{$block-class}__condition-wrapper-color: #{$color};
198
+ }
199
+
200
+ $selector: list.append(
201
+ $selector,
202
+ string.unquote('.#{$block-class}__group')
203
+ );
204
+ }
205
+ }
206
+
207
+ .#{$block-class}__tree {
208
+ .#{$block-class}__condition-wrapper > :nth-child(n + 3) {
209
+ flex-basis: 100%;
210
+ }
211
+ .#{$block-class}__groupConnector {
212
+ background-color: $layer;
213
+ }
214
+ .#{$block-class}__condition-wrapper > :nth-child(1) .#{$block-class}__button,
215
+ .#{$block-class}__condition-wrapper > :nth-child(2) .#{$block-class}__button {
216
+ /* stylelint-disable-next-line carbon/theme-token-use */
217
+ box-shadow: inset 0 #{$spacing-01} 0 0 var(--#{$block-class}__condition-wrapper-color);
218
+ }
219
+ }
220
+
184
221
  .#{$block-class}__groupOperatorConnector {
185
222
  margin-bottom: $spacing-02;
186
223
  }
@@ -104,7 +104,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--non-linear-reading;
104
104
  padding: $spacing-03 $spacing-04;
105
105
  border-left: to-rem(1.25px) solid $text-primary;
106
106
  margin: $spacing-02 0;
107
- // Novice to pro does not always use Carbon defaults/tokens
107
+ // Onboarding does not always use Carbon defaults/tokens
108
108
  // stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
109
109
  animation: fade 600ms;
110
110