@xaypay/tui 0.2.18 → 0.2.20

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
@@ -597,6 +597,7 @@ var packageResult = {
597
597
  }
598
598
  },
599
599
  tel: {
600
+ className: 'tel-code',
600
601
  display: 'flex',
601
602
  alignItems: 'center',
602
603
  justifyContent: 'center',
@@ -1679,6 +1680,37 @@ const SvgDeleteComponent = ({
1679
1680
  fill: fillColor ? fillColor : '#E00'
1680
1681
  }));
1681
1682
 
1683
+ function styleInject(css, ref) {
1684
+ if ( ref === void 0 ) ref = {};
1685
+ var insertAt = ref.insertAt;
1686
+
1687
+ if (!css || typeof document === 'undefined') { return; }
1688
+
1689
+ var head = document.head || document.getElementsByTagName('head')[0];
1690
+ var style = document.createElement('style');
1691
+ style.type = 'text/css';
1692
+
1693
+ if (insertAt === 'top') {
1694
+ if (head.firstChild) {
1695
+ head.insertBefore(style, head.firstChild);
1696
+ } else {
1697
+ head.appendChild(style);
1698
+ }
1699
+ } else {
1700
+ head.appendChild(style);
1701
+ }
1702
+
1703
+ if (style.styleSheet) {
1704
+ style.styleSheet.cssText = css;
1705
+ } else {
1706
+ style.appendChild(document.createTextNode(css));
1707
+ }
1708
+ }
1709
+
1710
+ var css_248z$d = ".file-module_small-file-component__nlpcW>svg{max-height:77%!important}";
1711
+ var styles$b = {"small-file-component":"file-module_small-file-component__nlpcW"};
1712
+ styleInject(css_248z$d);
1713
+
1682
1714
  // eslint-disable-next-line react/display-name
1683
1715
  const File = /*#__PURE__*/forwardRef(({
1684
1716
  or,
@@ -1774,6 +1806,7 @@ const File = /*#__PURE__*/forwardRef(({
1774
1806
  listItemBackgroundColor,
1775
1807
  listItemBackgroundErrorColor,
1776
1808
  maxCHoosenLengthErrorHideTime,
1809
+ showPreviewIconInSmallComponent,
1777
1810
  maxSize = 10,
1778
1811
  preview = true,
1779
1812
  timeForRemoveError = 5000,
@@ -2216,6 +2249,7 @@ const File = /*#__PURE__*/forwardRef(({
2216
2249
  padding: '0px 10px'
2217
2250
  }
2218
2251
  }, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2252
+ className: styles$b['small-file-component'],
2219
2253
  style: {
2220
2254
  width: '100%',
2221
2255
  padding: '5px',
@@ -2224,7 +2258,20 @@ const File = /*#__PURE__*/forwardRef(({
2224
2258
  boxSizing: 'border-box',
2225
2259
  justifyContent: 'space-between'
2226
2260
  }
2227
- }, /*#__PURE__*/React__default.createElement(Button, {
2261
+ }, showPreviewIconInSmallComponent ? !image ? /*#__PURE__*/React__default.createElement(Button, {
2262
+ contentWidth: true,
2263
+ onClick: _ => _,
2264
+ font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
2265
+ size: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
2266
+ style: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
2267
+ weight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
2268
+ label: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
2269
+ color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
2270
+ height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
2271
+ hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
2272
+ backgroundColor: uploadBtnBackgroundColor ?? configStyles.FILE.uploadBtn.colors.background,
2273
+ backgroundHoverColor: uploadBtnBackgroundColorHover ?? configStyles.FILE.uploadBtn.colors.backgroundHover
2274
+ }) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default.createElement(Button, {
2228
2275
  contentWidth: true,
2229
2276
  onClick: _ => _,
2230
2277
  font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
@@ -2414,6 +2461,7 @@ File.propTypes = {
2414
2461
  listItemBackgroundErrorColor: PropTypes.string,
2415
2462
  maxCHoosenLengthErrorHideTime: PropTypes.number,
2416
2463
  filesArray: PropTypes.arrayOf(PropTypes.object),
2464
+ showPreviewIconInSmallComponent: PropTypes.bool,
2417
2465
  fileExtensions: PropTypes.arrayOf(PropTypes.string)
2418
2466
  };
2419
2467
 
@@ -2678,33 +2726,6 @@ const handleRemoveLeadingZeros = str => {
2678
2726
  return str.replace(/^0+(\d)/, '$1');
2679
2727
  };
2680
2728
 
2681
- function styleInject(css, ref) {
2682
- if ( ref === void 0 ) ref = {};
2683
- var insertAt = ref.insertAt;
2684
-
2685
- if (!css || typeof document === 'undefined') { return; }
2686
-
2687
- var head = document.head || document.getElementsByTagName('head')[0];
2688
- var style = document.createElement('style');
2689
- style.type = 'text/css';
2690
-
2691
- if (insertAt === 'top') {
2692
- if (head.firstChild) {
2693
- head.insertBefore(style, head.firstChild);
2694
- } else {
2695
- head.appendChild(style);
2696
- }
2697
- } else {
2698
- head.appendChild(style);
2699
- }
2700
-
2701
- if (style.styleSheet) {
2702
- style.styleSheet.cssText = css;
2703
- } else {
2704
- style.appendChild(document.createTextNode(css));
2705
- }
2706
- }
2707
-
2708
2729
  var css_248z$c = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}.table-module_no-tabel-data__6xp3N{align-items:center;display:flex;height:200px;justify-content:center;width:100%}";
2709
2730
  var styles$a = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO","no-tabel-data":"table-module_no-tabel-data__6xp3N"};
2710
2731
  styleInject(css_248z$c);
@@ -4542,6 +4563,7 @@ const TelInput = ({
4542
4563
  radius,
4543
4564
  isHover,
4544
4565
  disabled,
4566
+ telClass,
4545
4567
  inpStyles,
4546
4568
  errorColor,
4547
4569
  inputChange,
@@ -4573,6 +4595,7 @@ const TelInput = ({
4573
4595
  setInnerValue(() => newValue);
4574
4596
  }, [value]);
4575
4597
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
4598
+ className: telClass,
4576
4599
  style: {
4577
4600
  ...inpStyles,
4578
4601
  width: 'auto',
@@ -4741,7 +4764,12 @@ const NumberInput = ({
4741
4764
  let prevValue = innerValue;
4742
4765
  let currentValue = event.target.value.replace(/\.|․|\.|,/g, '.');
4743
4766
  currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
4744
- setInnerValue(() => cardNumber ? currentValue.replace(/(\d{4})(?=\d)/g, '$1-') : currentValue);
4767
+ if (cardNumber) {
4768
+ let digits = currentValue.replace(/\D/g, '');
4769
+ setInnerValue(() => digits.replace(/(\d{4})(?=\d)/g, '$1-'));
4770
+ } else {
4771
+ setInnerValue(() => currentValue);
4772
+ }
4745
4773
  if (inputChange && currentValue !== prevValue) {
4746
4774
  if (currentValue < Number.MIN_SAFE_INTEGER || currentValue > Number.MAX_SAFE_INTEGER) {
4747
4775
  if (!cardNumber) {
@@ -4814,11 +4842,16 @@ const NumberInput = ({
4814
4842
  if (value !== undefined && value !== null) {
4815
4843
  newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
4816
4844
  }
4817
- setInnerValue(() => cardNumber ? newValue.replace(/(\d{4})(?=\d)/g, '$1-') : newValue);
4818
- // inputChange(cardNumber ? newValue.replaceAll('-', '') : newValue);
4845
+ if (cardNumber) {
4846
+ let digits = newValue.replace(/\D/g, '');
4847
+ setInnerValue(() => digits.replace(/(\d{4})(?=\d)/g, '$1-'));
4848
+ } else {
4849
+ setInnerValue(() => newValue);
4850
+ }
4819
4851
  }, [dots, value, float, cardNumber, maxNumSize, minNumSize, numberMaxLength]);
4820
4852
  return /*#__PURE__*/React__default.createElement("input", {
4821
4853
  type: "text",
4854
+ inputMode: "decimal",
4822
4855
  value: innerValue,
4823
4856
  disabled: disabled,
4824
4857
  name: inpAttributes?.iName,
@@ -4874,6 +4907,7 @@ const Input = ({
4874
4907
  family,
4875
4908
  padding,
4876
4909
  tooltip,
4910
+ telClass,
4877
4911
  leftIcon,
4878
4912
  required,
4879
4913
  disabled,
@@ -5109,6 +5143,7 @@ const Input = ({
5109
5143
  inpStyles: inpStyles,
5110
5144
  inpAttributes: inpAttributes,
5111
5145
  radius: radius ?? configStyles.INPUT.radius,
5146
+ telClass: telClass ?? configStyles.INPUT.tel.className,
5112
5147
  phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
5113
5148
  phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
5114
5149
  phoneJustifyContent: phoneJustifyContent ?? configStyles.INPUT.tel.justifyContent,
@@ -5296,6 +5331,7 @@ Input.propTypes = {
5296
5331
  regexpErrorMessage: PropTypes.string,
5297
5332
  regexp: PropTypes.instanceOf(RegExp),
5298
5333
  fireInputInsideError: PropTypes.func,
5334
+ telClass: PropTypes.string,
5299
5335
  telBorderRightWidth: PropTypes.string,
5300
5336
  telBorderRightStyle: PropTypes.string,
5301
5337
  telBorderRightColor: PropTypes.string,
package/dist/index.js CHANGED
@@ -628,6 +628,7 @@ var packageResult = {
628
628
  }
629
629
  },
630
630
  tel: {
631
+ className: 'tel-code',
631
632
  display: 'flex',
632
633
  alignItems: 'center',
633
634
  justifyContent: 'center',
@@ -1710,6 +1711,37 @@ const SvgDeleteComponent = ({
1710
1711
  fill: fillColor ? fillColor : '#E00'
1711
1712
  }));
1712
1713
 
1714
+ function styleInject(css, ref) {
1715
+ if ( ref === void 0 ) ref = {};
1716
+ var insertAt = ref.insertAt;
1717
+
1718
+ if (!css || typeof document === 'undefined') { return; }
1719
+
1720
+ var head = document.head || document.getElementsByTagName('head')[0];
1721
+ var style = document.createElement('style');
1722
+ style.type = 'text/css';
1723
+
1724
+ if (insertAt === 'top') {
1725
+ if (head.firstChild) {
1726
+ head.insertBefore(style, head.firstChild);
1727
+ } else {
1728
+ head.appendChild(style);
1729
+ }
1730
+ } else {
1731
+ head.appendChild(style);
1732
+ }
1733
+
1734
+ if (style.styleSheet) {
1735
+ style.styleSheet.cssText = css;
1736
+ } else {
1737
+ style.appendChild(document.createTextNode(css));
1738
+ }
1739
+ }
1740
+
1741
+ var css_248z$d = ".file-module_small-file-component__nlpcW>svg{max-height:77%!important}";
1742
+ var styles$b = {"small-file-component":"file-module_small-file-component__nlpcW"};
1743
+ styleInject(css_248z$d);
1744
+
1713
1745
  // eslint-disable-next-line react/display-name
1714
1746
  const File = /*#__PURE__*/React.forwardRef(({
1715
1747
  or,
@@ -1805,6 +1837,7 @@ const File = /*#__PURE__*/React.forwardRef(({
1805
1837
  listItemBackgroundColor,
1806
1838
  listItemBackgroundErrorColor,
1807
1839
  maxCHoosenLengthErrorHideTime,
1840
+ showPreviewIconInSmallComponent,
1808
1841
  maxSize = 10,
1809
1842
  preview = true,
1810
1843
  timeForRemoveError = 5000,
@@ -2247,6 +2280,7 @@ const File = /*#__PURE__*/React.forwardRef(({
2247
2280
  padding: '0px 10px'
2248
2281
  }
2249
2282
  }, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
2283
+ className: styles$b['small-file-component'],
2250
2284
  style: {
2251
2285
  width: '100%',
2252
2286
  padding: '5px',
@@ -2255,7 +2289,20 @@ const File = /*#__PURE__*/React.forwardRef(({
2255
2289
  boxSizing: 'border-box',
2256
2290
  justifyContent: 'space-between'
2257
2291
  }
2258
- }, /*#__PURE__*/React__default["default"].createElement(Button, {
2292
+ }, showPreviewIconInSmallComponent ? !image ? /*#__PURE__*/React__default["default"].createElement(Button, {
2293
+ contentWidth: true,
2294
+ onClick: _ => _,
2295
+ font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
2296
+ size: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
2297
+ style: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
2298
+ weight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
2299
+ label: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
2300
+ color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
2301
+ height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
2302
+ hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
2303
+ backgroundColor: uploadBtnBackgroundColor ?? configStyles.FILE.uploadBtn.colors.background,
2304
+ backgroundHoverColor: uploadBtnBackgroundColorHover ?? configStyles.FILE.uploadBtn.colors.backgroundHover
2305
+ }) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default["default"].createElement(Button, {
2259
2306
  contentWidth: true,
2260
2307
  onClick: _ => _,
2261
2308
  font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
@@ -2445,6 +2492,7 @@ File.propTypes = {
2445
2492
  listItemBackgroundErrorColor: PropTypes__default["default"].string,
2446
2493
  maxCHoosenLengthErrorHideTime: PropTypes__default["default"].number,
2447
2494
  filesArray: PropTypes__default["default"].arrayOf(PropTypes__default["default"].object),
2495
+ showPreviewIconInSmallComponent: PropTypes__default["default"].bool,
2448
2496
  fileExtensions: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)
2449
2497
  };
2450
2498
 
@@ -2709,33 +2757,6 @@ const handleRemoveLeadingZeros = str => {
2709
2757
  return str.replace(/^0+(\d)/, '$1');
2710
2758
  };
2711
2759
 
2712
- function styleInject(css, ref) {
2713
- if ( ref === void 0 ) ref = {};
2714
- var insertAt = ref.insertAt;
2715
-
2716
- if (!css || typeof document === 'undefined') { return; }
2717
-
2718
- var head = document.head || document.getElementsByTagName('head')[0];
2719
- var style = document.createElement('style');
2720
- style.type = 'text/css';
2721
-
2722
- if (insertAt === 'top') {
2723
- if (head.firstChild) {
2724
- head.insertBefore(style, head.firstChild);
2725
- } else {
2726
- head.appendChild(style);
2727
- }
2728
- } else {
2729
- head.appendChild(style);
2730
- }
2731
-
2732
- if (style.styleSheet) {
2733
- style.styleSheet.cssText = css;
2734
- } else {
2735
- style.appendChild(document.createTextNode(css));
2736
- }
2737
- }
2738
-
2739
2760
  var css_248z$c = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}.table-module_no-tabel-data__6xp3N{align-items:center;display:flex;height:200px;justify-content:center;width:100%}";
2740
2761
  var styles$a = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO","no-tabel-data":"table-module_no-tabel-data__6xp3N"};
2741
2762
  styleInject(css_248z$c);
@@ -4573,6 +4594,7 @@ const TelInput = ({
4573
4594
  radius,
4574
4595
  isHover,
4575
4596
  disabled,
4597
+ telClass,
4576
4598
  inpStyles,
4577
4599
  errorColor,
4578
4600
  inputChange,
@@ -4604,6 +4626,7 @@ const TelInput = ({
4604
4626
  setInnerValue(() => newValue);
4605
4627
  }, [value]);
4606
4628
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
4629
+ className: telClass,
4607
4630
  style: {
4608
4631
  ...inpStyles,
4609
4632
  width: 'auto',
@@ -4772,7 +4795,12 @@ const NumberInput = ({
4772
4795
  let prevValue = innerValue;
4773
4796
  let currentValue = event.target.value.replace(/\.|․|\.|,/g, '.');
4774
4797
  currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
4775
- setInnerValue(() => cardNumber ? currentValue.replace(/(\d{4})(?=\d)/g, '$1-') : currentValue);
4798
+ if (cardNumber) {
4799
+ let digits = currentValue.replace(/\D/g, '');
4800
+ setInnerValue(() => digits.replace(/(\d{4})(?=\d)/g, '$1-'));
4801
+ } else {
4802
+ setInnerValue(() => currentValue);
4803
+ }
4776
4804
  if (inputChange && currentValue !== prevValue) {
4777
4805
  if (currentValue < Number.MIN_SAFE_INTEGER || currentValue > Number.MAX_SAFE_INTEGER) {
4778
4806
  if (!cardNumber) {
@@ -4845,11 +4873,16 @@ const NumberInput = ({
4845
4873
  if (value !== undefined && value !== null) {
4846
4874
  newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
4847
4875
  }
4848
- setInnerValue(() => cardNumber ? newValue.replace(/(\d{4})(?=\d)/g, '$1-') : newValue);
4849
- // inputChange(cardNumber ? newValue.replaceAll('-', '') : newValue);
4876
+ if (cardNumber) {
4877
+ let digits = newValue.replace(/\D/g, '');
4878
+ setInnerValue(() => digits.replace(/(\d{4})(?=\d)/g, '$1-'));
4879
+ } else {
4880
+ setInnerValue(() => newValue);
4881
+ }
4850
4882
  }, [dots, value, float, cardNumber, maxNumSize, minNumSize, numberMaxLength]);
4851
4883
  return /*#__PURE__*/React__default["default"].createElement("input", {
4852
4884
  type: "text",
4885
+ inputMode: "decimal",
4853
4886
  value: innerValue,
4854
4887
  disabled: disabled,
4855
4888
  name: inpAttributes?.iName,
@@ -4905,6 +4938,7 @@ const Input = ({
4905
4938
  family,
4906
4939
  padding,
4907
4940
  tooltip,
4941
+ telClass,
4908
4942
  leftIcon,
4909
4943
  required,
4910
4944
  disabled,
@@ -5140,6 +5174,7 @@ const Input = ({
5140
5174
  inpStyles: inpStyles,
5141
5175
  inpAttributes: inpAttributes,
5142
5176
  radius: radius ?? configStyles.INPUT.radius,
5177
+ telClass: telClass ?? configStyles.INPUT.tel.className,
5143
5178
  phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
5144
5179
  phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
5145
5180
  phoneJustifyContent: phoneJustifyContent ?? configStyles.INPUT.tel.justifyContent,
@@ -5327,6 +5362,7 @@ Input.propTypes = {
5327
5362
  regexpErrorMessage: PropTypes__default["default"].string,
5328
5363
  regexp: PropTypes__default["default"].instanceOf(RegExp),
5329
5364
  fireInputInsideError: PropTypes__default["default"].func,
5365
+ telClass: PropTypes__default["default"].string,
5330
5366
  telBorderRightWidth: PropTypes__default["default"].string,
5331
5367
  telBorderRightStyle: PropTypes__default["default"].string,
5332
5368
  telBorderRightColor: PropTypes__default["default"].string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
package/tui.config.js CHANGED
@@ -141,6 +141,7 @@ export default {
141
141
  },
142
142
 
143
143
  tel: {
144
+ className: 'tel-code',
144
145
  display: 'flex',
145
146
  alignItems: 'center',
146
147
  justifyContent: 'center',