@xaypay/tui 0.2.14 → 0.2.15

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
@@ -432,6 +432,8 @@ const FileItem = /*#__PURE__*/React__default.memo(({
432
432
  }, iconDelItem ? iconDelItem : /*#__PURE__*/React__default.createElement(SvgListItemDelete, null))));
433
433
  });
434
434
 
435
+ var img$2 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_18850_5919)'%3e%3cpath d='M13.4695 11.9505L20.7595 4.66046C20.9234 4.46916 21.009 4.22308 20.9993 3.9714C20.9895 3.71973 20.8852 3.48099 20.7071 3.30289C20.529 3.1248 20.2903 3.02047 20.0386 3.01075C19.7869 3.00102 19.5408 3.08663 19.3495 3.25046L12.0595 10.5405L4.76954 3.24046C4.57824 3.07663 4.33217 2.99102 4.08049 3.00075C3.82881 3.01047 3.59008 3.1148 3.41198 3.29289C3.23389 3.47099 3.12955 3.70973 3.11983 3.9614C3.11011 4.21308 3.19572 4.45915 3.35954 4.65046L10.6495 11.9505L3.34954 19.2405C3.24486 19.3301 3.15984 19.4404 3.09982 19.5645C3.0398 19.6886 3.00606 19.8237 3.00075 19.9614C2.99543 20.0991 3.01863 20.2365 3.06891 20.3648C3.11918 20.4931 3.19544 20.6097 3.29289 20.7071C3.39035 20.8046 3.5069 20.8808 3.63522 20.9311C3.76355 20.9814 3.90088 21.0046 4.0386 20.9993C4.17632 20.9939 4.31145 20.9602 4.43551 20.9002C4.55958 20.8402 4.6699 20.7551 4.75954 20.6505L12.0595 13.3605L19.3495 20.6505C19.5408 20.8143 19.7869 20.8999 20.0386 20.8902C20.2903 20.8804 20.529 20.7761 20.7071 20.598C20.8852 20.4199 20.9895 20.1812 20.9993 19.9295C21.009 19.6778 20.9234 19.4318 20.7595 19.2405L13.4695 11.9505Z' fill='%231C212D'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_18850_5919'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
436
+
435
437
  const boxSizing = 'border-box';
436
438
  const fontStyle = 'normal';
437
439
  const fontFamily = 'Arial';
