@xaypay/tui 0.0.108 → 0.0.110

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
@@ -44,16 +44,16 @@ const SvgRequired = ({
44
44
  titleId,
45
45
  ...props
46
46
  }) => /*#__PURE__*/React.createElement("svg", _extends({
47
- width: "12",
48
- height: "12",
49
- viewBox: "0 0 12 12",
47
+ width: "10",
48
+ height: "10",
49
+ viewBox: "0 0 10 10",
50
50
  fill: "none",
51
51
  xmlns: "http://www.w3.org/2000/svg",
52
52
  "aria-labelledby": titleId
53
53
  }, props), title ? /*#__PURE__*/React.createElement("title", {
54
54
  id: titleId
55
55
  }, title) : null, /*#__PURE__*/React.createElement("path", {
56
- d: "M9.281 7.317 7 6l2.281-1.317a.5.5 0 0 0-.5-.866L6.5 5.134V2.5a.5.5 0 1 0-1 0v2.634L3.219 3.817a.5.5 0 0 0-.5.866L5 6 2.719 7.317a.5.5 0 0 0 .5.866L5.5 6.866V9.5a.5.5 0 1 0 1 0V6.866l2.281 1.317a.5.5 0 0 0 .5-.866Z",
56
+ d: "M7.734 6.097 5.834 5l1.9-1.098a.417.417 0 0 0-.417-.721l-1.9 1.097V2.083a.417.417 0 0 0-.834 0v2.195l-1.9-1.097a.417.417 0 0 0-.417.721L4.166 5l-1.9 1.097a.417.417 0 0 0 .416.722l1.901-1.097v2.195a.417.417 0 1 0 .834 0V5.722l1.9 1.097a.417.417 0 0 0 .417-.722Z",
57
57
  fill: "#E00"
58
58
  }));
59
59
 
@@ -85,7 +85,7 @@ function styleInject(css, ref) {
85
85
  }
86
86
 
87
87
  var css_248z$f = ".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"};
