@xaypay/tui 0.0.122 → 0.0.123

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.es.js CHANGED
@@ -2492,13 +2492,14 @@ const Modal = ({
2492
2492
  outsideClose,
2493
2493
  headerWeight,
2494
2494
  headerHeight,
2495
- imageMaxWidth,
2495
+ // imageMaxWidth,
2496
2496
  justifyContent,
2497
- imageWrapWidth,
2497
+ // imageWrapWidth,
2498
2498
  backgroundColor,
2499
2499
  imageWrapHeight,
2500
2500
  grayDecorHeight,
2501
- layerBackgroundColor
2501
+ layerBackgroundColor,
2502
+ closeAreaBackgroundColor
2502
2503
  }) => {
2503
2504
  const [select, setSelect] = useState(0);
2504
2505
  const [isHover, setIsHover] = useState(false);
@@ -2668,7 +2669,7 @@ const Modal = ({
2668
2669
  borderTopLeftRadius: '6px',
2669
2670
  borderTopRightRadius: '6px',
2670
2671
  height: grayDecorHeight ? grayDecorHeight : configStyles.MODAL.grayDecorHeight,
2671
- backgroundImage: 'linear-gradient(rgb(60, 57, 62), rgba(60, 57, 62, 0))'
2672
+ background: closeAreaBackgroundColor ? closeAreaBackgroundColor : configStyles.MODAL.closeAreaBackgroundColor
2672
2673
  }
2673
2674
  }, /*#__PURE__*/React__default.createElement("button", {
2674
2675
  onClick: handleCloseModal,
@@ -2687,7 +2688,6 @@ const Modal = ({
2687
2688
  }
2688
2689
  }, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
2689
2690
  style: {
2690
- width: imageWrapWidth ? imageWrapWidth : configStyles.MODAL.imageWrapWidth,
2691
2691
  height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
2692
2692
  }
2693
2693
  }, innerData && innerData.length > 0 && innerData.map((item, index) => {
@@ -2700,13 +2700,12 @@ const Modal = ({
2700
2700
  }, /*#__PURE__*/React__default.createElement("img", {
2701
2701
  style: {
2702
2702
  display: 'block',
2703
- objectFit: 'cover',
2704
- objectPosition: 'center',
2703
+ objectFit: 'contain',
2705
2704
  margin: imageMargin ? imageMargin : configStyles.MODAL.imageMargin,
2706
2705
  borderRadius: radius ? radius : configStyles.MODAL.radius,
2707
2706
  width: imageWidth ? imageWidth : configStyles.MODAL.imageWidth,
2708
- height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight,
2709
- maxWidth: imageMaxWidth ? imageMaxWidth : configStyles.MODAL.imageMaxWidth
2707
+ height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight
2708
+ // maxWidth: '100%'
2710
2709
  },
2711
2710
  src: item.url
2712
2711
  }), isHover && showZoomIcon ? /*#__PURE__*/React__default.createElement("div", {
@@ -2794,7 +2793,8 @@ Modal.propTypes = {
2794
2793
  backgroundColor: PropTypes.string,
2795
2794
  grayDecorHeight: PropTypes.string,
2796
2795
  imageWrapHeight: PropTypes.string,
2797
- layerBackgroundColor: PropTypes.string
2796
+ layerBackgroundColor: PropTypes.string,
2797
+ closeAreaBackgroundColor: PropTypes.string
2798
2798
  };
2799
2799
  Modal.defaultProps = {
2800
2800
  type: 'content'
@@ -3011,7 +3011,7 @@ const Input = ({
3011
3011
  }
3012
3012
  if (minNumSize && minNumSize < 0) {
3013
3013
  setInnerMinNumSize(0);
3014
- alert('minNumSize prop can\'t be less then 0');
3014
+ alert("minNumSize prop can't be less then 0");
3015
3015
  } else if (minNumSize && minNumSize >= 0) {
3016
3016
  setInnerMinNumSize(minNumSize);
3017
3017
  }
@@ -3034,9 +3034,9 @@ const Input = ({
3034
3034
  if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
3035
3035
  !regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
3036
3036
  }
3037
- setInnerValue(() => newValue);
3038
3037
  }
3039
3038
  }
3039
+ setInnerValue(() => newValue);
3040
3040
  }, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage, telErrorMessage]);
3041
3041
  return /*#__PURE__*/React__default.createElement("div", {
3042
3042
  className: classProps
package/dist/index.js CHANGED
@@ -2522,13 +2522,14 @@ const Modal = ({
2522
2522
  outsideClose,
2523
2523
  headerWeight,
2524
2524
  headerHeight,
2525
- imageMaxWidth,
2525
+ // imageMaxWidth,
2526
2526
  justifyContent,
2527
- imageWrapWidth,
2527
+ // imageWrapWidth,
2528
2528
  backgroundColor,
2529
2529
  imageWrapHeight,
2530
2530
  grayDecorHeight,
2531
- layerBackgroundColor
2531
+ layerBackgroundColor,
2532
+ closeAreaBackgroundColor
2532
2533
  }) => {
2533
2534
  const [select, setSelect] = React.useState(0);
2534
2535
  const [isHover, setIsHover] = React.useState(false);
@@ -2698,7 +2699,7 @@ const Modal = ({
2698
2699
  borderTopLeftRadius: '6px',
2699
2700
  borderTopRightRadius: '6px',
2700
2701
  height: grayDecorHeight ? grayDecorHeight : configStyles.MODAL.grayDecorHeight,
2701
- backgroundImage: 'linear-gradient(rgb(60, 57, 62), rgba(60, 57, 62, 0))'
2702
+ background: closeAreaBackgroundColor ? closeAreaBackgroundColor : configStyles.MODAL.closeAreaBackgroundColor
2702
2703
  }
2703
2704
  }, /*#__PURE__*/React__default["default"].createElement("button", {
2704
2705
  onClick: handleCloseModal,
@@ -2717,7 +2718,6 @@ const Modal = ({
2717
2718
  }
2718
2719
  }, /*#__PURE__*/React__default["default"].createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default["default"].createElement("div", {
2719
2720
  style: {
2720
- width: imageWrapWidth ? imageWrapWidth : configStyles.MODAL.imageWrapWidth,
2721
2721
  height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
2722
2722
  }
2723
2723
  }, innerData && innerData.length > 0 && innerData.map((item, index) => {
@@ -2730,13 +2730,12 @@ const Modal = ({
2730
2730
  }, /*#__PURE__*/React__default["default"].createElement("img", {
2731
2731
  style: {
2732
2732
  display: 'block',
2733
- objectFit: 'cover',
2734
- objectPosition: 'center',
2733
+ objectFit: 'contain',
2735
2734
  margin: imageMargin ? imageMargin : configStyles.MODAL.imageMargin,
2736
2735
  borderRadius: radius ? radius : configStyles.MODAL.radius,
2737
2736
  width: imageWidth ? imageWidth : configStyles.MODAL.imageWidth,
2738
- height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight,
2739
- maxWidth: imageMaxWidth ? imageMaxWidth : configStyles.MODAL.imageMaxWidth
2737
+ height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight
2738
+ // maxWidth: '100%'
2740
2739
  },
2741
2740
  src: item.url
2742
2741
  }), isHover && showZoomIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2824,7 +2823,8 @@ Modal.propTypes = {
2824
2823
  backgroundColor: PropTypes__default["default"].string,
2825
2824
  grayDecorHeight: PropTypes__default["default"].string,
2826
2825
  imageWrapHeight: PropTypes__default["default"].string,
2827
- layerBackgroundColor: PropTypes__default["default"].string
2826
+ layerBackgroundColor: PropTypes__default["default"].string,
2827
+ closeAreaBackgroundColor: PropTypes__default["default"].string
2828
2828
  };
2829
2829
  Modal.defaultProps = {
2830
2830
  type: 'content'
@@ -3041,7 +3041,7 @@ const Input = ({
3041
3041
  }
3042
3042
  if (minNumSize && minNumSize < 0) {
3043
3043
  setInnerMinNumSize(0);
3044
- alert('minNumSize prop can\'t be less then 0');
3044
+ alert("minNumSize prop can't be less then 0");
3045
3045
  } else if (minNumSize && minNumSize >= 0) {
3046
3046
  setInnerMinNumSize(minNumSize);
3047
3047
  }
@@ -3064,9 +3064,9 @@ const Input = ({
3064
3064
  if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
3065
3065
  !regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
3066
3066
  }
3067
- setInnerValue(() => newValue);
3068
3067
  }
3069
3068
  }
3069
+ setInnerValue(() => newValue);
3070
3070
  }, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage, telErrorMessage]);
3071
3071
  return /*#__PURE__*/React__default["default"].createElement("div", {
3072
3072
  className: classProps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.0.122",
3
+ "version": "0.0.123",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
package/tui.config.js CHANGED
@@ -413,8 +413,8 @@ module.exports = {
413
413
  imageWidth: '', // for modal image width on images mode
414
414
  headerHeight: '30px', // for modal header height
415
415
  grayDecorHeight: '80px', // for modal top decoration when show slider
416
- width: 'fit-content', // for modal width
417
- height: 'fit-content', // for modal width
416
+ width: '', // for modal width
417
+ height: '', // for modal width
418
418
  headerColor: '#00236a', // for modal header color
419
419
  backgroundColor: 'white', // for modal background color
420
420
  padding: '20px 20px 20px', // for modal padding
@@ -424,8 +424,9 @@ module.exports = {
424
424
  borderColor: 'transparent', // for modal border color
425
425
  imageMargin: '0px', // for image margin
426
426
  imageMaxWidth: '100%', // for image max width
427
- imageWrapHeight: '80vh', // for image wrap
427
+ imageWrapHeight: '100%', // for image wrap
428
428
  imageWrapWidth: '100%', // for image wrap
429
+ closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
429
430
  },
430
431
  // default properties for <Checkbox /> component
431
432
  CHECKBOX: {