@carbon/ibm-products 2.42.1-canary.27 → 2.42.1-canary.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. package/css/index-full-carbon.css +9 -302
  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 +9 -302
  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 +9 -302
  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/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +0 -6
  14. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +33 -74
  15. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +1 -15
  16. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +12 -95
  17. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +2 -11
  18. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +9 -27
  19. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +0 -5
  20. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +14 -95
  21. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
  22. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +0 -1
  23. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +0 -7
  24. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -8
  25. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  26. package/es/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.js +33 -38
  27. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +67 -197
  28. package/es/components/ConditionBuilder/utils/util.d.ts +0 -1
  29. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  30. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +1 -1
  31. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -0
  32. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -7
  33. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +1 -7
  34. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +0 -1
  35. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -13
  36. package/es/components/Datagrid/types/index.d.ts +0 -2
  37. package/es/components/Datagrid/useColumnOrder.d.ts +1 -7
  38. package/es/components/Datagrid/useFiltering.d.ts +1 -8
  39. package/es/components/Datagrid/useFiltering.js +7 -8
  40. package/es/components/Datagrid/useFlexResize.d.ts +1 -1
  41. package/es/components/Datagrid/useFlexResize.js +11 -11
  42. package/es/components/Datagrid/useNestedRows.js +2 -24
  43. package/es/components/Datagrid/useOnRowClick.d.ts +1 -8
  44. package/es/components/Datagrid/useOnRowClick.js +1 -2
  45. package/es/components/Datagrid/useRowIsMouseOver.d.ts +1 -2
  46. package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
  47. package/es/components/Datagrid/useSelectRows.d.ts +1 -8
  48. package/es/components/Datagrid/useSelectRows.js +2 -3
  49. package/es/components/Datagrid/useSortableColumns.d.ts +3 -10
  50. package/es/components/Datagrid/useSortableColumns.js +2 -3
  51. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +1 -8
  52. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +7 -0
  53. package/es/components/SidePanel/SidePanel.d.ts +2 -2
  54. package/es/components/SidePanel/SidePanel.js +5 -9
  55. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +0 -6
  56. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +32 -73
  57. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +1 -15
  58. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +9 -92
  59. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +2 -11
  60. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +8 -26
  61. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +0 -5
  62. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +11 -92
  63. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
  64. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +0 -1
  65. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +0 -7
  66. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -8
  67. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  68. package/lib/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.js +31 -36
  69. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +64 -195
  70. package/lib/components/ConditionBuilder/utils/util.d.ts +0 -1
  71. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  72. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +1 -1
  73. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -0
  74. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -7
  75. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +1 -7
  76. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +0 -1
  77. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -13
  78. package/lib/components/Datagrid/types/index.d.ts +0 -2
  79. package/lib/components/Datagrid/useColumnOrder.d.ts +1 -7
  80. package/lib/components/Datagrid/useFiltering.d.ts +1 -8
  81. package/lib/components/Datagrid/useFiltering.js +7 -8
  82. package/lib/components/Datagrid/useFlexResize.d.ts +1 -1
  83. package/lib/components/Datagrid/useFlexResize.js +11 -11
  84. package/lib/components/Datagrid/useNestedRows.js +2 -24
  85. package/lib/components/Datagrid/useOnRowClick.d.ts +1 -8
  86. package/lib/components/Datagrid/useOnRowClick.js +1 -2
  87. package/lib/components/Datagrid/useRowIsMouseOver.d.ts +1 -2
  88. package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
  89. package/lib/components/Datagrid/useSelectRows.d.ts +1 -8
  90. package/lib/components/Datagrid/useSelectRows.js +2 -3
  91. package/lib/components/Datagrid/useSortableColumns.d.ts +3 -10
  92. package/lib/components/Datagrid/useSortableColumns.js +2 -3
  93. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +1 -8
  94. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +7 -0
  95. package/lib/components/SidePanel/SidePanel.d.ts +2 -2
  96. package/lib/components/SidePanel/SidePanel.js +5 -9
  97. package/package.json +3 -3
  98. package/scss/components/ConditionBuilder/_condition-builder.scss +1 -21
  99. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +3 -22
  100. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +21 -58
  101. package/telemetry.yml +0 -23
  102. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +0 -2
  103. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +0 -44
  104. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +0 -10
  105. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +0 -69
  106. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +0 -2
  107. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +0 -52
  108. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +0 -10
  109. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +0 -77
  110. /package/es/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.d.ts +0 -0
  111. /package/lib/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.d.ts +0 -0
