@xaypay/tui 0.0.95 → 0.0.96

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
@@ -455,13 +455,14 @@ const Modal = ({
455
455
  headerSize,
456
456
  imageHeight,
457
457
  headerColor,
458
+ borderStyle,
459
+ borderWidth,
458
460
  outsideClose,
459
461
  headerWeight,
460
462
  headerHeight,
461
463
  justifyContent,
462
464
  backgroundColor,
463
- layerBackgroundColor,
464
- borderWidth
465
+ layerBackgroundColor
465
466
  }) => {
466
467
  const [select, setSelect] = useState(0);
467
468
  const [innerData, setInnerData] = useState([]);
@@ -546,7 +547,7 @@ const Modal = ({
546
547
  height: height ? height : configStyles.MODAL.height,
547
548
  position: 'relative',
548
549
  display: 'grid',
549
- overflow: 'auto',
550
+ overflow: 'hidden',
550
551
  boxSizing: 'border-box',
551
552
  gridTemplateRows: 'auto 10fr',
552
553
  borderRadius: radius ? radius : configStyles.MODAL.radius,
@@ -608,7 +609,9 @@ const Modal = ({
608
609
  alignItems: 'center',
609
610
  boxSizing: 'border-box',
610
611
  justifyContent: 'center',
611
- borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth
612
+ overflow: 'auto',
613
+ borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
614
+ borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle
612
615
  }
613
616
  }, type === 'content' ? children ? children : '' : /*#__PURE__*/React__default.createElement("div", {
614
617
  style: {
@@ -683,6 +686,8 @@ Modal.propTypes = {
683
686
  imageWidth: PropTypes.string,
684
687
  headerSize: PropTypes.string,
685
688
  outsideClose: PropTypes.bool,
689
+ borderStyle: PropTypes.string,
690
+ borderWidth: PropTypes.string,
686
691
  headerColor: PropTypes.string,
687
692
  imageHeight: PropTypes.string,
688
693
  headerWeight: PropTypes.string,
@@ -790,7 +795,7 @@ const Input = ({
790
795
  const handleChange = event => {
791
796
  const currentValue = event.target.value;
792
797
  let prevValue = innerValue;
793
- setInnerValue(currentValue);
798
+ setInnerValue(() => currentValue);
794
799
  if (change) {
795
800
  change(currentValue);
796
801
  }
@@ -818,9 +823,10 @@ const Input = ({
818
823
  if (type === 'number') {
819
824
  const regNum = /^\d+(\.)?(\d+)?$/;
820
825
  if (!regNum.test(currentValue)) {
821
- setInnerValue(prevValue);
826
+ const newStr = currentValue.replace(/[^\d+]/g, '');
827
+ setInnerValue(newStr);
822
828
  if (change) {
823
- change(prevValue);
829
+ change(newStr);
824
830
  }
825
831
  }
826
832
  if (minNumSize && currentValue < minNumSize) {
@@ -913,9 +919,10 @@ const Input = ({
913
919
  if (type === 'number') {
914
920
  const regNum = /^\d+(\.)?(\d+)?$/;
915
921
  if (!regNum.test(value)) {
916
- setInnerValue('');
922
+ const newStr = value.replace(/[^\d+]/g, '');
923
+ setInnerValue(newStr);
917
924
  if (change) {
918
- change('');
925
+ change(newStr);
919
926
  }
920
927
  }
921
928
  if (minNumSize && value < minNumSize) {
package/dist/index.js CHANGED
@@ -485,13 +485,14 @@ const Modal = ({
485
485
  headerSize,
486
486
  imageHeight,
487
487
  headerColor,
488
+ borderStyle,
489
+ borderWidth,
488
490
  outsideClose,
489
491
  headerWeight,
490
492
  headerHeight,
491
493
  justifyContent,
492
494
  backgroundColor,
493
- layerBackgroundColor,
494
- borderWidth
495
+ layerBackgroundColor
495
496
  }) => {
496
497
  const [select, setSelect] = React.useState(0);
497
498
  const [innerData, setInnerData] = React.useState([]);
@@ -576,7 +577,7 @@ const Modal = ({
576
577
  height: height ? height : configStyles.MODAL.height,
577
578
  position: 'relative',
578
579
  display: 'grid',
579
- overflow: 'auto',
580
+ overflow: 'hidden',
580
581
  boxSizing: 'border-box',
581
582
  gridTemplateRows: 'auto 10fr',
582
583
  borderRadius: radius ? radius : configStyles.MODAL.radius,
@@ -638,7 +639,9 @@ const Modal = ({
638
639
  alignItems: 'center',
639
640
  boxSizing: 'border-box',
640
641
  justifyContent: 'center',
641
- borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth
642
+ overflow: 'auto',
643
+ borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
644
+ borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle
642
645
  }
643
646
  }, type === 'content' ? children ? children : '' : /*#__PURE__*/React__default["default"].createElement("div", {
644
647
  style: {
@@ -713,6 +716,8 @@ Modal.propTypes = {
713
716
  imageWidth: PropTypes__default["default"].string,
714
717
  headerSize: PropTypes__default["default"].string,
715
718
  outsideClose: PropTypes__default["default"].bool,
719
+ borderStyle: PropTypes__default["default"].string,
720
+ borderWidth: PropTypes__default["default"].string,
716
721
  headerColor: PropTypes__default["default"].string,
717
722
  imageHeight: PropTypes__default["default"].string,
718
723
  headerWeight: PropTypes__default["default"].string,
@@ -820,7 +825,7 @@ const Input = ({
820
825
  const handleChange = event => {
821
826
  const currentValue = event.target.value;
822
827
  let prevValue = innerValue;
823
- setInnerValue(currentValue);
828
+ setInnerValue(() => currentValue);
824
829
  if (change) {
825
830
  change(currentValue);
826
831
  }
@@ -848,9 +853,10 @@ const Input = ({
848
853
  if (type === 'number') {
849
854
  const regNum = /^\d+(\.)?(\d+)?$/;
850
855
  if (!regNum.test(currentValue)) {
851
- setInnerValue(prevValue);
856
+ const newStr = currentValue.replace(/[^\d+]/g, '');
857
+ setInnerValue(newStr);
852
858
  if (change) {
853
- change(prevValue);
859
+ change(newStr);
854
860
  }
855
861
  }
856
862
  if (minNumSize && currentValue < minNumSize) {
@@ -943,9 +949,10 @@ const Input = ({
943
949
  if (type === 'number') {
944
950
  const regNum = /^\d+(\.)?(\d+)?$/;
945
951
  if (!regNum.test(value)) {
946
- setInnerValue('');
952
+ const newStr = value.replace(/[^\d+]/g, '');
953
+ setInnerValue(newStr);
947
954
  if (change) {
948
- change('');
955
+ change(newStr);
949
956
  }
950
957
  }
951
958
  if (minNumSize && value < minNumSize) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.0.95",
3
+ "version": "0.0.96",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -108,7 +108,7 @@ export const Input = ({
108
108
 
109
109
  let prevValue = innerValue;
110
110
 
111
- setInnerValue(currentValue);
111
+ setInnerValue(() => currentValue);
112
112
  if (change) {
113
113
  change(currentValue);
114
114
  }
@@ -138,9 +138,10 @@ export const Input = ({
138
138
  if (type === 'number') {
139
139
  const regNum = /^\d+(\.)?(\d+)?$/;
140
140
  if (!regNum.test(currentValue)) {
141
- setInnerValue(prevValue);
141
+ const newStr = currentValue.replace(/[^\d+]/g, '');
142
+ setInnerValue(newStr);
142
143
  if (change) {
143
- change(prevValue);
144
+ change(newStr);
144
145
  }
145
146
  }
146
147
  if (minNumSize && currentValue < minNumSize) {
@@ -243,9 +244,10 @@ export const Input = ({
243
244
  if (type === 'number') {
244
245
  const regNum = /^\d+(\.)?(\d+)?$/;
245
246
  if (!regNum.test(value)) {
246
- setInnerValue('');
247
+ const newStr = value.replace(/[^\d+]/g, '');
248
+ setInnerValue(newStr);
247
249
  if (change) {
248
- change('');
250
+ change(newStr);
249
251
  }
250
252
  }
251
253
  if (minNumSize && value < minNumSize) {
@@ -31,13 +31,14 @@ export const Modal = ({
31
31
  headerSize,
32
32
  imageHeight,
33
33
  headerColor,
34
+ borderStyle,
35
+ borderWidth,
34
36
  outsideClose,
35
37
  headerWeight,
36
38
  headerHeight,
37
39
  justifyContent,
38
40
  backgroundColor,
39
41
  layerBackgroundColor,
40
- borderWidth,
41
42
  }) => {
42
43
  const [select, setSelect] = useState(0);
43
44
  const [innerData, setInnerData] = useState([]);
@@ -133,7 +134,7 @@ export const Modal = ({
133
134
  height: height ? height : configStyles.MODAL.height,
134
135
  position: 'relative',
135
136
  display: 'grid',
136
- overflow: 'auto',
137
+ overflow: 'hidden',
137
138
  boxSizing: 'border-box',
138
139
  gridTemplateRows: 'auto 10fr',
139
140
  borderRadius: radius ? radius : configStyles.MODAL.radius,
@@ -213,7 +214,9 @@ export const Modal = ({
213
214
  alignItems: 'center',
214
215
  boxSizing: 'border-box',
215
216
  justifyContent: 'center',
216
- borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth
217
+ overflow: 'auto',
218
+ borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
219
+ borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle
217
220
  }}
218
221
  >
219
222
  {
@@ -319,6 +322,8 @@ Modal.propTypes = {
319
322
  imageWidth: PropTypes.string,
320
323
  headerSize: PropTypes.string,
321
324
  outsideClose: PropTypes.bool,
325
+ borderStyle: PropTypes.string,
326
+ borderWidth: PropTypes.string,
322
327
  headerColor: PropTypes.string,
323
328
  imageHeight: PropTypes.string,
324
329
  headerWeight: PropTypes.string,
@@ -599,5 +599,7 @@ import StackAlt from './assets/stackalt.svg';
599
599
  backgroundColor: 'white', // for modal background color
600
600
  padding: '10px 20px 20px', // for modal padding
601
601
  layerBackgroundColor: 'rgba(0,0,0,0.4)', // for modal parent layer background color
602
+ borderWidth: '20px', // for modal padding from border transparent
603
+ borderStyle: 'solid', // for modal border style
602
604
  }
603
- ```
605
+ ```
package/tui.config.js CHANGED
@@ -395,7 +395,8 @@ module.exports = {
395
395
  backgroundColor: 'white', // for modal background color
396
396
  padding: '20px 20px 20px', // for modal padding
397
397
  layerBackgroundColor: 'rgba(0,0,0,0.4)', // for modal parent layer background color
398
- borderWidth: '20px solid transparent', // for modal padding from border transparent
398
+ borderWidth: '20px', // for modal padding from border transparent
399
+ borderStyle: 'solid', // for modal border style
399
400
  },
400
401
  // default properties for <Table /> component
401
402
  TABLE: {