@@ -458,17 +460,18 @@ const fontObject = {
458
460
  var packageResult = {
459
461
  // default properties for <Button /> component
460
462
  BUTTON: {
461
- type: 'button',
463
+ opacity: 1,
462
464
  width: '100%',
465
+ radius: '6px',
466
+ className: '',
467
+ type: 'button',
463
468
  height: '46px',
464
469
  color: 'white',
465
- contentWidth: false,
466
470
  border: 'none',
467
- radius: '6px',
471
+ disabled: false,
468
472
  cursor: 'pointer',
473
+ contentWidth: false,
469
474
  padding: '12px 20px',
470
- disabled: false,
471
- className: '',
472
475
  transition: 'background-color 240ms, color 240ms',
473
476
  box: {
474
477
  sizing: boxSizing
@@ -478,7 +481,11 @@ var packageResult = {
478
481
  backgroundHover: '#CB3A3A',
479
482
  disabled: 'rgba(60, 57, 62, 1)',
480
483
  disabledLine: 'rgba(60, 57, 62, 1)',
481
- disabledBackground: 'rgba(238, 238, 238, 1)'
484
+ disabledBackground: 'rgba(238, 238, 238, 1)',
485
+ withoutStyling: {
486
+ color: '#000000',
487
+ hoverColor: '#121212'
488
+ }
482
489
  },
483
490
  font: {
484
491
  ...fontObject
@@ -490,8 +497,10 @@ var packageResult = {
490
497
  }
491
498
  },
492
499
  icon: {
500
+ marginLeft: '10px',
493
501
  marginRight: '10px'
494
- }
502
+ },
503
+ withoutStyling: false
495
504
  },
496
505
  // default properties for <Input /> component
497
506
  INPUT: {
@@ -525,6 +534,7 @@ var packageResult = {
525
534
  color: presetColors.dark,
526
535
  display: 'block',
527
536
  lineHeight: '22px',
537
+ iconMargin: '10px',
528
538
  marginBottom: '6px',
529
539
  font: {
530
540
  ...fontObject
@@ -536,6 +546,7 @@ var packageResult = {
536
546
  zIndex: '1',
537
547
  className: '',
538
548
  marginTop: '10px',
549
+ iconMargin: '10px',
539
550
  lineHeight: '19px',
540
551
  font: {
541
552
  ...fontObject
@@ -1081,6 +1092,36 @@ var packageResult = {
1081
1092
  },
1082
1093
  closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
1083
1094
  },
1095
+ // default properties for <SwipeModal /> component
1096
+ SWIPEMODAL: {
1097
+ width: '300px',
1098
+ height: '100vh',
1099
+ titleStyle: {
1100
+ color: '#1C212D',
1101
+ textAlign: 'left',
1102
+ maxHeight: '66px',
1103
+ padding: '0px 20px',
1104
+ font: {
1105
+ ...fontObject
1106
+ }
1107
+ },
1108
+ parent: {
1109
+ width: '100%',
1110
+ height: '100vh',
1111
+ colors: {
1112
+ background: 'rgba(60, 61, 70, 0.2)'
1113
+ }
1114
+ },
1115
+ colors: {
1116
+ background: 'white'
1117
+ },
1118
+ border: {
1119
+ radius: '10px'
1120
+ },
1121
+ withParent: true,
1122
+ outSideClose: false,
1123
+ closeIcon: img$2
1124
+ },
1084
1125
  // default properties for <Checkbox /> component
1085
1126
  CHECKBOX: {
1086
1127
  className: '',
@@ -1163,13 +1204,48 @@ var packageResult = {
1163
1204
  },
1164
1205
  // default properties for <Toaster /> component
1165
1206
  TOASTER: {
1207
+ width: '440px',
1208
+ height: '83px',
1166
1209
  className: '',
1167
- icon: {
1168
- // info: React.createElement(SvgChecked, { just: 'must' }),
1169
- // warn: React.createElement(SvgUnchecked, { just: 'must' }),
1170
- // close: React.createElement(SvgChecked, { fill: 'green' }),
1171
- // error: React.createElement(SvgChecked, { fill: 'green' }),
1172
- // success: React.createElement(SvgChecked, { fill: 'green' }),
1210
+ marginBottom: '20px',
1211
+ backgroundColor: '#FFFFFF',
1212
+ padding: '14px 29px 14px 12px',
1213
+ border: {
1214
+ width: '2px',
1215
+ style: 'solid',
1216
+ radius: '40px',
1217
+ color: '#EEEEEE'
1218
+ },
1219
+ title: {
1220
+ color: '#3C393E',
1221
+ lineHeight: '22px',
1222
+ font: {
1223
+ size: '16px',
1224
+ style: 'normal',
1225
+ weight: 600,
1226
+ family: ''
1227
+ },
1228
+ props: {}
1229
+ },
1230
+ description: {
1231
+ color: '#3C393E',
1232
+ lineHeight: '16px',
1233
+ font: {
1234
+ size: '12px',
1235
+ style: 'normal',
1236
+ weight: 500,
1237
+ family: ''
1238
+ },
1239
+ props: {
1240
+ opacity: 0.8
1241
+ }
1242
+ },
1243
+ icons: {
1244
+ info: '',
1245
+ warn: '',
1246
+ error: '',
1247
+ close: '',
1248
+ success: ''
1173
1249
  }
1174
1250
  },
1175
1251
  // default properties for <Stepper /> component
@@ -1255,6 +1331,7 @@ const Button = ({
1255
1331
  radius,
1256
1332
  outline,
1257
1333
  padding,
1334
+ opacity,
1258
1335
  onClick,
1259
1336
  disabled,
1260
1337
  className,
@@ -1263,13 +1340,18 @@ const Button = ({
1263
1340
  hoverColor,
1264
1341
  transition,
1265
1342
  contentWidth,
1343
+ iconRightSide,
1266
1344
  disabledColor,
1267
1345
  textTransform,
1346
+ withoutStyling,
1268
1347
  backgroundColor,
1269
1348
  disabledLineColor,
1349
+ btnIconMarginLeft,
1270
1350
  btnIconMarginRight,
1351
+ withoutStylingColor,
1271
1352
  backgroundHoverColor,
1272
1353
  disabledBackgroundColor,
1354
+ withoutStylingHoverColor,
1273
1355
  ...props
1274
1356
  }) => {
1275
1357
  const [classProps, setClassProps] = useState({});
@@ -1305,22 +1387,23 @@ const Button = ({
1305
1387
  outline: 'none',
1306
1388
  alignItems: 'center',
1307
1389
  justifyContent: 'center',
1390
+ height: height ?? configStyles.BUTTON.height,
1391
+ padding: padding ?? configStyles.BUTTON.padding,
1308
1392
  fontSize: size ?? configStyles.BUTTON.font.size,
1393
+ borderRadius: radius ?? configStyles.BUTTON.radius,
1309
1394
  fontStyle: style ?? configStyles.BUTTON.font.style,
1310
1395
  fontFamily: font ?? configStyles.BUTTON.font.family,
1311
- height: height ?? configStyles.BUTTON.height,
1312
1396
  fontWeight: weight ?? configStyles.BUTTON.font.weight,
1313
- padding: padding ?? configStyles.BUTTON.padding,
1314
- borderRadius: radius ?? configStyles.BUTTON.radius,
1315
1397
  boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
1316
1398
  transition: transition ?? configStyles.BUTTON.transition,
1317
1399
  border: outline ? 'none' : border ?? configStyles.BUTTON.border,
1318
1400
  width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
1319
- cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
1320
1401
  textTransform: textTransform ?? configStyles.BUTTON.text.transform,
1321
- backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
1322
- boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background}` : 'none',
1323
- color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
1402
+ cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
1403
+ opacity: opacity ?? configStyles.BUTTON.opacity,
1404
+ backgroundColor: withoutStyling ?? configStyles.BUTTON.withoutStyling ? 'transparent' : (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
1405
+ boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background}` : 'none',
1406
+ color: withoutStyling ?? configStyles.BUTTON.withoutStyling ? isHover ? withoutStylingHoverColor ?? configStyles.BUTTON.colors.withoutStyling.hoverColor : withoutStylingColor ?? configStyles.BUTTON.colors.withoutStyling.color : (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
1324
1407
  },
1325
1408
  type: type ?? configStyles.BUTTON.type,
1326
1409
  disabled: disabled ?? configStyles.BUTTON.disabled,
@@ -1328,43 +1411,50 @@ const Button = ({
1328
1411
  onMouseEnter: handleMouseEnter,
1329
1412
  onMouseLeave: handleMouseLeave,
1330
1413
  className: classProps
1331
- }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
1414
+ }, props), !iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', ' ', label && /*#__PURE__*/React__default.createElement("span", {
1332
1415
  style: {
1333
- marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px'
1416
+ marginLeft: icon && !iconRightSide ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px',
1417
+ marginRight: icon && iconRightSide ? btnIconMarginLeft ? btnIconMarginLeft : configStyles.BUTTON.icon.marginLeft : '0px'
1334
1418
  }
1335
- }, label), ' ', !icon && !label && 'Add icon or label prop on Button component'));
1419
+ }, label), ' ', iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', !icon && !label && 'Add icon or label prop on Button component'));
1336
1420
  };
1337
1421
  Button.propTypes = {
1338
1422
  type: PropTypes.string,
1339
1423
  size: PropTypes.string,
1340
1424
  style: PropTypes.string,
1341
- weight: PropTypes.string,
1342
1425
  font: PropTypes.string,
1343
1426
  icon: PropTypes.element,
1344
- hoverIcon: PropTypes.element,
1345
1427
  color: PropTypes.string,
1346
1428
  width: PropTypes.string,
1347
1429
  outline: PropTypes.bool,
1348
1430
  onClick: PropTypes.func,
1349
1431
  label: PropTypes.string,
1432
+ weight: PropTypes.string,
1350
1433
  height: PropTypes.string,
1351
1434
  cursor: PropTypes.string,
1352
1435
  border: PropTypes.string,
1353
1436
  disabled: PropTypes.bool,
1354
1437
  radius: PropTypes.string,
1355
1438
  padding: PropTypes.string,
1439
+ opacity: PropTypes.number,
1356
1440
  boxSizing: PropTypes.string,
1357
1441
  className: PropTypes.string,
1442
+ hoverIcon: PropTypes.element,
1358
1443
  hoverColor: PropTypes.string,
1359
1444
  transition: PropTypes.string,
1360
1445
  contentWidth: PropTypes.bool,
1446
+ iconRightSide: PropTypes.bool,
1447
+ withoutStyling: PropTypes.bool,
1361
1448
  textTransform: PropTypes.string,
1362
1449
  disabledColor: PropTypes.string,
1363
1450
  backgroundColor: PropTypes.string,
1364
1451
  disabledLineColor: PropTypes.string,
1452
+ btnIconMarginLeft: PropTypes.string,
1365
1453
  btnIconMarginRight: PropTypes.string,
1454
+ withoutStylingColor: PropTypes.string,
1366
1455
  backgroundHoverColor: PropTypes.string,
1367
- disabledBackgroundColor: PropTypes.string
1456
+ disabledBackgroundColor: PropTypes.string,
1457
+ withoutStylingHoverColor: PropTypes.string
1368
1458
  };
1369
1459
 
1370
1460
  const SvgPdf = ({
@@ -2442,9 +2532,9 @@ function styleInject(css, ref) {
2442
2532
  }
2443
2533
  }
2444
2534
 
2445
- var css_248z$a = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}";
2446
- var styles$9 = {"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"};
2447
- styleInject(css_248z$a);
2535
+ var css_248z$b = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}";
2536
+ 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"};
2537
+ styleInject(css_248z$b);
2448
2538
 
2449
2539
  /* eslint-disable no-prototype-builtins */
2450
2540
  const TH = ({
@@ -2486,7 +2576,7 @@ const TH = ({
2486
2576
  borderColor: hideBorder ? 'transparent' : '#eeeeee'
2487
2577
  },
2488
2578
  onClick: handleHeaderItemClick,
2489
- className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$9['sorting-arrows'] : '' : ''}`
2579
+ className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$a['sorting-arrows'] : '' : ''}`
2490
2580
  }, /*#__PURE__*/React__default.createElement("div", {
2491
2581
  style: {
2492
2582
  display: 'flex',
@@ -2620,7 +2710,7 @@ const TD = ({
2620
2710
  },
2621
2711
  id: newItem.id,
2622
2712
  type: newItem.type,
2623
- className: styles$9['td-span'],
2713
+ className: styles$a['td-span'],
2624
2714
  key: `${newItem.id}_${newIndex}`,
2625
2715
  onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
2626
2716
  }, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
@@ -2642,7 +2732,7 @@ const TD = ({
2642
2732
  },
2643
2733
  id: iT.id ? iT.id : '',
2644
2734
  type: iT.type ? iT.type : '',
2645
- className: styles$9['td-span'],
2735
+ className: styles$a['td-span'],
2646
2736
  onClick: e => handleCheckActions(e, iT, 'type', iN),
2647
2737
  key: `${iT.id || iT.content}_${iN}`
2648
2738
  }, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
@@ -2666,7 +2756,7 @@ const TD = ({
2666
2756
  cursor: 'pointer'
2667
2757
  },
2668
2758
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
2669
- className: styles$9['td-span']
2759
+ className: styles$a['td-span']
2670
2760
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'draggableIcon') && /*#__PURE__*/React__default.createElement("div", {
2671
2761
  draggable: true,
2672
2762
  style: {
@@ -2735,7 +2825,7 @@ const TD = ({
2735
2825
  }, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
2736
2826
  return /*#__PURE__*/React__default.createElement("span", {
2737
2827
  key: `${optionItem.content}_${optionIndex}`,
2738
- className: styles$9['dots-option-item'],
2828
+ className: styles$a['dots-option-item'],
2739
2829
  style: {
2740
2830
  color: '#3C393E',
2741
2831
  fontSize: '14px',
@@ -2777,7 +2867,7 @@ const TD = ({
2777
2867
  }, innerItem.content.map((contInnerItem, contInnerIndex) => {
2778
2868
  return /*#__PURE__*/React__default.createElement("p", {
2779
2869
  key: `${contInnerItem}_${contInnerIndex}`,
2780
- className: styles$9['list-text'],
2870
+ className: styles$a['list-text'],
2781
2871
  style: {
2782
2872
  maxWidth: '100%',
2783
2873
  color: openListColor,
@@ -2794,7 +2884,7 @@ const TD = ({
2794
2884
  } else {
2795
2885
  return /*#__PURE__*/React__default.createElement("p", {
2796
2886
  key: `${innerItem}_${innerItemIndex}`,
2797
- className: styles$9['list-text'],
2887
+ className: styles$a['list-text'],
2798
2888
  style: {
2799
2889
  maxWidth: '100%',
2800
2890
  color: openListColor,
@@ -2815,7 +2905,7 @@ const TD = ({
2815
2905
  cursor: 'pointer'
2816
2906
  },
2817
2907
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
2818
- className: styles$9['td-span']
2908
+ className: styles$a['td-span']
2819
2909
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
2820
2910
  };
2821
2911
 
@@ -3072,7 +3162,6 @@ const Table = ({
3072
3162
  }
3073
3163
  };
3074
3164
  const handleCheckedHeader = (data, e) => {
3075
- console.log('ok - - - - - - - ');
3076
3165
  e.stopPropagation();
3077
3166
  let removeItemIndex;
3078
3167
  let checkableItemBool;
@@ -3183,9 +3272,18 @@ const Table = ({
3183
3272
  tempCheckedArray.push(innerItem.checked);
3184
3273
  });
3185
3274
  if (tempCheckedArray.every(i => i)) {
3186
- item.checkBox.checked = true;
3275
+ if (hasOwnerProperty(item, 'checkBox')) {
3276
+ if (hasOwnerProperty(item.checkBox, 'checked')) {
3277
+ item.checkBox.checked = true;
3278
+ return item;
3279
+ }
3280
+ }
3187
3281
  } else {
3188
- item.checkBox.checked = false;
3282
+ if (hasOwnerProperty(item, 'checkBox')) {
3283
+ if (hasOwnerProperty(item.checkBox, 'checked')) {
3284
+ item.checkBox.checked = false;
3285
+ }
3286
+ }
3189
3287
  }
3190
3288
  }
3191
3289
  return item;
@@ -3250,7 +3348,7 @@ const Table = ({
3250
3348
  const handleCheckArrowActionHeader = (e, item) => {
3251
3349
  e.stopPropagation();
3252
3350
  const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
3253
- if (item.checkIndex === innerIndex) {
3351
+ if (item.checkIndex === (draggable && !showOrder ? innerIndex - 1 : draggable && showOrder ? innerIndex - 2 : innerIndex)) {
3254
3352
  if (item.status === 'close') {
3255
3353
  innerItem.status = 'open';
3256
3354
  } else {
@@ -3360,7 +3458,12 @@ const Table = ({
3360
3458
  const newRows = body;
3361
3459
  const [draggedRow] = newRows.splice(draggedRowIndex.current, 1);
3362
3460
  newRows.splice(index, 0, draggedRow);
3363
- newRows.map(item => {
3461
+ newRows.map((item, newIndex) => {
3462
+ item.map(innerItem => {
3463
+ if (hasOwnerProperty(innerItem, 'checkIndex')) {
3464
+ innerItem.checkIndex = newIndex;
3465
+ }
3466
+ });
3364
3467
  correctData.push([...item]);
3365
3468
  });
3366
3469
  setBody(correctData);
@@ -3382,6 +3485,16 @@ const Table = ({
3382
3485
  itemRefs.current[index] = element;
3383
3486
  }
3384
3487
  };
3488
+ const handleSafeStringify = obj => {
3489
+ const seen = new WeakSet();
3490
+ return JSON.stringify(obj, (key, value) => {
3491
+ if (typeof value === "object" && value !== null) {
3492
+ if (seen.has(value)) return; // Ignore circular reference
3493
+ seen.add(value);
3494
+ }
3495
+ return value;
3496
+ });
3497
+ };
3385
3498
  useEffect(() => {
3386
3499
  const draggableArray = body && body.length && body.map((item, index) => {
3387
3500
  if (showOrder) {
@@ -3398,7 +3511,7 @@ const Table = ({
3398
3511
  setBody(() => draggableArray);
3399
3512
  }, [checkDrag]);
3400
3513
  useEffect(() => {
3401
- const isEqual = JSON.stringify(body) === JSON.stringify(dataBody);
3514
+ const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
3402
3515
  if (!isEqual) {
3403
3516
  let insert = [];
3404
3517
  let newArray = [];
@@ -3406,7 +3519,11 @@ const Table = ({
3406
3519
  const disabledArray = [];
3407
3520
  const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
3408
3521
  if (arrowShow) {
3409
- const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], arrowColumn);
3522
+ let column = arrowColumn;
3523
+ if (draggable) {
3524
+ column -= 1;
3525
+ }
3526
+ const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], column);
3410
3527
  const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
3411
3528
  insert = checkForInsertArrow.map((item, index) => {
3412
3529
  item.map((innerItem, innerIndex) => {
@@ -3425,27 +3542,8 @@ const Table = ({
3425
3542
  });
3426
3543
  return item;
3427
3544
  });
3545
+ newArray = insert;
3428
3546
  checkedItems = handleSetCheckboxArray(insert);
3429
- if (draggable) {
3430
- newArray = insert && insert.length && insert.map((item, index) => {
3431
- item.map(innerItem => {
3432
- if (hasOwnerProperty(innerItem, 'colorStatus')) {
3433
- innerItem.colorStatus = null;
3434
- }
3435
- });
3436
- if (showOrder) {
3437
- item.unshift({
3438
- content: index + 1,
3439
- draggable: true
3440
- });
3441
- }
3442
- item.unshift({
3443
- draggableIcon: '',
3444
- colorStatus: draggableColor
3445
- });
3446
- return item;
3447
- });
3448
- }
3449
3547
  } else {
3450
3548
  insert = checkBodyForChackedItems.map((item, index) => {
3451
3549
  item.map((innerItem, innerIndex) => {
@@ -3464,69 +3562,62 @@ const Table = ({
3464
3562
  });
3465
3563
  return item;
3466
3564
  });
3565
+ newArray = insert;
3467
3566
  checkedItems = handleSetCheckboxArray(insert);
3468
- if (draggable) {
3469
- newArray = insert && insert.length && insert.map((item, index) => {
3470
- item.map(innerItem => {
3471
- if (hasOwnerProperty(innerItem, 'colorStatus')) {
3472
- innerItem.colorStatus = null;
3473
- }
3474
- });
3475
- if (showOrder) {
3476
- item.unshift({
3477
- content: index + 1,
3478
- draggable: true
3479
- });
3567
+ }
3568
+ if (draggable) {
3569
+ newArray = insert && insert.length && insert.map((item, index) => {
3570
+ item.map(innerItem => {
3571
+ if (hasOwnerProperty(innerItem, 'colorStatus')) {
3572
+ innerItem.colorStatus = null;
3480
3573
  }
3574
+ });
3575
+ if (showOrder) {
3481
3576
  item.unshift({
3482
- draggableIcon: '',
3483
- colorStatus: draggableColor
3577
+ content: index + 1,
3578
+ draggable: true
3484
3579
  });
3485
- return item;
3580
+ }
3581
+ item.unshift({
3582
+ draggableIcon: '',
3583
+ colorStatus: draggableColor
3486
3584
  });
3487
- }
3585
+ return item;
3586
+ });
3488
3587
  }
3489
- getDraggableData && getDraggableData(newArray && newArray.length ? newArray : insert);
3490
- setBody(() => newArray && newArray.length ? newArray : insert);
3588
+ setBody(() => [...newArray]);
3491
3589
  setDisableArr(disabledArray);
3492
3590
  setCheckedArray(() => checkedItems);
3591
+ getDraggableData && getDraggableData(newArray);
3493
3592
  }
3494
3593
  }, [dataBody, arrowColumn, arrowShow, draggable]);
3495
3594
  useEffect(() => {
3496
- const isEqual = JSON.stringify(header) === JSON.stringify(dataHeader);
3595
+ const isEqual = handleSafeStringify(header) === handleSafeStringify(dataHeader);
3497
3596
  if (!isEqual) {
3498
- let insert = [];
3499
3597
  let newArray = [];
3500
3598
  if (arrowShow) {
3501
- const header = dataHeader.slice();
3502
- const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
3503
- const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
3504
- insert = checkForInsertArrow;
3599
+ let column = arrowColumn;
3505
3600
  if (draggable) {
3506
- newArray = insert;
3507
- newArray && newArray.length && newArray.unshift({
3508
- content: ''
3509
- });
3510
- if (showOrder) {
3511
- newArray.unshift({
3512
- content: ''
3513
- });
3514
- }
3601
+ column -= 1;
3515
3602
  }
3603
+ const header = dataHeader.slice();
3604
+ const arrowColumnCount = handleSetInsertIndex(header, column);
3605
+ const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
3606
+ newArray = checkForInsertArrow;
3516
3607
  } else {
3517
- if (draggable) {
3518
- newArray = dataHeader;
3519
- newArray && newArray.length && newArray.unshift({
3608
+ newArray = dataHeader.slice();
3609
+ }
3610
+ if (draggable) {
3611
+ newArray && newArray.length && newArray.unshift({
3612
+ content: ''
3613
+ });
3614
+ if (showOrder) {
3615
+ newArray.unshift({
3520
3616
  content: ''
3521
3617
  });
3522
- if (showOrder) {
3523
- newArray.unshift({
3524
- content: ''
3525
- });
3526
- }
3527
3618
  }
3528
3619
  }
3529
- setHeader(() => newArray && newArray.length ? newArray : insert);
3620
+ setHeader(() => [...newArray]);
3530
3621
  }
3531
3622
  }, [dataHeader, arrowColumn, arrowShow, disableArr, draggable]);
3532
3623
  useEffect(() => {
@@ -3688,6 +3779,9 @@ const Table = ({
3688
3779
  };
3689
3780
  Table.propTypes = {
3690
3781
  getData: PropTypes.func,
3782
+ getDraggableData: PropTypes.func,
3783
+ draggable: PropTypes.bool,
3784
+ showOrder: PropTypes.bool,
3691
3785
  dataBody: PropTypes.array,
3692
3786
  arrowShow: PropTypes.bool,
3693
3787
  dataHeader: PropTypes.array,
@@ -3725,9 +3819,9 @@ Table.propTypes = {
3725
3819
  hideBorder: PropTypes.bool
3726
3820
  };
3727
3821
 
3728
- var css_248z$9 = ".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)}}";
3729
- var styles$8 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
3730
- styleInject(css_248z$9);
3822
+ var css_248z$a = ".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)}}";
3823
+ var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
3824
+ styleInject(css_248z$a);
3731
3825
 
3732
3826
  const SvgNext = ({
3733
3827
  title,
@@ -4002,7 +4096,7 @@ const Modal = ({
4002
4096
  justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
4003
4097
  }
4004
4098
  }, /*#__PURE__*/React__default.createElement("div", {
4005
- className: `${styles$8['animation__modal']}`,
4099
+ className: `${styles$9['animation__modal']}`,
4006
4100
  onClick: handleStopClosing,
4007
4101
  style: {
4008
4102
  position: 'relative',
@@ -4489,9 +4583,9 @@ const NumberInput = ({
4489
4583
  });
4490
4584
  };
4491
4585
 
4492
- var css_248z$8 = ".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)}}";
4493
- var styles$7 = {"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"};
4494
- styleInject(css_248z$8);
4586
+ var css_248z$9 = ".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)}}";
4587
+ 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"};
4588
+ styleInject(css_248z$9);
4495
4589
 
4496
4590
  const InputTypes = {
4497
4591
  TEL: 'tel',
@@ -4499,6 +4593,10 @@ const InputTypes = {
4499
4593
  NUMBER: 'number',
4500
4594
  PASSWORD: 'password'
4501
4595
  };
4596
+ const IconSides = {
4597
+ LEFT: 'left',
4598
+ RIGHT: 'right'
4599
+ };
4502
4600
  const P = styled.span`
4503
4601
  animation: ${true};
4504
4602
  `;
@@ -4521,6 +4619,8 @@ const Input = ({
4521
4619
  leftIcon,
4522
4620
  required,
4523
4621
  disabled,
4622
+ errorDots,
4623
+ errorIcon,
4524
4624
  labelDots,
4525
4625
  iconWidth,
4526
4626
  rightIcon,
@@ -4531,6 +4631,7 @@ const Input = ({
4531
4631
  errorSize,
4532
4632
  labelSize,
4533
4633
  maxLength,
4634
+ labelIcon,
4534
4635
  labelStyle,
4535
4636
  floatToFix,
4536
4637
  minNumSize,
@@ -4539,6 +4640,8 @@ const Input = ({
4539
4640
  errorColor,
4540
4641
  withoutDot,
4541
4642
  errorStyle,
4643
+ labelAction,
4644
+ errorAction,
4542
4645
  placeholder,
4543
4646
  errorZindex,
4544
4647
  labelWeight,
@@ -4548,15 +4651,21 @@ const Input = ({
4548
4651
  errorMessage,
4549
4652
  autoComplete,
4550
4653
  labelDisplay,
4654
+ labelIconSide,
4655
+ showLabelIcon,
4656
+ errorIconSide,
4657
+ showErrorIcon,
4551
4658
  errorMarginTop,
4552
4659
  boxShadowHover,
4553
4660
  errorClassName,
4661
+ labelIconMargin,
4554
4662
  labelFontFamily,
4555
4663
  phoneAlignItems,
4556
4664
  errorLineHeight,
4557
4665
  labelLineHeight,
4558
4666
  numberMaxLength,
4559
4667
  backgroundColor,
4668
+ errorIconMargin,
4560
4669
  withZero = false,
4561
4670
  labelMarginBottom,
4562
4671
  regexpErrorMessage,
@@ -4574,7 +4683,11 @@ const Input = ({
4574
4683
  const [classProps, setClassProps] = useState({});
4575
4684
  const [innerValue, setInnerValue] = useState('');
4576
4685
  const [configStyles, setConfigStyles] = useState({});
4686
+ const [innerErrorIcon, setInnerErrorIcon] = useState('');
4687
+ const [innerLabelIcon, setInnerLabelIcon] = useState('');
4577
4688
  const [innerErrorMessage, setInnerErrorMessage] = useState('');
4689
+ const [innerErrorIconSide, setInnerErrorIconSide] = useState('left');
4690
+ const [innerLabelIconSide, setInnerLabelIconSide] = useState('left');
4578
4691
  const inpStyles = configStyles.INPUT && {
4579
4692
  width: width ?? configStyles.INPUT.width,
4580
4693
  cursor: disabled ? 'not-allowed' : 'auto',
@@ -4631,11 +4744,27 @@ const Input = ({
4631
4744
  setInnerValue(() => val);
4632
4745
  }, [value]);
4633
4746
  useEffect(() => {
4634
- className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
4747
+ className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
4635
4748
  }, [className]);
4749
+ useEffect(() => {
4750
+ setInnerErrorIcon(() => errorIcon);
4751
+ }, [errorIcon]);
4752
+ useEffect(() => {
4753
+ if (errorIconSide) {
4754
+ setInnerErrorIconSide(() => errorIconSide);
4755
+ }
4756
+ }, [errorIconSide]);
4757
+ useEffect(() => {
4758
+ setInnerLabelIcon(() => labelIcon);
4759
+ }, [labelIcon]);
4760
+ useEffect(() => {
4761
+ if (labelIconSide) {
4762
+ setInnerLabelIconSide(() => labelIconSide);
4763
+ }
4764
+ }, [labelIconSide]);
4636
4765
  useEffect(() => {
4637
4766
  configStylesPromise.then(data => {
4638
- setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
4767
+ setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
4639
4768
  setConfigStyles(() => {
4640
4769
  return {
4641
4770
  ...data
@@ -4663,8 +4792,28 @@ const Input = ({
4663
4792
  textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
4664
4793
  },
4665
4794
  title: label
4666
- }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
4667
- className: `${styles$7['input-content']}`,
4795
+ }, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
4796
+ alt: "label icon",
4797
+ src: innerLabelIcon,
4798
+ style: {
4799
+ width: '14px',
4800
+ height: '14px',
4801
+ cursor: labelAction ? 'pointer' : 'normal',
4802
+ marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
4803
+ },
4804
+ onClick: labelAction ? () => labelAction() : _ => _
4805
+ }) : '', label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default.createElement("img", {
4806
+ alt: "label icon",
4807
+ src: innerLabelIcon,
4808
+ style: {
4809
+ width: '14px',
4810
+ height: '14px',
4811
+ cursor: labelAction ? 'pointer' : 'normal',
4812
+ marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
4813
+ },
4814
+ onClick: labelAction ? () => labelAction() : _ => _
4815
+ }) : '') : '', /*#__PURE__*/React__default.createElement("div", {
4816
+ className: `${styles$8['input-content']}`,
4668
4817
  style: {
4669
4818
  width: width ?? configStyles.INPUT.width,
4670
4819
  borderRadius: radius ?? configStyles.INPUT.radius,
@@ -4755,21 +4904,51 @@ const Input = ({
4755
4904
  animation: animation,
4756
4905
  style: {
4757
4906
  margin: '0px',
4907
+ display: 'flex',
4908
+ alignItems: 'center',
4758
4909
  position: 'absolute',
4759
4910
  width: width ?? configStyles.INPUT.width,
4760
4911
  left: errorLeft ?? configStyles.INPUT.error.left,
4761
4912
  color: errorColor ?? configStyles.INPUT.error.color,
4913
+ zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
4762
4914
  fontSize: errorSize ?? configStyles.INPUT.error.font.size,
4763
4915
  fontStyle: errorStyle ?? configStyles.INPUT.error.font.style,
4764
4916
  fontFamily: errorFamily ?? configStyles.INPUT.error.font.family,
4765
4917
  fontWeight: errorWeight ?? configStyles.INPUT.error.font.weight,
4766
- zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
4767
4918
  lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
4768
4919
  top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
4769
4920
  transform: 'scale3d(1,1,1)'
4770
4921
  },
4771
4922
  className: errorClassName ?? configStyles.INPUT.error.className
4772
- }, innerErrorMessage) : '');
4923
+ }, showErrorIcon && innerErrorIcon && innerErrorIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
4924
+ alt: "error icon",
4925
+ src: innerErrorIcon,
4926
+ style: {
4927
+ width: '14px',
4928
+ height: '14px',
4929
+ cursor: errorAction ? 'pointer' : 'normal',
4930
+ marginRight: errorIconMargin ?? configStyles.INPUT.error.iconMargin
4931
+ },
4932
+ onClick: errorAction ? () => errorAction() : _ => _
4933
+ }) : '', /*#__PURE__*/React__default.createElement("span", {
4934
+ style: {
4935
+ display: 'inline-block',
4936
+ whiteSpace: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'nowrap' : 'normal',
4937
+ overflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'hidden' : 'visible',
4938
+ textOverflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'ellipsis' : '',
4939
+ maxWidth: `calc(100% - ${(errorIconMargin ? Number(errorIconMargin.match(/\d+/)[0]) : Number(configStyles.INPUT.error.iconMargin.match(/\d+/)[0])) + 14}px)`
4940
+ }
4941
+ }, innerErrorMessage), showErrorIcon && innerErrorIcon && innerErrorIconSide === 'right' && /*#__PURE__*/React__default.createElement("img", {
4942
+ alt: "error icon",
4943
+ src: innerErrorIcon,
4944
+ style: {
4945
+ width: '14px',
4946
+ height: '14px',
4947
+ cursor: errorAction ? 'pointer' : 'normal',
4948
+ marginLeft: errorIconMargin ?? configStyles.INPUT.error.iconMargin
4949
+ },
4950
+ onClick: errorAction ? () => errorAction() : _ => _
4951
+ })) : '');
4773
4952
  };
4774
4953
  Input.propTypes = {
4775
4954
  size: PropTypes.string,
@@ -4778,7 +4957,6 @@ Input.propTypes = {
4778
4957
  style: PropTypes.string,
4779
4958
  color: PropTypes.string,
4780
4959
  width: PropTypes.string,
4781
- label: PropTypes.string,
4782
4960
  withZero: PropTypes.bool,
4783
4961
  weight: PropTypes.string,
4784
4962
  family: PropTypes.string,
@@ -4787,45 +4965,56 @@ Input.propTypes = {
4787
4965
  height: PropTypes.string,
4788
4966
  radius: PropTypes.string,
4789
4967
  padding: PropTypes.string,
4790
- labelDots: PropTypes.bool,
4791
4968
  tooltip: PropTypes.element,
4792
4969
  withoutDot: PropTypes.bool,
4793
4970
  className: PropTypes.string,
4794
4971
  iconWidth: PropTypes.string,
4795
- boxSizing: PropTypes.string,
4796
- boxShadow: PropTypes.string,
4797
- errorSize: PropTypes.string,
4798
- errorLeft: PropTypes.string,
4799
- labelSize: PropTypes.string,
4800
4972
  maxLength: PropTypes.number,
4801
4973
  floatToFix: PropTypes.number,
4802
4974
  minNumSize: PropTypes.number,
4803
4975
  maxNumSize: PropTypes.number,
4804
- errorColor: PropTypes.string,
4976
+ label: PropTypes.string,
4977
+ labelDots: PropTypes.bool,
4978
+ labelAction: PropTypes.func,
4979
+ labelIcon: PropTypes.string,
4980
+ labelSize: PropTypes.string,
4805
4981
  labelColor: PropTypes.string,
4806
4982
  labelStyle: PropTypes.string,
4983
+ showLabelIcon: PropTypes.bool,
4984
+ labelWeight: PropTypes.string,
4985
+ labelDisplay: PropTypes.string,
4986
+ labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
4987
+ labelLineHeight: PropTypes.string,
4988
+ labelFontFamily: PropTypes.string,
4989
+ labelIconMargin: PropTypes.string,
4990
+ labelMarginBottom: PropTypes.string,
4991
+ borderRight: PropTypes.string,
4992
+ placeholder: PropTypes.string,
4993
+ phoneDisplay: PropTypes.string,
4994
+ autoComplete: PropTypes.string,
4995
+ errorDots: PropTypes.bool,
4996
+ errorLeft: PropTypes.string,
4997
+ errorSize: PropTypes.string,
4998
+ errorIcon: PropTypes.string,
4999
+ errorAction: PropTypes.func,
5000
+ errorColor: PropTypes.string,
4807
5001
  errorStyle: PropTypes.string,
5002
+ showErrorIcon: PropTypes.bool,
4808
5003
  errorWeight: PropTypes.string,
4809
5004
  errorFamily: PropTypes.string,
4810
- borderRight: PropTypes.string,
4811
- placeholder: PropTypes.string,
4812
5005
  errorZindex: PropTypes.string,
4813
- labelWeight: PropTypes.string,
5006
+ errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
4814
5007
  errorMessage: PropTypes.string,
4815
- phoneDisplay: PropTypes.string,
4816
- autoComplete: PropTypes.string,
4817
- labelDisplay: PropTypes.string,
4818
5008
  errorPosition: PropTypes.string,
4819
5009
  errorMarginTop: PropTypes.string,
4820
- boxShadowHover: PropTypes.string,
4821
5010
  errorClassName: PropTypes.string,
4822
- labelFontFamily: PropTypes.string,
4823
- backgroundColor: PropTypes.string,
4824
- phoneAlignItems: PropTypes.string,
5011
+ errorIconMargin: PropTypes.string,
4825
5012
  errorLineHeight: PropTypes.string,
4826
- labelLineHeight: PropTypes.string,
5013
+ boxSizing: PropTypes.string,
5014
+ boxShadow: PropTypes.string,
5015
+ boxShadowHover: PropTypes.string,
5016
+ phoneAlignItems: PropTypes.string,
4827
5017
  numberMaxLength: PropTypes.number,
4828
- labelMarginBottom: PropTypes.string,
4829
5018
  regexpErrorMessage: PropTypes.string,
4830
5019
  regexp: PropTypes.instanceOf(RegExp),
4831
5020
  fireInputInsideError: PropTypes.func,
@@ -4833,6 +5022,7 @@ Input.propTypes = {
4833
5022
  telBorderRightStyle: PropTypes.string,
4834
5023
  telBorderRightColor: PropTypes.string,
4835
5024
  phoneJustifyContent: PropTypes.string,
5025
+ backgroundColor: PropTypes.string,
4836
5026
  backgroundDisableColor: PropTypes.string,
4837
5027
  telBorderRightColorHover: PropTypes.string,
4838
5028
  leftIcon: PropTypes.arrayOf(PropTypes.element),
@@ -5056,9 +5246,9 @@ const SvgArrow = ({
5056
5246
  fill: fillColor ? fillColor : '#3C393E'
5057
5247
  }));
5058
5248
 
5059
- var css_248z$7 = ".select-module_select-content__GCMDX{-webkit-appearance:none;display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;-webkit-appearance:none;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:99999999999}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_ellipsis__uNgol{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
5060
- var styles$6 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","ellipsis":"select-module_ellipsis__uNgol"};
5061
- styleInject(css_248z$7);
5249
+ var css_248z$8 = ".select-module_select-content__GCMDX{-webkit-appearance:none;display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;-webkit-appearance:none;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:99999999999}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_ellipsis__uNgol{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
5250
+ var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","ellipsis":"select-module_ellipsis__uNgol"};
5251
+ styleInject(css_248z$8);
5062
5252
 
5063
5253
  const Select = ({
5064
5254
  dots,
@@ -5270,7 +5460,7 @@ const Select = ({
5270
5460
  }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
5271
5461
  ref: ref
5272
5462
  }, /*#__PURE__*/React__default.createElement("div", {
5273
- className: styles$6['select-content']
5463
+ className: styles$7['select-content']
5274
5464
  }, /*#__PURE__*/React__default.createElement("div", {
5275
5465
  style: {
5276
5466
  cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.selected.cursor,
@@ -5290,9 +5480,9 @@ const Select = ({
5290
5480
  onClick: disabled ? _ => _ : () => handleOpenClose(),
5291
5481
  onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
5292
5482
  onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
5293
- className: `${styles$6['select-content-top']}`
5483
+ className: `${styles$7['select-content-top']}`
5294
5484
  }, /*#__PURE__*/React__default.createElement("div", {
5295
- className: `${styles$6['select-content-top-text']}`,
5485
+ className: `${styles$7['select-content-top-text']}`,
5296
5486
  style: {
5297
5487
  whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
5298
5488
  overflow: 'hidden',
@@ -5308,9 +5498,9 @@ const Select = ({
5308
5498
  }
5309
5499
  }
5310
5500
  }) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
5311
- className: `${styles$6['select-content-top-icon']}`
5501
+ className: `${styles$7['select-content-top-icon']}`
5312
5502
  }, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
5313
- className: `${styles$6['close-icon']}`,
5503
+ className: `${styles$7['close-icon']}`,
5314
5504
  onClick: disabled ? _ => _ : handleClearSelect,
5315
5505
  style: {
5316
5506
  marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
@@ -5319,7 +5509,7 @@ const Select = ({
5319
5509
  style: {
5320
5510
  transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
5321
5511
  },
5322
- className: `${styles$6['arrow-icon']}`
5512
+ className: `${styles$7['arrow-icon']}`
5323
5513
  }, arrowIcon ? arrowIcon : configStyles.SELECT.arrowIcon ? configStyles.SELECT.arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && existOptions && existOptions.length > 0 && !disabled ? /*#__PURE__*/React__default.createElement("div", {
5324
5514
  style: {
5325
5515
  boxShadow: optionsBoxShadow ?? configStyles.SELECT.options.box.shadow,
@@ -5327,9 +5517,9 @@ const Select = ({
5327
5517
  backgroundColor: optionsBackgroundColor ?? configStyles.SELECT.options.colors.background,
5328
5518
  top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : configStyles.SELECT.selected.minHeight.includes('rem') ? parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 2)) + 6 + 'px'
5329
5519
  },
5330
- className: `${styles$6['select-content-bottom']}`
5520
+ className: `${styles$7['select-content-bottom']}`
5331
5521
  }, /*#__PURE__*/React__default.createElement("div", {
5332
- className: `${styles$6['select-content-bottom-inner']}`
5522
+ className: `${styles$7['select-content-bottom-inner']}`
5333
5523
  }, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
5334
5524
  return /*#__PURE__*/React__default.createElement("div", {
5335
5525
  key: i,
@@ -5338,7 +5528,7 @@ const Select = ({
5338
5528
  onClick: disabled ? _ => _ : () => handleSelectItem(option),
5339
5529
  onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
5340
5530
  onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
5341
- className: `${styles$6['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$6['ellipsis'] : ''}`,
5531
+ className: `${styles$7['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$7['ellipsis'] : ''}`,
5342
5532
  style: {
5343
5533
  overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
5344
5534
  color: optionItemColor ?? configStyles.SELECT.options.item.color,
@@ -5551,11 +5741,10 @@ const SvgToasterSuccess = ({
5551
5741
  fill: fillColor ? fillColor : '#0DA574'
5552
5742
  }));
5553
5743
 
5554
- var css_248z$6 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceInLeftMobile__CA2dc{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:0}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}@media(max-width:480px){.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeftMobile__CA2dc;animation-name:toaster-module_bounceInLeftMobile__CA2dc}}";
5555
- var styles$5 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO","bounceInLeftMobile":"toaster-module_bounceInLeftMobile__CA2dc"};
5556
- styleInject(css_248z$6);
5744
+ var css_248z$7 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceInLeftMobile__CA2dc{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:0}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}@media(max-width:480px){.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeftMobile__CA2dc;animation-name:toaster-module_bounceInLeftMobile__CA2dc}}";
5745
+ var styles$6 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO","bounceInLeftMobile":"toaster-module_bounceInLeftMobile__CA2dc"};
5746
+ styleInject(css_248z$7);
5557
5747
 
5558
- let wWidth$1 = window.innerWidth;
5559
5748
  const ToasterType = {
5560
5749
  info: 'info',
5561
5750
  warn: 'warn',
@@ -5572,16 +5761,21 @@ const ToasterPosition = {
5572
5761
  };
5573
5762
  const Toast = ({
5574
5763
  type,
5575
- icon,
5576
- closeIcon,
5764
+ icons,
5765
+ title,
5766
+ timer,
5767
+ propStyles,
5577
5768
  removeToast,
5578
5769
  description,
5579
- timer = 5000,
5580
- position = 'top-right',
5581
- title = 'toaster title'
5770
+ titleStyles,
5771
+ descriptionStyles,
5772
+ position = 'top-right'
5582
5773
  }) => {
5583
5774
  let timeoutCall;
5584
5775
  let timeoutClick;
5776
+ const firstCheck = propStyles.height.replace(/\D/g, '') - 28 < 30 ? 30 : propStyles.height.replace(/\D/g, '') - 28;
5777
+ const secondCheck = propStyles.height.replace(/\D/g, '') - 65 < 18 ? 18 : propStyles.height.replace(/\D/g, '') - 65;
5778
+ const finalCheck = firstCheck + secondCheck + 'px';
5585
5779
  const ref = useRef(null);
5586
5780
  const [showToaster, setShowToaster] = useState(true);
5587
5781
  const handleToasterClick = e => {
@@ -5610,63 +5804,111 @@ const Toast = ({
5610
5804
  style: {
5611
5805
  position: 'absolute',
5612
5806
  display: 'flex',
5613
- width: wWidth$1 > 480 ? '440px' : '300px',
5614
- height: '83px',
5615
- borderRadius: '40px',
5616
5807
  alignItems: 'center',
5617
5808
  boxSizing: 'border-box',
5618
- backgroundColor: '#FFFFFF',
5619
- border: '2px solid #EEEEEE',
5620
- padding: '14px 29px 14px 12px',
5621
- justifyContent: 'space-between'
5809
+ justifyContent: 'space-between',
5810
+ ...propStyles
5622
5811
  },
5623
5812
  className: `
5624
- ${styles$5['notify-block']}
5625
- ${position === 'top-left' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : position === 'top-right' ? showToaster ? styles$5['bounce-in-right'] : styles$5['bounce-out-right'] : position === 'top-center' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : position === 'bottom-left' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : position === 'bottom-right' ? showToaster ? styles$5['bounce-in-right'] : styles$5['bounce-out-right'] : position === 'bottom-center' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : ''}
5626
- `
5813
+ ${styles$6['notify-block']}
5814
+ ${position === 'top-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'top-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'top-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'bottom-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : ''}
5815
+ `
5627
5816
  }, /*#__PURE__*/React__default.createElement("div", {
5628
5817
  style: {
5629
5818
  display: 'flex',
5630
- width: '60px',
5631
- height: '60px',
5632
- borderRadius: '30px',
5819
+ height: `calc(${propStyles.height} - 28px)`,
5820
+ width: `calc(${propStyles.height} - 28px)`,
5821
+ minWidth: '30px',
5822
+ minHeight: '30px',
5823
+ borderRadius: '50%',
5633
5824
  alignItems: 'center',
5634
5825
  justifyContent: 'center'
5635
5826
  }
5636
- }, type === 'info' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
5827
+ }, type === 'info' ? icons.info ? /*#__PURE__*/React__default.createElement("img", {
5828
+ src: icons.info,
5829
+ alt: "icons",
5637
5830
  style: {
5831
+ width: '100%',
5638
5832
  height: '100%',
5639
- width: 'calc(100% - 90px)'
5833
+ objectFit: 'cover',
5834
+ objectPosition: 'center'
5640
5835
  }
5641
- }, /*#__PURE__*/React__default.createElement("p", {
5836
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? icons.warn ? /*#__PURE__*/React__default.createElement("img", {
5837
+ src: icons.warn,
5838
+ alt: "icons",
5839
+ style: {
5840
+ width: '100%',
5841
+ height: '100%',
5842
+ objectFit: 'cover',
5843
+ objectPosition: 'center'
5844
+ }
5845
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? icons.error ? /*#__PURE__*/React__default.createElement("img", {
5846
+ src: icons.error,
5847
+ alt: "icons",
5848
+ style: {
5849
+ width: '100%',
5850
+ height: '100%',
5851
+ objectFit: 'cover',
5852
+ objectPosition: 'center'
5853
+ }
5854
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? icons.success ? /*#__PURE__*/React__default.createElement("img", {
5855
+ src: icons.success,
5856
+ alt: "icons",
5857
+ style: {
5858
+ width: '100%',
5859
+ height: '100%',
5860
+ objectFit: 'cover',
5861
+ objectPosition: 'center'
5862
+ }
5863
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
5864
+ style: {
5865
+ height: '100%',
5866
+ width: `calc(100% - ${finalCheck})`,
5867
+ minWidth: '50%',
5868
+ maxWidth: 'calc(100% - 90px)'
5869
+ }
5870
+ }, title && /*#__PURE__*/React__default.createElement("p", {
5642
5871
  style: {
5643
5872
  margin: '0px',
5644
- fontWeight: 600,
5645
- color: '#3C393E',
5646
- fontSize: '16px',
5647
- lineHeight: '22px',
5648
- fontStyle: 'normal'
5873
+ color: titleStyles.color,
5874
+ fontSize: titleStyles.font.size,
5875
+ fontStyle: titleStyles.font.style,
5876
+ lineHeight: titleStyles.lineHeight,
5877
+ fontWeight: titleStyles.font.weight,
5878
+ fontFamily: titleStyles.font.family,
5879
+ ...titleStyles.props
5649
5880
  },
5650
- className: styles$5['notify-title']
5651
- }, title ? title : ''), /*#__PURE__*/React__default.createElement("span", {
5881
+ className: styles$6['notify-title']
5882
+ }, title), description && /*#__PURE__*/React__default.createElement("span", {
5652
5883
  style: {
5653
- fontWeight: 500,
5654
- color: '#3C393E',
5655
- fontSize: '12px',
5656
- lineHeight: '16px',
5657
- fontStyle: 'normal',
5658
- fontFamily: '',
5659
- opacity: 0.8
5884
+ color: descriptionStyles.color,
5885
+ fontSize: descriptionStyles.font.size,
5886
+ fontStyle: descriptionStyles.font.style,
5887
+ lineHeight: descriptionStyles.lineHeight,
5888
+ fontWeight: descriptionStyles.font.weight,
5889
+ fontFamily: descriptionStyles.font.family,
5890
+ ...descriptionStyles.props
5660
5891
  },
5661
- className: styles$5['notify-desc']
5662
- }, description ? description : '')), /*#__PURE__*/React__default.createElement("div", {
5892
+ className: styles$6['notify-desc']
5893
+ }, description)), /*#__PURE__*/React__default.createElement("div", {
5663
5894
  onClick: () => handleCloseToaster(ref),
5664
5895
  style: {
5665
- width: '18px',
5666
- height: '18px',
5896
+ width: `calc(${propStyles.height} - 65px)`,
5897
+ height: `calc(${propStyles.height} - 65px)`,
5898
+ minWidth: '18px',
5899
+ minHeight: '18px',
5667
5900
  cursor: 'pointer'
5668
5901
  }
5669
- }, closeIcon ? closeIcon : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
5902
+ }, icons.close ? /*#__PURE__*/React__default.createElement("img", {
5903
+ src: icons.close,
5904
+ alt: "icons",
5905
+ style: {
5906
+ width: '100%',
5907
+ height: '100%',
5908
+ objectFit: 'cover',
5909
+ objectPosition: 'center'
5910
+ }
5911
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
5670
5912
  };
5671
5913
  Toast.propTypes = {
5672
5914
  timer: PropTypes.number,
@@ -5679,7 +5921,6 @@ Toast.propTypes = {
5679
5921
 
5680
5922
  let toastify = document.getElementById('toastify');
5681
5923
  let path = window.location.href;
5682
- let wWidth = window.innerWidth;
5683
5924
  const removeToast = ref => {
5684
5925
  if (ref.current) {
5685
5926
  const node = ref.current;
@@ -5695,15 +5936,66 @@ const removeToast = ref => {
5695
5936
  }
5696
5937
  }
5697
5938
  };
5939
+ const createElem$1 = (type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles) => {
5940
+ const projectTitleStyle = styleProps?.title;
5941
+ const packageTitleStyle = innerConfigStyles?.TOASTER?.title;
5942
+ const compareTitleStyles = _.merge({
5943
+ ...packageTitleStyle
5944
+ }, {
5945
+ ...projectTitleStyle
5946
+ });
5947
+ const projectDescStyle = styleProps?.description;
5948
+ const packageDescStyle = innerConfigStyles?.TOASTER?.description;
5949
+ const compareDescStyles = _.merge({
5950
+ ...packageDescStyle
5951
+ }, {
5952
+ ...projectDescStyle
5953
+ });
5954
+ const projectIcons = styleProps?.icons;
5955
+ const packageIcons = innerConfigStyles?.TOASTER?.icons;
5956
+ const icons = _.merge({
5957
+ ...packageIcons
5958
+ }, {
5959
+ ...projectIcons
5960
+ });
5961
+ toastBlock.style.position = 'relative';
5962
+ toastBlock.style.flexShrink = 0;
5963
+ toastBlock.style.width = styleProps?.width ?? innerConfigStyles?.TOASTER?.width;
5964
+ toastBlock.style.height = styleProps?.height ?? innerConfigStyles?.TOASTER?.height;
5965
+ toastBlock.style.marginBottom = styleProps?.marginBottom ?? innerConfigStyles?.TOASTER?.marginBottom;
5966
+ const newElem = /*#__PURE__*/React__default.createElement(Toast, {
5967
+ type,
5968
+ icons,
5969
+ timer,
5970
+ title,
5971
+ position,
5972
+ description,
5973
+ removeToast,
5974
+ propStyles: {
5975
+ width: styleProps?.width ?? innerConfigStyles?.TOASTER?.width,
5976
+ height: styleProps?.height ?? innerConfigStyles?.TOASTER?.height,
5977
+ padding: styleProps?.padding ?? innerConfigStyles?.TOASTER?.padding,
5978
+ borderWidth: styleProps?.borderWidth ?? innerConfigStyles?.TOASTER?.border.width,
5979
+ borderColor: styleProps?.borderColor ?? innerConfigStyles?.TOASTER?.border.color,
5980
+ borderStyle: styleProps?.borderStyle ?? innerConfigStyles?.TOASTER?.border.style,
5981
+ borderRadius: styleProps?.borderRadius ?? innerConfigStyles?.TOASTER?.border.radius,
5982
+ backgroundColor: styleProps?.backgroundColor ?? innerConfigStyles?.TOASTER?.backgroundColor
5983
+ },
5984
+ titleStyles: compareTitleStyles,
5985
+ descriptionStyles: compareDescStyles
5986
+ });
5987
+ const root = ReactDOM.createRoot(toastBlock);
5988
+ root.render(newElem);
5989
+ };
5698
5990
  const createToast = ({
5699
5991
  type,
5700
- icon,
5701
5992
  timer,
5702
5993
  title,
5703
5994
  position,
5704
- iconClose,
5995
+ styleProps,
5705
5996
  description
5706
5997
  }) => {
5998
+ let innerConfigStyles = {};
5707
5999
  let toastParentBlock;
5708
6000
  if (!toastify) {
5709
6001
  toastify = document.createElement('div');
@@ -5711,42 +6003,33 @@ const createToast = ({
5711
6003
  document.body.appendChild(toastify);
5712
6004
  }
5713
6005
  const toastBlock = document.createElement('div');
5714
- toastBlock.style.position = 'relative';
5715
- toastBlock.style.flexShrink = 0;
5716
- toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
5717
- toastBlock.style.height = '83px';
5718
- toastBlock.style.marginBottom = '20px';
5719
- const newElem = /*#__PURE__*/React__default.createElement(Toast, {
5720
- type,
5721
- icon,
5722
- timer,
5723
- title,
5724
- position,
5725
- iconClose,
5726
- description,
5727
- removeToast
6006
+ configStylesPromise.then(data => {
6007
+ innerConfigStyles = {
6008
+ ...data
6009
+ };
6010
+ createElem$1(type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles);
6011
+ }, error => {
6012
+ console.error(error);
5728
6013
  });
5729
- const root = ReactDOM.createRoot(toastBlock);
5730
- root.render(newElem);
5731
- if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
6014
+ if (!document.getElementById(styles$6[position]) || document.getElementById(styles$6[position]) == null) {
5732
6015
  toastParentBlock = document.createElement('div');
5733
6016
  toastParentBlock.style.position = 'fixed';
5734
6017
  toastParentBlock.style.display = 'flex';
5735
6018
  toastParentBlock.style.zIndex = 999999999999;
5736
6019
  toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
5737
- toastParentBlock.setAttribute('id', styles$5[position]);
6020
+ toastParentBlock.setAttribute('id', styles$6[position]);
5738
6021
  toastParentBlock.appendChild(toastBlock);
5739
6022
  toastify.appendChild(toastParentBlock);
5740
6023
  } else {
5741
- document.getElementById(styles$5[position]).appendChild(toastBlock);
6024
+ document.getElementById(styles$6[position]).appendChild(toastBlock);
5742
6025
  }
5743
6026
  };
5744
6027
  const toast = {
5745
6028
  success: (title, props) => {
5746
- // const { icon, timer, position, iconClose, description } = props || {}
5747
6029
  const {
5748
6030
  timer,
5749
6031
  position,
6032
+ styleProps,
5750
6033
  description
5751
6034
  } = props || {};
5752
6035
  createToast({
@@ -5754,16 +6037,15 @@ const toast = {
5754
6037
  type: 'success',
5755
6038
  timer: timer ?? 5000,
5756
6039
  position: position ?? 'top-right',
5757
- description: description ?? ''
5758
- // icon: icon ?? configStyles.TOASTER.icon.success,
5759
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6040
+ description: description ?? '',
6041
+ styleProps: styleProps
5760
6042
  });
5761
6043
  },
5762
6044
  info: (title, props) => {
5763
- // const { icon, timer, position, iconClose, description } = props || {}
5764
6045
  const {
5765
6046
  timer,
5766
6047
  position,
6048
+ styleProps,
5767
6049
  description
5768
6050
  } = props || {};
5769
6051
  createToast({
@@ -5771,16 +6053,15 @@ const toast = {
5771
6053
  type: 'info',
5772
6054
  timer: timer ?? 5000,
5773
6055
  position: position ?? 'top-right',
5774
- description: description ?? ''
5775
- // icon: icon ?? configStyles.TOASTER.icon.info,
5776
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6056
+ description: description ?? '',
6057
+ styleProps: styleProps
5777
6058
  });
5778
6059
  },
5779
6060
  warn: (title, props) => {
5780
- // const { icon, timer, position, iconClose, description } = props || {}
5781
6061
  const {
5782
6062
  timer,
5783
6063
  position,
6064
+ styleProps,
5784
6065
  description
5785
6066
  } = props || {};
5786
6067
  createToast({
@@ -5788,16 +6069,15 @@ const toast = {
5788
6069
  type: 'warn',
5789
6070
  timer: timer ?? 5000,
5790
6071
  position: position ?? 'top-right',
5791
- description: description ?? ''
5792
- // icon: icon ?? configStyles.TOASTER.icon.warn,
5793
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6072
+ description: description ?? '',
6073
+ styleProps: styleProps
5794
6074
  });
5795
6075
  },
5796
6076
  error: (title, props) => {
5797
- // const { icon, timer, position, iconClose, description } = props || {}
5798
6077
  const {
5799
6078
  timer,
5800
6079
  position,
6080
+ styleProps,
5801
6081
  description
5802
6082
  } = props || {};
5803
6083
  createToast({
@@ -5805,16 +6085,12 @@ const toast = {
5805
6085
  type: 'error',
5806
6086
  timer: timer ?? 5000,
5807
6087
  position: position ?? 'top-right',
5808
- description: description ?? ''
5809
- // icon: icon ?? configStyles.TOASTER.icon.error,
5810
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6088
+ description: description ?? '',
6089
+ styleProps: styleProps
5811
6090
  });
5812
6091
  }
5813
6092
  };
5814
- const Toaster = ({
5815
- className
5816
- }) => {
5817
- const [classProps, setClassProps] = useState('');
6093
+ const Toaster = () => {
5818
6094
  const [configStyles, setConfigStyles] = useState({});
5819
6095
  window.addEventListener('popstate', () => {
5820
6096
  if (path !== window.location.href) {
@@ -5831,12 +6107,8 @@ const Toaster = ({
5831
6107
  const handleToasterClick = e => {
5832
6108
  e.stopPropagation();
5833
6109
  };
5834
- useEffect(() => {
5835
- className && setClassProps(() => classnames(className ?? configStyles.TOASTER.className));
5836
- }, [className]);
5837
6110
  useEffect(() => {
5838
6111
  configStylesPromise.then(data => {
5839
- setClassProps(() => classnames(className ?? data.TOASTER.className));
5840
6112
  setConfigStyles(() => {
5841
6113
  return {
5842
6114
  ...data
@@ -5848,7 +6120,6 @@ const Toaster = ({
5848
6120
  }, []);
5849
6121
  return configStyles.TOASTER && /*#__PURE__*/React__default.createElement("div", {
5850
6122
  onClick: handleToasterClick,
5851
- className: classProps,
5852
6123
  id: "toastify"
5853
6124
  });
5854
6125
  };
@@ -5872,10 +6143,24 @@ const SvgTooltip = ({
5872
6143
  fill: fillColor ? fillColor : '#D1D1D1'
5873
6144
  }));
5874
6145
 
5875
- var css_248z$5 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
5876
- var styles$4 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
5877
- styleInject(css_248z$5);
6146
+ var css_248z$6 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{box-sizing:border-box;padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
6147
+ var styles$5 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
6148
+ styleInject(css_248z$6);
5878
6149
 
6150
+ const TooltipDirections = {
6151
+ TOP: 'top',
6152
+ TOP_LEFT: 'top-left',
6153
+ TOP_RIGHT: 'top-right',
6154
+ LEFT: 'left',
6155
+ LEFT_TOP: 'left-top',
6156
+ LEFT_BOTTOM: 'left-bottom',
6157
+ RIGHT: 'right',
6158
+ RIGHT_TOP: 'right-top',
6159
+ RIGHT_BOTTOM: 'right-bottom',
6160
+ BOTTOM: 'bottom',
6161
+ BOTTOM_TOP: 'bottom-left',
6162
+ BOTTOM_BOTTOM: 'bottom-right'
6163
+ };
5879
6164
  const Tooltip = ({
5880
6165
  text,
5881
6166
  width,
@@ -5883,6 +6168,7 @@ const Tooltip = ({
5883
6168
  height,
5884
6169
  radius,
5885
6170
  fontSize,
6171
+ hoverOpen,
5886
6172
  className,
5887
6173
  fontStyle,
5888
6174
  fontFamily,
@@ -5892,16 +6178,28 @@ const Tooltip = ({
5892
6178
  tooltipRadius,
5893
6179
  backgroundColor,
5894
6180
  tooltipBackgroundColor,
5895
- type = 'top'
6181
+ direction = 'top'
5896
6182
  }) => {
5897
6183
  const tooltipRef = /*#__PURE__*/createRef(null);
6184
+ const iconBlockRef = /*#__PURE__*/createRef(null);
6185
+ const tooltipIconParentRef = /*#__PURE__*/createRef(null);
5898
6186
  const [classProps, setClassProps] = useState({});
5899
6187
  const [configStyles, setConfigStyles] = useState({});
5900
6188
  const [showTooltip, setShowTooltip] = useState(false);
5901
6189
  const [checkTooltipWidth, setCheckTooltipWidth] = useState(0);
5902
6190
  const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
6191
+ const [tooltipIconBlockWidth, setTooltipIconBlockWidth] = useState(0);
6192
+ const [tooltipIconParentWidth, setTooltipIconParentWidth] = useState(0);
6193
+ const [tooltipIconBlockHeight, setTooltipIconBlockHeight] = useState(0);
6194
+ const [tooltipIconParentHeight, setTooltipIconParentHeight] = useState(0);
5903
6195
  const handleShow = () => {
5904
- setShowTooltip(!showTooltip);
6196
+ setShowTooltip(() => !showTooltip);
6197
+ };
6198
+ const handleMouseEnter = () => {
6199
+ setShowTooltip(() => true);
6200
+ };
6201
+ const handleMouseLeave = () => {
6202
+ setShowTooltip(() => false);
5905
6203
  };
5906
6204
  useEffect(() => {
5907
6205
  if (!text) {
@@ -5910,12 +6208,32 @@ const Tooltip = ({
5910
6208
  tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
5911
6209
  tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
5912
6210
  }, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
6211
+ useEffect(() => {
6212
+ tooltipIconParentRef.current && tooltipIconParentRef.current.clientWidth && tooltipIconParentRef.current.clientWidth > 0 && setTooltipIconParentWidth(tooltipIconParentRef.current.clientWidth);
6213
+ tooltipIconParentRef.current && tooltipIconParentRef.current.clientHeight && tooltipIconParentRef.current.clientHeight > 0 && setTooltipIconParentHeight(tooltipIconParentRef.current.clientHeight);
6214
+ }, [tooltipIconParentRef, tooltipIconParentWidth, tooltipIconParentHeight]);
6215
+ useEffect(() => {
6216
+ iconBlockRef.current && iconBlockRef.current.clientWidth && iconBlockRef.current.clientWidth > 0 && setTooltipIconBlockWidth(iconBlockRef.current.clientWidth);
6217
+ iconBlockRef.current && iconBlockRef.current.clientHeight && iconBlockRef.current.clientHeight > 0 && setTooltipIconBlockHeight(iconBlockRef.current.clientHeight);
6218
+ }, [iconBlockRef, tooltipIconParentWidth, tooltipIconParentHeight]);
5913
6219
  useEffect(() => {
5914
6220
  className && setClassProps(() => classnames(className ?? configStyles.TOOLTIP.className));
5915
6221
  }, [className]);
6222
+ useEffect(() => {
6223
+ document.addEventListener('click', () => {
6224
+ if (showTooltip) {
6225
+ handleShow();
6226
+ }
6227
+ }, false);
6228
+ return () => {
6229
+ document.removeEventListener('click', () => {
6230
+ handleShow();
6231
+ }, false);
6232
+ };
6233
+ }, [showTooltip]);
5916
6234
  useEffect(() => {
5917
6235
  configStylesPromise.then(data => {
5918
- setClassProps(() => classnames(styles$4['tooltip-block'], className ?? data.TOOLTIP.className));
6236
+ setClassProps(() => classnames(styles$5['tooltip-block'], className ?? data.TOOLTIP.className));
5919
6237
  setConfigStyles(() => {
5920
6238
  return {
5921
6239
  ...data
@@ -5926,31 +6244,33 @@ const Tooltip = ({
5926
6244
  });
5927
6245
  }, []);
5928
6246
  return configStyles.TOOLTIP && /*#__PURE__*/React__default.createElement("div", {
6247
+ ref: tooltipIconParentRef,
5929
6248
  className: classProps,
5930
6249
  style: {
5931
6250
  width: width ?? configStyles.TOOLTIP.parent.width,
5932
6251
  height: height ?? configStyles.TOOLTIP.parent.height,
5933
6252
  borderRadius: radius ?? configStyles.TOOLTIP.parent.radius,
5934
6253
  backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
5935
- }
6254
+ },
6255
+ onClick: e => e.stopPropagation()
5936
6256
  }, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
5937
6257
  ref: tooltipRef,
5938
- className: `${styles$4['tooltip']}`,
6258
+ className: `${styles$5['tooltip']}`,
5939
6259
  style: {
5940
6260
  width: tooltipWidth ?? configStyles.TOOLTIP.width,
5941
6261
  borderRadius: tooltipRadius ?? configStyles.TOOLTIP.radius,
5942
6262
  backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
5943
- top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
5944
- left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
6263
+ top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? `calc(-${checkTooltipHeight + 7}px)` : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? 'calc(100% + 7px)' : direction === 'left' || direction === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : direction === 'left-top' || direction === 'right-top' ? '0px' : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(-${checkTooltipHeight - tooltipIconParentHeight}px)` : '0px',
6264
+ left: direction === 'top' || direction === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? `-${checkTooltipWidth + 7}px` : direction === 'top-left' || direction === 'bottom-left' ? `0px` : direction === 'top-right' || direction === 'bottom-right' ? `-${checkTooltipWidth - tooltipIconParentWidth}px` : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? 'calc(100% + 7px)' : '0px'
5945
6265
  }
5946
6266
  }, /*#__PURE__*/React__default.createElement("div", {
5947
- className: `${styles$4['tooltip-rel']}`
6267
+ className: `${styles$5['tooltip-rel']}`
5948
6268
  }, /*#__PURE__*/React__default.createElement("div", {
5949
- className: `${styles$4['tooltip-decor']}`,
6269
+ className: `${styles$5['tooltip-decor']}`,
5950
6270
  style: {
5951
6271
  backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
5952
- left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
5953
- top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
6272
+ left: direction === 'top' || direction === 'bottom' ? 'calc(50% - 5px)' : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? '-15px' : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? 'calc(100% + 5px)' : direction === 'top-left' || direction === 'bottom-left' ? `${tooltipIconParentWidth / 2 - tooltipIconBlockWidth}px` : direction === 'top-right' || direction === 'bottom-right' ? `calc(100% - ${tooltipIconParentWidth / 2 - tooltipIconBlockWidth / 2}px` : '0px',
6273
+ top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? 'calc(100% + 5px)' : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? '-15px' : direction === 'right' || direction === 'left' ? 'calc(50% - 5px)' : direction === 'left-top' || direction === 'right-top' ? `${tooltipIconParentHeight / 2 - tooltipIconBlockHeight}px` : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(100% - ${tooltipIconParentHeight / 2 - tooltipIconBlockHeight / 2}px` : '0px'
5954
6274
  }
5955
6275
  }), /*#__PURE__*/React__default.createElement("p", {
5956
6276
  style: {
@@ -5961,18 +6281,22 @@ const Tooltip = ({
5961
6281
  fontWeight: fontWeight ?? configStyles.TOOLTIP.font.weight
5962
6282
  }
5963
6283
  }, text))) : '', /*#__PURE__*/React__default.createElement("div", {
6284
+ ref: iconBlockRef,
6285
+ onClick: hoverOpen ? _ => _ : handleShow,
5964
6286
  style: {
6287
+ display: 'flex',
5965
6288
  cursor: 'pointer'
5966
6289
  },
5967
- onClick: handleShow
6290
+ onMouseEnter: hoverOpen ? handleMouseEnter : _ => _,
6291
+ onMouseLeave: hoverOpen ? handleMouseLeave : _ => _
5968
6292
  }, tooltipIcon ? tooltipIcon : configStyles.TOOLTIP.icon ? configStyles.TOOLTIP.icon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
5969
6293
  };
5970
6294
  Tooltip.propTypes = {
5971
- type: PropTypes.string,
5972
6295
  width: PropTypes.string,
5973
6296
  color: PropTypes.string,
5974
6297
  height: PropTypes.string,
5975
6298
  radius: PropTypes.string,
6299
+ hoverOpen: PropTypes.bool,
5976
6300
  fontSize: PropTypes.string,
5977
6301
  fontStyle: PropTypes.string,
5978
6302
  className: PropTypes.string,
@@ -5983,7 +6307,8 @@ Tooltip.propTypes = {
5983
6307
  tooltipRadius: PropTypes.string,
5984
6308
  text: PropTypes.string.isRequired,
5985
6309
  backgroundColor: PropTypes.string,
5986
- tooltipBackgroundColor: PropTypes.string
6310
+ tooltipBackgroundColor: PropTypes.string,
6311
+ direction: PropTypes.oneOf(Object.values(TooltipDirections))
5987
6312
  };
5988
6313
 
5989
6314
  const SvgCaptchaArrowUp = ({
@@ -6024,9 +6349,9 @@ const SvgCaptchaArrowDown = ({
6024
6349
  fill: fillColor ? fillColor : '#00236A'
6025
6350
  }));
6026
6351
 
6027
- var css_248z$4 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
6028
- var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
6029
- styleInject(css_248z$4);
6352
+ var css_248z$5 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
6353
+ var styles$4 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
6354
+ styleInject(css_248z$5);
6030
6355
 
6031
6356
  const Captcha = ({
6032
6357
  color,
@@ -6114,7 +6439,7 @@ const Captcha = ({
6114
6439
  alignItems: 'center',
6115
6440
  zIndex: 1
6116
6441
  },
6117
- className: styles$3['start-point']
6442
+ className: styles$4['start-point']
6118
6443
  }, /*#__PURE__*/React__default.createElement("div", {
6119
6444
  style: {
6120
6445
  position: 'absolute',
@@ -6140,8 +6465,8 @@ const Captcha = ({
6140
6465
  backgroundColor: 'transparent'
6141
6466
  },
6142
6467
  className: `
6143
- ${styles$3['range']}
6144
- ${+rangeProgress === rangeNumber ? styles$3['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$3['range-error'] : styles$3['range-default']}
6468
+ ${styles$4['range']}
6469
+ ${+rangeProgress === rangeNumber ? styles$4['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$4['range-error'] : styles$4['range-default']}
6145
6470
  `,
6146
6471
  onInput: handleRange
6147
6472
  }), /*#__PURE__*/React__default.createElement("div", {
@@ -6171,9 +6496,9 @@ Captcha.propTypes = {
6171
6496
  getRange: PropTypes.func.isRequired
6172
6497
  };
6173
6498
 
6174
- var css_248z$3 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
6175
- var styles$2 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
6176
- styleInject(css_248z$3);
6499
+ var css_248z$4 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
6500
+ var styles$3 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
6501
+ styleInject(css_248z$4);
6177
6502
 
6178
6503
  const Stepper = ({
6179
6504
  stepLength,
@@ -6183,11 +6508,11 @@ const Stepper = ({
6183
6508
  const [classProps, setClassProps] = useState({});
6184
6509
  const [configStyles, setConfigStyles] = useState({});
6185
6510
  useEffect(() => {
6186
- className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
6511
+ className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
6187
6512
  }, [className]);
6188
6513
  useEffect(() => {
6189
6514
  configStylesPromise.then(data => {
6190
- setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
6515
+ setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
6191
6516
  setConfigStyles(() => {
6192
6517
  return {
6193
6518
  ...data
@@ -6203,10 +6528,10 @@ const Stepper = ({
6203
6528
  let steppers = [];
6204
6529
  for (let step = 1; step <= stepLength; step++) {
6205
6530
  steppers.push( /*#__PURE__*/React__default.createElement("div", {
6206
- className: classnames(`${step <= activeSteps ? styles$2.activeRing : styles$2.bigRing}`),
6531
+ className: classnames(`${step <= activeSteps ? styles$3.activeRing : styles$3.bigRing}`),
6207
6532
  key: step
6208
6533
  }, /*#__PURE__*/React__default.createElement("div", {
6209
- className: classnames(`${step <= activeSteps ? styles$2.smallActiveRing : styles$2.smallRing}`)
6534
+ className: classnames(`${step <= activeSteps ? styles$3.smallActiveRing : styles$3.smallRing}`)
6210
6535
  }, step <= activeSteps ? step : '')));
6211
6536
  }
6212
6537
  return steppers;
@@ -6336,8 +6661,8 @@ Checkbox.propTypes = {
6336
6661
  data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
6337
6662
  };
6338
6663
 
6339
- var css_248z$2 = "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}";
6340
- styleInject(css_248z$2);
6664
+ var css_248z$3 = "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}";
6665
+ styleInject(css_248z$3);
6341
6666
 
6342
6667
  const PositionSide = {
6343
6668
  TOP: 'top',
@@ -6411,10 +6736,12 @@ const Textarea = ({
6411
6736
  if (maxLength) {
6412
6737
  if (value.length > maxLength) {
6413
6738
  onChange(value.substr(0, maxLength));
6739
+ setInnerValue(() => value.substr(0, maxLength));
6414
6740
  }
6415
6741
  } else {
6416
6742
  if (value.length > configStyles.TEXTAREA.maxLength) {
6417
6743
  onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
6744
+ setInnerValue(() => value.substr(0, configStyles.TEXTAREA.maxLength));
6418
6745
  }
6419
6746
  }
6420
6747
  };
@@ -6573,6 +6900,236 @@ Textarea.propTypes = {
6573
6900
  characterCountPosition: PropTypes.oneOf(Object.values(PositionSide))
6574
6901
  };
6575
6902
 
6903
+ const Swipe = ({
6904
+ id,
6905
+ title,
6906
+ child,
6907
+ props,
6908
+ innerConfigStyles
6909
+ }) => {
6910
+ const {
6911
+ SWIPEMODAL
6912
+ } = innerConfigStyles || {};
6913
+ const {
6914
+ width,
6915
+ height,
6916
+ titleStyle,
6917
+ position,
6918
+ borderRadius,
6919
+ callClose,
6920
+ showCloseIcon
6921
+ } = props || {};
6922
+ return /*#__PURE__*/React__default.createElement("div", {
6923
+ style: {
6924
+ width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
6925
+ height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100vh'
6926
+ }
6927
+ }, (title || showCloseIcon) && /*#__PURE__*/React__default.createElement("div", {
6928
+ style: {
6929
+ width: '100%',
6930
+ display: 'flex',
6931
+ minHeight: '40px',
6932
+ alignItems: 'center',
6933
+ boxSizing: 'border-box',
6934
+ justifyContent: title ? 'space-between' : 'flex-end',
6935
+ padding: titleStyle?.padding ?? SWIPEMODAL.titleStyle.padding,
6936
+ maxHeight: titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight
6937
+ }
6938
+ }, title && /*#__PURE__*/React__default.createElement("h1", {
6939
+ style: {
6940
+ color: titleStyle?.color ?? SWIPEMODAL.titleStyle.color,
6941
+ fontSize: titleStyle?.fontSize ?? SWIPEMODAL.titleStyle.font.size,
6942
+ textAlign: titleStyle?.textAlign ?? SWIPEMODAL.titleStyle.textAlign,
6943
+ fontStyle: titleStyle?.fontStyle ?? SWIPEMODAL.titleStyle.font.style,
6944
+ fontWeight: titleStyle?.fontWeight ?? SWIPEMODAL.titleStyle.font.weight,
6945
+ fontFamily: titleStyle?.fontFamily ?? SWIPEMODAL.titleStyle.font.family
6946
+ }
6947
+ }, title), showCloseIcon && /*#__PURE__*/React__default.createElement("div", {
6948
+ style: {
6949
+ width: '24px',
6950
+ height: '24px',
6951
+ maxWidth: '24px',
6952
+ maxHeight: '24px',
6953
+ cursor: 'pointer'
6954
+ },
6955
+ onClick: hasOwnerProperty(props, 'callClose') && {}.toString.call(callClose) === '[object Function]' ? () => callClose(id) : _ => _
6956
+ }, /*#__PURE__*/React__default.createElement("img", {
6957
+ alt: "close",
6958
+ src: hasOwnerProperty(props, 'closeIcon') && typeof props.closeIcon === 'string' ? props.closeIcon : SWIPEMODAL.closeIcon,
6959
+ style: {
6960
+ width: '100%',
6961
+ height: '100%',
6962
+ objectFit: 'contain',
6963
+ objectPosition: 'center'
6964
+ }
6965
+ }))), child && /*#__PURE__*/React__default.createElement("div", {
6966
+ style: {
6967
+ width: '100%',
6968
+ height: '100%',
6969
+ overflowY: 'auto',
6970
+ overflowX: 'hidden',
6971
+ maxHeight: `calc(100% - ${titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight})`,
6972
+ borderTopLeftRadius: position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
6973
+ borderTopRightRadius: position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
6974
+ borderBottomLeftRadius: position === 'right' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
6975
+ borderBottomRightRadius: position === 'left' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius
6976
+ }
6977
+ }, child));
6978
+ };
6979
+
6980
+ var css_248z$2 = ".swipe-module_to-top__lrHfG{bottom:0}.swipe-module_to-left__kgLsE{right:0}.swipe-module_to-right__Xu3Ul{left:0}.swipe-module_to-bottom__94M7H{top:0}.swipe-module_visible__---aC{visibility:visible!important}.swipe-module_swipe-block__Yv1B3{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.swipe-module_move-top__m6t2O{-webkit-animation-name:swipe-module_slideTop__-Bbap;animation-name:swipe-module_slideTop__-Bbap}.swipe-module_move-left__4TDLs{-webkit-animation-name:swipe-module_slideLeft__i24cS;animation-name:swipe-module_slideLeft__i24cS}.swipe-module_move-right__FrYo0{-webkit-animation-name:swipe-module_slideRight__swgSY;animation-name:swipe-module_slideRight__swgSY}.swipe-module_move-bottom__eYDx6{-webkit-animation-name:swipe-module_slideBottom__TBoZo;animation-name:swipe-module_slideBottom__TBoZo}.swipe-module_back-top__gJZv0{-webkit-animation-name:swipe-module_backTop__32loc;animation-name:swipe-module_backTop__32loc}.swipe-module_back-left__Wd3aY{-webkit-animation-name:swipe-module_backLeft__q89ub;animation-name:swipe-module_backLeft__q89ub}.swipe-module_back-right__Lgwz7{-webkit-animation-name:swipe-module_backRight__8t5Dm;animation-name:swipe-module_backRight__8t5Dm}.swipe-module_back-bottom__JRN-7{-webkit-animation-name:swipe-module_backBottom__lwR8B;animation-name:swipe-module_backBottom__lwR8B}@keyframes swipe-module_slideTop__-Bbap{0%{bottom:-100%}to{bottom:0}}@keyframes swipe-module_slideLeft__i24cS{0%{right:-100%}to{right:0}}@keyframes swipe-module_slideRight__swgSY{0%{left:-100%}to{left:0}}@keyframes swipe-module_slideBottom__TBoZo{0%{top:-100%}to{top:0}}@keyframes swipe-module_backTop__32loc{0%{bottom:0}to{bottom:-100%}}@keyframes swipe-module_backLeft__q89ub{0%{right:0}to{right:-100%}}@keyframes swipe-module_backRight__8t5Dm{0%{left:0}to{left:-100%}}@keyframes swipe-module_backBottom__lwR8B{0%{top:0}to{top:-100%}}";
6981
+ var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","slideTop":"swipe-module_slideTop__-Bbap","move-left":"swipe-module_move-left__4TDLs","slideLeft":"swipe-module_slideLeft__i24cS","move-right":"swipe-module_move-right__FrYo0","slideRight":"swipe-module_slideRight__swgSY","move-bottom":"swipe-module_move-bottom__eYDx6","slideBottom":"swipe-module_slideBottom__TBoZo","back-top":"swipe-module_back-top__gJZv0","backTop":"swipe-module_backTop__32loc","back-left":"swipe-module_back-left__Wd3aY","backLeft":"swipe-module_backLeft__q89ub","back-right":"swipe-module_back-right__Lgwz7","backRight":"swipe-module_backRight__8t5Dm","back-bottom":"swipe-module_back-bottom__JRN-7","backBottom":"swipe-module_backBottom__lwR8B"};
6982
+ styleInject(css_248z$2);
6983
+
6984
+ let swipeCount = 0;
6985
+ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
6986
+ const {
6987
+ width,
6988
+ height,
6989
+ position = 'left',
6990
+ animation,
6991
+ borderRadius,
6992
+ backgroundColor
6993
+ } = props || {};
6994
+ swipeBlock.style.position = 'fixed';
6995
+ swipeBlock.style.zIndex = swipeCount;
6996
+ swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
6997
+ swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
6998
+ swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100vh';
6999
+ swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7000
+ swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7001
+ swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7002
+ swipeBlock.style.borderBottomRightRadius = position === 'left' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7003
+ swipeBlock.setAttribute('id', id);
7004
+ swipeBlock.setAttribute('closePos', position);
7005
+ swipeBlock.classList.add(styles$2['swipe-block'], position === 'top' ? styles$2['to-top'] : position === 'bottom' ? styles$2['to-bottom'] : position === 'left' ? styles$2['to-left'] : styles$2['to-right']);
7006
+ if (hasOwnerProperty(props, 'animation') && animation === true) {
7007
+ swipeBlock.setAttribute('anime', animation);
7008
+ swipeBlock.classList.add(position === 'top' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-top'] : ''}` : position === 'bottom' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-bottom'] : ''}` : position === 'left' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-left'] : ''}` : `${hasOwnerProperty(props, 'animation') && props.animation === true ? styles$2['move-right'] : ''}`);
7009
+ }
7010
+ const newElem = /*#__PURE__*/React__default.createElement(Swipe, {
7011
+ id,
7012
+ title,
7013
+ child,
7014
+ props,
7015
+ innerConfigStyles
7016
+ });
7017
+ const root = ReactDOM.createRoot(swipeBlock);
7018
+ root.render(newElem);
7019
+ };
7020
+ const createSwipe = (id, title, child, props, swipable) => {
7021
+ let innerConfigStyles = {};
7022
+ const swipeBlock = document.createElement('div');
7023
+ swipeBlock.addEventListener('click', function (e) {
7024
+ e.stopPropagation();
7025
+ });
7026
+ configStylesPromise.then(data => {
7027
+ innerConfigStyles = {
7028
+ ...data
7029
+ };
7030
+ createElem(id, title, child, props, swipeBlock, innerConfigStyles);
7031
+ if (!swipable) {
7032
+ const widthParent = hasOwnerProperty(props, 'withParent') ? props.withParent === true ? true : false : innerConfigStyles.SWIPEMODAL.withParent;
7033
+ swipable = document.createElement('div');
7034
+ swipable.setAttribute('id', 'swipable');
7035
+ swipable.style.position = 'fixed';
7036
+ swipable.style.top = '0px';
7037
+ swipable.style.left = '0px';
7038
+ swipable.style.zIndex = 99999;
7039
+ swipable.style.maxWidth = '100%';
7040
+ swipable.style.maxHeight = '100vh';
7041
+ swipable.style.visibility = 'hidden';
7042
+ swipable.style.width = widthParent ? '100%' : '0px';
7043
+ swipable.style.height = widthParent ? '100vh' : '0px';
7044
+ swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
7045
+ swipable.classList.add(styles$2['visible']);
7046
+ if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
7047
+ swipable.addEventListener('click', function () {
7048
+ hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
7049
+ });
7050
+ }
7051
+ document.body.appendChild(swipable);
7052
+ }
7053
+ swipable.appendChild(swipeBlock);
7054
+ }, error => {
7055
+ console.error(error);
7056
+ });
7057
+ };
7058
+
7059
+ // Function to handle removing the element on navigation change
7060
+ const handleNavigationChange = () => {
7061
+ let swipable = document.getElementById('swipable');
7062
+ if (swipable) {
7063
+ swipable.remove();
7064
+ }
7065
+ };
7066
+
7067
+ // Wrap history methods to detect all navigation changes
7068
+ (function (history) {
7069
+ const pushState = history.pushState;
7070
+ const replaceState = history.replaceState;
7071
+ history.pushState = function (state) {
7072
+ const result = pushState.apply(history, arguments);
7073
+ window.dispatchEvent(new Event('navigationchange'));
7074
+ return result;
7075
+ };
7076
+ history.replaceState = function (state) {
7077
+ const result = replaceState.apply(history, arguments);
7078
+ window.dispatchEvent(new Event('navigationchange'));
7079
+ return result;
7080
+ };
7081
+ })(window.history);
7082
+ const swipe = {
7083
+ open: (title = '', id, child, props) => {
7084
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
7085
+ alert('Please pass valid id prop (string / number) when call swipe.open function');
7086
+ return;
7087
+ }
7088
+ if (swipeCount === 0) {
7089
+ window.addEventListener('popstate', handleNavigationChange);
7090
+ window.addEventListener('navigationchange', handleNavigationChange);
7091
+ }
7092
+ let swipable = document.getElementById('swipable');
7093
+ swipeCount += 1;
7094
+ createSwipe(id, title, child, props, swipable);
7095
+ return Promise.resolve(id);
7096
+ },
7097
+ close: id => {
7098
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
7099
+ alert('Please pass valid id prop (string / number) when call swipe.close function');
7100
+ return;
7101
+ }
7102
+ let swipable = document.getElementById('swipable');
7103
+ swipeCount -= 1;
7104
+ const removable = document.getElementById(id);
7105
+ if (swipable && removable) {
7106
+ const animation = removable.getAttribute('anime');
7107
+ const position = removable.getAttribute('closePos');
7108
+ if (animation) {
7109
+ removable.classList.add(position === 'top' ? styles$2['back-top'] : position === 'left' ? styles$2['back-left'] : position === 'right' ? styles$2['back-right'] : styles$2['back-bottom']);
7110
+ setTimeout(() => {
7111
+ swipable.removeChild(removable);
7112
+ if (swipeCount === 0 && swipable) {
7113
+ window.removeEventListener('popstate', handleNavigationChange);
7114
+ window.removeEventListener('navigationchange', handleNavigationChange);
7115
+ document.body.removeChild(swipable);
7116
+ }
7117
+ }, 200);
7118
+ } else {
7119
+ swipable.removeChild(removable);
7120
+ if (swipeCount === 0 && swipable) {
7121
+ window.removeEventListener('popstate', handleNavigationChange);
7122
+ window.removeEventListener('navigationchange', handleNavigationChange);
7123
+ document.body.removeChild(swipable);
7124
+ }
7125
+ }
7126
+ }
7127
+ }
7128
+ };
7129
+ const SwipeModal = () => {
7130
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
7131
+ };
7132
+
6576
7133
  const TypographyType = {
6577
7134
  p: 'p',
6578
7135
  h1: 'h1',
@@ -7359,4 +7916,4 @@ Autocomplete.propTypes = {
7359
7916
  backgroundDisableColor: PropTypes.string
7360
7917
  };
7361
7918
 
7362
- export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
7919
+ export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, IconSides, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, SwipeModal, Table, Textarea, Toaster, Tooltip, TooltipDirections, Typography, TypographyType, swipe, toast };