@@ -13,8 +13,7 @@ var settings = require('../../settings.js');
13
13
 
14
14
  var useOnRowClick = function useOnRowClick(hooks) {
15
15
  var useInstance = function useInstance(rowInstance) {
16
- var _ref = rowInstance,
17
- onRowClick = _ref.onRowClick;
16
+ var onRowClick = rowInstance.onRowClick;
18
17
  var getRowProps = function getRowProps(props, datagridState) {
19
18
  var isFetching = datagridState.isFetching,
20
19
  row = datagridState.row,
@@ -1,3 +1,2 @@
1
- import { Hooks } from 'react-table';
2
- declare const useRowIsMouseOver: (hooks: Hooks) => void;
3
1
  export default useRowIsMouseOver;
2
+ declare function useRowIsMouseOver(hooks: any): void;
@@ -25,7 +25,7 @@ var useRowIsMouseOver = function useRowIsMouseOver(hooks) {
25
25
  setMouseOverRowIndex = _useState2[1];
26
26
  var onMouseChange = useDebounce(function (datagridState) {
27
27
  var row = datagridState.row;
28
- setMouseOverRowIndex(row === null || row === void 0 ? void 0 : row.index);
28
+ setMouseOverRowIndex(row.index);
29
29
  }, 100);
30
30
  var getRowProps = function getRowProps(props, datagridState) {
31
31
  var onMouseOver = function onMouseOver() {
@@ -1,9 +1,2 @@
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;
9
1
  export default useSelectRows;
2
+ declare function useSelectRows(hooks: any): void;
@@ -117,8 +117,7 @@ var SelectRow = function SelectRow(datagridState) {
117
117
  dispatch: dispatch,
118
118
  rowData: row,
119
119
  isChecked: event.target.checked,
120
- getRowId: getRowId,
121
- selectAll: null
120
+ getRowId: getRowId
122
121
  });
123
122
  };
124
123
  var selectDisabled = isFetching || row.getRowProps().disabled;
@@ -138,7 +137,7 @@ var SelectRow = function SelectRow(datagridState) {
138
137
  onSelect: onSelectHandler,
139
138
  id: rowId,
140
139
  name: "".concat(rowId, "-name"),
141
- className: cx__default["default"]([checkboxClass, cellProps.className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && Number(windowSize) > 671)]),
140
+ className: cx__default["default"]([checkboxClass, cellProps.className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && windowSize > 671)]),
142
141
  ariaLabel: title,
143
142
  disabled: selectDisabled
144
143
  }));
@@ -1,13 +1,6 @@
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;
1
+ export function getNewSortOrder(sortOrder: any): {
2
+ newSortDesc: undefined;
10
3
  newOrder: string;
11
4
  };
12
- declare const useSortableColumns: (hooks: Hooks) => void;
13
5
  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: false,
34
+ newSortDesc: undefined,
35
35
  newOrder: ordering.NONE
36
36
  };
