@xaypay/tui 0.0.117 → 0.0.119

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
@@ -84,9 +84,9 @@ function styleInject(css, ref) {
84
84
  }
85
85
  }
86
86
 
87
- var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
88
- var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
89
- styleInject(css_248z$e);
87
+ var css_248z$d = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
88
+ var styles$b = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
89
+ styleInject(css_248z$d);
90
90
 
91
91
  const File = ({
92
92
  name,
@@ -146,11 +146,11 @@ const File = ({
146
146
  document.querySelector(`.${name}`).value = '';
147
147
  };
148
148
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
149
- className: `${styles$c['file-form-title']} ile-form-title-rem`
149
+ className: `${styles$b['file-form-title']} ile-form-title-rem`
150
150
  }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))), /*#__PURE__*/React__default.createElement("div", {
151
- className: classnames(`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
151
+ className: classnames(`${styles$b['file-form-wrap']} file-form-wrap-rem`, image ? styles$b['active'] : '')
152
152
  }, /*#__PURE__*/React__default.createElement("div", {
153
- className: `${styles$c['file-form']} file-form-rem ${error || errorMessage ? styles$c['error'] : ''}`,
153
+ className: `${styles$b['file-form']} file-form-rem ${error || errorMessage ? styles$b['error'] : ''}`,
154
154
  onClick: () => document.querySelector(`.${name}`).click()
155
155
  }, /*#__PURE__*/React__default.createElement("input", {
156
156
  hidden: true,
@@ -159,23 +159,23 @@ const File = ({
159
159
  disabled: disabled,
160
160
  onChange: e => handleCheckFile(e)
161
161
  }), image ? /*#__PURE__*/React__default.createElement("div", {
162
- className: `${styles$c['upload-file-content']} upload-file-content-rem`
162
+ className: `${styles$b['upload-file-content']} upload-file-content-rem`
163
163
  }, image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : /*#__PURE__*/React__default.createElement("img", {
164
164
  src: image,
165
165
  alt: fileName
166
166
  })) : /*#__PURE__*/React__default.createElement("div", {
167
- className: `${styles$c['file-form-inner-upload']} ile-form-inner-upload-rem`
167
+ className: `${styles$b['file-form-inner-upload']} ile-form-inner-upload-rem`
168
168
  }, /*#__PURE__*/React__default.createElement("img", {
169
169
  src: "../../assets/upload.svg",
170
170
  alt: ""
171
171
  }), /*#__PURE__*/React__default.createElement("span", {
172
- className: `${styles$c['upload-info']} upload-info-rem`
172
+ className: `${styles$b['upload-info']} upload-info-rem`
173
173
  }, /*#__PURE__*/React__default.createElement("span", {
174
- className: `${styles$c['upload-info-txt']} upload-info-txt-rem`
174
+ className: `${styles$b['upload-info-txt']} upload-info-txt-rem`
175
175
  }, "\u0532\u0565\u057C\u0576\u0565\u056C")), /*#__PURE__*/React__default.createElement("span", {
176
- className: `${styles$c['upload-info-size']} upload-info-size-rem`
176
+ className: `${styles$b['upload-info-size']} upload-info-size-rem`
177
177
  }, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))), !disabled && /*#__PURE__*/React__default.createElement("div", {
178
- className: `${styles$c['delete-upload-icon']} delete-upload-icon-rem`,
178
+ className: `${styles$b['delete-upload-icon']} delete-upload-icon-rem`,
179
179
  onClick: handleRemoveFile
180
180
  }, /*#__PURE__*/React__default.createElement("i", {
181
181
  className: "icon-delete"
@@ -383,9 +383,9 @@ SingleCheckbox.propTypes = {
383
383
  ignoreDisabledForChecked: PropTypes.bool
384
384
  };
385
385
 
386
- var css_248z$d = ".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{cursor:pointer;margin:0 0 8px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.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}";
387
- var styles$b = {"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"};
388
- styleInject(css_248z$d);
386
+ 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{cursor:pointer;margin:0 0 8px;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}";
387
+ 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"};
388
+ styleInject(css_248z$c);
389
389
 
390
390
  /* eslint-disable no-prototype-builtins */
391
391
  const TH = ({
@@ -396,6 +396,8 @@ const TH = ({
396
396
  tHeadFontSize,
397
397
  tHeadTextAlign,
398
398
  tHeadFontWeight,
399
+ tableColumnMinWidth,
400
+ tableColumnMaxWidth,
399
401
  handleCheckedHeader,
400
402
  borderTopLeftRadius,
401
403
  borderTopRightRadius,
@@ -411,18 +413,19 @@ const TH = ({
411
413
  style: {
412
414
  width: 'auto',
413
415
  cursor: 'pointer',
414
- whiteSpace: 'nowrap',
415
416
  position: 'relative',
416
417
  padding: tHeadPadding,
417
418
  fontSize: tHeadFontSize,
418
419
  fontFamily: tHeadFamily,
419
420
  fontWeight: tHeadFontWeight,
421
+ minWidth: tableColumnMinWidth,
422
+ maxWidth: tableColumnMaxWidth,
420
423
  borderTopLeftRadius: borderTopLeftRadius,
421
424
  borderTopRightRadius: borderTopRightRadius,
422
425
  borderColor: hideBorder ? 'transparent' : '#eeeeee'
423
426
  },
424
427
  onClick: handleHeaderItemClick,
425
- className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$b['sorting-arrows'] : '' : ''}`
428
+ className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$a['sorting-arrows'] : '' : ''}`
426
429
  }, /*#__PURE__*/React__default.createElement("div", {
427
430
  style: {
428
431
  display: 'flex',
@@ -461,7 +464,11 @@ const TD = ({
461
464
  tBodyFontFamily,
462
465
  tBodyFontWeight,
463
466
  handleCheckDots,
467
+ openListFontSize,
464
468
  handleCheckedBody,
469
+ openListFontFamily,
470
+ tableColumnMinWidth,
471
+ tableColumnMaxWidth,
465
472
  handleBodyActionClick,
466
473
  handleMoreOptionsClick,
467
474
  handleContentListClick,
@@ -511,13 +518,15 @@ const TD = ({
511
518
  width: 'auto',
512
519
  color: tBodyColor,
513
520
  verticalAlign: 'top',
514
- whiteSpace: 'nowrap',
515
521
  padding: tBodyPadding,
516
522
  fontSize: tBodyFontSize,
517
523
  borderRight: borderRight,
518
524
  textAlign: tBodyTextAlign,
519
525
  fontFamily: tBodyFontFamily,
520
526
  fontWeight: tBodyFontWeight,
527
+ minWidth: tableColumnMinWidth,
528
+ maxWidth: tableColumnMaxWidth,
529
+ whiteSpace: Array.isArray(item) ? 'nowrap' : 'wrap',
521
530
  borderColor: hideBorder ? 'transparent' : '#eeeeee',
522
531
  boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
523
532
  borderTopLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
@@ -536,7 +545,7 @@ const TD = ({
536
545
  },
537
546
  id: newItem.id,
538
547
  type: newItem.type,
539
- className: styles$b['td-span'],
548
+ className: styles$a['td-span'],
540
549
  key: `${newItem.id}_${newIndex}`,
541
550
  onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
542
551
  }, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
@@ -558,7 +567,7 @@ const TD = ({
558
567
  },
559
568
  id: iT.id ? iT.id : '',
560
569
  type: iT.type ? iT.type : '',
561
- className: styles$b['td-span'],
570
+ className: styles$a['td-span'],
562
571
  onClick: e => handleCheckActions(e, iT, 'type', iN),
563
572
  key: `${iT.id || iT.content}_${iN}`
564
573
  }, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
@@ -582,7 +591,7 @@ const TD = ({
582
591
  cursor: 'pointer'
583
592
  },
584
593
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
585
- className: styles$b['td-span']
594
+ className: styles$a['td-span']
586
595
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'checkBox') && /*#__PURE__*/React__default.createElement(SingleCheckbox, {
587
596
  data: item,
588
597
  index: index,
@@ -594,11 +603,13 @@ const TD = ({
594
603
  unCheckedColor: item.checkBox.unCheckedColor
595
604
  }), /*#__PURE__*/React__default.createElement("div", {
596
605
  style: {
597
- marginLeft: hasOwnerProperty(item, 'contentList') && (!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty(item, 'rightArrow') ? item.rightArrow === true ? '0px' : '10px' : hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow') ? '10px' : '0px' : '0px',
598
- marginRight: hasOwnerProperty(item, 'contentList') && (!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty(item, 'rightArrow') ? item.rightArrow === true ? '10px' : '0px' : '0px' : '0px'
606
+ flexShrink: 11,
607
+ marginLeft: hasOwnerProperty(item, 'contentList') && (!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty(item, 'rightArrow') ? item.rightArrow === true ? '0px' : '11px' : hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow') ? '11px' : '0px' : '0px',
608
+ marginRight: hasOwnerProperty(item, 'contentList') && (!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty(item, 'rightArrow') ? item.rightArrow === true ? '11px' : '0px' : '0px' : '0px'
599
609
  }
600
610
  }, /*#__PURE__*/React__default.createElement("p", {
601
611
  style: {
612
+ textAlign: tBodyTextAlign,
602
613
  margin: '0px',
603
614
  cursor: hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots') ? 'pointer' : 'auto'
604
615
  },
@@ -627,7 +638,7 @@ const TD = ({
627
638
  }, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
628
639
  return /*#__PURE__*/React__default.createElement("span", {
629
640
  key: `${optionItem.content}_${optionIndex}`,
630
- className: styles$b['dots-option-item'],
641
+ className: styles$a['dots-option-item'],
631
642
  style: {
632
643
  color: '#3C393E',
633
644
  fontSize: '14px',
@@ -653,17 +664,20 @@ const TD = ({
653
664
  style: {
654
665
  overflow: 'auto',
655
666
  marginTop: '10px',
656
- maxHeight: '300px',
667
+ maxHeight: '500px',
657
668
  maxWidth: '100%',
658
669
  height: item.status === 'close' ? '0px' : 'auto'
659
670
  }
660
671
  }, item.contentList.map((innerItem, innerItemIndex) => {
661
672
  return /*#__PURE__*/React__default.createElement("p", {
662
673
  key: `${innerItem}_${innerItemIndex}`,
663
- className: styles$b['list-text'],
674
+ className: styles$a['list-text'],
664
675
  style: {
676
+ maxWidth: '100%',
665
677
  color: openListColor,
666
- maxWidth: (item.content.length * 9 <= 100 ? 100 : item.content.length * 9) + 'px'
678
+ textAlign: tBodyTextAlign,
679
+ fontSize: openListFontSize,
680
+ fontFamily: openListFontFamily
667
681
  },
668
682
  onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
669
683
  }, innerItem.content === 0 ? innerItem.content.toString() : innerItem.content ? innerItem.content : '');
@@ -675,7 +689,7 @@ const TD = ({
675
689
  cursor: 'pointer'
676
690
  },
677
691
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
678
- className: styles$b['td-span']
692
+ className: styles$a['td-span']
679
693
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
680
694
  };
681
695
 
@@ -741,6 +755,8 @@ const Table = ({
741
755
  tableRowRadius,
742
756
  tableRowBGColor,
743
757
  tableRowBoxShadow,
758
+ tableColumnMaxWidth,
759
+ tableColumnMinWidth,
744
760
  tHeadColor,
745
761
  tHeadFamily,
746
762
  tHeadPadding,
@@ -760,6 +776,8 @@ const Table = ({
760
776
  tBodyRowMarginTop,
761
777
  className,
762
778
  openListColor,
779
+ openListFontSize,
780
+ openListFontFamily,
763
781
  hideBorder
764
782
  }) => {
765
783
  const [body, setBody] = useState([]);
@@ -1260,7 +1278,9 @@ const Table = ({
1260
1278
  tHeadTextAlign: tHeadTextAlign ? tHeadTextAlign : configStyles.TABLE.tHeadTextAlign,
1261
1279
  tHeadFontWeight: tHeadFontWeight ? tHeadFontWeight : configStyles.TABLE.tHeadFontWeight,
1262
1280
  borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px',
1263
- borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px'
1281
+ borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px',
1282
+ tableColumnMinWidth: tableColumnMinWidth ? tableColumnMinWidth : configStyles.TABLE.tableColumnMinWidth,
1283
+ tableColumnMaxWidth: tableColumnMaxWidth ? tableColumnMaxWidth : configStyles.TABLE.tableColumnMaxWidth
1264
1284
  });
1265
1285
  }))), body && body.length > 0 && /*#__PURE__*/React__default.createElement("tbody", {
1266
1286
  style: {
@@ -1286,6 +1306,10 @@ const Table = ({
1286
1306
  handleCheckDots: handleCheckDots,
1287
1307
  key: `${innerItem}_${index}_${innerIndex}`,
1288
1308
  openListColor: openListColor ? openListColor : configStyles.TABLE.openListColor,
1309
+ tableColumnMinWidth: tableColumnMinWidth ? tableColumnMinWidth : configStyles.TABLE.tableColumnMinWidth,
1310
+ tableColumnMaxWidth: tableColumnMaxWidth ? tableColumnMaxWidth : configStyles.TABLE.tableColumnMaxWidth,
1311
+ openListFontSize: openListFontSize ? openListFontSize : configStyles.TABLE.openListFontSize,
1312
+ openListFontFamily: openListFontFamily ? openListFontFamily : configStyles.TABLE.openListFontFamily,
1289
1313
  handleCheckedBody: handleCheckedBody,
1290
1314
  handleBodyActionClick: handleBodyActionClick,
1291
1315
  handleMoreOptionsClick: handleMoreOptionsClick,
@@ -1315,6 +1339,8 @@ Table.propTypes = {
1315
1339
  tableRowRadius: PropTypes.string,
1316
1340
  tableRowBGColor: PropTypes.string,
1317
1341
  tableRowBoxShadow: PropTypes.string,
1342
+ tableColumnMaxWidth: PropTypes.string,
1343
+ tableColumnMinWidth: PropTypes.string,
1318
1344
  tHeadColor: PropTypes.string,
1319
1345
  tHeadFamily: PropTypes.string,
1320
1346
  tHeadPadding: PropTypes.string,
@@ -1334,12 +1360,14 @@ Table.propTypes = {
1334
1360
  className: PropTypes.string,
1335
1361
  tBodyRowBorder: PropTypes.string,
1336
1362
  openListColor: PropTypes.string,
1363
+ openListFontSize: PropTypes.string,
1364
+ openListFontFamily: PropTypes.string,
1337
1365
  hideBorder: PropTypes.bool
1338
1366
  };
1339
1367
 
1340
- var css_248z$c = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
1341
- var styles$a = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
1342
- styleInject(css_248z$c);
1368
+ var css_248z$b = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
1369
+ var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
1370
+ styleInject(css_248z$b);
1343
1371
 
1344
1372
  const SvgNext = ({
1345
1373
  title,
@@ -1579,7 +1607,7 @@ const Modal = ({
1579
1607
  justifyContent: justifyContent ? justifyContent : configStyles.MODAL.justifyContent
1580
1608
  }
1581
1609
  }, /*#__PURE__*/React__default.createElement("div", {
1582
- className: `${styles$a['animation__modal']}`,
1610
+ className: `${styles$9['animation__modal']}`,
1583
1611
  onClick: handleStopClosing,
1584
1612
  style: {
1585
1613
  position: 'relative',
@@ -1783,9 +1811,9 @@ Modal.defaultProps = {
1783
1811
  type: 'content'
1784
1812
  };
1785
1813
 
1786
- var css_248z$b = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
1787
- var styles$9 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
1788
- styleInject(css_248z$b);
1814
+ var css_248z$a = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
1815
+ var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
1816
+ styleInject(css_248z$a);
1789
1817
 
1790
1818
  const InputTypes = {
1791
1819
  TEL: 'tel',
@@ -1863,7 +1891,7 @@ const Input = ({
1863
1891
  const [innerErrorMessage, setInnerErrorMessage] = useState('');
1864
1892
  const random = Math.floor(Math.random() * 1000 + 1);
1865
1893
  const configStyles = compereConfigs();
1866
- const classProps = classnames(className ? className : configStyles.INPUT.className, type === 'number' ? styles$9['inp-num'] : '', styles$9['input-wrap']);
1894
+ const classProps = classnames(className ? className : configStyles.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']);
1867
1895
  const errorShow = keyframes`
1868
1896
  100% {
1869
1897
  bottom: '-20px';
@@ -2163,7 +2191,7 @@ const Input = ({
2163
2191
  fontFamily: labelFontFamily ? labelFontFamily : configStyles.INPUT.labelFontFamily
2164
2192
  }
2165
2193
  }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
2166
- className: `${styles$9['input-content']}`,
2194
+ className: `${styles$8['input-content']}`,
2167
2195
  style: {
2168
2196
  width: width ? width : configStyles.INPUT.width,
2169
2197
  borderRadius: radius ? radius : configStyles.INPUT.radius,
@@ -2323,57 +2351,222 @@ Input.defaultProps = {
2323
2351
  type: 'text'
2324
2352
  };
2325
2353
 
2326
- var css_248z$a = ".radio-module_radio-wrap__-lO7V{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.radio-module_radio-wrap__-lO7V>input{height:0;opacity:0;position:absolute;width:0}.radio-module_radio-wrap__-lO7V .radio-module_radio-checkmark__Kvol0{border:1px solid #d9d9d9;border-radius:50%;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.radio-module_radio-wrap__-lO7V>.radio-module_radio-checkmark__Kvol0:after{background-color:#d9d9d9;border-radius:50%;bottom:0;content:\"\";height:8px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:0;transition:opacity .24s,background-color .24s;width:8px}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0:after{background-color:#1890ff;opacity:1}.radio-module_radio-wrap__-lO7V:hover input~.radio-module_radio-checkmark__Kvol0:after{opacity:1}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0{border-color:#1890ff}";
2327
- var styles$8 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
2328
- styleInject(css_248z$a);
2354
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
2355
+ // require the crypto API and do not support built-in fallback to lower quality random number
2356
+ // generators (like Math.random()).
2357
+ let getRandomValues;
2358
+ const rnds8 = new Uint8Array(16);
2359
+ function rng() {
2360
+ // lazy load so that environments that need to polyfill have a chance to do so
2361
+ if (!getRandomValues) {
2362
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
2363
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
2364
+
2365
+ if (!getRandomValues) {
2366
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
2367
+ }
2368
+ }
2369
+
2370
+ return getRandomValues(rnds8);
2371
+ }
2372
+
2373
+ /**
2374
+ * Convert array of 16 byte values to UUID string format of the form:
2375
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2376
+ */
2377
+
2378
+ const byteToHex = [];
2379
+
2380
+ for (let i = 0; i < 256; ++i) {
2381
+ byteToHex.push((i + 0x100).toString(16).slice(1));
2382
+ }
2383
+
2384
+ function unsafeStringify(arr, offset = 0) {
2385
+ // Note: Be careful editing this code! It's been tuned for performance
2386
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
2387
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
2388
+ }
2389
+
2390
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
2391
+ var native = {
2392
+ randomUUID
2393
+ };
2394
+
2395
+ function v4(options, buf, offset) {
2396
+ if (native.randomUUID && !buf && !options) {
2397
+ return native.randomUUID();
2398
+ }
2399
+
2400
+ options = options || {};
2401
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
2402
+
2403
+ rnds[6] = rnds[6] & 0x0f | 0x40;
2404
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
2405
+
2406
+ if (buf) {
2407
+ offset = offset || 0;
2408
+
2409
+ for (let i = 0; i < 16; ++i) {
2410
+ buf[offset + i] = rnds[i];
2411
+ }
2412
+
2413
+ return buf;
2414
+ }
2415
+
2416
+ return unsafeStringify(rnds);
2417
+ }
2329
2418
 
2419
+ const RadioDirectionMode = {
2420
+ VERTICAL: 'vertical',
2421
+ HORINZONTAL: 'horizontal'
2422
+ };
2330
2423
  const Radio = ({
2331
- disabled,
2332
- defaultChecked,
2333
- required,
2424
+ data,
2425
+ size,
2426
+ getData,
2427
+ selected,
2428
+ keyNames,
2429
+ diraction,
2334
2430
  className,
2335
- name,
2336
- value,
2337
- jsonData,
2338
- label,
2339
- ...props
2431
+ borderSize,
2432
+ labelColor,
2433
+ borderColor,
2434
+ borderStyle,
2435
+ labelFontSize,
2436
+ labelFontFamily,
2437
+ labelFontWeight,
2438
+ labelLineHeight,
2439
+ radioMarginRight,
2440
+ borderActiveColor,
2441
+ radioItemMarginRight,
2442
+ radioItemMarginBottom
2340
2443
  }) => {
2341
- const classProps = classnames(styles$8.checkbox, className);
2342
- const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
2343
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parseData.map((element, id) => {
2344
- return /*#__PURE__*/React__default.createElement("label", {
2345
- className: `${styles$8['radio-wrap']} radio-wrap-rem`,
2346
- key: element.value
2347
- }, /*#__PURE__*/React__default.createElement("input", _extends({
2348
- type: "radio",
2349
- className: classProps,
2350
- disabled: disabled,
2351
- required: required,
2352
- defaultChecked: id === 0 ? defaultChecked : '',
2353
- value: value ? value : element.value,
2354
- name: name ? name : element.name
2355
- }, props)), /*#__PURE__*/React__default.createElement("span", {
2356
- className: `${styles$8['radio-checkmark']} radio-checkmark-rem`
2357
- }), element.label ? /*#__PURE__*/React__default.createElement("span", {
2358
- className: styles$8.labelRadio
2359
- }, label ? label : element.label) : '');
2444
+ const configStyles = compereConfigs();
2445
+ const classProps = classnames(className ? className : configStyles.RADIO.className);
2446
+ const [innerData, setInnerData] = useState([]);
2447
+ const [radioInnerSize, setRadioInnerSize] = useState('');
2448
+ const [radioInnerFormat, setRadioInnerFormat] = useState('');
2449
+ const [innerSelectedData, setInnerSelectedData] = useState({});
2450
+ const handleMouseEnter = (id, elemID) => {
2451
+ const elem = document.querySelector(`#${elemID}`);
2452
+ elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.borderActiveColor : borderColor ? borderColor : configStyles.RADIO.borderColor;
2453
+ };
2454
+ const handleMouseLeave = (id, elemID) => {
2455
+ const elem = document.querySelector(`#${elemID}`);
2456
+ elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.borderActiveColor : 'transparent';
2457
+ };
2458
+ const handleChecked = selItem => {
2459
+ setInnerSelectedData(selItem);
2460
+ getData && getData(selItem);
2461
+ };
2462
+ useEffect(() => {
2463
+ if (Array.isArray(data)) {
2464
+ setInnerData(data);
2465
+ } else {
2466
+ setInnerData([data]);
2467
+ }
2468
+ }, [data]);
2469
+ useEffect(() => {
2470
+ let radioSize = '';
2471
+ let radioSizeFormat = '';
2472
+ const checkSize = size || configStyles.RADIO.size;
2473
+ if (checkSize && typeof checkSize === 'string') {
2474
+ if (checkSize.length > 0) {
2475
+ checkSize.split('').map(item => {
2476
+ if (!isNaN(parseInt(item))) {
2477
+ radioSize += item;
2478
+ } else {
2479
+ radioSizeFormat += item;
2480
+ }
2481
+ });
2482
+ }
2483
+ }
2484
+ if (radioSize < '10') {
2485
+ radioSize = '10';
2486
+ }
2487
+ setRadioInnerFormat(radioSizeFormat);
2488
+ setRadioInnerSize(`${parseInt(radioSize) / 2}`);
2489
+ }, [size, configStyles.RADIO.size]);
2490
+ useEffect(() => {
2491
+ setInnerSelectedData(selected);
2492
+ }, [selected]);
2493
+ return /*#__PURE__*/React__default.createElement("div", {
2494
+ className: classProps,
2495
+ style: {
2496
+ display: 'flex',
2497
+ flexDirection: diraction === 'horizontal' ? 'row' : 'column'
2498
+ }
2499
+ }, innerData && innerData.length > 0 && innerData.map((item, index) => {
2500
+ const elemId = `TUI_${index}_radio_inner` + v4();
2501
+ return /*#__PURE__*/React__default.createElement("div", {
2502
+ key: `TUI_${index}_radio`,
2503
+ style: {
2504
+ display: 'flex',
2505
+ cursor: item.disabled ? 'not-allowed' : 'pointer',
2506
+ width: 'fit-content',
2507
+ alignItems: 'center',
2508
+ marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight : configStyles.RADIO.radioItemMarginRight : '0px',
2509
+ marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom : configStyles.RADIO.radioItemMarginBottom : '0px'
2510
+ },
2511
+ onClick: item.disabled ? _ => _ : () => handleChecked(item),
2512
+ onMouseEnter: () => handleMouseEnter(item[keyNames.id], elemId),
2513
+ onMouseLeave: () => handleMouseLeave(item[keyNames.id], elemId)
2514
+ }, /*#__PURE__*/React__default.createElement("div", {
2515
+ style: {
2516
+ display: 'flex',
2517
+ alignItems: 'center',
2518
+ borderRadius: '100%',
2519
+ justifyContent: 'center',
2520
+ width: size ? size : configStyles.RADIO.size,
2521
+ height: size ? size : configStyles.RADIO.size,
2522
+ marginRight: item.label ? radioMarginRight ? radioMarginRight : configStyles.RADIO.radioMarginRight : '0px',
2523
+ border: `${borderSize ? borderSize : configStyles.RADIO.borderSize} ${borderStyle ? borderStyle : configStyles.RADIO.borderStyle}`,
2524
+ borderColor: item[keyNames.id] === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.borderActiveColor : borderColor ? borderColor : configStyles.RADIO.borderColor
2525
+ }
2526
+ }, /*#__PURE__*/React__default.createElement("div", {
2527
+ id: elemId,
2528
+ style: {
2529
+ borderRadius: '100%',
2530
+ width: radioInnerSize + radioInnerFormat,
2531
+ height: radioInnerSize + radioInnerFormat,
2532
+ backgroundColor: item[keyNames.id] === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.borderActiveColor : 'transparent'
2533
+ }
2534
+ })), item[keyNames.label] ? /*#__PURE__*/React__default.createElement("span", {
2535
+ style: {
2536
+ color: labelColor ? labelColor : configStyles.RADIO.labelColor,
2537
+ fontSize: labelFontSize ? labelFontSize : configStyles.RADIO.labelFontSize,
2538
+ fontFamily: labelFontFamily ? labelFontFamily : configStyles.RADIO.labelFontFamily,
2539
+ fontWeight: labelFontWeight ? labelFontWeight : configStyles.RADIO.labelFontWeight,
2540
+ lineHeight: labelLineHeight ? labelLineHeight : configStyles.RADIO.labelLineHeight
2541
+ },
2542
+ onMouseEnter: () => handleMouseEnter(item[keyNames.id], elemId),
2543
+ onMouseLeave: () => handleMouseLeave(item[keyNames.id], elemId)
2544
+ }, item[keyNames.label]) : '');
2360
2545
  }));
2361
2546
  };
2362
2547
  Radio.propTypes = {
2548
+ size: PropTypes.string,
2549
+ selected: PropTypes.object,
2550
+ keyNames: PropTypes.object,
2363
2551
  className: PropTypes.string,
2364
- onChange: PropTypes.func,
2365
- required: PropTypes.bool,
2366
- defaultChecked: PropTypes.bool,
2367
- disabled: PropTypes.bool,
2368
- name: PropTypes.string,
2369
- value: PropTypes.string,
2370
- jsonData: PropTypes.string,
2371
- label: PropTypes.string,
2372
- keyNames: PropTypes.object
2552
+ borderSize: PropTypes.string,
2553
+ labelColor: PropTypes.string,
2554
+ borderColor: PropTypes.string,
2555
+ borderStyle: PropTypes.string,
2556
+ labelFontSize: PropTypes.string,
2557
+ labelFontFamily: PropTypes.string,
2558
+ labelFontWeight: PropTypes.string,
2559
+ labelLineHeight: PropTypes.string,
2560
+ radioMarginRight: PropTypes.string,
2561
+ getData: PropTypes.func.isRequired,
2562
+ borderActiveColor: PropTypes.string,
2563
+ radioItemMarginRight: PropTypes.string,
2564
+ radioItemMarginBottom: PropTypes.string,
2565
+ diraction: PropTypes.oneOf(Object.values(RadioDirectionMode)),
2566
+ data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
2373
2567
  };
2374
2568
  Radio.defaultProps = {
2375
- onChange: undefined,
2376
- jsonData: '[{"value":"email", "name":"contact", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact", "label":"Phone", "id":"contactChoice2"}]'
2569
+ diraction: 'vertical'
2377
2570
  };
2378
2571
 
2379
2572
  const Button = ({
@@ -3408,8 +3601,8 @@ const Captcha = ({
3408
3601
  className: classProps
3409
3602
  }, label && /*#__PURE__*/React__default.createElement("p", {
3410
3603
  style: {
3411
- fontSize: size ? size : configStyles.Captcha.size,
3412
- color: color ? color : configStyles.Captcha.color
3604
+ fontSize: size ? size : configStyles.CAPTCHA.size,
3605
+ color: color ? color : configStyles.CAPTCHA.color
3413
3606
  }
3414
3607
  }, label), /*#__PURE__*/React__default.createElement("div", {
3415
3608
  style: {
@@ -3525,71 +3718,6 @@ Stepper.propTypes = {
3525
3718
  activeSteps: PropTypes.number
3526
3719
  };
3527
3720
 
3528
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
3529
- // require the crypto API and do not support built-in fallback to lower quality random number
3530
- // generators (like Math.random()).
3531
- let getRandomValues;
3532
- const rnds8 = new Uint8Array(16);
3533
- function rng() {
3534
- // lazy load so that environments that need to polyfill have a chance to do so
3535
- if (!getRandomValues) {
3536
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
3537
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
3538
-
3539
- if (!getRandomValues) {
3540
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
3541
- }
3542
- }
3543
-
3544
- return getRandomValues(rnds8);
3545
- }
3546
-
3547
- /**
3548
- * Convert array of 16 byte values to UUID string format of the form:
3549
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
3550
- */
3551
-
3552
- const byteToHex = [];
3553
-
3554
- for (let i = 0; i < 256; ++i) {
3555
- byteToHex.push((i + 0x100).toString(16).slice(1));
3556
- }
3557
-
3558
- function unsafeStringify(arr, offset = 0) {
3559
- // Note: Be careful editing this code! It's been tuned for performance
3560
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
3561
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
3562
- }
3563
-
3564
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3565
- var native = {
3566
- randomUUID
3567
- };
3568
-
3569
- function v4(options, buf, offset) {
3570
- if (native.randomUUID && !buf && !options) {
3571
- return native.randomUUID();
3572
- }
3573
-
3574
- options = options || {};
3575
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
3576
-
3577
- rnds[6] = rnds[6] & 0x0f | 0x40;
3578
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
3579
-
3580
- if (buf) {
3581
- offset = offset || 0;
3582
-
3583
- for (let i = 0; i < 16; ++i) {
3584
- buf[offset + i] = rnds[i];
3585
- }
3586
-
3587
- return buf;
3588
- }
3589
-
3590
- return unsafeStringify(rnds);
3591
- }
3592
-
3593
3721
  const SvgHeic = ({
3594
3722
  title,
3595
3723
  titleId,
@@ -4008,6 +4136,7 @@ const NewFile = ({
4008
4136
  change,
4009
4137
  border,
4010
4138
  upload,
4139
+ preview,
4011
4140
  maxSize,
4012
4141
  maxWidth,
4013
4142
  disabled,
@@ -4031,6 +4160,12 @@ const NewFile = ({
4031
4160
  maxSizeError,
4032
4161
  progressColor,
4033
4162
  noChoosenFile,
4163
+ uploadBtnFont,
4164
+ uploadBtnSize,
4165
+ uploadBtnLabel,
4166
+ uploadBtnColor,
4167
+ uploadBtnHeight,
4168
+ uploadBtnBackgroundColor,
4034
4169
  fileExtensions,
4035
4170
  listItemHeight,
4036
4171
  backgroundColor,
@@ -4076,6 +4211,7 @@ const NewFile = ({
4076
4211
  };
4077
4212
  const handleRemoveFile = () => {
4078
4213
  setImage(null);
4214
+ setSingleFile(null);
4079
4215
  removeFile && removeFile(singleFile);
4080
4216
  };
4081
4217
  const handleUploadFiles = file => {
@@ -4329,7 +4465,7 @@ const NewFile = ({
4329
4465
  fontSize: size ? size : configStyles.FILE.size,
4330
4466
  fontWeight: weight ? weight : configStyles.FILE.weight
4331
4467
  }
4332
- }, !multiple && image ? image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
4468
+ }, !multiple && image && preview ? image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
4333
4469
  src: image,
4334
4470
  style: {
4335
4471
  display: 'block',
@@ -4340,7 +4476,7 @@ const NewFile = ({
4340
4476
  height: fileAreaImageHeight ? fileAreaImageHeight : configStyles.FILE.fileAreaImageHeight
4341
4477
  },
4342
4478
  alt: "file preview"
4343
- }) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SvgUpload, null)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
4479
+ }) : preview ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SvgUpload, null)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
4344
4480
  style: {
4345
4481
  margin: '0px'
4346
4482
  }
@@ -4356,7 +4492,35 @@ const NewFile = ({
4356
4492
  style: {
4357
4493
  margin: '0px'
4358
4494
  }
4359
- }, fileSizeText ? fileSizeText : configStyles.FILE.fileSizeText, " ", maxSize, "\u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default.createElement("div", {
4495
+ }, fileSizeText ? fileSizeText : configStyles.FILE.fileSizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
4496
+ style: {
4497
+ width: '100%',
4498
+ padding: '5px',
4499
+ display: 'flex',
4500
+ alignItems: 'center',
4501
+ boxSizing: 'border-box',
4502
+ justifyContent: 'space-between'
4503
+ }
4504
+ }, /*#__PURE__*/React__default.createElement(Button, {
4505
+ contentWidth: true,
4506
+ onClick: _ => _,
4507
+ font: uploadBtnFont ? uploadBtnFont : configStyles.FILE.uploadBtnFont,
4508
+ size: uploadBtnSize ? uploadBtnSize : configStyles.FILE.uploadBtnSize,
4509
+ label: uploadBtnLabel ? uploadBtnLabel : configStyles.FILE.uploadBtnLabel,
4510
+ color: uploadBtnColor ? uploadBtnColor : configStyles.FILE.uploadBtnColor,
4511
+ height: uploadBtnHeight ? uploadBtnHeight : configStyles.FILE.uploadBtnHeight,
4512
+ hoverColor: uploadBtnColor ? uploadBtnColor : configStyles.FILE.uploadBtnColor,
4513
+ backgroundColor: uploadBtnBackgroundColor ? uploadBtnBackgroundColor : configStyles.FILE.uploadBtnBackgroundColor,
4514
+ backgroundHoverColor: uploadBtnBackgroundColor ? uploadBtnBackgroundColor : configStyles.FILE.uploadBtnBackgroundColor
4515
+ }), /*#__PURE__*/React__default.createElement("p", {
4516
+ style: {
4517
+ margin: '0px',
4518
+ marginLeft: '5px',
4519
+ overflow: 'hidden',
4520
+ whiteSpace: 'nowrap',
4521
+ textOverflow: 'ellipsis'
4522
+ }
4523
+ }, singleFile ? singleFile[0].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ? fileSizeText : configStyles.FILE.fileSizeText, " ", maxSize, " \u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
4360
4524
  style: {
4361
4525
  position: 'absolute',
4362
4526
  top: '0px',
@@ -4416,6 +4580,7 @@ const NewFile = ({
4416
4580
  NewFile.propTypes = {
4417
4581
  or: PropTypes.string,
4418
4582
  size: PropTypes.string,
4583
+ preview: PropTypes.bool,
4419
4584
  label: PropTypes.string,
4420
4585
  color: PropTypes.string,
4421
4586
  height: PropTypes.string,
@@ -4426,6 +4591,7 @@ NewFile.propTypes = {
4426
4591
  upload: PropTypes.string,
4427
4592
  weight: PropTypes.number,
4428
4593
  maxSize: PropTypes.number,
4594
+ maxWidth: PropTypes.string,
4429
4595
  removeFile: PropTypes.func,
4430
4596
  className: PropTypes.string,
4431
4597
  errorSize: PropTypes.string,
@@ -4445,6 +4611,12 @@ NewFile.propTypes = {
4445
4611
  progressColor: PropTypes.string,
4446
4612
  deleteComponent: PropTypes.bool,
4447
4613
  removeComponent: PropTypes.func,
4614
+ uploadBtnFont: PropTypes.string,
4615
+ uploadBtnSize: PropTypes.string,
4616
+ uploadBtnLabel: PropTypes.string,
4617
+ uploadBtnColor: PropTypes.string,
4618
+ uploadBtnHeight: PropTypes.string,
4619
+ uploadBtnBackgroundColor: PropTypes.string,
4448
4620
  listItemHeight: PropTypes.string,
4449
4621
  backgroundColor: PropTypes.string,
4450
4622
  change: PropTypes.func.isRequired,
@@ -4472,6 +4644,7 @@ NewFile.propTypes = {
4472
4644
  };
4473
4645
  NewFile.defaultProps = {
4474
4646
  maxSize: 10,
4647
+ preview: true,
4475
4648
  timeForRemoveError: 5000,
4476
4649
  fileExtensions: ['jpg', 'jpeg', 'png', 'pdf', 'heic']
4477
4650
  };
@@ -4569,6 +4742,10 @@ Checkbox.defaultProps = {
4569
4742
  var css_248z$4 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
4570
4743
  styleInject(css_248z$4);
4571
4744
 
4745
+ const PositionSide = {
4746
+ TOP: 'top',
4747
+ BOTTOM: 'bottom'
4748
+ };
4572
4749
  const Textarea = ({
4573
4750
  size,
4574
4751
  label,
@@ -4603,7 +4780,8 @@ const Textarea = ({
4603
4780
  borderFocusColor,
4604
4781
  borderHoverColor,
4605
4782
  labelMarginBottom,
4606
- showCharacterCount
4783
+ showCharacterCount,
4784
+ characterCountPosition
4607
4785
  }) => {
4608
4786
  const [error, setError] = useState('');
4609
4787
  const [isHover, setIsHover] = useState(false);
@@ -4643,18 +4821,16 @@ const Textarea = ({
4643
4821
  if (!onChange) {
4644
4822
  alert('Please add onChange function on Textarea component');
4645
4823
  }
4646
- if (value === '') {
4647
- setError('');
4648
- }
4649
- setInnerValue(value);
4650
- }, [value, onChange]);
4651
- useEffect(() => {
4652
4824
  if (errorMessage) {
4653
4825
  setError(errorMessage);
4654
4826
  } else {
4655
4827
  setError('');
4656
4828
  }
4657
- }, [errorMessage]);
4829
+ if (value === '') {
4830
+ setError('');
4831
+ }
4832
+ setInnerValue(value);
4833
+ }, [value, onChange, errorMessage]);
4658
4834
  return /*#__PURE__*/React__default.createElement("div", {
4659
4835
  style: {
4660
4836
  width: width ? width : configStyles.TEXTAREA.width
@@ -4675,7 +4851,7 @@ const Textarea = ({
4675
4851
  display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
4676
4852
  fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
4677
4853
  }
4678
- }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && /*#__PURE__*/React__default.createElement("span", {
4854
+ }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", {
4679
4855
  style: {
4680
4856
  color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
4681
4857
  fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize
@@ -4708,14 +4884,29 @@ const Textarea = ({
4708
4884
  placeholder: placeholder,
4709
4885
  onMouseEnter: handleMouseEnter,
4710
4886
  onMouseLeave: handleMouseLeave
4711
- }), error ? /*#__PURE__*/React__default.createElement("span", {
4887
+ }), showCharacterCount && maxLength && characterCountPosition === 'bottom' && /*#__PURE__*/React__default.createElement("div", {
4888
+ style: {
4889
+ float: 'right'
4890
+ }
4891
+ }, /*#__PURE__*/React__default.createElement("span", {
4892
+ style: {
4893
+ color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
4894
+ fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize
4895
+ }
4896
+ }, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default.createElement("div", {
4897
+ style: {
4898
+ clear: 'both',
4899
+ wordBreak: 'break-all',
4900
+ maxWidth: width ? width : configStyles.TEXTAREA.width
4901
+ }
4902
+ }, /*#__PURE__*/React__default.createElement("span", {
4712
4903
  style: {
4713
4904
  display: 'inline-block',
4714
4905
  fontSize: errorSize ? errorSize : configStyles.TEXTAREA.errorSize,
4715
4906
  color: errorColor ? errorColor : configStyles.TEXTAREA.errorColor,
4716
4907
  marginTop: marginTop ? marginTop : configStyles.TEXTAREA.marginTop
4717
4908
  }
4718
- }, error) : '');
4909
+ }, error)) : '');
4719
4910
  };
4720
4911
  Textarea.propTypes = {
4721
4912
  size: PropTypes.string,
@@ -4751,7 +4942,11 @@ Textarea.propTypes = {
4751
4942
  borderFocusColor: PropTypes.string,
4752
4943
  borderHoverColor: PropTypes.string,
4753
4944
  labelMarginBottom: PropTypes.string,
4754
- onChange: PropTypes.func.isRequired
4945
+ onChange: PropTypes.func.isRequired,
4946
+ characterCountPosition: PropTypes.oneOf(Object.values(PositionSide))
4947
+ };
4948
+ Textarea.defaultProps = {
4949
+ characterCountPosition: 'top'
4755
4950
  };
4756
4951
 
4757
4952
  var css_248z$3 = "";
@@ -5607,4 +5802,4 @@ NewAutocomplete.defaultProps = {
5607
5802
  disabled: false
5608
5803
  };
5609
5804
 
5610
- export { Autocomplate, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
5805
+ export { Autocomplate, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };