@xelto.npm/xc2-lib 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -74171,7 +74171,7 @@ AppTileComponent.propTypes = {
74171
74171
  onClick: propTypesExports.func
74172
74172
  };
74173
74173
 
74174
- var _excluded$d = ["type", "text", "size", "fluid", "color", "onClick", "disabled", "forwardedRef"];
74174
+ var _excluded$d = ["type", "text", "size", "fluid", "color", "onClick", "disabled", "submit", "forwardedRef"];
74175
74175
  var CustomButton = styled$1(Button$2, {
74176
74176
  shouldForwardProp: function shouldForwardProp(prop) {
74177
74177
  return prop !== 'fluid';
@@ -74422,6 +74422,8 @@ var CustomButtonComponent = function CustomButtonComponent(_ref2) {
74422
74422
  onClick = _ref2$onClick === void 0 ? function () {} : _ref2$onClick,
74423
74423
  _ref2$disabled = _ref2.disabled,
74424
74424
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
74425
+ _ref2$submit = _ref2.submit,
74426
+ submit = _ref2$submit === void 0 ? false : _ref2$submit,
74425
74427
  forwardedRef = _ref2.forwardedRef,
74426
74428
  props = _objectWithoutProperties$1(_ref2, _excluded$d);
74427
74429
  var className = "".concat(type, " ").concat(disabled ? 'grey' : color, " ").concat(size);
@@ -74432,6 +74434,7 @@ var CustomButtonComponent = function CustomButtonComponent(_ref2) {
74432
74434
  fluid: fluid,
74433
74435
  variant: "contained",
74434
74436
  disableRipple: true,
74437
+ type: submit ? 'submit' : 'button',
74435
74438
  ref: forwardedRef
74436
74439
  }, props), text);
74437
74440
  };
@@ -74444,6 +74447,7 @@ CustomButtonComponent.propTypes = {
74444
74447
  })]),
74445
74448
  onClick: propTypesExports.func,
74446
74449
  size: propTypesExports.string,
74450
+ submit: propTypesExports.bool,
74447
74451
  type: propTypesExports.string,
74448
74452
  text: propTypesExports.string
74449
74453
  };