88
+ var styles$d = {"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
89
  styleInject(css_248z$f);
90
90
 
91
91
  const File = ({
@@ -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$d['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$d['file-form-wrap']} file-form-wrap-rem`, image ? styles$d['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$d['file-form']} file-form-rem ${error || errorMessage ? styles$d['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$d['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$d['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$d['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$d['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$d['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$d['delete-upload-icon']} delete-upload-icon-rem`,
179
179
  onClick: handleRemoveFile
180
180
  }, /*#__PURE__*/React__default.createElement("i", {
181
181
  className: "icon-delete"
@@ -350,15 +350,769 @@ SingleCheckbox.propTypes = {
350
350
  ignoreDisabledForChecked: PropTypes.bool
351
351
  };
352
352
 
353
- var css_248z$e = ".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{cursor:pointer;display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}";
353
+ var css_248z$e = ".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}";
354
+ var styles$c = {"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"};
354
355
  styleInject(css_248z$e);
355
356
 
356
- ({
357
+ /* eslint-disable no-prototype-builtins */
358
+ const TH = ({
359
+ item,
360
+ tHeadFamily,
361
+ tHeadPadding,
362
+ tHeadFontSize,
363
+ tHeadFontWeight,
364
+ handleCheckedHeader,
365
+ borderTopLeftRadius,
366
+ borderTopRightRadius,
367
+ handleHeaderItemClick,
368
+ handleCheckArrowActionHeader
369
+ }) => {
370
+ return /*#__PURE__*/React__default.createElement("th", {
371
+ style: {
372
+ width: 'auto',
373
+ cursor: 'pointer',
374
+ whiteSpace: 'nowrap',
375
+ position: 'relative',
376
+ padding: tHeadPadding,
377
+ fontSize: tHeadFontSize,
378
+ fontFamily: tHeadFamily,
379
+ fontWeight: tHeadFontWeight,
380
+ borderTopLeftRadius: borderTopLeftRadius,
381
+ borderTopRightRadius: borderTopRightRadius
382
+ },
383
+ onClick: handleHeaderItemClick,
384
+ className: `${item.sortingArrows && styles$c['sorting-arrows']}`
385
+ }, /*#__PURE__*/React__default.createElement("div", {
386
+ style: {
387
+ display: 'flex',
388
+ alignItems: 'flex-start',
389
+ justifyContent: Object.prototype.hasOwnProperty.call(item, 'checkBox') ? 'space-between' : 'center'
390
+ }
391
+ }, item.hasOwnProperty('checkBox') ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
392
+ data: item,
393
+ float: "left",
394
+ checked: item.checkBox.checked,
395
+ disabled: item.checkBox.disabled,
396
+ handleChecked: !item.checkBox.disabled ? handleCheckedHeader : _ => _,
397
+ checkedColor: item.checkBox.checkedColor ? item.checkBox.checkedColor : '',
398
+ unCheckedColor: item.checkBox.unCheckedColor ? item.checkBox.unCheckedColor : ''
399
+ }) : '', /*#__PURE__*/React__default.createElement("p", {
400
+ style: {
401
+ margin: '0px'
402
+ },
403
+ onClick: Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? e => handleCheckArrowActionHeader(e, item) : _ => _
404
+ }, item.type === 'show' ? item.content : Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : '')));
405
+ };
406
+
407
+ const TD = ({
408
+ item,
409
+ index,
410
+ innerIndex,
411
+ tBodyColor,
412
+ borderRight,
413
+ tBodyPadding,
414
+ tBodyFontSize,
415
+ openListColor,
416
+ tBodyTextAlign,
417
+ tBodyFontFamily,
418
+ tBodyFontWeight,
419
+ handleCheckDots,
420
+ handleCheckedBody,
421
+ handleBodyActionClick,
422
+ handleCheckArrowAction,
423
+ handleOpenCloseRowSingleArrow
424
+ }) => {
425
+ return /*#__PURE__*/React__default.createElement("td", {
426
+ style: {
427
+ width: 'auto',
428
+ color: tBodyColor,
429
+ verticalAlign: 'top',
430
+ whiteSpace: 'nowrap',
431
+ padding: tBodyPadding,
432
+ fontSize: tBodyFontSize,
433
+ borderRight: borderRight,
434
+ textAlign: tBodyTextAlign,
435
+ fontFamily: tBodyFontFamily,
436
+ fontWeight: tBodyFontWeight,
437
+ boxShadow: item.colorStatus ? `inset 3px 0px 0px 0px ${item.colorStatus}` : ''
438
+ }
439
+ }, Array.isArray(item) ? item.length > 0 ? item.map((newItem, newIndex) => {
440
+ if (newItem && !Array.isArray(newItem) && typeof newItem === 'object') {
441
+ return /*#__PURE__*/React__default.createElement("span", {
442
+ style: {
443
+ width: '32px',
444
+ height: '32px',
445
+ marginRight: '10px',
446
+ cursor: Object.prototype.hasOwnProperty.call(newItem, 'type') ? 'pointer' : 'auto'
447
+ },
448
+ id: newItem.id,
449
+ type: newItem.type,
450
+ className: styles$c['td-span'],
451
+ key: `${newItem.id}_${newIndex}`,
452
+ onClick: Object.prototype.hasOwnProperty.call(newItem, 'type') ? e => handleBodyActionClick(e, {
453
+ item,
454
+ index,
455
+ innerIndex
456
+ }) : _ => _
457
+ }, newItem.content);
458
+ } else if (newItem && Array.isArray(newItem)) {
459
+ return /*#__PURE__*/React__default.createElement("span", {
460
+ key: `${newItem.id}_${newIndex}`,
461
+ style: {
462
+ display: 'inline-block',
463
+ marginRight: newIndex !== item.length - 1 ? '10px' : '0px',
464
+ borderRight: newIndex !== item.length - 1 ? '1px solid rgb(238, 238, 238)' : 'none'
465
+ }
466
+ }, item[newIndex].map((iT, iN) => {
467
+ return /*#__PURE__*/React__default.createElement("span", {
468
+ style: {
469
+ width: '32px',
470
+ height: '32px',
471
+ marginRight: '10px',
472
+ cursor: Object.prototype.hasOwnProperty.call(iT, 'type') ? 'pointer' : 'auto'
473
+ },
474
+ id: iT.id ? iT.id : '',
475
+ type: iT.type ? iT.type : '',
476
+ className: styles$c['td-span'],
477
+ onClick: Object.prototype.hasOwnProperty.call(iT, 'type') ? e => handleBodyActionClick(e, {
478
+ index,
479
+ innerIndex,
480
+ items: item,
481
+ item: iT,
482
+ itemIndex: iN
483
+ }) : _ => _,
484
+ key: `${iT.id || iT.content}_${iN}`
485
+ }, iT.content);
486
+ }));
487
+ } else {
488
+ return /*#__PURE__*/React__default.createElement("span", {
489
+ key: `${newItem.id}_${newIndex}`
490
+ }, newItem);
491
+ }
492
+ }) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : item !== null && !Array.isArray(item) && typeof item === 'object' ? /*#__PURE__*/React__default.createElement("div", {
493
+ style: {
494
+ display: 'flex',
495
+ alignItems: 'flex-start',
496
+ justifyContent: item.contentList || item.checkBox ? 'space-between' : 'center'
497
+ }
498
+ }, item.contentList && /*#__PURE__*/React__default.createElement("div", {
499
+ id: item.id,
500
+ style: {
501
+ width: '21px',
502
+ height: '21px'
503
+ },
504
+ onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex),
505
+ className: styles$c['td-span']
506
+ }, item.status === 'close' ? item.closeArrow : item.openArrow), item.checkBox && /*#__PURE__*/React__default.createElement(SingleCheckbox, {
507
+ data: item,
508
+ handleChecked: handleCheckedBody,
509
+ checked: item.checkBox.checked,
510
+ disabled: item.checkBox.disabled,
511
+ checkedColor: item.checkBox.checkedColor,
512
+ unCheckedColor: item.checkBox.unCheckedColor
513
+ }), /*#__PURE__*/React__default.createElement("div", {
514
+ style: {
515
+ marginLeft: item.contentList ? '10px' : '0px'
516
+ }
517
+ }, /*#__PURE__*/React__default.createElement("p", {
518
+ style: {
519
+ margin: '0px',
520
+ cursor: Object.prototype.hasOwnProperty.call(item, 'arrowComponent') || Object.prototype.hasOwnProperty.call(item, 'dots') ? 'pointer' : 'auto'
521
+ },
522
+ onClick: Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? () => handleCheckArrowAction(item, item.checkIndex) : Object.prototype.hasOwnProperty.call(item, 'dots') ? e => handleCheckDots(e, item, index, innerIndex) : _ => _
523
+ }, item.content ? item.content : Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : Object.prototype.hasOwnProperty.call(item, 'dots') ? /*#__PURE__*/React__default.createElement("span", {
524
+ style: {
525
+ display: 'block',
526
+ position: 'relative'
527
+ }
528
+ }, item.dotsStatus === 'deActive' ? item.deActiveIcon : item.activeIcon, /*#__PURE__*/React__default.createElement("span", {
529
+ style: {
530
+ position: 'absolute',
531
+ display: item.dotsStatus === 'deActive' ? 'none' : 'block',
532
+ top: '0px',
533
+ right: 'calc(100% + 6px)',
534
+ width: '223px',
535
+ height: 'auto',
536
+ overflow: 'auto',
537
+ minHeight: '40px',
538
+ maxHeight: '246px',
539
+ borderRadius: '6px',
540
+ backgroundColor: '#FFFFFF',
541
+ boxShadow: '0px 0px 20px 0px #3C393E4D'
542
+ }
543
+ }, item.options && item.options.map((item, index) => {
544
+ return /*#__PURE__*/React__default.createElement("span", {
545
+ key: `${item.content}_${index}`,
546
+ className: styles$c['dots-option-item'],
547
+ style: {
548
+ color: '#3C393E',
549
+ fontSize: '14px',
550
+ fontFamily: 'Noto Sans Armenian'
551
+ }
552
+ // TODO: onClick
553
+ }, /*#__PURE__*/React__default.createElement("span", {
554
+ style: {
555
+ marginRight: '10px'
556
+ }
557
+ }, item.icon), /*#__PURE__*/React__default.createElement("span", {
558
+ style: {
559
+ width: 'calc(100% - 36px)',
560
+ textAlign: 'left',
561
+ overflow: 'hidden',
562
+ whiteSpace: 'nowrap',
563
+ textOverflow: 'ellipsis'
564
+ },
565
+ title: item.content
566
+ }, item.content));
567
+ }))) : ''), item.contentList && /*#__PURE__*/React__default.createElement("div", {
568
+ style: {
569
+ overflow: 'hidden',
570
+ marginTop: '10px',
571
+ height: item.status === 'close' ? '0px' : 'auto'
572
+ }
573
+ }, item.contentList.map((innerItem, innerIndex) => {
574
+ return /*#__PURE__*/React__default.createElement("p", {
575
+ key: `${innerItem}_${innerIndex}`,
576
+ className: styles$c['list-text'],
577
+ style: {
578
+ color: openListColor
579
+ }
580
+ // TODO: add onClick
581
+ }, innerItem);
582
+ })))) : '');
583
+ };
584
+
585
+ const SvgUpArrow = ({
586
+ title,
587
+ titleId,
588
+ ...props
589
+ }) => /*#__PURE__*/React.createElement("svg", _extends({
590
+ width: "21",
591
+ height: "21",
592
+ viewBox: "0 0 21 21",
593
+ fill: "none",
594
+ xmlns: "http://www.w3.org/2000/svg",
595
+ "aria-labelledby": titleId
596
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
597
+ id: titleId
598
+ }, title) : null, /*#__PURE__*/React.createElement("rect", {
599
+ x: 0.5,
600
+ y: 0.5,
601
+ width: 20,
602
+ height: 20,
603
+ rx: 0.5,
604
+ fill: "#fff",
605
+ stroke: "#EEE"
606
+ }), /*#__PURE__*/React.createElement("path", {
607
+ d: "M10.509 8.002c.183 0 .36.07.502.197l4.706 4.284a.912.912 0 0 1 .102 1.208.767.767 0 0 1-.532.305.742.742 0 0 1-.574-.194l-4.204-3.838-4.204 3.7a.765.765 0 0 1-.272.157.721.721 0 0 1-.599-.07.805.805 0 0 1-.235-.215.879.879 0 0 1-.16-.303.932.932 0 0 1 .06-.683.84.84 0 0 1 .21-.264l4.705-4.138a.735.735 0 0 1 .495-.146Z",
608
+ fill: "#3C393E"
609
+ }));
610
+
611
+ const SvgDownArrow = ({
612
+ title,
613
+ titleId,
614
+ ...props
615
+ }) => /*#__PURE__*/React.createElement("svg", _extends({
616
+ width: "21",
617
+ height: "21",
618
+ viewBox: "0 0 21 21",
619
+ fill: "none",
620
+ xmlns: "http://www.w3.org/2000/svg",
621
+ "aria-labelledby": titleId
622
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
623
+ id: titleId
624
+ }, title) : null, /*#__PURE__*/React.createElement("rect", {
625
+ x: 0.5,
626
+ y: 0.5,
627
+ width: 20,
628
+ height: 20,
629
+ rx: 0.5,
630
+ fill: "#fff",
631
+ stroke: "#EEE"
632
+ }), /*#__PURE__*/React.createElement("path", {
633
+ d: "M10.491 13.998a.745.745 0 0 1-.502-.197L5.283 9.517a.912.912 0 0 1-.102-1.208.767.767 0 0 1 .532-.305c.208-.021.414.049.574.194l4.204 3.838 4.204-3.7a.765.765 0 0 1 .272-.157.721.721 0 0 1 .599.07c.09.054.17.127.235.215a.88.88 0 0 1 .16.303.933.933 0 0 1-.06.683.841.841 0 0 1-.21.264l-4.706 4.138a.735.735 0 0 1-.494.146Z",
634
+ fill: "#3C393E"
635
+ }));
636
+
637
+ const Table = ({
638
+ getData,
639
+ dataBody,
640
+ arrowShow,
641
+ dataHeader,
642
+ arrowColumn,
643
+ tHeadColor,
644
+ tHeadFamily,
645
+ tHeadPadding,
646
+ tHeadFontSize,
647
+ tHeadFontWeight,
648
+ tHeadBorderRadius,
649
+ tHeadBackgroundColor,
650
+ tBodyColor,
651
+ tBodyPadding,
652
+ tBodyFontSize,
653
+ tBodyTextAlign,
654
+ tBodyFontWeight,
655
+ tBodyFontFamily,
656
+ tBodyRowBorder,
657
+ openListColor
658
+ }) => {
659
+ const [body, setBody] = useState([]);
660
+ const [header, setHeader] = useState([]);
661
+ const [disableArr, setDisableArr] = useState([]);
662
+ const [checkedArray, setCheckedArray] = useState([]);
663
+ const configStyles = compereConfigs();
664
+ const handleHeaderItemClick = e => {
665
+ e.stopPropagation();
666
+ if (!e.target.tagName.startsWith('svg') && e.target.innerText !== undefined && e.target.innerText !== '') {
667
+ let removeItemIndex;
668
+ let headerWithoutArrow;
669
+ header.map((item, index) => {
670
+ if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
671
+ removeItemIndex = index;
672
+ }
673
+ });
674
+ if (removeItemIndex !== undefined) {
675
+ const firstPart = header.slice(0, removeItemIndex);
676
+ const secondPart = header.slice(removeItemIndex + 1, header.length);
677
+ headerWithoutArrow = [...firstPart, ...secondPart];
678
+ }
679
+ const returnedData = {
680
+ from: 'header',
681
+ content: e.target.innerText,
682
+ row: headerWithoutArrow !== undefined ? headerWithoutArrow : header
683
+ };
684
+ getData(returnedData);
685
+ }
686
+ };
687
+ const handleBodyActionClick = (e, data) => {
688
+ e.stopPropagation();
689
+ // const dataRow =
690
+
691
+ const actionData = {
692
+ row: '',
693
+ item: data.item,
694
+ id: data.item.id,
695
+ items: data.items,
696
+ type: data.item.type,
697
+ rowIndex: data.index,
698
+ itemIndex: data.innerIndex,
699
+ itemInnerIndex: data.itemIndex
700
+ };
701
+ console.log(actionData);
702
+ };
703
+ const handleSetCheckboxArray = data => {
704
+ let checkedItems = [];
705
+ data.map((item, index) => {
706
+ item.map((innerItem, innerIndex) => {
707
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
708
+ if (!checkedItems[innerIndex]) {
709
+ checkedItems[innerIndex] = [];
710
+ }
711
+ checkedItems[innerIndex].push({
712
+ rowCount: index,
713
+ columnCount: innerIndex,
714
+ checked: innerItem.checkBox.checked
715
+ });
716
+ }
717
+ });
718
+ });
719
+ return checkedItems;
720
+ };
721
+ const handleSetInsertIndex = (data, count) => {
722
+ let arrowColumnCount;
723
+ if (typeof count !== 'number') {
724
+ alert('arrowColumn props must be a number, please check it');
725
+ } else {
726
+ if (count <= 0) {
727
+ arrowColumnCount = 0;
728
+ } else {
729
+ if (count >= data.length - 1) {
730
+ arrowColumnCount = data.length;
731
+ } else {
732
+ arrowColumnCount = count;
733
+ }
734
+ }
735
+ }
736
+ return arrowColumnCount;
737
+ };
738
+ const handleInsertArrow = (data, count, arrowObject) => {
739
+ if (count === 0) {
740
+ data.unshift(arrowObject);
741
+ } else if (count >= data.length - 1) {
742
+ data.push(arrowObject);
743
+ } else {
744
+ data.splice(count, 0, arrowObject);
745
+ }
746
+ return data;
747
+ };
748
+ const handleTransformDataForInsertArrow = (data, count, type) => {
749
+ const arrowObject = {
750
+ status: 'close',
751
+ checkIndex: null,
752
+ arrowComponent: true,
753
+ openArrow: /*#__PURE__*/React__default.createElement(SvgUpArrow, null),
754
+ closeArrow: /*#__PURE__*/React__default.createElement(SvgDownArrow, null)
755
+ };
756
+ if (type === 'body') {
757
+ return data.map((item, index) => {
758
+ const newObjWithArrow = {
759
+ ...arrowObject
760
+ };
761
+ newObjWithArrow.checkIndex = index;
762
+ return handleInsertArrow(item, count, newObjWithArrow);
763
+ });
764
+ } else {
765
+ const newObjWithArrow = {
766
+ ...arrowObject
767
+ };
768
+ newObjWithArrow.checkIndex = count;
769
+ return handleInsertArrow(data, count, newObjWithArrow);
770
+ }
771
+ };
772
+ const handleCheckedHeader = (data, e) => {
773
+ e.stopPropagation();
774
+ let removeItemIndex;
775
+ let checkableItemBool;
776
+ let checkableItemIndex;
777
+ let headerWithoutArrow;
778
+ let checkableBodyRowItems = [];
779
+ const updatedHeader = header.slice();
780
+ const updatedBody = body.slice().map(item => Object.values(item));
781
+ const newData = updatedHeader.map((item, index) => {
782
+ if (item.content === data.content) {
783
+ checkableItemIndex = index;
784
+ checkableItemBool = !item.checkBox.checked;
785
+ item.checkBox.checked = !item.checkBox.checked;
786
+ }
787
+ if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
788
+ removeItemIndex = index;
789
+ }
790
+ return item;
791
+ });
792
+ const newUpdatedBody = updatedBody.map((item, index) => {
793
+ return item.map((innerItem, innerIndex) => {
794
+ if (checkableItemIndex === innerIndex) {
795
+ innerItem.checkBox.checked = checkableItemBool;
796
+ checkableBodyRowItems.push({
797
+ column: innerIndex,
798
+ columnItem: innerItem
799
+ });
800
+ handleHeaderCheckedUpdate({
801
+ row: index,
802
+ column: innerIndex,
803
+ checked: {
804
+ checked: checkableItemBool
805
+ }
806
+ });
807
+ }
808
+ return innerItem;
809
+ });
810
+ });
811
+ if (removeItemIndex !== undefined) {
812
+ const firstPart = newData.slice(0, removeItemIndex);
813
+ const secondPart = newData.slice(removeItemIndex + 1, newData.length);
814
+ headerWithoutArrow = [...firstPart, ...secondPart];
815
+ }
816
+ const returnedData = {
817
+ from: 'header',
818
+ content: data.content,
819
+ checkBox: data.checkBox,
820
+ columnArray: checkableBodyRowItems,
821
+ row: headerWithoutArrow !== undefined ? headerWithoutArrow : newData
822
+ };
823
+ getData(returnedData);
824
+ setHeader(newData);
825
+ setBody(newUpdatedBody);
826
+ };
827
+ const handleCheckedBody = (data, e) => {
828
+ e.stopPropagation();
829
+ const updatedBody = body.slice().map(item => Object.values(item));
830
+ const newData = updatedBody.map((item, index) => {
831
+ return item.map((innerItem, innerIndex) => {
832
+ if (innerItem.id === data.id && innerItem.content === data.content && innerItem.checkBox) {
833
+ innerItem.checkBox.checked = !innerItem.checkBox.checked;
834
+ handleHeaderCheckedUpdate({
835
+ row: index,
836
+ column: innerIndex,
837
+ checked: innerItem.checkBox
838
+ });
839
+ }
840
+ return innerItem;
841
+ });
842
+ });
843
+ setBody(newData);
844
+ };
845
+ const handleHeaderCheckedUpdate = checkedData => {
846
+ const updatedHeader = header.slice();
847
+ const newCheckedArray = checkedArray.map((item, index) => {
848
+ return item.map((innerItem, innerIndex) => {
849
+ if (index === checkedData.column) {
850
+ if (innerIndex === checkedData.row) {
851
+ innerItem.checked = checkedData.checked.checked;
852
+ }
853
+ }
854
+ return innerItem;
855
+ });
856
+ });
857
+ const newData = updatedHeader.map((item, index) => {
858
+ if (newCheckedArray[index]) {
859
+ const tempCheckedArray = [];
860
+ newCheckedArray[index].map(innerItem => {
861
+ tempCheckedArray.push(innerItem.checked);
862
+ });
863
+ if (tempCheckedArray.every(i => i)) {
864
+ item.checkBox.checked = true;
865
+ } else {
866
+ item.checkBox.checked = false;
867
+ }
868
+ }
869
+ return item;
870
+ });
871
+ setHeader(newData);
872
+ setCheckedArray(newCheckedArray);
873
+ };
874
+ const handleCheckArrowAction = (item, rowPosition) => {
875
+ const status = item.status;
876
+ const checkedOpenableRow = body[rowPosition].map(innerItem => {
877
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'status')) {
878
+ if (status === 'close') {
879
+ innerItem.status = 'open';
880
+ } else {
881
+ innerItem.status = 'close';
882
+ }
883
+ }
884
+ return innerItem;
885
+ });
886
+ setBody(prev => {
887
+ prev[rowPosition] = checkedOpenableRow;
888
+ return [...prev];
889
+ });
890
+ };
891
+ const handleOpenCloseRowSingleArrow = (arrowRowIndex, arrowIndex) => {
892
+ let single = {};
893
+ const allArrows = [];
894
+ const checkedOpenableRow = body[arrowRowIndex].map((item, index) => {
895
+ if (index === arrowIndex) {
896
+ if (item.status === 'close') {
897
+ item.status = 'open';
898
+ } else {
899
+ item.status = 'close';
900
+ }
901
+ single = item;
902
+ }
903
+ if (Object.prototype.hasOwnProperty.call(item, 'status') && !Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
904
+ allArrows.push(item);
905
+ }
906
+ return item;
907
+ });
908
+ const checkedOpenableRowArrow = checkedOpenableRow.map(item => {
909
+ if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
910
+ if (single && single.status === 'close') {
911
+ item.status = 'close';
912
+ } else if (single && single.status === 'open') {
913
+ if (allArrows.every(i => i.status === 'open')) {
914
+ item.status = 'open';
915
+ }
916
+ }
917
+ }
918
+ return item;
919
+ });
920
+ setBody(prev => {
921
+ prev[arrowRowIndex] = checkedOpenableRowArrow;
922
+ return [...prev];
923
+ });
924
+ };
925
+ const handleCheckArrowActionHeader = (e, item) => {
926
+ e.stopPropagation();
927
+ const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
928
+ if (item.checkIndex === innerIndex) {
929
+ if (item.status === 'close') {
930
+ innerItem.status = 'open';
931
+ } else {
932
+ innerItem.status = 'close';
933
+ }
934
+ }
935
+ return innerItem;
936
+ });
937
+ const checkedOpenableAllRowsBody = body.map(innerItem => {
938
+ return innerItem.map(iElem => {
939
+ if (Object.prototype.hasOwnProperty.call(iElem, 'status')) {
940
+ if (item.status === 'open') {
941
+ iElem.status = 'open';
942
+ } else {
943
+ iElem.status = 'close';
944
+ }
945
+ }
946
+ return iElem;
947
+ });
948
+ });
949
+ setHeader(() => checkedOpenableAllRows);
950
+ setBody(() => checkedOpenableAllRowsBody);
951
+ };
952
+ const handleCheckDots = (e, item, index, innerIndex) => {
953
+ e.stopPropagation();
954
+ const checkBodyMore = body.map((elemItem, elemIndex) => {
955
+ return elemItem.map((elemInnerItem, elemInnerIndex) => {
956
+ if (elemIndex === index && Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
957
+ if (elemInnerIndex === innerIndex) {
958
+ if (item.dotsStatus === 'deActive') {
959
+ elemInnerItem.dotsStatus = 'active';
960
+ } else {
961
+ elemInnerItem.dotsStatus = 'deActive';
962
+ }
963
+ }
964
+ } else if (elemIndex !== index && Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
965
+ if (elemInnerIndex === innerIndex) {
966
+ elemInnerItem.dotsStatus = 'deActive';
967
+ }
968
+ }
969
+ return elemInnerItem;
970
+ });
971
+ });
972
+ setBody(() => checkBodyMore);
973
+ };
974
+ const handleCheckDisable = (arr, disableArr) => {
975
+ let headerWithDisabled = [];
976
+ if (disableArr && disableArr.length > 0) {
977
+ headerWithDisabled = arr.map((item, index) => {
978
+ if (disableArr[index]) {
979
+ if (Object.prototype.hasOwnProperty.call(item, 'checkBox')) {
980
+ item.checkBox.disabled = true;
981
+ }
982
+ }
983
+ return item;
984
+ });
985
+ }
986
+ return headerWithDisabled;
987
+ };
988
+ useEffect(() => {
989
+ let checkedItems = [];
990
+ const disabledArray = [];
991
+ const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
992
+ if (arrowShow) {
993
+ const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], arrowColumn);
994
+ const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
995
+ checkForInsertArrow.map((item, index) => {
996
+ item.map((innerItem, innerIndex) => {
997
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
998
+ if (Object.prototype.hasOwnProperty.call(innerItem.checkBox, 'disabled')) {
999
+ if (innerItem.checkBox.disabled === true) {
1000
+ if (!disabledArray[innerIndex]) {
1001
+ disabledArray[innerIndex] = {
1002
+ rowIndex: index,
1003
+ columnIndex: innerIndex
1004
+ };
1005
+ }
1006
+ }
1007
+ }
1008
+ }
1009
+ });
1010
+ });
1011
+ checkedItems = handleSetCheckboxArray(checkForInsertArrow);
1012
+ setBody(() => checkForInsertArrow);
1013
+ } else {
1014
+ checkedItems = handleSetCheckboxArray(checkBodyForChackedItems);
1015
+ checkBodyForChackedItems.map((item, index) => {
1016
+ item.map((innerItem, innerIndex) => {
1017
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
1018
+ if (Object.prototype.hasOwnProperty.call(innerItem.checkBox, 'disabled')) {
1019
+ if (innerItem.checkBox.disabled === true) {
1020
+ if (!disabledArray[innerIndex]) {
1021
+ disabledArray[innerIndex] = {
1022
+ rowIndex: index,
1023
+ columnIndex: innerIndex
1024
+ };
1025
+ }
1026
+ }
1027
+ }
1028
+ }
1029
+ });
1030
+ });
1031
+ setBody(() => dataBody);
1032
+ }
1033
+ setDisableArr(disabledArray);
1034
+ setCheckedArray(() => checkedItems);
1035
+ }, [dataBody, arrowColumn, arrowShow]);
1036
+ useEffect(() => {
1037
+ if (arrowShow) {
1038
+ const header = dataHeader.slice();
1039
+ const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
1040
+ const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
1041
+ const headerWithDisabled = handleCheckDisable(checkForInsertArrow, disableArr);
1042
+ setHeader(() => headerWithDisabled.length > 0 ? headerWithDisabled : checkForInsertArrow);
1043
+ } else {
1044
+ const headerWithDisabled = handleCheckDisable(dataHeader, disableArr);
1045
+ setHeader(() => headerWithDisabled.length > 0 ? headerWithDisabled : dataHeader);
1046
+ }
1047
+ }, [dataHeader, arrowColumn, arrowShow, disableArr]);
1048
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("table", {
1049
+ style: {
1050
+ width: '100%',
1051
+ borderCollapse: 'collapse'
1052
+ }
1053
+ }, header && header.length > 0 && /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", {
1054
+ style: {
1055
+ color: tHeadColor ? tHeadColor : configStyles.TABLE.tHeadColor,
1056
+ backgroundColor: tHeadBackgroundColor ? tHeadBackgroundColor : configStyles.TABLE.tHeadBackgroundColor
1057
+ }
1058
+ }, header.map((item, index) => {
1059
+ return /*#__PURE__*/React__default.createElement(TH, {
1060
+ item: item,
1061
+ key: `${item}_${index}`,
1062
+ handleCheckedHeader: handleCheckedHeader,
1063
+ handleHeaderItemClick: handleHeaderItemClick,
1064
+ handleCheckArrowActionHeader: handleCheckArrowActionHeader,
1065
+ tHeadFamily: tHeadFamily ? tHeadFamily : configStyles.TABLE.tHeadFamily,
1066
+ tHeadPadding: tHeadPadding ? tHeadPadding : configStyles.TABLE.tHeadPadding,
1067
+ tHeadFontSize: tHeadFontSize ? tHeadFontSize : configStyles.TABLE.tHeadFontSize,
1068
+ tHeadFontWeight: tHeadFontWeight ? tHeadFontWeight : configStyles.TABLE.tHeadFontWeight,
1069
+ borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px',
1070
+ borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px'
1071
+ });
1072
+ }))), body && body.length > 0 && /*#__PURE__*/React__default.createElement("tbody", {
1073
+ style: {
1074
+ boxShadow: '0px 10px 30px rgba(0, 35, 106, 0.06)'
1075
+ }
1076
+ }, body.map((item, index) => {
1077
+ return /*#__PURE__*/React__default.createElement("tr", {
1078
+ key: `${item}_${index}`,
1079
+ style: {
1080
+ borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.tBodyRowBorder
1081
+ }
1082
+ }, Object.values(item).map((innerItem, innerIndex) => {
1083
+ return /*#__PURE__*/React__default.createElement(TD, {
1084
+ index: index,
1085
+ item: innerItem,
1086
+ innerIndex: innerIndex,
1087
+ id: item.id ? item.id : '',
1088
+ handleCheckDots: handleCheckDots,
1089
+ key: `${innerItem}_${index}_${innerIndex}`,
1090
+ openListColor: openListColor ? openListColor : configStyles.TABLE.openListColor,
1091
+ handleCheckedBody: handleCheckedBody,
1092
+ handleBodyActionClick: handleBodyActionClick,
1093
+ tBodyColor: tBodyColor ? tBodyColor : configStyles.TABLE.tBodyColor,
1094
+ tBodyPadding: tBodyPadding ? tBodyPadding : configStyles.TABLE.tBodyPadding,
1095
+ tBodyFontSize: tBodyFontSize ? tBodyFontSize : configStyles.TABLE.tBodyFontSize,
1096
+ tBodyTextAlign: tBodyTextAlign ? tBodyTextAlign : configStyles.TABLE.tBodyTextAlign,
1097
+ tBodyFontFamily: tBodyFontFamily ? tBodyFontFamily : configStyles.TABLE.tBodyFontFamily,
1098
+ tBodyFontWeight: tBodyFontWeight ? tBodyFontWeight : configStyles.TABLE.tBodyFontWeight,
1099
+ borderRight: innerIndex === Object.values(item).length - 1 ? 'none' : configStyles.TABLE.tBodyRowBorder,
1100
+ handleCheckArrowAction: handleCheckArrowAction,
1101
+ handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
1102
+ });
1103
+ }));
1104
+ }))));
1105
+ };
1106
+ Table.propTypes = {
1107
+ getData: PropTypes.func,
357
1108
  dataBody: PropTypes.array,
1109
+ arrowShow: PropTypes.bool,
358
1110
  dataHeader: PropTypes.array,
1111
+ arrowColumn: PropTypes.number,
359
1112
  tHeadColor: PropTypes.string,
360
1113
  tHeadFamily: PropTypes.string,
361
1114
  tHeadPadding: PropTypes.string,
1115
+ tHeadFontSize: PropTypes.string,
362
1116
  tHeadFontWeight: PropTypes.number,
363
1117
  tHeadBorderRadius: PropTypes.string,
364
1118
  tHeadBackgroundColor: PropTypes.string,
@@ -369,8 +1123,8 @@ styleInject(css_248z$e);
369
1123
  tBodyFontWeight: PropTypes.string,
370
1124
  tBodyFontFamily: PropTypes.string,
371
1125
  tBodyRowBorder: PropTypes.string,
372
- setTableDataHeader: PropTypes.func
373
- });
1126
+ openListColor: PropTypes.string
1127
+ };
374
1128
 
375
1129
  var css_248z$d = ".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)}}";
376
1130
  var styles$b = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
@@ -491,6 +1245,9 @@ const Modal = ({
491
1245
  backgroundColor,
492
1246
  grayDecorHeight,
493
1247
  layerBackgroundColor,
1248
+ imageMargin,
1249
+ imageMaxWidth,
1250
+ imageWrapWidth,
494
1251
  imageWrapHeight
495
1252
  }) => {
496
1253
  const [select, setSelect] = useState(0);
@@ -628,11 +1385,11 @@ const Modal = ({
628
1385
  display: 'flex',
629
1386
  width: '100%',
630
1387
  height: '100%',
631
- overflow: 'hidden',
632
1388
  position: 'relative',
633
1389
  alignItems: 'center',
634
1390
  boxSizing: 'border-box',
635
1391
  justifyContent: 'center',
1392
+ overflow: type === 'content' ? 'auto' : 'hidden',
636
1393
  borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
637
1394
  borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle,
638
1395
  borderColor: borderColor ? borderColor : configStyles.MODAL.borderColor
@@ -665,7 +1422,7 @@ const Modal = ({
665
1422
  }
666
1423
  }, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
667
1424
  style: {
668
- width: '100%',
1425
+ width: imageWrapWidth ? imageWrapWidth : configStyles.MODAL.imageWrapWidth,
669
1426
  height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
670
1427
  }
671
1428
  }, innerData && innerData.length > 0 && innerData.map((item, index) => {
@@ -679,9 +1436,11 @@ const Modal = ({
679
1436
  display: 'block',
680
1437
  objectFit: 'cover',
681
1438
  objectPosition: 'center',
1439
+ margin: imageMargin ? imageMargin : configStyles.MODAL.imageMargin,
682
1440
  borderRadius: radius ? radius : configStyles.MODAL.radius,
683
1441
  width: imageWidth ? imageWidth : configStyles.MODAL.imageWidth,
684
- height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight
1442
+ height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight,
1443
+ maxWidth: imageMaxWidth ? imageMaxWidth : configStyles.MODAL.imageMaxWidth
685
1444
  },
686
1445
  src: item.url,
687
1446
  key: item.id ? item.id : index
@@ -746,7 +1505,11 @@ Modal.propTypes = {
746
1505
  justifyContent: PropTypes.string,
747
1506
  backgroundColor: PropTypes.string,
748
1507
  grayDecorHeight: PropTypes.string,
749
- layerBackgroundColor: PropTypes.string
1508
+ layerBackgroundColor: PropTypes.string,
1509
+ imageMargin: PropTypes.string,
1510
+ imageMaxWidth: PropTypes.string,
1511
+ imageWrapWidth: PropTypes.string,
1512
+ imageWrapHeight: PropTypes.string
750
1513
  };
751
1514
  Modal.defaultProps = {
752
1515
  type: 'content'
@@ -1108,7 +1871,7 @@ const Input = ({
1108
1871
  style: {
1109
1872
  width: width ? width : configStyles.INPUT.width,
1110
1873
  borderRadius: radius ? radius : configStyles.INPUT.radius,
1111
- boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.INPUT.errorColor}` : isHover ? boxShadowHover ? boxShadowHover : configStyles.INPUT.boxShadowHover : boxShadow ? boxShadow : configStyles.INPUT.boxShadow
1874
+ boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.INPUT.errorColor}` : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.boxShadowHover : boxShadow ? boxShadow : configStyles.INPUT.boxShadow
1112
1875
  },
1113
1876
  onMouseEnter: handleMouseEnter,
1114
1877
  onMouseLeave: handleMouseLeave
@@ -2942,6 +3705,7 @@ const NewFile = ({
2942
3705
  labelColor,
2943
3706
  errorColor,
2944
3707
  filesArray,
3708
+ componentId,
2945
3709
  putFileHere,
2946
3710
  borderColor,
2947
3711
  uploadColor,
@@ -2956,6 +3720,7 @@ const NewFile = ({
2956
3720
  listItemHeight,
2957
3721
  backgroundColor,
2958
3722
  deleteComponent,
3723
+ removeComponent,
2959
3724
  listItemPadding,
2960
3725
  progressFontSize,
2961
3726
  borderHoverColor,
@@ -2991,6 +3756,7 @@ const NewFile = ({
2991
3756
  } else {
2992
3757
  removeFile && removeFile(filesArray);
2993
3758
  }
3759
+ removeComponent(componentId);
2994
3760
  };
2995
3761
  const handleRemoveFile = () => {
2996
3762
  setImage(null);
@@ -3110,6 +3876,11 @@ const NewFile = ({
3110
3876
  alert('Please add removeFile prop on NewFile component, it is a require in multiple mode');
3111
3877
  }
3112
3878
  }, [multiple, removeFile, filesArray && filesArray.length, defaultData]);
3879
+ useEffect(() => {
3880
+ if (deleteComponent && !removeComponent) {
3881
+ alert('Please add removeComponent prop on NewFile component it is require when deleteComponent prop is true');
3882
+ }
3883
+ }, [deleteComponent]);
3113
3884
  useEffect(() => {
3114
3885
  if (errorMessage) {
3115
3886
  setError(errorMessage);
@@ -3294,12 +4065,14 @@ NewFile.propTypes = {
3294
4065
  borderColor: PropTypes.string,
3295
4066
  uploadColor: PropTypes.string,
3296
4067
  defaultData: PropTypes.object,
4068
+ componentId: PropTypes.number,
3297
4069
  maxSizeError: PropTypes.string,
3298
4070
  errorMessage: PropTypes.string,
3299
4071
  fileSizeText: PropTypes.string,
3300
4072
  noChoosenFile: PropTypes.string,
3301
4073
  progressColor: PropTypes.string,
3302
4074
  deleteComponent: PropTypes.bool,
4075
+ removeComponent: PropTypes.func,
3303
4076
  listItemHeight: PropTypes.string,
3304
4077
  backgroundColor: PropTypes.string,
3305
4078
  change: PropTypes.func.isRequired,
@@ -3425,6 +4198,7 @@ const Textarea = ({
3425
4198
  resize,
3426
4199
  radius,
3427
4200
  padding,
4201
+ disabled,
3428
4202
  required,
3429
4203
  onChange,
3430
4204
  minWidth,
@@ -3530,6 +4304,7 @@ const Textarea = ({
3530
4304
  border: 'none',
3531
4305
  outline: 'none',
3532
4306
  overflow: 'auto',
4307
+ cursor: disabled ? 'not-allowed' : 'auto',
3533
4308
  fontSize: size ? size : configStyles.TEXTAREA.size,
3534
4309
  height: height ? height : configStyles.TEXTAREA.height,
3535
4310
  padding: padding ? padding : configStyles.TEXTAREA.padding,
@@ -3544,6 +4319,7 @@ const Textarea = ({
3544
4319
  resize: resize ? resize : configStyles.TEXTAREA.resize
3545
4320
  },
3546
4321
  value: innerValue,
4322
+ disabled: disabled,
3547
4323
  onBlur: handleBlur,
3548
4324
  onFocus: handleFocus,
3549
4325
  onChange: handleChange,
@@ -3567,6 +4343,7 @@ Textarea.propTypes = {
3567
4343
  resize: PropTypes.string,
3568
4344
  radius: PropTypes.string,
3569
4345
  required: PropTypes.bool,
4346
+ disabled: PropTypes.bool,
3570
4347
  padding: PropTypes.string,
3571
4348
  minWidth: PropTypes.string,
3572
4349
  maxWidth: PropTypes.string,
@@ -3686,7 +4463,7 @@ Typography.propTypes = {
3686
4463
  textDecoration: PropTypes.string,
3687
4464
  backgroundColor: PropTypes.string,
3688
4465
  variant: PropTypes.oneOf(Object.values(TypographyType)),
3689
- size: PropTypes.oneOf(PropTypes.string, PropTypes.number)
4466
+ size: PropTypes.oneOf([PropTypes.string, PropTypes.number])
3690
4467
  };
3691
4468
  Typography.defaultProps = {
3692
4469
  variant: 'p'
@@ -4443,4 +5220,4 @@ NewAutocomplete.defaultProps = {
4443
5220
  disabled: false
4444
5221
  };
4445
5222
 
4446
- export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select, SingleCheckbox, Stepper, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
5223
+ export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select, SingleCheckbox, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };