@datarobot/design-system 29.4.1 → 29.6.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.
@@ -1,9 +1,11 @@
1
- import { ChartLegendItemType, OnChangeHandler } from './types';
1
+ import { ChartLegendItemType, OnChangeHandler, OnMouseEnterHandler, OnMouseLeaveHandler } from './types';
2
2
  import './chart-legend-item.less';
3
3
  type ChartLegendItemProps = {
4
4
  item: ChartLegendItemType;
5
5
  isInteractive?: boolean;
6
6
  onChange?: OnChangeHandler;
7
+ onMouseEnter?: OnMouseEnterHandler;
8
+ onMouseLeave?: OnMouseLeaveHandler;
7
9
  };
8
- export declare function ChartLegendItem({ item, isInteractive, onChange, }: ChartLegendItemProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ChartLegendItem({ item, isInteractive, onChange, onMouseEnter, onMouseLeave, }: ChartLegendItemProps): import("react/jsx-runtime").JSX.Element;
9
11
  export {};
@@ -13,7 +13,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
13
13
  function ChartLegendItem({
14
14
  item,
15
15
  isInteractive = false,
16
- onChange = () => {}
16
+ onChange = () => {},
17
+ onMouseEnter = () => {},
18
+ onMouseLeave = () => {}
17
19
  }) {
18
20
  const {
19
21
  key,
@@ -27,25 +29,31 @@ function ChartLegendItem({
27
29
  isDisabled
28
30
  } = item;
29
31
  const id = `legend-item-${key}`;
30
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
31
- content: tooltipText,
32
- placement: _tooltip.TOOLTIP_PLACEMENT_TYPES.TOP,
33
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
34
- className: (0, _classnames.default)('chart-legend-item', className),
35
- "test-id": testId,
36
- children: [isInteractive ? /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
37
- onChange: e => isDisabled ? null : onChange({
38
- item,
39
- isActive: e.target.checked
40
- }),
41
- id: id,
42
- "test-id": "chart-legend-item-input",
43
- type: "checkbox",
44
- checked: isActive,
45
- value: key,
46
- className: "chart-legend-item-checkbox",
47
- disabled: isDisabled
48
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
33
+ className: (0, _classnames.default)('chart-legend-item', className),
34
+ "test-id": testId,
35
+ onMouseEnter: () => onMouseEnter({
36
+ item
37
+ }),
38
+ onMouseLeave: () => onMouseLeave({
39
+ item
40
+ }),
41
+ children: [isInteractive ? /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
42
+ onChange: e => isDisabled ? null : onChange({
43
+ item,
44
+ isActive: e.target.checked
45
+ }),
46
+ id: id,
47
+ "test-id": "chart-legend-item-input",
48
+ type: "checkbox",
49
+ checked: isActive,
50
+ value: key,
51
+ className: "chart-legend-item-checkbox",
52
+ disabled: isDisabled
53
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
54
+ content: tooltipText,
55
+ placement: _tooltip.TOOLTIP_PLACEMENT_TYPES.TOP,
56
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
49
57
  htmlFor: id,
50
58
  className: "chart-legend-item-label",
51
59
  "aria-labelledby": `${id}-glyph ${id}-label`,
@@ -60,7 +68,7 @@ function ChartLegendItem({
60
68
  id: `${id}-label`,
61
69
  children: label
62
70
  })]
63
- })]
64
- })
71
+ })
72
+ })]
65
73
  });
66
74
  }
@@ -1,4 +1,4 @@
1
- import { ChartLegendItemType, OnChangeHandler } from './types';
1
+ import { ChartLegendItemType, OnChangeHandler, OnMouseEnterHandler, OnMouseLeaveHandler } from './types';
2
2
  import './chart-legend.less';
3
3
  type ChartLegendProps = {
4
4
  className?: string;
@@ -7,11 +7,13 @@ type ChartLegendProps = {
7
7
  /** if true, legend items will become clickable */
8
8
  isInteractive?: boolean;
9
9
  onChange?: OnChangeHandler;
10
+ onMouseEnter?: OnMouseEnterHandler;
11
+ onMouseLeave?: OnMouseLeaveHandler;
10
12
  };
11
13
  /**
12
14
  * Legends for charts
13
15
  * @midnight-gray-supported
14
16
  * @alpine-light-supported
15
17
  */
16
- export declare function ChartLegend({ className, items, isInteractive, onChange, testId, }: ChartLegendProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function ChartLegend({ className, items, isInteractive, onChange, onMouseEnter, onMouseLeave, testId, }: ChartLegendProps): import("react/jsx-runtime").JSX.Element;
17
19
  export {};
@@ -19,6 +19,8 @@ function ChartLegend({
19
19
  items,
20
20
  isInteractive,
21
21
  onChange,
22
+ onMouseEnter,
23
+ onMouseLeave,
22
24
  testId
23
25
  }) {
24
26
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -28,7 +30,9 @@ function ChartLegend({
28
30
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_chartLegendItem.ChartLegendItem, {
29
31
  item: item,
30
32
  isInteractive: isInteractive,
31
- onChange: onChange
33
+ onChange: onChange,
34
+ onMouseEnter: onMouseEnter,
35
+ onMouseLeave: onMouseLeave
32
36
  }, item.key);
33
37
  })
34
38
  });
@@ -16,3 +16,8 @@ export type OnChangeHandlerEvent = {
16
16
  isActive: boolean;
17
17
  };
18
18
  export type OnChangeHandler = (event: OnChangeHandlerEvent) => void;
19
+ export type OnMouseOverHandlerEvent = {
20
+ item: ChartLegendItemType;
21
+ };
22
+ export type OnMouseEnterHandler = (event: OnMouseOverHandlerEvent) => void;
23
+ export type OnMouseLeaveHandler = (event: OnMouseOverHandlerEvent) => void;
@@ -1,5 +1,5 @@
1
1
  import React, { MouseEvent } from 'react';
2
- import { Item } from './types';
2
+ import { Item, ValueObject } from './types';
3
3
  import { FormFieldValidity } from '../form-field/validity-shape';
4
4
  type OnChangeEvent = Item;
5
5
  type KeyValueInputsProps = {
@@ -9,6 +9,7 @@ type KeyValueInputsProps = {
9
9
  value?: string | number;
10
10
  /** True to disable inputs, false to enable inputs */
11
11
  isDisabled?: boolean;
12
+ disabledPairs?: ValueObject;
12
13
  /** Change handler */
13
14
  onChange?: (event: OnChangeEvent) => void;
14
15
  /** Delete handler */
@@ -23,6 +23,7 @@ const KeyValueInputs = exports.KeyValueInputs = /*#__PURE__*/(0, _react.forwardR
23
23
  name,
24
24
  value = '',
25
25
  isDisabled = false,
26
+ disabledPairs,
26
27
  onChange = () => {},
27
28
  onDelete = () => {},
28
29
  validity = {},
@@ -40,6 +41,7 @@ const KeyValueInputs = exports.KeyValueInputs = /*#__PURE__*/(0, _react.forwardR
40
41
  id,
41
42
  validationValues
42
43
  });
44
+ const disabled = isDisabled || disabledPairs?.[name] !== undefined && disabledPairs[name] === value;
43
45
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
44
46
  className: "kvp-inputs",
45
47
  "test-id": "kvp-inputs",
@@ -48,7 +50,7 @@ const KeyValueInputs = exports.KeyValueInputs = /*#__PURE__*/(0, _react.forwardR
48
50
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.Input, {
49
51
  type: _formField.INPUT_TYPES.TEXT,
50
52
  value: name,
51
- isDisabled: isDisabled,
53
+ isDisabled: disabled,
52
54
  onChange: ({
53
55
  target
54
56
  }) => onChange({
@@ -67,7 +69,7 @@ const KeyValueInputs = exports.KeyValueInputs = /*#__PURE__*/(0, _react.forwardR
67
69
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.Input, {
68
70
  type: _formField.INPUT_TYPES.TEXT,
69
71
  value: value,
70
- isDisabled: isDisabled,
72
+ isDisabled: disabled,
71
73
  onChange: ({
72
74
  target
73
75
  }) => onChange({
@@ -85,7 +87,7 @@ const KeyValueInputs = exports.KeyValueInputs = /*#__PURE__*/(0, _react.forwardR
85
87
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
86
88
  accentType: _button.ACCENT_TYPES.ROUND_ICON,
87
89
  onClick: onDelete,
88
- isDisabled: isDisabled,
90
+ isDisabled: disabled,
89
91
  testId: "kvp-delete-button",
90
92
  "aria-label": deleteKeyValueText,
91
93
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontAwesomeIcon.FontAwesomeIcon, {
@@ -8,7 +8,9 @@ type KeyValuePairsProps = {
8
8
  /** Object that represents the key value pairs in this component */
9
9
  value: ValueObject;
10
10
  className?: string;
11
+ /** whether whole form is disabled */
11
12
  isDisabled?: boolean;
13
+ disabledPairs?: ValueObject;
12
14
  label?: string;
13
15
  /** Label for the key column */
14
16
  keyLabel?: string;
@@ -54,5 +56,5 @@ type KeyValuePairsProps = {
54
56
  @midnight-gray-supported
55
57
  @alpine-light-supported
56
58
  */
57
- export declare const KeyValuePairs: ({ value, className, label, keyLabel, valueLabel, helperText, placeholder: placeholderParams, isDisabled, onChange, hasWarning, emptyCheck, warningMessage: warningMessageParams, buttonText: buttonTextParams, maxItemsTooltipText: maxItemsTooltipTextParams, emptyItemErrorText: emptyItemErrorTextParams, deleteKeyValueText: deleteKeyValueTextParams, buildDuplicateItemErrorText: buildDuplicateItemErrorTextParams, testId, infoIconProps, onError, maxSize, addButtonAccentType, keyInputAriaLabel: keyInputAriaLabelParams, valueInputAriaLabel: valueInputAriaLabelParams, id, }: KeyValuePairsProps) => import("react/jsx-runtime").JSX.Element;
59
+ export declare const KeyValuePairs: ({ value, className, label, keyLabel, valueLabel, helperText, placeholder: placeholderParams, isDisabled, disabledPairs, onChange, hasWarning, emptyCheck, warningMessage: warningMessageParams, buttonText: buttonTextParams, maxItemsTooltipText: maxItemsTooltipTextParams, emptyItemErrorText: emptyItemErrorTextParams, deleteKeyValueText: deleteKeyValueTextParams, buildDuplicateItemErrorText: buildDuplicateItemErrorTextParams, testId, infoIconProps, onError, maxSize, addButtonAccentType, keyInputAriaLabel: keyInputAriaLabelParams, valueInputAriaLabel: valueInputAriaLabelParams, id, }: KeyValuePairsProps) => import("react/jsx-runtime").JSX.Element;
58
60
  export {};
@@ -65,6 +65,7 @@ const KeyValuePairs = ({
65
65
  helperText = '',
66
66
  placeholder: placeholderParams,
67
67
  isDisabled = false,
68
+ disabledPairs,
68
69
  onChange = () => {},
69
70
  hasWarning = false,
70
71
  emptyCheck = false,
@@ -197,6 +198,7 @@ const KeyValuePairs = ({
197
198
  name: item.name,
198
199
  value: item.value,
199
200
  isDisabled: isDisabled,
201
+ disabledPairs: disabledPairs,
200
202
  onChange: updatedOption => changeItem(index, updatedOption),
201
203
  onDelete: () => removeItem(index),
202
204
  deleteKeyValueText: `${deleteKeyValueText} ${paddedIndex}`,
@@ -1,9 +1,11 @@
1
- import { ChartLegendItemType, OnChangeHandler } from './types';
1
+ import { ChartLegendItemType, OnChangeHandler, OnMouseEnterHandler, OnMouseLeaveHandler } from './types';
2
2
  import './chart-legend-item.less';
3
3
  type ChartLegendItemProps = {
4
4
  item: ChartLegendItemType;
5
5
  isInteractive?: boolean;
6
6
  onChange?: OnChangeHandler;
7
+ onMouseEnter?: OnMouseEnterHandler;
8
+ onMouseLeave?: OnMouseLeaveHandler;
7
9
  };
8
- export declare function ChartLegendItem({ item, isInteractive, onChange, }: ChartLegendItemProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ChartLegendItem({ item, isInteractive, onChange, onMouseEnter, onMouseLeave, }: ChartLegendItemProps): import("react/jsx-runtime").JSX.Element;
9
11
  export {};
@@ -6,7 +6,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  export function ChartLegendItem({
7
7
  item,
8
8
  isInteractive = false,
9
- onChange = () => {}
9
+ onChange = () => {},
10
+ onMouseEnter = () => {},
11
+ onMouseLeave = () => {}
10
12
  }) {
11
13
  const {
12
14
  key,
@@ -20,25 +22,31 @@ export function ChartLegendItem({
20
22
  isDisabled
21
23
  } = item;
22
24
  const id = `legend-item-${key}`;
23
- return /*#__PURE__*/_jsx(Tooltip, {
24
- content: tooltipText,
25
- placement: TOOLTIP_PLACEMENT_TYPES.TOP,
26
- children: /*#__PURE__*/_jsxs("div", {
27
- className: classnames('chart-legend-item', className),
28
- "test-id": testId,
29
- children: [isInteractive ? /*#__PURE__*/_jsx("input", {
30
- onChange: e => isDisabled ? null : onChange({
31
- item,
32
- isActive: e.target.checked
33
- }),
34
- id: id,
35
- "test-id": "chart-legend-item-input",
36
- type: "checkbox",
37
- checked: isActive,
38
- value: key,
39
- className: "chart-legend-item-checkbox",
40
- disabled: isDisabled
41
- }) : null, /*#__PURE__*/_jsxs("label", {
25
+ return /*#__PURE__*/_jsxs("div", {
26
+ className: classnames('chart-legend-item', className),
27
+ "test-id": testId,
28
+ onMouseEnter: () => onMouseEnter({
29
+ item
30
+ }),
31
+ onMouseLeave: () => onMouseLeave({
32
+ item
33
+ }),
34
+ children: [isInteractive ? /*#__PURE__*/_jsx("input", {
35
+ onChange: e => isDisabled ? null : onChange({
36
+ item,
37
+ isActive: e.target.checked
38
+ }),
39
+ id: id,
40
+ "test-id": "chart-legend-item-input",
41
+ type: "checkbox",
42
+ checked: isActive,
43
+ value: key,
44
+ className: "chart-legend-item-checkbox",
45
+ disabled: isDisabled
46
+ }) : null, /*#__PURE__*/_jsx(Tooltip, {
47
+ content: tooltipText,
48
+ placement: TOOLTIP_PLACEMENT_TYPES.TOP,
49
+ children: /*#__PURE__*/_jsxs("label", {
42
50
  htmlFor: id,
43
51
  className: "chart-legend-item-label",
44
52
  "aria-labelledby": `${id}-glyph ${id}-label`,
@@ -53,7 +61,7 @@ export function ChartLegendItem({
53
61
  id: `${id}-label`,
54
62
  children: label
55
63
  })]
56
- })]
57
- })
64
+ })
65
+ })]
58
66
  });
59
67
  }
@@ -1,4 +1,4 @@
1
- import { ChartLegendItemType, OnChangeHandler } from './types';
1
+ import { ChartLegendItemType, OnChangeHandler, OnMouseEnterHandler, OnMouseLeaveHandler } from './types';
2
2
  import './chart-legend.less';
3
3
  type ChartLegendProps = {
4
4
  className?: string;
@@ -7,11 +7,13 @@ type ChartLegendProps = {
7
7
  /** if true, legend items will become clickable */
8
8
  isInteractive?: boolean;
9
9
  onChange?: OnChangeHandler;
10
+ onMouseEnter?: OnMouseEnterHandler;
11
+ onMouseLeave?: OnMouseLeaveHandler;
10
12
  };
11
13
  /**
12
14
  * Legends for charts
13
15
  * @midnight-gray-supported
14
16
  * @alpine-light-supported
15
17
  */
16
- export declare function ChartLegend({ className, items, isInteractive, onChange, testId, }: ChartLegendProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function ChartLegend({ className, items, isInteractive, onChange, onMouseEnter, onMouseLeave, testId, }: ChartLegendProps): import("react/jsx-runtime").JSX.Element;
17
19
  export {};
@@ -12,6 +12,8 @@ export function ChartLegend({
12
12
  items,
13
13
  isInteractive,
14
14
  onChange,
15
+ onMouseEnter,
16
+ onMouseLeave,
15
17
  testId
16
18
  }) {
17
19
  return /*#__PURE__*/_jsx("div", {
@@ -21,7 +23,9 @@ export function ChartLegend({
21
23
  return /*#__PURE__*/_jsx(ChartLegendItem, {
22
24
  item: item,
23
25
  isInteractive: isInteractive,
24
- onChange: onChange
26
+ onChange: onChange,
27
+ onMouseEnter: onMouseEnter,
28
+ onMouseLeave: onMouseLeave
25
29
  }, item.key);
26
30
  })
27
31
  });
@@ -16,3 +16,8 @@ export type OnChangeHandlerEvent = {
16
16
  isActive: boolean;
17
17
  };
18
18
  export type OnChangeHandler = (event: OnChangeHandlerEvent) => void;
19
+ export type OnMouseOverHandlerEvent = {
20
+ item: ChartLegendItemType;
21
+ };
22
+ export type OnMouseEnterHandler = (event: OnMouseOverHandlerEvent) => void;
23
+ export type OnMouseLeaveHandler = (event: OnMouseOverHandlerEvent) => void;
@@ -1,5 +1,5 @@
1
1
  import React, { MouseEvent } from 'react';
2
- import { Item } from './types';
2
+ import { Item, ValueObject } from './types';
3
3
  import { FormFieldValidity } from '../form-field/validity-shape';
4
4
  type OnChangeEvent = Item;
5
5
  type KeyValueInputsProps = {
@@ -9,6 +9,7 @@ type KeyValueInputsProps = {
9
9
  value?: string | number;
10
10
  /** True to disable inputs, false to enable inputs */
11
11
  isDisabled?: boolean;
12
+ disabledPairs?: ValueObject;
12
13
  /** Change handler */
13
14
  onChange?: (event: OnChangeEvent) => void;
14
15
  /** Delete handler */
@@ -16,6 +16,7 @@ const KeyValueInputs = /*#__PURE__*/forwardRef((props, ref) => {
16
16
  name,
17
17
  value = '',
18
18
  isDisabled = false,
19
+ disabledPairs,
19
20
  onChange = () => {},
20
21
  onDelete = () => {},
21
22
  validity = {},
@@ -33,6 +34,7 @@ const KeyValueInputs = /*#__PURE__*/forwardRef((props, ref) => {
33
34
  id,
34
35
  validationValues
35
36
  });
37
+ const disabled = isDisabled || disabledPairs?.[name] !== undefined && disabledPairs[name] === value;
36
38
  return /*#__PURE__*/_jsxs("div", {
37
39
  className: "kvp-inputs",
38
40
  "test-id": "kvp-inputs",
@@ -41,7 +43,7 @@ const KeyValueInputs = /*#__PURE__*/forwardRef((props, ref) => {
41
43
  children: /*#__PURE__*/_jsx(Input, {
42
44
  type: INPUT_TYPES.TEXT,
43
45
  value: name,
44
- isDisabled: isDisabled,
46
+ isDisabled: disabled,
45
47
  onChange: ({
46
48
  target
47
49
  }) => onChange({
@@ -60,7 +62,7 @@ const KeyValueInputs = /*#__PURE__*/forwardRef((props, ref) => {
60
62
  children: /*#__PURE__*/_jsx(Input, {
61
63
  type: INPUT_TYPES.TEXT,
62
64
  value: value,
63
- isDisabled: isDisabled,
65
+ isDisabled: disabled,
64
66
  onChange: ({
65
67
  target
66
68
  }) => onChange({
@@ -78,7 +80,7 @@ const KeyValueInputs = /*#__PURE__*/forwardRef((props, ref) => {
78
80
  children: /*#__PURE__*/_jsx(Button, {
79
81
  accentType: ACCENT_TYPES.ROUND_ICON,
80
82
  onClick: onDelete,
81
- isDisabled: isDisabled,
83
+ isDisabled: disabled,
82
84
  testId: "kvp-delete-button",
83
85
  "aria-label": deleteKeyValueText,
84
86
  children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
@@ -8,7 +8,9 @@ type KeyValuePairsProps = {
8
8
  /** Object that represents the key value pairs in this component */
9
9
  value: ValueObject;
10
10
  className?: string;
11
+ /** whether whole form is disabled */
11
12
  isDisabled?: boolean;
13
+ disabledPairs?: ValueObject;
12
14
  label?: string;
13
15
  /** Label for the key column */
14
16
  keyLabel?: string;
@@ -54,5 +56,5 @@ type KeyValuePairsProps = {
54
56
  @midnight-gray-supported
55
57
  @alpine-light-supported
56
58
  */
57
- export declare const KeyValuePairs: ({ value, className, label, keyLabel, valueLabel, helperText, placeholder: placeholderParams, isDisabled, onChange, hasWarning, emptyCheck, warningMessage: warningMessageParams, buttonText: buttonTextParams, maxItemsTooltipText: maxItemsTooltipTextParams, emptyItemErrorText: emptyItemErrorTextParams, deleteKeyValueText: deleteKeyValueTextParams, buildDuplicateItemErrorText: buildDuplicateItemErrorTextParams, testId, infoIconProps, onError, maxSize, addButtonAccentType, keyInputAriaLabel: keyInputAriaLabelParams, valueInputAriaLabel: valueInputAriaLabelParams, id, }: KeyValuePairsProps) => import("react/jsx-runtime").JSX.Element;
59
+ export declare const KeyValuePairs: ({ value, className, label, keyLabel, valueLabel, helperText, placeholder: placeholderParams, isDisabled, disabledPairs, onChange, hasWarning, emptyCheck, warningMessage: warningMessageParams, buttonText: buttonTextParams, maxItemsTooltipText: maxItemsTooltipTextParams, emptyItemErrorText: emptyItemErrorTextParams, deleteKeyValueText: deleteKeyValueTextParams, buildDuplicateItemErrorText: buildDuplicateItemErrorTextParams, testId, infoIconProps, onError, maxSize, addButtonAccentType, keyInputAriaLabel: keyInputAriaLabelParams, valueInputAriaLabel: valueInputAriaLabelParams, id, }: KeyValuePairsProps) => import("react/jsx-runtime").JSX.Element;
58
60
  export {};
@@ -57,6 +57,7 @@ export const KeyValuePairs = ({
57
57
  helperText = '',
58
58
  placeholder: placeholderParams,
59
59
  isDisabled = false,
60
+ disabledPairs,
60
61
  onChange = () => {},
61
62
  hasWarning = false,
62
63
  emptyCheck = false,
@@ -189,6 +190,7 @@ export const KeyValuePairs = ({
189
190
  name: item.name,
190
191
  value: item.value,
191
192
  isDisabled: isDisabled,
193
+ disabledPairs: disabledPairs,
192
194
  onChange: updatedOption => changeItem(index, updatedOption),
193
195
  onDelete: () => removeItem(index),
194
196
  deleteKeyValueText: `${deleteKeyValueText} ${paddedIndex}`,
@@ -43786,7 +43786,11 @@ function ChartLegendItem(_ref) {
43786
43786
  _ref$isInteractive = _ref.isInteractive,
43787
43787
  isInteractive = _ref$isInteractive === void 0 ? false : _ref$isInteractive,
43788
43788
  _ref$onChange = _ref.onChange,
43789
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
43789
+ _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
43790
+ _ref$onMouseEnter = _ref.onMouseEnter,
43791
+ _onMouseEnter = _ref$onMouseEnter === void 0 ? function () {} : _ref$onMouseEnter,
43792
+ _ref$onMouseLeave = _ref.onMouseLeave,
43793
+ _onMouseLeave = _ref$onMouseLeave === void 0 ? function () {} : _ref$onMouseLeave;
43790
43794
  var key = item.key,
43791
43795
  label = item.label,
43792
43796
  color = item.color,
@@ -43800,12 +43804,19 @@ function ChartLegendItem(_ref) {
43800
43804
  tooltipText = _item$tooltipText === void 0 ? '' : _item$tooltipText,
43801
43805
  isDisabled = item.isDisabled;
43802
43806
  var id = "legend-item-".concat(key);
43803
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_2__.Tooltip, {
43804
- content: tooltipText,
43805
- placement: _tooltip__WEBPACK_IMPORTED_MODULE_2__.TOOLTIP_PLACEMENT_TYPES.TOP
43806
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
43807
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
43807
43808
  className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('chart-legend-item', className),
43808
- "test-id": testId
43809
+ "test-id": testId,
43810
+ onMouseEnter: function onMouseEnter() {
43811
+ return _onMouseEnter({
43812
+ item: item
43813
+ });
43814
+ },
43815
+ onMouseLeave: function onMouseLeave() {
43816
+ return _onMouseLeave({
43817
+ item: item
43818
+ });
43819
+ }
43809
43820
  }, isInteractive ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
43810
43821
  onChange: function onChange(e) {
43811
43822
  return isDisabled ? null : _onChange({
@@ -43820,7 +43831,10 @@ function ChartLegendItem(_ref) {
43820
43831
  value: key,
43821
43832
  className: "chart-legend-item-checkbox",
43822
43833
  disabled: isDisabled
43823
- }) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
43834
+ }) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_2__.Tooltip, {
43835
+ content: tooltipText,
43836
+ placement: _tooltip__WEBPACK_IMPORTED_MODULE_2__.TOOLTIP_PLACEMENT_TYPES.TOP
43837
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
43824
43838
  htmlFor: id,
43825
43839
  className: "chart-legend-item-label",
43826
43840
  "aria-labelledby": "".concat(id, "-glyph ").concat(id, "-label")
@@ -43879,6 +43893,8 @@ function ChartLegend(_ref) {
43879
43893
  items = _ref.items,
43880
43894
  isInteractive = _ref.isInteractive,
43881
43895
  onChange = _ref.onChange,
43896
+ onMouseEnter = _ref.onMouseEnter,
43897
+ onMouseLeave = _ref.onMouseLeave,
43882
43898
  testId = _ref.testId;
43883
43899
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
43884
43900
  className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('chart-legend', className),
@@ -43888,7 +43904,9 @@ function ChartLegend(_ref) {
43888
43904
  key: item.key,
43889
43905
  item: item,
43890
43906
  isInteractive: isInteractive,
43891
- onChange: onChange
43907
+ onChange: onChange,
43908
+ onMouseEnter: onMouseEnter,
43909
+ onMouseLeave: onMouseLeave
43892
43910
  });
43893
43911
  }));
43894
43912
  }
@@ -66652,6 +66670,7 @@ var KeyValueInputs = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
66652
66670
  value = _props$value === void 0 ? '' : _props$value,
66653
66671
  _props$isDisabled = props.isDisabled,
66654
66672
  isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
66673
+ disabledPairs = props.disabledPairs,
66655
66674
  _props$onChange = props.onChange,
66656
66675
  _onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
66657
66676
  _props$onDelete = props.onDelete,
@@ -66671,6 +66690,7 @@ var KeyValueInputs = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
66671
66690
  id: id,
66672
66691
  validationValues: validationValues
66673
66692
  });
66693
+ var disabled = isDisabled || (disabledPairs === null || disabledPairs === void 0 ? void 0 : disabledPairs[name]) !== undefined && disabledPairs[name] === value;
66674
66694
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
66675
66695
  className: "kvp-inputs",
66676
66696
  "test-id": "kvp-inputs"
@@ -66679,7 +66699,7 @@ var KeyValueInputs = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
66679
66699
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_input__WEBPACK_IMPORTED_MODULE_3__.Input, _extends({
66680
66700
  type: _form_field__WEBPACK_IMPORTED_MODULE_5__.INPUT_TYPES.TEXT,
66681
66701
  value: name,
66682
- isDisabled: isDisabled,
66702
+ isDisabled: disabled,
66683
66703
  onChange: function onChange(_ref) {
66684
66704
  var target = _ref.target;
66685
66705
  return _onChange({
@@ -66697,7 +66717,7 @@ var KeyValueInputs = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
66697
66717
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_input__WEBPACK_IMPORTED_MODULE_3__.Input, _extends({
66698
66718
  type: _form_field__WEBPACK_IMPORTED_MODULE_5__.INPUT_TYPES.TEXT,
66699
66719
  value: value,
66700
- isDisabled: isDisabled,
66720
+ isDisabled: disabled,
66701
66721
  onChange: function onChange(_ref2) {
66702
66722
  var target = _ref2.target;
66703
66723
  return _onChange({
@@ -66714,7 +66734,7 @@ var KeyValueInputs = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
66714
66734
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_button__WEBPACK_IMPORTED_MODULE_4__.Button, {
66715
66735
  accentType: _button__WEBPACK_IMPORTED_MODULE_4__.ACCENT_TYPES.ROUND_ICON,
66716
66736
  onClick: onDelete,
66717
- isDisabled: isDisabled,
66737
+ isDisabled: disabled,
66718
66738
  testId: "kvp-delete-button",
66719
66739
  "aria-label": deleteKeyValueText
66720
66740
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_font_awesome_icon__WEBPACK_IMPORTED_MODULE_2__.FontAwesomeIcon, {
@@ -66850,6 +66870,7 @@ var KeyValuePairs = function KeyValuePairs(_ref5) {
66850
66870
  placeholderParams = _ref5.placeholder,
66851
66871
  _ref5$isDisabled = _ref5.isDisabled,
66852
66872
  isDisabled = _ref5$isDisabled === void 0 ? false : _ref5$isDisabled,
66873
+ disabledPairs = _ref5.disabledPairs,
66853
66874
  _ref5$onChange = _ref5.onChange,
66854
66875
  onChange = _ref5$onChange === void 0 ? function () {} : _ref5$onChange,
66855
66876
  _ref5$hasWarning = _ref5.hasWarning,
@@ -66996,6 +67017,7 @@ var KeyValuePairs = function KeyValuePairs(_ref5) {
66996
67017
  name: item.name,
66997
67018
  value: item.value,
66998
67019
  isDisabled: isDisabled,
67020
+ disabledPairs: disabledPairs,
66999
67021
  onChange: function onChange(updatedOption) {
67000
67022
  return changeItem(index, updatedOption);
67001
67023
  },