@@ -99429,6 +99433,11 @@ var StyledScrollableDescription = styled$1(Box$1)(function (_ref3) {
99429
99433
  overflowY: 'auto',
99430
99434
  fontFamily: ['"Barlow", sans-serif'],
99431
99435
  fontWeight: theme.fontWeight.medium,
99436
+ '&.not-string': {
99437
+ marginLeft: 'auto',
99438
+ marginRight: 'auto',
99439
+ width: '100%'
99440
+ },
99432
99441
  '@media(min-width: 480px)': {
99433
99442
  marginBottom: '40px'
99434
99443
  },
@@ -99541,6 +99550,7 @@ var CustomModal = function CustomModal(_ref7) {
99541
99550
  var isScrollableTextModal = type === 'text-scroll';
99542
99551
  var isHeadingTypeRow = headingType === 'row';
99543
99552
  var isActionButtonHidden = actionButtonLabel === '' || actionButtonLabel === undefined;
99553
+ var isDescriptionString = typeof description === 'string';
99544
99554
  return /*#__PURE__*/React__namespace.createElement(StyledModalContainer, {
99545
99555
  ref: forwardedRef,
99546
99556
  className: !isModalOpen ? 'hidden' : ''
@@ -99575,7 +99585,9 @@ var CustomModal = function CustomModal(_ref7) {
99575
99585
  text: closeButtonLabel,
99576
99586
  color: "navy-blue",
99577
99587
  size: 'small'
99578
- })), isScrollableTextModal && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(StyledScrollableDescription, null, description), /*#__PURE__*/React__namespace.createElement(StyledButtonsWrapper, null, !isActionButtonHidden && /*#__PURE__*/React__namespace.createElement(CustomButtonComponent, {
99588
+ })), isScrollableTextModal && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(StyledScrollableDescription, {
99589
+ className: !isDescriptionString ? 'not-string' : ''
99590
+ }, description), /*#__PURE__*/React__namespace.createElement(StyledButtonsWrapper, null, !isActionButtonHidden && /*#__PURE__*/React__namespace.createElement(CustomButtonComponent, {
99579
99591
  fluid: true,
99580
99592
  onClick: handleActionButton,
99581
99593
  type: "secondary",
@@ -99733,8 +99745,19 @@ var StyledLabelAndIconWrapper = styled$1(Box$1)(function () {
99733
99745
  display: 'flex',
99734
99746
  flexDirection: 'row',
99735
99747
  justifyContent: 'space-between',
99736
- alignItems: 'baseline',
99737
- paddingRight: '10px'
99748
+ alignItems: 'flex-start',
99749
+ '.scan-icon': {
99750
+ marginTop: '4px',
99751
+ '@media(min-width: 480px)': {
99752
+ marginTop: '8px'
99753
+ },
99754
+ '@media(min-width: 720px)': {
99755
+ marginTop: '15px'
99756
+ },
99757
+ '@media(min-width: 1024px)': {
99758
+ marginTop: '4px'
99759
+ }
99760
+ }
99738
99761
  };
99739
99762
  });
99740
99763
  var StyledStepper = styled$1(function (props) {
@@ -99807,13 +99830,17 @@ var CustomStepper = function CustomStepper(_ref4) {
99807
99830
  sx: {
99808
99831
  width: '100%'
99809
99832
  }
99810
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), typeof scan === 'boolean' && (scan ? /*#__PURE__*/React.createElement(Icon, {
99833
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), typeof scan === 'boolean' && (scan ? /*#__PURE__*/React.createElement("div", {
99834
+ className: "scan-icon"
99835
+ }, /*#__PURE__*/React.createElement(Icon, {
99811
99836
  iconName: 'icon_wf_scan',
99812
99837
  size: 'responsive'
99813
- }) : /*#__PURE__*/React.createElement(Icon, {
99838
+ })) : /*#__PURE__*/React.createElement("div", {
99839
+ className: "scan-icon"
99840
+ }, /*#__PURE__*/React.createElement(Icon, {
99814
99841
  iconName: 'icon_wf_no_scan',
99815
99842
  size: 'responsive'
99816
- })))), /*#__PURE__*/React.createElement(StyledStepper, {
99843
+ }))))), /*#__PURE__*/React.createElement(StyledStepper, {
99817
99844
  activeStep: currentStepIndex,
99818
99845
  numberOfSteps: steps.length
99819
99846
  }, steps.map(function (step, index) {
package/dist/index.esm.js CHANGED
@@ -74151,7 +74151,7 @@ AppTileComponent.propTypes = {
74151
74151
  onClick: propTypesExports.func
74152
74152
  };
74153
74153
 
74154
- var _excluded$d = ["type", "text", "size", "fluid", "color", "onClick", "disabled", "forwardedRef"];
74154
+ var _excluded$d = ["type", "text", "size", "fluid", "color", "onClick", "disabled", "submit", "forwardedRef"];
74155
74155
  var CustomButton = styled$1(Button$2, {
74156
74156
  shouldForwardProp: function shouldForwardProp(prop) {
74157
74157
  return prop !== 'fluid';
@@ -74402,6 +74402,8 @@ var CustomButtonComponent = function CustomButtonComponent(_ref2) {
74402
74402
  onClick = _ref2$onClick === void 0 ? function () {} : _ref2$onClick,
74403
74403
  _ref2$disabled = _ref2.disabled,
74404
74404
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
74405
+ _ref2$submit = _ref2.submit,
74406
+ submit = _ref2$submit === void 0 ? false : _ref2$submit,
74405
74407
  forwardedRef = _ref2.forwardedRef,
74406
74408
  props = _objectWithoutProperties$1(_ref2, _excluded$d);
74407
74409
  var className = "".concat(type, " ").concat(disabled ? 'grey' : color, " ").concat(size);
@@ -74412,6 +74414,7 @@ var CustomButtonComponent = function CustomButtonComponent(_ref2) {
74412
74414
  fluid: fluid,
74413
74415
  variant: "contained",
74414
74416
  disableRipple: true,
74417
+ type: submit ? 'submit' : 'button',
74415
74418
  ref: forwardedRef
74416
74419
  }, props), text);
74417
74420
  };
@@ -74424,6 +74427,7 @@ CustomButtonComponent.propTypes = {
74424
74427
  })]),
74425
74428
  onClick: propTypesExports.func,
74426
74429
  size: propTypesExports.string,
74430
+ submit: propTypesExports.bool,
74427
74431
  type: propTypesExports.string,
74428
74432
  text: propTypesExports.string
74429
74433
  };
@@ -99409,6 +99413,11 @@ var StyledScrollableDescription = styled$1(Box$1)(function (_ref3) {
99409
99413
  overflowY: 'auto',
99410
99414
  fontFamily: ['"Barlow", sans-serif'],
99411
99415
  fontWeight: theme.fontWeight.medium,
99416
+ '&.not-string': {
99417
+ marginLeft: 'auto',
99418
+ marginRight: 'auto',
99419
+ width: '100%'
99420
+ },
99412
99421
  '@media(min-width: 480px)': {
99413
99422
  marginBottom: '40px'
99414
99423
  },
@@ -99521,6 +99530,7 @@ var CustomModal = function CustomModal(_ref7) {
99521
99530
  var isScrollableTextModal = type === 'text-scroll';
99522
99531
  var isHeadingTypeRow = headingType === 'row';
99523
99532
  var isActionButtonHidden = actionButtonLabel === '' || actionButtonLabel === undefined;
99533
+ var isDescriptionString = typeof description === 'string';
99524
99534
  return /*#__PURE__*/React.createElement(StyledModalContainer, {
99525
99535
  ref: forwardedRef,
99526
99536
  className: !isModalOpen ? 'hidden' : ''
@@ -99555,7 +99565,9 @@ var CustomModal = function CustomModal(_ref7) {
99555
99565
  text: closeButtonLabel,
99556
99566
  color: "navy-blue",
99557
99567
  size: 'small'
99558
- })), isScrollableTextModal && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledScrollableDescription, null, description), /*#__PURE__*/React.createElement(StyledButtonsWrapper, null, !isActionButtonHidden && /*#__PURE__*/React.createElement(CustomButtonComponent, {
99568
+ })), isScrollableTextModal && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledScrollableDescription, {
99569
+ className: !isDescriptionString ? 'not-string' : ''
99570
+ }, description), /*#__PURE__*/React.createElement(StyledButtonsWrapper, null, !isActionButtonHidden && /*#__PURE__*/React.createElement(CustomButtonComponent, {
99559
99571
  fluid: true,
99560
99572
  onClick: handleActionButton,
99561
99573
  type: "secondary",
@@ -99713,8 +99725,19 @@ var StyledLabelAndIconWrapper = styled$1(Box$1)(function () {
99713
99725
  display: 'flex',
99714
99726
  flexDirection: 'row',
99715
99727
  justifyContent: 'space-between',
99716
- alignItems: 'baseline',
99717
- paddingRight: '10px'
99728
+ alignItems: 'flex-start',
99729
+ '.scan-icon': {
99730
+ marginTop: '4px',
99731
+ '@media(min-width: 480px)': {
99732
+ marginTop: '8px'
99733
+ },
99734
+ '@media(min-width: 720px)': {
99735
+ marginTop: '15px'
99736
+ },
99737
+ '@media(min-width: 1024px)': {
99738
+ marginTop: '4px'
99739
+ }
99740
+ }
99718
99741
  };
99719
99742
  });
99720
99743
  var StyledStepper = styled$1(function (props) {
@@ -99787,13 +99810,17 @@ var CustomStepper = function CustomStepper(_ref4) {
99787
99810
  sx: {
99788
99811
  width: '100%'
99789
99812
  }
99790
- }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), typeof scan === 'boolean' && (scan ? /*#__PURE__*/React__default.createElement(Icon, {
99813
+ }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), typeof scan === 'boolean' && (scan ? /*#__PURE__*/React__default.createElement("div", {
99814
+ className: "scan-icon"
99815
+ }, /*#__PURE__*/React__default.createElement(Icon, {
99791
99816
  iconName: 'icon_wf_scan',
99792
99817
  size: 'responsive'
99793
- }) : /*#__PURE__*/React__default.createElement(Icon, {
99818
+ })) : /*#__PURE__*/React__default.createElement("div", {
99819
+ className: "scan-icon"
99820
+ }, /*#__PURE__*/React__default.createElement(Icon, {
99794
99821
  iconName: 'icon_wf_no_scan',
99795
99822
  size: 'responsive'
99796
- })))), /*#__PURE__*/React__default.createElement(StyledStepper, {
99823
+ }))))), /*#__PURE__*/React__default.createElement(StyledStepper, {
99797
99824
  activeStep: currentStepIndex,
99798
99825
  numberOfSteps: steps.length
99799
99826
  }, steps.map(function (step, index) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xelto.npm/xc2-lib",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "author": "XELTO",
5
5
  "description": "React component library based on MUI",
6
6
  "license": "ISC",