37
37
  if (sortOrder === false || sortOrder === ordering.DESC) {
@@ -146,8 +146,7 @@ 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 _ref3 = instance,
150
- onSort = _ref3.onSort;
149
+ var onSort = instance.onSort;
151
150
  Object.assign(instance, {
152
151
  manualSortBy: !!onSort,
153
152
  isTableSortable: true
@@ -1,8 +1 @@
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;
1
+ export function getAutoSizedColumnWidth(rows: Array<object>, accessor: string, headerText: string): number;
@@ -18,6 +18,13 @@ 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
+
21
28
  var getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, headerText) {
22
29
  var maxWidth = 400;
23
30
  var minWidth = 58;
@@ -11,7 +11,7 @@ type SidePanelBaseProps = {
11
11
  /**
12
12
  * Sets the action toolbar buttons
13
13
  */
14
- actionToolbarButtons?: ButtonProps<any>[];
14
+ actionToolbarButtons?: ButtonProps[];
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<any>[];
23
+ actions?: ButtonProps[];
24
24
  /**
25
25
  * Determines if the title will animate on scroll
26
26
  */
@@ -104,8 +104,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
104
104
  var subtitleRef = React.useRef(null);
105
105
  var previousState = usePreviousValue.usePreviousValue({
106
106
  size: size,
107
- open: open,
108
- currentStep: currentStep
107
+ open: open
109
108
  });
110
109
  var _useState3 = React.useState(-1),
111
110
  _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
@@ -172,10 +171,9 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
172
171
  if (sidePanelRef && panelRefValue) {
173
172
  var _animatedScrollRef$cu;
174
173
  var scrollableSection = (_animatedScrollRef$cu = animatedScrollRef.current) !== null && _animatedScrollRef$cu !== void 0 ? _animatedScrollRef$cu : innerContentRef.current;
175
- if (previousState && previousState['currentStep'] !== currentStep && scrollableSection) {
174
+ if (scrollableSection) {
176
175
  scrollableSection.scrollTop = 0;
177
176
  }
178
-
179
177
  // The size of the panel has changed while it is still opened
180
178
  // so we need to scroll it to the top and reset the header
181
179
  // height css custom property
@@ -334,12 +332,12 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
334
332
  if (primeFocusEl) {
335
333
  primeFocusEl === null || primeFocusEl === void 0 || primeFocusEl.focus();
336
334
  }
337
- } else if (!slideIn) {
335
+ } else {
338
336
  firstElement === null || firstElement === void 0 || firstElement.focus();
339
337
  }
340
338
  }, 0);
341
339
  }
342
- }, [animationComplete, firstElement, open, selectorPrimaryFocus, slideIn]);
340
+ }, [animationComplete, firstElement, open, selectorPrimaryFocus]);
343
341
  var primaryActionContainerClassNames = cx__default["default"](["".concat(blockClass, "__actions-container"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__actions-container--condensed"), condensedActions)]);
344
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)]);
345
343
  var renderTitle = function renderTitle() {
@@ -459,7 +457,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
459
457
  placement: placement,
460
458
  shouldReduceMotion: shouldReduceMotion
461
459
  },
