iguazio.dashboard-react-controls 2.2.18 → 2.2.19

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.
@@ -38,6 +38,7 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
38
38
  className = '',
39
39
  density = 'normal',
40
40
  icon,
41
+ iconPosition = 'left',
41
42
  id = 'btn',
42
43
  label = 'Button',
43
44
  tooltip = '',
@@ -50,16 +51,16 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
50
51
  className: buttonClassName,
51
52
  ref: ref,
52
53
  "data-testid": id,
53
- children: [icon, tooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
54
+ children: [icon && iconPosition === 'left' && icon, tooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
54
55
  template: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextTooltipTemplate.default, {
55
56
  text: tooltip
56
57
  }),
57
- children: label && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
58
+ children: label && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
58
59
  children: label
59
60
  })
60
- }) : label && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
61
+ }) : label && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
61
62
  children: label
62
- })]
63
+ }), icon && iconPosition === 'right' && icon]
63
64
  });
64
65
  });
65
66
  Button.propTypes = {
@@ -82,9 +82,6 @@ const FormChipCell = _ref => {
82
82
  isValueFocused: false,
83
83
  isNewChip: false
84
84
  });
85
- (0, _react.useEffect)(() => {
86
- formState.form.change('labelsAreInEditMode', editConfig.isEdit);
87
- }, [editConfig.isEdit, formState.form]);
88
85
  let chips = (0, _react.useMemo)(() => {
89
86
  return isEditable || visibleChipsMaxLength === 'all' ? {
90
87
  visibleChips: (0, _lodash.get)(formState.values, name),
@@ -13,6 +13,7 @@ var _Modal = _interopRequireDefault(require("../Modal/Modal"));
13
13
  var _WizardSteps = _interopRequireDefault(require("./WizardSteps/WizardSteps"));
14
14
  var _constants = require("../../constants");
15
15
  var _types = require("../../types");
16
+ var _backArrow = require("../../images/back-arrow.svg");
16
17
  require("./Wizard.scss");
17
18
  var _jsxRuntime = require("react/jsx-runtime");
18
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -107,20 +108,25 @@ const Wizard = _ref => {
107
108
  if (activeStepNumber !== 0) {
108
109
  defaultActions.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
109
110
  id: "wizard-btn-back",
111
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_backArrow.ReactComponent, {}),
112
+ className: "wizard-form__back-button",
110
113
  onClick: goToPreviousStep,
111
114
  disabled: activeStepNumber === 0,
112
115
  label: "Back",
113
116
  type: "button",
114
- variant: _constants.LABEL_BUTTON
117
+ variant: _constants.TERTIARY_BUTTON
115
118
  }));
116
119
  }
117
120
  defaultActions.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
118
121
  id: "wizard-btn-next",
122
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_backArrow.ReactComponent, {}),
123
+ iconPosition: "right",
124
+ className: "wizard-form__next-button",
119
125
  disabled: (stepConfig === null || stepConfig === void 0 ? void 0 : stepConfig.nextIsDisabled) || isLastStep,
120
126
  onClick: goToNextStep,
121
- label: 'Next',
127
+ label: "Next",
122
128
  type: "button",
123
- variant: _constants.LABEL_BUTTON
129
+ variant: _constants.TERTIARY_BUTTON
124
130
  }));
125
131
  return defaultActions;
126
132
  };
@@ -37,4 +37,17 @@
37
37
  height: 100%;
38
38
  }
39
39
  }
40
+
41
+ &__back-button,
42
+ &__next-button {
43
+ svg {
44
+ width: 14px;
45
+ }
46
+ }
47
+
48
+ &__next-button {
49
+ svg {
50
+ rotate: 180deg;
51
+ }
52
+ }
40
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iguazio.dashboard-react-controls",
3
- "version": "2.2.18",
3
+ "version": "2.2.19",
4
4
  "description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",