462
- onKeyDown: slideIn ? undefined : keyDownListener
460
+ onKeyDown: keyDownListener
463
461
  }), /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, renderHeader(), renderMain()), /*#__PURE__*/React__default["default"].createElement(MotionActionSet, {
464
462
  actions: actions !== null && actions !== void 0 ? actions : [],
465
463
  className: primaryActionContainerClassNames,
@@ -482,7 +480,6 @@ exports.SidePanel.propTypes = {
482
480
  /**
483
481
  * Sets the action toolbar buttons
484
482
  */
485
- /**@ts-ignore */
486
483
  actionToolbarButtons: index["default"].arrayOf(index["default"].shape({
487
484
  label: index["default"].string,
488
485
  leading: index["default"].bool,
@@ -516,7 +513,6 @@ exports.SidePanel.propTypes = {
516
513
  label: index["default"].string,
517
514
  loading: index["default"].bool,
518
515
  // we duplicate this Button prop to improve the DocGen here
519
- /**@ts-ignore */
520
516
  onClick: react.Button.propTypes.onClick
521
517
  })))]),
522
518
  /**
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.27+452089a1f",
4
+ "version": "2.42.1-canary.4+7442150e7",
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.1",
100
+ "@carbon/ibm-products-styles": "^2.38.2-canary.4+7442150e7",
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": "452089a1f3aca14aa3626e2d6cdce7c9c5dbc880"
124
+ "gitHead": "7442150e758ba89967e09233bc45c944bdb8c37f"
125
125
  }
@@ -27,9 +27,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
27
27
  // .#{$block-class} {
28
28
  // // TODO: Styles.
29
29
  // }
30
- .#{$block-class} {
31
- padding: $spacing-06;
32
- }
30
+
33
31
  .#{$block-class}__condition-builder__group {
34
32
  display: flex;
35
33
  }
@@ -49,23 +47,5 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
49
47
  }
50
48
  .#{$block-class}__condition-block {
51
49
  display: flex;
52
- width: max-content;
53
50
  flex-direction: row;
54
51
  }
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,4 +1,3 @@
1
- @use '@carbon/react/scss/theme' as *;
2
1
  @use '@carbon/react/scss/spacing' as *;
3
2
  @use '@carbon/react/scss/motion';
4
3
  @use '@carbon/styles/scss/components/tag' as *;
@@ -6,7 +5,6 @@
6
5
  @use '../../../global/styles/project-settings' as c4p-settings;
7
6
  @use '@carbon/styles/scss/type';
8
7
  @use '@carbon/styles/scss/type' as *;
9
- @use '@carbon/react/scss/utilities';
10
8
 
11
9
  $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
12
10
 
@@ -16,17 +14,12 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
16
14
  display: inline-flex;
17
15
  }
18
16
 
19
- .#{$block-class} [role='row'] {
20
- position: relative;
21
- outline: none;
22
- }
23
- .#{$block-class} [role='row']:focus::after {
17
+ [role='row']:focus {
24
18
  @include focus-outline.focus-outline('outline');
25
19
 
26
- position: absolute;
27
- content: '';
28
- inset: 0;
20
+ outline-offset: 0;
29
21
  }
22
+
30
23
  .#{$block-class}__condition__deletion-preview
31
24
  .#{$block-class}__button:not(
32
25
  .#{$block-class}__statement-button,
@@ -51,15 +44,3 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
51
44
  text-overflow: ellipsis;
52
45
  text-wrap: nowrap;
53
46
  }
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,5 +1,3 @@
1
- @use 'sass:list';
2
- @use 'sass:string';
3
1
  @use '@carbon/react/scss/theme' as *;
4
2
  @use '../../../global/styles/project-settings' as c4p-settings;
5
3
  @use '@carbon/styles/scss/type';
@@ -10,11 +8,10 @@
10
8
  @use '@carbon/styles/scss/components/tag';
11
9
 
12
10
  @use '@carbon/styles/scss/type' as *;
13
- @use '@carbon/react/scss/colors' as *;
14
11
 
15
12
  $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
16
13
 
17
- .#{$block-class}__condition-wrapper * {
14
+ .#{$block-class}__content-container * {
18
15
  @include type-style('body-01');
19
16
  }
20
17
 
@@ -123,7 +120,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
123
120
  }
124
121
  .#{$block-class}__condition-builder__group.hoveredConnector
125
122
  .#{$block-class}__condition-wrapper
126
- > .#{$block-class}__condition-block
123
+ > .conditionBlockWrapper
127
124
  .#{$block-class}__connector-button {
128
125
  background-color: $layer-hover;
129
126
  }
@@ -152,6 +149,9 @@ $block-class: #{c4p-settings.$pkg-prefix}--condition-builder;
152
149
  padding-right: $spacing-03;
153
150
  padding-left: $spacing-03;
154
151
  }
152
+ .#{$block-class}__conditionWrapper {
153
+ display: flex;
154
+ }
155
155
 
156
156
  .#{$block-class}__multiselectSelectionStatusContainer {
157
157
  display: flex;
@@ -165,59 +165,22 @@ $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
- //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
-
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
+ // }
221
184
  .#{$block-class}__groupOperatorConnector {
222
185
  margin-bottom: $spacing-02;
223
186
  }
package/telemetry.yml CHANGED
@@ -14,7 +14,6 @@ collect:
14
14
  - actionsPlacement
15
15
  - activeCellCoordinates
16
16
  - activeHref
17
- - addConditionSubGroupHandler
18
17
  - align
19
18
  - allPageRowsLabel
20
19
  - allRowsLabel
@@ -123,8 +122,6 @@ collect:
123
122
  - HeaderRow
124
123
  - headers
125
124
  - headRef
126
- - hideConditionPreviewHandler
127
- - hideConditionSubGroupPreviewHandler
128
125
  - hideIcon
129
126
  - hideSelectAll
130
127
  - href
@@ -216,14 +213,12 @@ collect:
216
213
  - onRemove
217
214
  - onRequestClose
218
215
  - onRequestSubmit
219
- - onRowClick
220
216
  - onScroll
221
217
  - onSecondaryButtonClick
222
218
  - onSelectAllRows
223
219
  - onSelectColumn
224
220
  - onSelectionAreaChange
225
221
  - onShowAllClick
226
- - onSort
227
222
  - onSubmit
228
223
  - onSubmitButtonText
229
224
  - onToggle
@@ -301,8 +296,6 @@ collect:
301
296
  - setSelectionAreas
302
297
  - showAllTagsLabel
303
298
  - showCloseButton
304
- - showConditionPreviewHandler
305
- - showConditionSubGroupPreviewHandler
306
299
  - showToolTip
307
300
  - sideNavAriaLabel
308
301
  - size
@@ -511,25 +504,13 @@ collect:
511
504
  - isStatement
512
505
  - onConnectorOperatorChange
513
506
  - onStatementChange
514
- # ConditionBuilderAdd
515
- - buttonLabel
516
- - enableSubGroup
517
507
  # ConditionBuilderButton
518
508
  - hideLabel
519
- - onBlur
520
- - onFocus
521
- - onMouseEnter
522
- - onMouseLeave
523
509
  - tooltipAlign
524
- - wrapperProps
525
- # ConditionBuilderContent
526
- - getActionsState
527
510
  # ConditionBuilderItem
528
511
  - popOverClassName
529
512
  # ConditionConnector
530
513
  - operator
531
- # ConditionPreview
532
- - previewType
533
514
  # CreateFullPage
534
515
  - breadcrumbsOverflowAriaLabel
535
516
  - maxVisibleBreadcrumbs
@@ -1097,10 +1078,6 @@ collect:
1097
1078
  - floating
1098
1079
  - stacked
1099
1080
  - tooltip
1100
- # ConditionPreview - previewType
1101
- - condition
1102
- - newGroup
1103
- - subGroup
1104
1081
  # DecoratorIcon - magnitude
1105
1082
  - benign
1106
1083
  - critical
@@ -1,2 +0,0 @@
1
- export default GroupConnector;
2
- declare function GroupConnector(): import("react/jsx-runtime").JSX.Element;
@@ -1,44 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 2024
3
- *
4
- * This source code is licensed under the Apache-2.0 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- import React__default, { useContext } from 'react';
9
- import { ConditionBuilderItem } from '../ConditionBuilderItem/ConditionBuilderItem.js';
10
- import { blockClass, translateWithId, connectorConfig } from '../ConditionBuilderContext/DataConfigs.js';
11
- import { ConditionBuilderItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js';
12
- import { focusThisField } from '../utils/util.js';
13
- import { ConditionBuilderContext } from '../ConditionBuilderContext/ConditionBuilderProvider.js';
14
-
15
- var GroupConnector = function GroupConnector() {
16
- var _useContext = useContext(ConditionBuilderContext),
17
- rootState = _useContext.rootState;
18
- return /*#__PURE__*/React__default.createElement("div", {
19
- className: "".concat(blockClass, "__group-separator"),
20
- role: "row",
21
- tabIndex: -1,
22
- "aria-level": 1
23
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
24
- label: rootState.operator,
25
- title: translateWithId('condition'),
26
- "data-name": "connectorField",
27
- popOverClassName: "".concat(blockClass, "__gap"),
28
- className: "".concat(blockClass, "__statement-button")
29
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItemOption, {
30
- conditionState: {
31
- value: rootState.operator,
32
- label: translateWithId('condition')
33
- },
34
- onChange: function onChange(v, e) {
35
- focusThisField(e);
36
- },
37
- config: {
38
- options: connectorConfig
39
- }
40
- })));
41
- };
42
- var GroupConnector$1 = GroupConnector;
43
-
44
- export { GroupConnector$1 as default };
@@ -1,10 +0,0 @@
1
- export default ConditionPreview;
2
- declare function ConditionPreview({ previewType }: {
3
- previewType: any;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- declare namespace ConditionPreview {
6
- namespace propTypes {
7
- let previewType: PropTypes.Requireable<string>;
8
- }
9
- }
10
- import PropTypes from 'prop-types';
@@ -1,69 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 2024
3
- *
4
- * This source code is licensed under the Apache-2.0 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- import React__default from 'react';
9
- import PropTypes from '../../../node_modules/prop-types/index.js';
10
- import { blockClass, translateWithId } from '../ConditionBuilderContext/DataConfigs.js';
11
- import { ConditionBuilderItem } from '../ConditionBuilderItem/ConditionBuilderItem.js';
12
- import ConditionConnector from '../ConditionBuilderConnector/ConditionConnector.js';
13
-
14
- var ConditionPreview = function ConditionPreview(_ref) {
15
- var previewType = _ref.previewType;
16
- var getConditionSection = function getConditionSection() {
17
- return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
18
- label: translateWithId('property')
19
- }), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
20
- label: translateWithId('operator')
21
- }), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
22
- label: translateWithId('value')
23
- }));
24
- };
25
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, previewType == 'newGroup' && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
26
- className: "".concat(blockClass, "__group__row ").concat(blockClass, "__group-preview ")
27
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
28
- className: "".concat(blockClass, "__statement-button"),
29
- label: translateWithId('and')
30
- })), /*#__PURE__*/React__default.createElement("div", {
31
- "aria-hidden": true,
32
- className: "".concat(blockClass, "__group ").concat(blockClass, "__condition-wrapper ").concat(blockClass, "__group-preview ").concat(blockClass, "__group-wrapper")
33
- }, /*#__PURE__*/React__default.createElement("div", {
34
- className: "".concat(blockClass, "__gap")
35
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
36
- className: "".concat(blockClass, "__statement-button"),
37
- label: translateWithId('if')
38
- })), getConditionSection())), previewType == 'subGroup' && /*#__PURE__*/React__default.createElement("div", {
39
- className: "".concat(blockClass, "__group-preview")
40
- }, /*#__PURE__*/React__default.createElement("div", {
41
- className: "".concat(blockClass, "__condition-block ").concat(blockClass, "__gap")
42
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
43
- label: translateWithId('and'),
44
- className: "".concat(blockClass, "__statement-button"),
45
- popOverClassName: "".concat(blockClass, "__gap")
46
- }), /*#__PURE__*/React__default.createElement("div", {
47
- className: "".concat(blockClass, "__group ").concat(blockClass, "__condition-wrapper")
48
- }, /*#__PURE__*/React__default.createElement(ConditionConnector, {
49
- className: "".concat(blockClass, "__gap ").concat(blockClass, "__groupConnector"),
50
- operator: translateWithId('if')
51
- }), getConditionSection()))), previewType == 'condition' && /*#__PURE__*/React__default.createElement("div", {
52
- className: "".concat(blockClass, "__group-preview")
53
- }, /*#__PURE__*/React__default.createElement("div", {
54
- className: "".concat(blockClass, "__condition-block ").concat(blockClass, "__gap")
55
- }, /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
56
- label: translateWithId('and'),
57
- className: "".concat(blockClass, "__statement-button"),
58
- popOverClassName: "".concat(blockClass, "__gap")
59
- }), getConditionSection())));
60
- };
61
- var ConditionPreview$1 = ConditionPreview;
62
- ConditionPreview.propTypes = {
63
- /**
64
- * type of review to be displayed
65
- */
66
- previewType: PropTypes.oneOf(['condition', 'subGroup', 'newGroup'])
67
- };
68
-
69
- export { ConditionPreview$1 as default };
@@ -1,2 +0,0 @@
1
- export default GroupConnector;
2
- declare function GroupConnector(): import("react/jsx-runtime").JSX.Element;