@xaypay/tui 0.2.13 → 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.js CHANGED
@@ -463,6 +463,8 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
463
463
  }, iconDelItem ? iconDelItem : /*#__PURE__*/React__default["default"].createElement(SvgListItemDelete, null))));
464
464
  });
465
465
 
466
+ 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";
467
+
466
468
  const boxSizing = 'border-box';
467
469
  const fontStyle = 'normal';
468
470
  const fontFamily = 'Arial';
@@ -489,17 +491,18 @@ const fontObject = {
489
491
  var packageResult = {
490
492
  // default properties for <Button /> component
491
493
  BUTTON: {
492
- type: 'button',
494
+ opacity: 1,
493
495
  width: '100%',
496
+ radius: '6px',
497
+ className: '',
498
+ type: 'button',
494
499
  height: '46px',
495
500
  color: 'white',
496
- contentWidth: false,
497
501
  border: 'none',
498
- radius: '6px',
502
+ disabled: false,
499
503
  cursor: 'pointer',
504
+ contentWidth: false,
500
505
  padding: '12px 20px',
501
- disabled: false,
502
- className: '',
503
506
  transition: 'background-color 240ms, color 240ms',
504
507
  box: {
505
508
  sizing: boxSizing
@@ -509,7 +512,11 @@ var packageResult = {
509
512
  backgroundHover: '#CB3A3A',
510
513
  disabled: 'rgba(60, 57, 62, 1)',
511
514
  disabledLine: 'rgba(60, 57, 62, 1)',
512
- disabledBackground: 'rgba(238, 238, 238, 1)'
515
+ disabledBackground: 'rgba(238, 238, 238, 1)',
516
+ withoutStyling: {
517
+ color: '#000000',
518
+ hoverColor: '#121212'
519
+ }
513
520
  },
514
521
  font: {
515
522
  ...fontObject
@@ -521,8 +528,10 @@ var packageResult = {
521
528
  }
522
529
  },
523
530
  icon: {
531
+ marginLeft: '10px',
524
532
  marginRight: '10px'
525
- }
533
+ },
534
+ withoutStyling: false
526
535
  },
527
536
  // default properties for <Input /> component
528
537
  INPUT: {
@@ -552,9 +561,11 @@ var packageResult = {
552
561
  ...fontObject
553
562
  },
554
563
  label: {
564
+ dots: false,
555
565
  color: presetColors.dark,
556
566
  display: 'block',
557
567
  lineHeight: '22px',
568
+ iconMargin: '10px',
558
569
  marginBottom: '6px',
559
570
  font: {
560
571
  ...fontObject
@@ -566,6 +577,7 @@ var packageResult = {
566
577
  zIndex: '1',
567
578
  className: '',
568
579
  marginTop: '10px',
580
+ iconMargin: '10px',
569
581
  lineHeight: '19px',
570
582
  font: {
571
583
  ...fontObject
@@ -1111,6 +1123,36 @@ var packageResult = {
1111
1123
  },
1112
1124
  closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
1113
1125
  },
1126
+ // default properties for <SwipeModal /> component
1127
+ SWIPEMODAL: {
1128
+ width: '300px',
1129
+ height: '100vh',
1130
+ titleStyle: {
1131
+ color: '#1C212D',
1132
+ textAlign: 'left',
1133
+ maxHeight: '66px',
1134
+ padding: '0px 20px',
1135
+ font: {
1136
+ ...fontObject
1137
+ }
1138
+ },
1139
+ parent: {
1140
+ width: '100%',
1141
+ height: '100vh',
1142
+ colors: {
1143
+ background: 'rgba(60, 61, 70, 0.2)'
1144
+ }
1145
+ },
1146
+ colors: {
1147
+ background: 'white'
1148
+ },
1149
+ border: {
1150
+ radius: '10px'
1151
+ },
1152
+ withParent: true,
1153
+ outSideClose: false,
1154
+ closeIcon: img$2
1155
+ },
1114
1156
  // default properties for <Checkbox /> component
1115
1157
  CHECKBOX: {
1116
1158
  className: '',
@@ -1179,6 +1221,12 @@ var packageResult = {
1179
1221
  font: {
1180
1222
  ...fontObject
1181
1223
  }
1224
+ },
1225
+ draggable: {
1226
+ boxShadow: '1px 1px 9px black',
1227
+ color: {
1228
+ background: 'white'
1229
+ }
1182
1230
  }
1183
1231
  },
1184
1232
  // default properties for <Pagination /> component
@@ -1187,13 +1235,48 @@ var packageResult = {
1187
1235
  },
1188
1236
  // default properties for <Toaster /> component
1189
1237
  TOASTER: {
1238
+ width: '440px',
1239
+ height: '83px',
1190
1240
  className: '',
1191
- icon: {
1192
- // info: React.createElement(SvgChecked, { just: 'must' }),
1193
- // warn: React.createElement(SvgUnchecked, { just: 'must' }),
1194
- // close: React.createElement(SvgChecked, { fill: 'green' }),
1195
- // error: React.createElement(SvgChecked, { fill: 'green' }),
1196
- // success: React.createElement(SvgChecked, { fill: 'green' }),
1241
+ marginBottom: '20px',
1242
+ backgroundColor: '#FFFFFF',
1243
+ padding: '14px 29px 14px 12px',
1244
+ border: {
1245
+ width: '2px',
1246
+ style: 'solid',
1247
+ radius: '40px',
1248
+ color: '#EEEEEE'
1249
+ },
1250
+ title: {
1251
+ color: '#3C393E',
1252
+ lineHeight: '22px',
1253
+ font: {
1254
+ size: '16px',
1255
+ style: 'normal',
1256
+ weight: 600,
1257
+ family: ''
1258
+ },
1259
+ props: {}
1260
+ },
1261
+ description: {
1262
+ color: '#3C393E',
1263
+ lineHeight: '16px',
1264
+ font: {
1265
+ size: '12px',
1266
+ style: 'normal',
1267
+ weight: 500,
1268
+ family: ''
1269
+ },
1270
+ props: {
1271
+ opacity: 0.8
1272
+ }
1273
+ },
1274
+ icons: {
1275
+ info: '',
1276
+ warn: '',
1277
+ error: '',
1278
+ close: '',
1279
+ success: ''
1197
1280
  }
1198
1281
  },
1199
1282
  // default properties for <Stepper /> component
@@ -1279,6 +1362,7 @@ const Button = ({
1279
1362
  radius,
1280
1363
  outline,
1281
1364
  padding,
1365
+ opacity,
1282
1366
  onClick,
1283
1367
  disabled,
1284
1368
  className,
@@ -1287,13 +1371,18 @@ const Button = ({
1287
1371
  hoverColor,
1288
1372
  transition,
1289
1373
  contentWidth,
1374
+ iconRightSide,
1290
1375
  disabledColor,
1291
1376
  textTransform,
1377
+ withoutStyling,
1292
1378
  backgroundColor,
1293
1379
  disabledLineColor,
1380
+ btnIconMarginLeft,
1294
1381
  btnIconMarginRight,
1382
+ withoutStylingColor,
1295
1383
  backgroundHoverColor,
1296
1384
  disabledBackgroundColor,
1385
+ withoutStylingHoverColor,
1297
1386
  ...props
1298
1387
  }) => {
1299
1388
  const [classProps, setClassProps] = React.useState({});
@@ -1329,22 +1418,23 @@ const Button = ({
1329
1418
  outline: 'none',
1330
1419
  alignItems: 'center',
1331
1420
  justifyContent: 'center',
1421
+ height: height ?? configStyles.BUTTON.height,
1422
+ padding: padding ?? configStyles.BUTTON.padding,
1332
1423
  fontSize: size ?? configStyles.BUTTON.font.size,
1424
+ borderRadius: radius ?? configStyles.BUTTON.radius,
1333
1425
  fontStyle: style ?? configStyles.BUTTON.font.style,
1334
1426
  fontFamily: font ?? configStyles.BUTTON.font.family,
1335
- height: height ?? configStyles.BUTTON.height,
1336
1427
  fontWeight: weight ?? configStyles.BUTTON.font.weight,
1337
- padding: padding ?? configStyles.BUTTON.padding,
1338
- borderRadius: radius ?? configStyles.BUTTON.radius,
1339
1428
  boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
1340
1429
  transition: transition ?? configStyles.BUTTON.transition,
1341
1430
  border: outline ? 'none' : border ?? configStyles.BUTTON.border,
1342
1431
  width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
1343
- cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
1344
1432
  textTransform: textTransform ?? configStyles.BUTTON.text.transform,
1345
- 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,
1346
- 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',
1347
- 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
1433
+ cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
1434
+ opacity: opacity ?? configStyles.BUTTON.opacity,
1435
+ 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,
1436
+ 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',
1437
+ 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
1348
1438
  },
1349
1439
  type: type ?? configStyles.BUTTON.type,
1350
1440
  disabled: disabled ?? configStyles.BUTTON.disabled,
@@ -1352,43 +1442,50 @@ const Button = ({
1352
1442
  onMouseEnter: handleMouseEnter,
1353
1443
  onMouseLeave: handleMouseLeave,
1354
1444
  className: classProps
1355
- }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
1445
+ }, props), !iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
1356
1446
  style: {
1357
- marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px'
1447
+ marginLeft: icon && !iconRightSide ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px',
1448
+ marginRight: icon && iconRightSide ? btnIconMarginLeft ? btnIconMarginLeft : configStyles.BUTTON.icon.marginLeft : '0px'
1358
1449
  }
1359
- }, label), ' ', !icon && !label && 'Add icon or label prop on Button component'));
1450
+ }, label), ' ', iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', !icon && !label && 'Add icon or label prop on Button component'));
1360
1451
  };
1361
1452
  Button.propTypes = {
1362
1453
  type: PropTypes__default["default"].string,
1363
1454
  size: PropTypes__default["default"].string,
1364
1455
  style: PropTypes__default["default"].string,
1365
- weight: PropTypes__default["default"].string,
1366
1456
  font: PropTypes__default["default"].string,
1367
1457
  icon: PropTypes__default["default"].element,
1368
- hoverIcon: PropTypes__default["default"].element,
1369
1458
  color: PropTypes__default["default"].string,
1370
1459
  width: PropTypes__default["default"].string,
1371
1460
  outline: PropTypes__default["default"].bool,
1372
1461
  onClick: PropTypes__default["default"].func,
1373
1462
  label: PropTypes__default["default"].string,
1463
+ weight: PropTypes__default["default"].string,
1374
1464
  height: PropTypes__default["default"].string,
1375
1465
  cursor: PropTypes__default["default"].string,
1376
1466
  border: PropTypes__default["default"].string,
1377
1467
  disabled: PropTypes__default["default"].bool,
1378
1468
  radius: PropTypes__default["default"].string,
1379
1469
  padding: PropTypes__default["default"].string,
1470
+ opacity: PropTypes__default["default"].number,
1380
1471
  boxSizing: PropTypes__default["default"].string,
1381
1472
  className: PropTypes__default["default"].string,
1473
+ hoverIcon: PropTypes__default["default"].element,
1382
1474
  hoverColor: PropTypes__default["default"].string,
1383
1475
  transition: PropTypes__default["default"].string,
1384
1476
  contentWidth: PropTypes__default["default"].bool,
1477
+ iconRightSide: PropTypes__default["default"].bool,
1478
+ withoutStyling: PropTypes__default["default"].bool,
1385
1479
  textTransform: PropTypes__default["default"].string,
1386
1480
  disabledColor: PropTypes__default["default"].string,
1387
1481
  backgroundColor: PropTypes__default["default"].string,
1388
1482
  disabledLineColor: PropTypes__default["default"].string,
1483
+ btnIconMarginLeft: PropTypes__default["default"].string,
1389
1484
  btnIconMarginRight: PropTypes__default["default"].string,
1485
+ withoutStylingColor: PropTypes__default["default"].string,
1390
1486
  backgroundHoverColor: PropTypes__default["default"].string,
1391
- disabledBackgroundColor: PropTypes__default["default"].string
1487
+ disabledBackgroundColor: PropTypes__default["default"].string,
1488
+ withoutStylingHoverColor: PropTypes__default["default"].string
1392
1489
  };
1393
1490
 
1394
1491
  const SvgPdf = ({
@@ -1761,19 +1858,19 @@ const File = /*#__PURE__*/React.forwardRef(({
1761
1858
  setError('');
1762
1859
  if (file[0].type === 'application/pdf') {
1763
1860
  setImage('pdf');
1764
- change(file[0]);
1765
- setSingleFile(file[0]);
1861
+ change(file);
1862
+ setSingleFile(file);
1766
1863
  } else if (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) {
1767
1864
  handleCheckHeicFormat(file[0]).then(() => {
1768
1865
  setImage('heic');
1769
- change(file[0]);
1770
- setSingleFile(file[0]);
1866
+ change(file);
1867
+ setSingleFile(file);
1771
1868
  }).catch(() => {
1772
1869
  setImage(null);
1773
1870
  setError(formatError ?? configStyles.FILE.error.format);
1774
1871
  });
1775
1872
  } else {
1776
- change(file[0]);
1873
+ change(file);
1777
1874
  setImage(URL.createObjectURL(file[0]));
1778
1875
  }
1779
1876
  } else {
@@ -2382,7 +2479,7 @@ const handleUtilsCheckTypeTel = (val, prevVal) => {
2382
2479
  }
2383
2480
  return val;
2384
2481
  };
2385
- const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize) => {
2482
+ const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength) => {
2386
2483
  if (maxLength && maxLength > 0) {
2387
2484
  if (val.length > maxLength) {
2388
2485
  val = val.substr(0, maxLength);
@@ -2392,6 +2489,9 @@ const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumS
2392
2489
  if (val.length > 16 && !val.includes('.')) {
2393
2490
  val = val.substr(0, 16);
2394
2491
  }
2492
+ if (numberMaxLength && numberMaxLength > 0 && !val.includes('.')) {
2493
+ val = val.substr(0, numberMaxLength);
2494
+ }
2395
2495
  const floatNumParts = typeof val === 'string' ? val.split(/\.|\․|\.|\,/) : val;
2396
2496
  const int = floatNumParts[0];
2397
2497
  const float = floatNumParts[1];
@@ -2463,9 +2563,9 @@ function styleInject(css, ref) {
2463
2563
  }
2464
2564
  }
2465
2565
 
2466
- 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}";
2467
- 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"};
2468
- styleInject(css_248z$a);
2566
+ 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}";
2567
+ 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"};
2568
+ styleInject(css_248z$b);
2469
2569
 
2470
2570
  /* eslint-disable no-prototype-builtins */
2471
2571
  const TH = ({
@@ -2507,7 +2607,7 @@ const TH = ({
2507
2607
  borderColor: hideBorder ? 'transparent' : '#eeeeee'
2508
2608
  },
2509
2609
  onClick: handleHeaderItemClick,
2510
- className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$9['sorting-arrows'] : '' : ''}`
2610
+ className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$a['sorting-arrows'] : '' : ''}`
2511
2611
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2512
2612
  style: {
2513
2613
  display: 'flex',
@@ -2536,16 +2636,16 @@ const TD = ({
2536
2636
  item,
2537
2637
  index,
2538
2638
  rowItem,
2639
+ dragged,
2640
+ dragEnd,
2539
2641
  rowRadius,
2540
2642
  dragStart,
2541
- handleMouseDown,
2542
2643
  hideBorder,
2543
2644
  innerIndex,
2544
2645
  tBodyColor,
2545
2646
  orderColor,
2546
2647
  borderRight,
2547
2648
  tBodyPadding,
2548
- setIsDragging,
2549
2649
  orderFontSize,
2550
2650
  tBodyFontSize,
2551
2651
  openListColor,
@@ -2641,7 +2741,7 @@ const TD = ({
2641
2741
  },
2642
2742
  id: newItem.id,
2643
2743
  type: newItem.type,
2644
- className: styles$9['td-span'],
2744
+ className: styles$a['td-span'],
2645
2745
  key: `${newItem.id}_${newIndex}`,
2646
2746
  onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
2647
2747
  }, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
@@ -2663,7 +2763,7 @@ const TD = ({
2663
2763
  },
2664
2764
  id: iT.id ? iT.id : '',
2665
2765
  type: iT.type ? iT.type : '',
2666
- className: styles$9['td-span'],
2766
+ className: styles$a['td-span'],
2667
2767
  onClick: e => handleCheckActions(e, iT, 'type', iN),
2668
2768
  key: `${iT.id || iT.content}_${iN}`
2669
2769
  }, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
@@ -2687,7 +2787,7 @@ const TD = ({
2687
2787
  cursor: 'pointer'
2688
2788
  },
2689
2789
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
2690
- className: styles$9['td-span']
2790
+ className: styles$a['td-span']
2691
2791
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'draggableIcon') && /*#__PURE__*/React__default["default"].createElement("div", {
2692
2792
  draggable: true,
2693
2793
  style: {
@@ -2695,7 +2795,9 @@ const TD = ({
2695
2795
  height: '24px',
2696
2796
  cursor: 'grab'
2697
2797
  },
2698
- onDragStart: () => dragStart(index)
2798
+ onDrag: dragged,
2799
+ onDragEnd: dragEnd,
2800
+ onDragStart: e => dragStart(e, index, row)
2699
2801
  }, /*#__PURE__*/React__default["default"].createElement("img", {
2700
2802
  src: img$1,
2701
2803
  alt: "drag"
@@ -2754,7 +2856,7 @@ const TD = ({
2754
2856
  }, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
2755
2857
  return /*#__PURE__*/React__default["default"].createElement("span", {
2756
2858
  key: `${optionItem.content}_${optionIndex}`,
2757
- className: styles$9['dots-option-item'],
2859
+ className: styles$a['dots-option-item'],
2758
2860
  style: {
2759
2861
  color: '#3C393E',
2760
2862
  fontSize: '14px',
@@ -2796,7 +2898,7 @@ const TD = ({
2796
2898
  }, innerItem.content.map((contInnerItem, contInnerIndex) => {
2797
2899
  return /*#__PURE__*/React__default["default"].createElement("p", {
2798
2900
  key: `${contInnerItem}_${contInnerIndex}`,
2799
- className: styles$9['list-text'],
2901
+ className: styles$a['list-text'],
2800
2902
  style: {
2801
2903
  maxWidth: '100%',
2802
2904
  color: openListColor,
@@ -2813,7 +2915,7 @@ const TD = ({
2813
2915
  } else {
2814
2916
  return /*#__PURE__*/React__default["default"].createElement("p", {
2815
2917
  key: `${innerItem}_${innerItemIndex}`,
2816
- className: styles$9['list-text'],
2918
+ className: styles$a['list-text'],
2817
2919
  style: {
2818
2920
  maxWidth: '100%',
2819
2921
  color: openListColor,
@@ -2834,7 +2936,7 @@ const TD = ({
2834
2936
  cursor: 'pointer'
2835
2937
  },
2836
2938
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
2837
- className: styles$9['td-span']
2939
+ className: styles$a['td-span']
2838
2940
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
2839
2941
  };
2840
2942
 
@@ -2935,8 +3037,11 @@ const Table = ({
2935
3037
  draggable,
2936
3038
  showOrder,
2937
3039
  draggableColor,
2938
- getDraggableData
3040
+ getDraggableData,
3041
+ draggableItemBoxShadow,
3042
+ draggableItemBackgroundColor
2939
3043
  }) => {
3044
+ const itemRefs = React.useRef({});
2940
3045
  const headerRef = React.useRef(null);
2941
3046
  const draggedRowIndex = React.useRef(null);
2942
3047
  const [body, setBody] = React.useState([]);
@@ -2946,8 +3051,12 @@ const Table = ({
2946
3051
  const [checkDrag, setCheckDrag] = React.useState(false);
2947
3052
  const [checkedArray, setCheckedArray] = React.useState([]);
2948
3053
  const [configStyles, setConfigStyles] = React.useState({});
2949
- React.useState(false);
2950
- const [draggingIndex, setDraggingIndex] = React.useState(null);
3054
+ const [dragging, setDragging] = React.useState(false);
3055
+ const [draggedItem, setDraggedItem] = React.useState(null);
3056
+ const [position, setPosition] = React.useState({
3057
+ x: 0,
3058
+ y: 0
3059
+ });
2951
3060
  const handleCheckIfArrow = (bodyData, data) => {
2952
3061
  let removeItemIndex;
2953
3062
  let headerWithoutArrow = [];
@@ -3194,9 +3303,18 @@ const Table = ({
3194
3303
  tempCheckedArray.push(innerItem.checked);
3195
3304
  });
3196
3305
  if (tempCheckedArray.every(i => i)) {
3197
- item.checkBox.checked = true;
3306
+ if (hasOwnerProperty(item, 'checkBox')) {
3307
+ if (hasOwnerProperty(item.checkBox, 'checked')) {
3308
+ item.checkBox.checked = true;
3309
+ return item;
3310
+ }
3311
+ }
3198
3312
  } else {
3199
- item.checkBox.checked = false;
3313
+ if (hasOwnerProperty(item, 'checkBox')) {
3314
+ if (hasOwnerProperty(item.checkBox, 'checked')) {
3315
+ item.checkBox.checked = false;
3316
+ }
3317
+ }
3200
3318
  }
3201
3319
  }
3202
3320
  return item;
@@ -3261,7 +3379,7 @@ const Table = ({
3261
3379
  const handleCheckArrowActionHeader = (e, item) => {
3262
3380
  e.stopPropagation();
3263
3381
  const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
3264
- if (item.checkIndex === innerIndex) {
3382
+ if (item.checkIndex === (draggable && !showOrder ? innerIndex - 1 : draggable && showOrder ? innerIndex - 2 : innerIndex)) {
3265
3383
  if (item.status === 'close') {
3266
3384
  innerItem.status = 'open';
3267
3385
  } else {
@@ -3354,24 +3472,59 @@ const Table = ({
3354
3472
  });
3355
3473
  setBody(() => checkBodyMore);
3356
3474
  };
3357
- const handleDragStart = index => {
3475
+ const handleDragStart = (e, index, row) => {
3476
+ setDragging(true);
3477
+ setDraggedItem(row);
3358
3478
  draggedRowIndex.current = index;
3359
- setDraggingIndex(() => index);
3479
+ e.dataTransfer.setDragImage(new Image(), 0, 0);
3480
+ };
3481
+ const handleDrag = e => {
3482
+ setPosition({
3483
+ x: e.clientX,
3484
+ y: e.clientY
3485
+ });
3360
3486
  };
3361
- const handleDrop = index => {
3487
+ const handleDrop = (e, index) => {
3362
3488
  let correctData = [];
3363
3489
  const newRows = body;
3364
3490
  const [draggedRow] = newRows.splice(draggedRowIndex.current, 1);
3365
3491
  newRows.splice(index, 0, draggedRow);
3366
- newRows.map(item => {
3492
+ newRows.map((item, newIndex) => {
3493
+ item.map(innerItem => {
3494
+ if (hasOwnerProperty(innerItem, 'checkIndex')) {
3495
+ innerItem.checkIndex = newIndex;
3496
+ }
3497
+ });
3367
3498
  correctData.push([...item]);
3368
3499
  });
3369
3500
  setBody(correctData);
3370
3501
  getDraggableData && getDraggableData(correctData);
3371
3502
  setCheckDrag(prev => !prev);
3372
3503
  draggedRowIndex.current = null;
3373
- setDraggingIndex(() => null);
3374
3504
  correctData = null;
3505
+ setDraggedItem(null);
3506
+ setDragging(false);
3507
+ e.dataTransfer.setDragImage(new Image(), 0, 0);
3508
+ };
3509
+ const handleDragEnd = e => {
3510
+ setDraggedItem(null);
3511
+ setDragging(false);
3512
+ e.dataTransfer.setDragImage(new Image(), 0, 0);
3513
+ };
3514
+ const setRef = (index, element) => {
3515
+ if (element) {
3516
+ itemRefs.current[index] = element;
3517
+ }
3518
+ };
3519
+ const handleSafeStringify = obj => {
3520
+ const seen = new WeakSet();
3521
+ return JSON.stringify(obj, (key, value) => {
3522
+ if (typeof value === "object" && value !== null) {
3523
+ if (seen.has(value)) return; // Ignore circular reference
3524
+ seen.add(value);
3525
+ }
3526
+ return value;
3527
+ });
3375
3528
  };
3376
3529
  React.useEffect(() => {
3377
3530
  const draggableArray = body && body.length && body.map((item, index) => {
@@ -3389,7 +3542,7 @@ const Table = ({
3389
3542
  setBody(() => draggableArray);
3390
3543
  }, [checkDrag]);
3391
3544
  React.useEffect(() => {
3392
- const isEqual = JSON.stringify(body) === JSON.stringify(dataBody);
3545
+ const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
3393
3546
  if (!isEqual) {
3394
3547
  let insert = [];
3395
3548
  let newArray = [];
@@ -3397,7 +3550,11 @@ const Table = ({
3397
3550
  const disabledArray = [];
3398
3551
  const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
3399
3552
  if (arrowShow) {
3400
- const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], arrowColumn);
3553
+ let column = arrowColumn;
3554
+ if (draggable) {
3555
+ column -= 1;
3556
+ }
3557
+ const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], column);
3401
3558
  const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
3402
3559
  insert = checkForInsertArrow.map((item, index) => {
3403
3560
  item.map((innerItem, innerIndex) => {
@@ -3416,27 +3573,8 @@ const Table = ({
3416
3573
  });
3417
3574
  return item;
3418
3575
  });
3576
+ newArray = insert;
3419
3577
  checkedItems = handleSetCheckboxArray(insert);
3420
- if (draggable) {
3421
- newArray = insert && insert.length && insert.map((item, index) => {
3422
- item.map(innerItem => {
3423
- if (hasOwnerProperty(innerItem, 'colorStatus')) {
3424
- innerItem.colorStatus = null;
3425
- }
3426
- });
3427
- if (showOrder) {
3428
- item.unshift({
3429
- content: index + 1,
3430
- draggable: true
3431
- });
3432
- }
3433
- item.unshift({
3434
- draggableIcon: '',
3435
- colorStatus: draggableColor
3436
- });
3437
- return item;
3438
- });
3439
- }
3440
3578
  } else {
3441
3579
  insert = checkBodyForChackedItems.map((item, index) => {
3442
3580
  item.map((innerItem, innerIndex) => {
@@ -3455,69 +3593,62 @@ const Table = ({
3455
3593
  });
3456
3594
  return item;
3457
3595
  });
3596
+ newArray = insert;
3458
3597
  checkedItems = handleSetCheckboxArray(insert);
3459
- if (draggable) {
3460
- newArray = insert && insert.length && insert.map((item, index) => {
3461
- item.map(innerItem => {
3462
- if (hasOwnerProperty(innerItem, 'colorStatus')) {
3463
- innerItem.colorStatus = null;
3464
- }
3465
- });
3466
- if (showOrder) {
3467
- item.unshift({
3468
- content: index + 1,
3469
- draggable: true
3470
- });
3598
+ }
3599
+ if (draggable) {
3600
+ newArray = insert && insert.length && insert.map((item, index) => {
3601
+ item.map(innerItem => {
3602
+ if (hasOwnerProperty(innerItem, 'colorStatus')) {
3603
+ innerItem.colorStatus = null;
3471
3604
  }
3605
+ });
3606
+ if (showOrder) {
3472
3607
  item.unshift({
3473
- draggableIcon: '',
3474
- colorStatus: draggableColor
3608
+ content: index + 1,
3609
+ draggable: true
3475
3610
  });
3476
- return item;
3611
+ }
3612
+ item.unshift({
3613
+ draggableIcon: '',
3614
+ colorStatus: draggableColor
3477
3615
  });
3478
- }
3616
+ return item;
3617
+ });
3479
3618
  }
3480
- getDraggableData && getDraggableData(newArray && newArray.length ? newArray : insert);
3481
- setBody(() => newArray && newArray.length ? newArray : insert);
3619
+ setBody(() => [...newArray]);
3482
3620
  setDisableArr(disabledArray);
3483
3621
  setCheckedArray(() => checkedItems);
3622
+ getDraggableData && getDraggableData(newArray);
3484
3623
  }
3485
3624
  }, [dataBody, arrowColumn, arrowShow, draggable]);
3486
3625
  React.useEffect(() => {
3487
- const isEqual = JSON.stringify(header) === JSON.stringify(dataHeader);
3626
+ const isEqual = handleSafeStringify(header) === handleSafeStringify(dataHeader);
3488
3627
  if (!isEqual) {
3489
- let insert = [];
3490
3628
  let newArray = [];
3491
3629
  if (arrowShow) {
3492
- const header = dataHeader.slice();
3493
- const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
3494
- const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
3495
- insert = checkForInsertArrow;
3630
+ let column = arrowColumn;
3496
3631
  if (draggable) {
3497
- newArray = insert;
3498
- newArray && newArray.length && newArray.unshift({
3499
- content: ''
3500
- });
3501
- if (showOrder) {
3502
- newArray.unshift({
3503
- content: ''
3504
- });
3505
- }
3632
+ column -= 1;
3506
3633
  }
3634
+ const header = dataHeader.slice();
3635
+ const arrowColumnCount = handleSetInsertIndex(header, column);
3636
+ const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
3637
+ newArray = checkForInsertArrow;
3507
3638
  } else {
3508
- if (draggable) {
3509
- newArray = dataHeader;
3510
- newArray && newArray.length && newArray.unshift({
3639
+ newArray = dataHeader.slice();
3640
+ }
3641
+ if (draggable) {
3642
+ newArray && newArray.length && newArray.unshift({
3643
+ content: ''
3644
+ });
3645
+ if (showOrder) {
3646
+ newArray.unshift({
3511
3647
  content: ''
3512
3648
  });
3513
- if (showOrder) {
3514
- newArray.unshift({
3515
- content: ''
3516
- });
3517
- }
3518
3649
  }
3519
3650
  }
3520
- setHeader(() => newArray && newArray.length ? newArray : insert);
3651
+ setHeader(() => [...newArray]);
3521
3652
  }
3522
3653
  }, [dataHeader, arrowColumn, arrowShow, disableArr, draggable]);
3523
3654
  React.useEffect(() => {
@@ -3576,22 +3707,24 @@ const Table = ({
3576
3707
  }
3577
3708
  }, body.map((item, index) => {
3578
3709
  return /*#__PURE__*/React__default["default"].createElement("tr", {
3579
- onDragStart: () => handleDragStart(index),
3580
3710
  onDragOver: e => e.preventDefault(),
3581
- onDrop: () => handleDrop(index),
3711
+ onDrop: e => handleDrop(e, index),
3582
3712
  key: `${item}_${index}`,
3583
3713
  style: {
3584
3714
  backgroundColor: tableRowBGColor ?? configStyles.TABLE.body.row.colors.background,
3585
3715
  borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.body.row.border,
3586
3716
  borderColor: hideBorder ? 'transparent' : configStyles.TABLE.body.row.borderColor,
3587
3717
  boxShadow: (tableRowItem ? tableRowItem : configStyles.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : configStyles.TABLE.body.row.box.shadow : 'none'
3588
- }
3718
+ },
3719
+ ref: el => setRef(index, el)
3589
3720
  }, Object.values(item).map((innerItem, innerIndex) => {
3590
3721
  return /*#__PURE__*/React__default["default"].createElement(TD, {
3591
3722
  index: index,
3592
3723
  item: innerItem,
3724
+ dragged: handleDrag,
3593
3725
  hideBorder: hideBorder,
3594
3726
  innerIndex: innerIndex,
3727
+ dragEnd: handleDragEnd,
3595
3728
  row: Object.values(item),
3596
3729
  dragStart: handleDragStart,
3597
3730
  id: item.id ? item.id : '',
@@ -3627,10 +3760,59 @@ const Table = ({
3627
3760
  handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
3628
3761
  });
3629
3762
  }));
3763
+ })), draggable && dragging && draggedItem && /*#__PURE__*/React__default["default"].createElement("div", {
3764
+ style: {
3765
+ position: 'fixed',
3766
+ top: `${position.y - 30}px`,
3767
+ left: `${position.x - 30}px`,
3768
+ borderSpacing: '0px',
3769
+ pointerEvents: 'none',
3770
+ height: 'fit-content',
3771
+ blockSize: 'fit-content',
3772
+ borderRadius: tableRowItem ? tableRowRadius ?? configStyles.TABLE.body.row.radius : '0px',
3773
+ boxShadow: draggableItemBoxShadow ?? configStyles.TABLE.draggable.boxShadow,
3774
+ backgroundColor: draggableItemBackgroundColor ?? configStyles.TABLE.draggable.color.background
3775
+ }
3776
+ }, draggedItem.map((innerItem, innerIndex) => {
3777
+ return /*#__PURE__*/React__default["default"].createElement(TD, {
3778
+ item: innerItem,
3779
+ dragged: handleDrag,
3780
+ hideBorder: hideBorder,
3781
+ innerIndex: innerIndex,
3782
+ row: Object.values(draggedItem),
3783
+ dragStart: handleDragStart,
3784
+ handleCheckDots: handleCheckDots,
3785
+ key: `${innerItem}__${innerIndex}`,
3786
+ openListColor: openListColor ?? configStyles.TABLE.openList.color,
3787
+ tableColumnMinWidth: tableColumnMinWidth ?? configStyles.TABLE.column.minWidth,
3788
+ tableColumnMaxWidth: tableColumnMaxWidth ?? configStyles.TABLE.column.maxWidth,
3789
+ openListFontSize: openListFontSize ?? configStyles.TABLE.openList.font.size,
3790
+ openListFontStyle: openListFontStyle ?? configStyles.TABLE.openList.font.style,
3791
+ openListFontWeight: openListFontWeight ?? configStyles.TABLE.openList.font.weight,
3792
+ openListFontFamily: openListFontFamily ?? configStyles.TABLE.openList.font.family,
3793
+ tBodyColor: tBodyColor ?? configStyles.TABLE.body.color,
3794
+ orderColor: orderColor ?? configStyles.TABLE.order.color,
3795
+ rowItem: tableRowItem ?? configStyles.TABLE.body.row.isItem,
3796
+ tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
3797
+ tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
3798
+ rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
3799
+ tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
3800
+ orderFontSize: orderFontSize ?? configStyles.TABLE.order.font.size,
3801
+ orderFontStyle: orderFontStyle ?? configStyles.TABLE.order.font.style,
3802
+ tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
3803
+ tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
3804
+ orderFontFamily: orderFontFamily ?? configStyles.TABLE.order.font.family,
3805
+ orderFontWeight: orderFontWeight ?? configStyles.TABLE.order.font.weight,
3806
+ borderRight: innerIndex === Object.values(draggedItem).length - 1 ? 'none' : configStyles.TABLE.body.row.border,
3807
+ borderRightColor: innerIndex === Object.values(draggedItem).length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor
3808
+ });
3630
3809
  })));
3631
3810
  };
3632
3811
  Table.propTypes = {
3633
3812
  getData: PropTypes__default["default"].func,
3813
+ getDraggableData: PropTypes__default["default"].func,
3814
+ draggable: PropTypes__default["default"].bool,
3815
+ showOrder: PropTypes__default["default"].bool,
3634
3816
  dataBody: PropTypes__default["default"].array,
3635
3817
  arrowShow: PropTypes__default["default"].bool,
3636
3818
  dataHeader: PropTypes__default["default"].array,
@@ -3668,9 +3850,9 @@ Table.propTypes = {
3668
3850
  hideBorder: PropTypes__default["default"].bool
3669
3851
  };
3670
3852
 
3671
- 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)}}";
3672
- var styles$8 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
3673
- styleInject(css_248z$9);
3853
+ 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)}}";
3854
+ var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
3855
+ styleInject(css_248z$a);
3674
3856
 
3675
3857
  const SvgNext = ({
3676
3858
  title,
@@ -3945,7 +4127,7 @@ const Modal = ({
3945
4127
  justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
3946
4128
  }
3947
4129
  }, /*#__PURE__*/React__default["default"].createElement("div", {
3948
- className: `${styles$8['animation__modal']}`,
4130
+ className: `${styles$9['animation__modal']}`,
3949
4131
  onClick: handleStopClosing,
3950
4132
  style: {
3951
4133
  position: 'relative',
@@ -4339,6 +4521,7 @@ const NumberInput = ({
4339
4521
  value,
4340
4522
  float,
4341
4523
  radius,
4524
+ withZero,
4342
4525
  disabled,
4343
4526
  inpStyles,
4344
4527
  minNumSize,
@@ -4346,6 +4529,7 @@ const NumberInput = ({
4346
4529
  insideError,
4347
4530
  inputChange,
4348
4531
  inpAttributes,
4532
+ numberMaxLength,
4349
4533
  setInnerErrorMessage
4350
4534
  }) => {
4351
4535
  const [innerValue, setInnerValue] = React.useState('');
@@ -4353,7 +4537,7 @@ const NumberInput = ({
4353
4537
  const handleChange = event => {
4354
4538
  let prevValue = innerValue;
4355
4539
  let currentValue = event.target.value.replace(/\.|․|\.|,/g, '.');
4356
- currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots);
4540
+ currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
4357
4541
  setInnerValue(() => currentValue);
4358
4542
  if (inputChange && currentValue !== prevValue) {
4359
4543
  if (currentValue < Number.MIN_SAFE_INTEGER || currentValue > Number.MAX_SAFE_INTEGER) {
@@ -4383,11 +4567,13 @@ const NumberInput = ({
4383
4567
  }
4384
4568
  };
4385
4569
  const handleBlur = () => {
4386
- const newVal = handleRemoveLeadingZeros(innerValue);
4387
- if (parseFloat(newVal) === 0) {
4388
- inputChange('');
4389
- } else {
4390
- inputChange(newVal);
4570
+ if (!withZero) {
4571
+ const newVal = handleRemoveLeadingZeros(innerValue);
4572
+ if (parseFloat(newVal) === 0) {
4573
+ inputChange('');
4574
+ } else {
4575
+ inputChange(newVal);
4576
+ }
4391
4577
  }
4392
4578
  };
4393
4579
  React.useEffect(() => {
@@ -4404,10 +4590,10 @@ const NumberInput = ({
4404
4590
  React.useEffect(() => {
4405
4591
  let newValue = '';
4406
4592
  if (value !== undefined && value !== null) {
4407
- newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots);
4593
+ newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
4408
4594
  }
4409
4595
  setInnerValue(() => newValue);
4410
- }, [dots, value, float, maxNumSize, minNumSize]);
4596
+ }, [dots, value, float, maxNumSize, minNumSize, numberMaxLength]);
4411
4597
  return /*#__PURE__*/React__default["default"].createElement("input", {
4412
4598
  type: "text",
4413
4599
  value: innerValue,
@@ -4428,9 +4614,9 @@ const NumberInput = ({
4428
4614
  });
4429
4615
  };
4430
4616
 
4431
- 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)}}";
4432
- 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"};
4433
- styleInject(css_248z$8);
4617
+ 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)}}";
4618
+ 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"};
4619
+ styleInject(css_248z$9);
4434
4620
 
4435
4621
  const InputTypes = {
4436
4622
  TEL: 'tel',
@@ -4438,6 +4624,10 @@ const InputTypes = {
4438
4624
  NUMBER: 'number',
4439
4625
  PASSWORD: 'password'
4440
4626
  };
4627
+ const IconSides = {
4628
+ LEFT: 'left',
4629
+ RIGHT: 'right'
4630
+ };
4441
4631
  const P = styled__default["default"].span`
4442
4632
  animation: ${true};
4443
4633
  `;
@@ -4460,6 +4650,9 @@ const Input = ({
4460
4650
  leftIcon,
4461
4651
  required,
4462
4652
  disabled,
4653
+ errorDots,
4654
+ errorIcon,
4655
+ labelDots,
4463
4656
  iconWidth,
4464
4657
  rightIcon,
4465
4658
  className,
@@ -4469,6 +4662,7 @@ const Input = ({
4469
4662
  errorSize,
4470
4663
  labelSize,
4471
4664
  maxLength,
4665
+ labelIcon,
4472
4666
  labelStyle,
4473
4667
  floatToFix,
4474
4668
  minNumSize,
@@ -4477,6 +4671,8 @@ const Input = ({
4477
4671
  errorColor,
4478
4672
  withoutDot,
4479
4673
  errorStyle,
4674
+ labelAction,
4675
+ errorAction,
4480
4676
  placeholder,
4481
4677
  errorZindex,
4482
4678
  labelWeight,
@@ -4486,14 +4682,22 @@ const Input = ({
4486
4682
  errorMessage,
4487
4683
  autoComplete,
4488
4684
  labelDisplay,
4685
+ labelIconSide,
4686
+ showLabelIcon,
4687
+ errorIconSide,
4688
+ showErrorIcon,
4489
4689
  errorMarginTop,
4490
4690
  boxShadowHover,
4491
4691
  errorClassName,
4692
+ labelIconMargin,
4492
4693
  labelFontFamily,
4493
4694
  phoneAlignItems,
4494
4695
  errorLineHeight,
4495
4696
  labelLineHeight,
4697
+ numberMaxLength,
4496
4698
  backgroundColor,
4699
+ errorIconMargin,
4700
+ withZero = false,
4497
4701
  labelMarginBottom,
4498
4702
  regexpErrorMessage,
4499
4703
  phoneJustifyContent,
@@ -4510,7 +4714,11 @@ const Input = ({
4510
4714
  const [classProps, setClassProps] = React.useState({});
4511
4715
  const [innerValue, setInnerValue] = React.useState('');
4512
4716
  const [configStyles, setConfigStyles] = React.useState({});
4717
+ const [innerErrorIcon, setInnerErrorIcon] = React.useState('');
4718
+ const [innerLabelIcon, setInnerLabelIcon] = React.useState('');
4513
4719
  const [innerErrorMessage, setInnerErrorMessage] = React.useState('');
4720
+ const [innerErrorIconSide, setInnerErrorIconSide] = React.useState('left');
4721
+ const [innerLabelIconSide, setInnerLabelIconSide] = React.useState('left');
4514
4722
  const inpStyles = configStyles.INPUT && {
4515
4723
  width: width ?? configStyles.INPUT.width,
4516
4724
  cursor: disabled ? 'not-allowed' : 'auto',
@@ -4567,11 +4775,27 @@ const Input = ({
4567
4775
  setInnerValue(() => val);
4568
4776
  }, [value]);
4569
4777
  React.useEffect(() => {
4570
- className && setClassProps(() => classnames__default["default"](className ?? configStyles.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
4778
+ className && setClassProps(() => classnames__default["default"](className ?? configStyles.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
4571
4779
  }, [className]);
4780
+ React.useEffect(() => {
4781
+ setInnerErrorIcon(() => errorIcon);
4782
+ }, [errorIcon]);
4783
+ React.useEffect(() => {
4784
+ if (errorIconSide) {
4785
+ setInnerErrorIconSide(() => errorIconSide);
4786
+ }
4787
+ }, [errorIconSide]);
4788
+ React.useEffect(() => {
4789
+ setInnerLabelIcon(() => labelIcon);
4790
+ }, [labelIcon]);
4791
+ React.useEffect(() => {
4792
+ if (labelIconSide) {
4793
+ setInnerLabelIconSide(() => labelIconSide);
4794
+ }
4795
+ }, [labelIconSide]);
4572
4796
  React.useEffect(() => {
4573
4797
  configStylesPromise.then(data => {
4574
- setClassProps(() => classnames__default["default"](className ?? data.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
4798
+ setClassProps(() => classnames__default["default"](className ?? data.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
4575
4799
  setConfigStyles(() => {
4576
4800
  return {
4577
4801
  ...data
@@ -4585,6 +4809,7 @@ const Input = ({
4585
4809
  className: classProps
4586
4810
  }, label ? /*#__PURE__*/React__default["default"].createElement("label", {
4587
4811
  style: {
4812
+ maxWidth: '100%',
4588
4813
  color: labelColor ?? configStyles.INPUT.label.color,
4589
4814
  fontSize: labelSize ?? configStyles.INPUT.label.font.size,
4590
4815
  fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
@@ -4592,10 +4817,34 @@ const Input = ({
4592
4817
  fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
4593
4818
  lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
4594
4819
  marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
4595
- fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family
4596
- }
4597
- }, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
4598
- className: `${styles$7['input-content']}`,
4820
+ fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
4821
+ whiteSpace: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'nowrap' : 'normal',
4822
+ overflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'hidden' : 'visible',
4823
+ textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
4824
+ },
4825
+ title: label
4826
+ }, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default["default"].createElement("img", {
4827
+ alt: "label icon",
4828
+ src: innerLabelIcon,
4829
+ style: {
4830
+ width: '14px',
4831
+ height: '14px',
4832
+ cursor: labelAction ? 'pointer' : 'normal',
4833
+ marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
4834
+ },
4835
+ onClick: labelAction ? () => labelAction() : _ => _
4836
+ }) : '', label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default["default"].createElement("img", {
4837
+ alt: "label icon",
4838
+ src: innerLabelIcon,
4839
+ style: {
4840
+ width: '14px',
4841
+ height: '14px',
4842
+ cursor: labelAction ? 'pointer' : 'normal',
4843
+ marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
4844
+ },
4845
+ onClick: labelAction ? () => labelAction() : _ => _
4846
+ }) : '') : '', /*#__PURE__*/React__default["default"].createElement("div", {
4847
+ className: `${styles$8['input-content']}`,
4599
4848
  style: {
4600
4849
  width: width ?? configStyles.INPUT.width,
4601
4850
  borderRadius: radius ?? configStyles.INPUT.radius,
@@ -4639,9 +4888,11 @@ const Input = ({
4639
4888
  value: innerValue,
4640
4889
  float: floatToFix,
4641
4890
  disabled: disabled,
4891
+ withZero: withZero,
4642
4892
  inputChange: change,
4643
4893
  inpStyles: inpStyles,
4644
4894
  inpAttributes: inpAttributes,
4895
+ numberMaxLength: numberMaxLength,
4645
4896
  insideError: fireInputInsideError,
4646
4897
  minNumSize: minNumSize ? minNumSize : '',
4647
4898
  maxNumSize: maxNumSize ? maxNumSize : '',
@@ -4684,32 +4935,62 @@ const Input = ({
4684
4935
  animation: animation,
4685
4936
  style: {
4686
4937
  margin: '0px',
4938
+ display: 'flex',
4939
+ alignItems: 'center',
4687
4940
  position: 'absolute',
4688
4941
  width: width ?? configStyles.INPUT.width,
4689
4942
  left: errorLeft ?? configStyles.INPUT.error.left,
4690
4943
  color: errorColor ?? configStyles.INPUT.error.color,
4944
+ zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
4691
4945
  fontSize: errorSize ?? configStyles.INPUT.error.font.size,
4692
4946
  fontStyle: errorStyle ?? configStyles.INPUT.error.font.style,
4693
4947
  fontFamily: errorFamily ?? configStyles.INPUT.error.font.family,
4694
4948
  fontWeight: errorWeight ?? configStyles.INPUT.error.font.weight,
4695
- zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
4696
4949
  lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
4697
4950
  top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
4698
4951
  transform: 'scale3d(1,1,1)'
4699
4952
  },
4700
4953
  className: errorClassName ?? configStyles.INPUT.error.className
4701
- }, innerErrorMessage) : '');
4954
+ }, showErrorIcon && innerErrorIcon && innerErrorIconSide === 'left' ? /*#__PURE__*/React__default["default"].createElement("img", {
4955
+ alt: "error icon",
4956
+ src: innerErrorIcon,
4957
+ style: {
4958
+ width: '14px',
4959
+ height: '14px',
4960
+ cursor: errorAction ? 'pointer' : 'normal',
4961
+ marginRight: errorIconMargin ?? configStyles.INPUT.error.iconMargin
4962
+ },
4963
+ onClick: errorAction ? () => errorAction() : _ => _
4964
+ }) : '', /*#__PURE__*/React__default["default"].createElement("span", {
4965
+ style: {
4966
+ display: 'inline-block',
4967
+ whiteSpace: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'nowrap' : 'normal',
4968
+ overflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'hidden' : 'visible',
4969
+ textOverflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'ellipsis' : '',
4970
+ maxWidth: `calc(100% - ${(errorIconMargin ? Number(errorIconMargin.match(/\d+/)[0]) : Number(configStyles.INPUT.error.iconMargin.match(/\d+/)[0])) + 14}px)`
4971
+ }
4972
+ }, innerErrorMessage), showErrorIcon && innerErrorIcon && innerErrorIconSide === 'right' && /*#__PURE__*/React__default["default"].createElement("img", {
4973
+ alt: "error icon",
4974
+ src: innerErrorIcon,
4975
+ style: {
4976
+ width: '14px',
4977
+ height: '14px',
4978
+ cursor: errorAction ? 'pointer' : 'normal',
4979
+ marginLeft: errorIconMargin ?? configStyles.INPUT.error.iconMargin
4980
+ },
4981
+ onClick: errorAction ? () => errorAction() : _ => _
4982
+ })) : '');
4702
4983
  };
4703
4984
  Input.propTypes = {
4704
4985
  size: PropTypes__default["default"].string,
4705
4986
  name: PropTypes__default["default"].string,
4706
- style: PropTypes__default["default"].string,
4707
- weight: PropTypes__default["default"].string,
4708
- family: PropTypes__default["default"].string,
4709
4987
  change: PropTypes__default["default"].func,
4988
+ style: PropTypes__default["default"].string,
4710
4989
  color: PropTypes__default["default"].string,
4711
4990
  width: PropTypes__default["default"].string,
4712
- label: PropTypes__default["default"].string,
4991
+ withZero: PropTypes__default["default"].bool,
4992
+ weight: PropTypes__default["default"].string,
4993
+ family: PropTypes__default["default"].string,
4713
4994
  required: PropTypes__default["default"].bool,
4714
4995
  disabled: PropTypes__default["default"].bool,
4715
4996
  height: PropTypes__default["default"].string,
@@ -4719,39 +5000,52 @@ Input.propTypes = {
4719
5000
  withoutDot: PropTypes__default["default"].bool,
4720
5001
  className: PropTypes__default["default"].string,
4721
5002
  iconWidth: PropTypes__default["default"].string,
4722
- boxSizing: PropTypes__default["default"].string,
4723
- boxShadow: PropTypes__default["default"].string,
4724
- errorSize: PropTypes__default["default"].string,
4725
- errorLeft: PropTypes__default["default"].string,
4726
- labelSize: PropTypes__default["default"].string,
4727
5003
  maxLength: PropTypes__default["default"].number,
4728
5004
  floatToFix: PropTypes__default["default"].number,
4729
5005
  minNumSize: PropTypes__default["default"].number,
4730
5006
  maxNumSize: PropTypes__default["default"].number,
4731
- errorColor: PropTypes__default["default"].string,
5007
+ label: PropTypes__default["default"].string,
5008
+ labelDots: PropTypes__default["default"].bool,
5009
+ labelAction: PropTypes__default["default"].func,
5010
+ labelIcon: PropTypes__default["default"].string,
5011
+ labelSize: PropTypes__default["default"].string,
4732
5012
  labelColor: PropTypes__default["default"].string,
4733
5013
  labelStyle: PropTypes__default["default"].string,
5014
+ showLabelIcon: PropTypes__default["default"].bool,
5015
+ labelWeight: PropTypes__default["default"].string,
5016
+ labelDisplay: PropTypes__default["default"].string,
5017
+ labelIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
5018
+ labelLineHeight: PropTypes__default["default"].string,
5019
+ labelFontFamily: PropTypes__default["default"].string,
5020
+ labelIconMargin: PropTypes__default["default"].string,
5021
+ labelMarginBottom: PropTypes__default["default"].string,
5022
+ borderRight: PropTypes__default["default"].string,
5023
+ placeholder: PropTypes__default["default"].string,
5024
+ phoneDisplay: PropTypes__default["default"].string,
5025
+ autoComplete: PropTypes__default["default"].string,
5026
+ errorDots: PropTypes__default["default"].bool,
5027
+ errorLeft: PropTypes__default["default"].string,
5028
+ errorSize: PropTypes__default["default"].string,
5029
+ errorIcon: PropTypes__default["default"].string,
5030
+ errorAction: PropTypes__default["default"].func,
5031
+ errorColor: PropTypes__default["default"].string,
4734
5032
  errorStyle: PropTypes__default["default"].string,
5033
+ showErrorIcon: PropTypes__default["default"].bool,
4735
5034
  errorWeight: PropTypes__default["default"].string,
4736
5035
  errorFamily: PropTypes__default["default"].string,
4737
- borderRight: PropTypes__default["default"].string,
4738
- placeholder: PropTypes__default["default"].string,
4739
5036
  errorZindex: PropTypes__default["default"].string,
4740
- labelWeight: PropTypes__default["default"].string,
5037
+ errorIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
4741
5038
  errorMessage: PropTypes__default["default"].string,
4742
- phoneDisplay: PropTypes__default["default"].string,
4743
- autoComplete: PropTypes__default["default"].string,
4744
- labelDisplay: PropTypes__default["default"].string,
4745
5039
  errorPosition: PropTypes__default["default"].string,
4746
5040
  errorMarginTop: PropTypes__default["default"].string,
4747
- boxShadowHover: PropTypes__default["default"].string,
4748
5041
  errorClassName: PropTypes__default["default"].string,
4749
- labelFontFamily: PropTypes__default["default"].string,
4750
- backgroundColor: PropTypes__default["default"].string,
4751
- phoneAlignItems: PropTypes__default["default"].string,
5042
+ errorIconMargin: PropTypes__default["default"].string,
4752
5043
  errorLineHeight: PropTypes__default["default"].string,
4753
- labelLineHeight: PropTypes__default["default"].string,
4754
- labelMarginBottom: PropTypes__default["default"].string,
5044
+ boxSizing: PropTypes__default["default"].string,
5045
+ boxShadow: PropTypes__default["default"].string,
5046
+ boxShadowHover: PropTypes__default["default"].string,
5047
+ phoneAlignItems: PropTypes__default["default"].string,
5048
+ numberMaxLength: PropTypes__default["default"].number,
4755
5049
  regexpErrorMessage: PropTypes__default["default"].string,
4756
5050
  regexp: PropTypes__default["default"].instanceOf(RegExp),
4757
5051
  fireInputInsideError: PropTypes__default["default"].func,
@@ -4759,6 +5053,7 @@ Input.propTypes = {
4759
5053
  telBorderRightStyle: PropTypes__default["default"].string,
4760
5054
  telBorderRightColor: PropTypes__default["default"].string,
4761
5055
  phoneJustifyContent: PropTypes__default["default"].string,
5056
+ backgroundColor: PropTypes__default["default"].string,
4762
5057
  backgroundDisableColor: PropTypes__default["default"].string,
4763
5058
  telBorderRightColorHover: PropTypes__default["default"].string,
4764
5059
  leftIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
@@ -4982,9 +5277,9 @@ const SvgArrow = ({
4982
5277
  fill: fillColor ? fillColor : '#3C393E'
4983
5278
  }));
4984
5279
 
4985
- 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}}";
4986
- 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"};
4987
- styleInject(css_248z$7);
5280
+ 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}}";
5281
+ 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"};
5282
+ styleInject(css_248z$8);
4988
5283
 
4989
5284
  const Select = ({
4990
5285
  dots,
@@ -5196,7 +5491,7 @@ const Select = ({
5196
5491
  }, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
5197
5492
  ref: ref
5198
5493
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5199
- className: styles$6['select-content']
5494
+ className: styles$7['select-content']
5200
5495
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5201
5496
  style: {
5202
5497
  cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.selected.cursor,
@@ -5216,9 +5511,9 @@ const Select = ({
5216
5511
  onClick: disabled ? _ => _ : () => handleOpenClose(),
5217
5512
  onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
5218
5513
  onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
5219
- className: `${styles$6['select-content-top']}`
5514
+ className: `${styles$7['select-content-top']}`
5220
5515
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5221
- className: `${styles$6['select-content-top-text']}`,
5516
+ className: `${styles$7['select-content-top-text']}`,
5222
5517
  style: {
5223
5518
  whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
5224
5519
  overflow: 'hidden',
@@ -5234,9 +5529,9 @@ const Select = ({
5234
5529
  }
5235
5530
  }
5236
5531
  }) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default["default"].createElement("div", {
5237
- className: `${styles$6['select-content-top-icon']}`
5532
+ className: `${styles$7['select-content-top-icon']}`
5238
5533
  }, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default["default"].createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
5239
- className: `${styles$6['close-icon']}`,
5534
+ className: `${styles$7['close-icon']}`,
5240
5535
  onClick: disabled ? _ => _ : handleClearSelect,
5241
5536
  style: {
5242
5537
  marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
@@ -5245,7 +5540,7 @@ const Select = ({
5245
5540
  style: {
5246
5541
  transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
5247
5542
  },
5248
- className: `${styles$6['arrow-icon']}`
5543
+ className: `${styles$7['arrow-icon']}`
5249
5544
  }, arrowIcon ? arrowIcon : configStyles.SELECT.arrowIcon ? configStyles.SELECT.arrowIcon : /*#__PURE__*/React__default["default"].createElement(SvgArrow, null)) : '')), opened && existOptions && existOptions.length > 0 && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
5250
5545
  style: {
5251
5546
  boxShadow: optionsBoxShadow ?? configStyles.SELECT.options.box.shadow,
@@ -5253,9 +5548,9 @@ const Select = ({
5253
5548
  backgroundColor: optionsBackgroundColor ?? configStyles.SELECT.options.colors.background,
5254
5549
  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'
5255
5550
  },
5256
- className: `${styles$6['select-content-bottom']}`
5551
+ className: `${styles$7['select-content-bottom']}`
5257
5552
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5258
- className: `${styles$6['select-content-bottom-inner']}`
5553
+ className: `${styles$7['select-content-bottom-inner']}`
5259
5554
  }, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
5260
5555
  return /*#__PURE__*/React__default["default"].createElement("div", {
5261
5556
  key: i,
@@ -5264,7 +5559,7 @@ const Select = ({
5264
5559
  onClick: disabled ? _ => _ : () => handleSelectItem(option),
5265
5560
  onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
5266
5561
  onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
5267
- className: `${styles$6['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$6['ellipsis'] : ''}`,
5562
+ className: `${styles$7['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$7['ellipsis'] : ''}`,
5268
5563
  style: {
5269
5564
  overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
5270
5565
  color: optionItemColor ?? configStyles.SELECT.options.item.color,
@@ -5477,11 +5772,10 @@ const SvgToasterSuccess = ({
5477
5772
  fill: fillColor ? fillColor : '#0DA574'
5478
5773
  }));
5479
5774
 
5480
- 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}}";
5481
- 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"};
5482
- styleInject(css_248z$6);
5775
+ 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}}";
5776
+ 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"};
5777
+ styleInject(css_248z$7);
5483
5778
 
5484
- let wWidth$1 = window.innerWidth;
5485
5779
  const ToasterType = {
5486
5780
  info: 'info',
5487
5781
  warn: 'warn',
@@ -5498,16 +5792,21 @@ const ToasterPosition = {
5498
5792
  };
5499
5793
  const Toast = ({
5500
5794
  type,
5501
- icon,
5502
- closeIcon,
5795
+ icons,
5796
+ title,
5797
+ timer,
5798
+ propStyles,
5503
5799
  removeToast,
5504
5800
  description,
5505
- timer = 5000,
5506
- position = 'top-right',
5507
- title = 'toaster title'
5801
+ titleStyles,
5802
+ descriptionStyles,
5803
+ position = 'top-right'
5508
5804
  }) => {
5509
5805
  let timeoutCall;
5510
5806
  let timeoutClick;
5807
+ const firstCheck = propStyles.height.replace(/\D/g, '') - 28 < 30 ? 30 : propStyles.height.replace(/\D/g, '') - 28;
5808
+ const secondCheck = propStyles.height.replace(/\D/g, '') - 65 < 18 ? 18 : propStyles.height.replace(/\D/g, '') - 65;
5809
+ const finalCheck = firstCheck + secondCheck + 'px';
5511
5810
  const ref = React.useRef(null);
5512
5811
  const [showToaster, setShowToaster] = React.useState(true);
5513
5812
  const handleToasterClick = e => {
@@ -5536,63 +5835,111 @@ const Toast = ({
5536
5835
  style: {
5537
5836
  position: 'absolute',
5538
5837
  display: 'flex',
5539
- width: wWidth$1 > 480 ? '440px' : '300px',
5540
- height: '83px',
5541
- borderRadius: '40px',
5542
5838
  alignItems: 'center',
5543
5839
  boxSizing: 'border-box',
5544
- backgroundColor: '#FFFFFF',
5545
- border: '2px solid #EEEEEE',
5546
- padding: '14px 29px 14px 12px',
5547
- justifyContent: 'space-between'
5840
+ justifyContent: 'space-between',
5841
+ ...propStyles
5548
5842
  },
5549
5843
  className: `
5550
- ${styles$5['notify-block']}
5551
- ${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'] : ''}
5552
- `
5844
+ ${styles$6['notify-block']}
5845
+ ${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'] : ''}
5846
+ `
5553
5847
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5554
5848
  style: {
5555
5849
  display: 'flex',
5556
- width: '60px',
5557
- height: '60px',
5558
- borderRadius: '30px',
5850
+ height: `calc(${propStyles.height} - 28px)`,
5851
+ width: `calc(${propStyles.height} - 28px)`,
5852
+ minWidth: '30px',
5853
+ minHeight: '30px',
5854
+ borderRadius: '50%',
5559
5855
  alignItems: 'center',
5560
5856
  justifyContent: 'center'
5561
5857
  }
5562
- }, type === 'info' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterInfo, null) : type === 'warn' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterWarning, null) : type === 'error' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterError, null) : type === 'success' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
5858
+ }, type === 'info' ? icons.info ? /*#__PURE__*/React__default["default"].createElement("img", {
5859
+ src: icons.info,
5860
+ alt: "icons",
5563
5861
  style: {
5862
+ width: '100%',
5564
5863
  height: '100%',
5565
- width: 'calc(100% - 90px)'
5864
+ objectFit: 'cover',
5865
+ objectPosition: 'center'
5566
5866
  }
5567
- }, /*#__PURE__*/React__default["default"].createElement("p", {
5867
+ }) : /*#__PURE__*/React__default["default"].createElement(SvgToasterInfo, null) : type === 'warn' ? icons.warn ? /*#__PURE__*/React__default["default"].createElement("img", {
5868
+ src: icons.warn,
5869
+ alt: "icons",
5870
+ style: {
5871
+ width: '100%',
5872
+ height: '100%',
5873
+ objectFit: 'cover',
5874
+ objectPosition: 'center'
5875
+ }
5876
+ }) : /*#__PURE__*/React__default["default"].createElement(SvgToasterWarning, null) : type === 'error' ? icons.error ? /*#__PURE__*/React__default["default"].createElement("img", {
5877
+ src: icons.error,
5878
+ alt: "icons",
5879
+ style: {
5880
+ width: '100%',
5881
+ height: '100%',
5882
+ objectFit: 'cover',
5883
+ objectPosition: 'center'
5884
+ }
5885
+ }) : /*#__PURE__*/React__default["default"].createElement(SvgToasterError, null) : type === 'success' ? icons.success ? /*#__PURE__*/React__default["default"].createElement("img", {
5886
+ src: icons.success,
5887
+ alt: "icons",
5888
+ style: {
5889
+ width: '100%',
5890
+ height: '100%',
5891
+ objectFit: 'cover',
5892
+ objectPosition: 'center'
5893
+ }
5894
+ }) : /*#__PURE__*/React__default["default"].createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
5895
+ style: {
5896
+ height: '100%',
5897
+ width: `calc(100% - ${finalCheck})`,
5898
+ minWidth: '50%',
5899
+ maxWidth: 'calc(100% - 90px)'
5900
+ }
5901
+ }, title && /*#__PURE__*/React__default["default"].createElement("p", {
5568
5902
  style: {
5569
5903
  margin: '0px',
5570
- fontWeight: 600,
5571
- color: '#3C393E',
5572
- fontSize: '16px',
5573
- lineHeight: '22px',
5574
- fontStyle: 'normal'
5904
+ color: titleStyles.color,
5905
+ fontSize: titleStyles.font.size,
5906
+ fontStyle: titleStyles.font.style,
5907
+ lineHeight: titleStyles.lineHeight,
5908
+ fontWeight: titleStyles.font.weight,
5909
+ fontFamily: titleStyles.font.family,
5910
+ ...titleStyles.props
5575
5911
  },
5576
- className: styles$5['notify-title']
5577
- }, title ? title : ''), /*#__PURE__*/React__default["default"].createElement("span", {
5912
+ className: styles$6['notify-title']
5913
+ }, title), description && /*#__PURE__*/React__default["default"].createElement("span", {
5578
5914
  style: {
5579
- fontWeight: 500,
5580
- color: '#3C393E',
5581
- fontSize: '12px',
5582
- lineHeight: '16px',
5583
- fontStyle: 'normal',
5584
- fontFamily: '',
5585
- opacity: 0.8
5915
+ color: descriptionStyles.color,
5916
+ fontSize: descriptionStyles.font.size,
5917
+ fontStyle: descriptionStyles.font.style,
5918
+ lineHeight: descriptionStyles.lineHeight,
5919
+ fontWeight: descriptionStyles.font.weight,
5920
+ fontFamily: descriptionStyles.font.family,
5921
+ ...descriptionStyles.props
5586
5922
  },
5587
- className: styles$5['notify-desc']
5588
- }, description ? description : '')), /*#__PURE__*/React__default["default"].createElement("div", {
5923
+ className: styles$6['notify-desc']
5924
+ }, description)), /*#__PURE__*/React__default["default"].createElement("div", {
5589
5925
  onClick: () => handleCloseToaster(ref),
5590
5926
  style: {
5591
- width: '18px',
5592
- height: '18px',
5927
+ width: `calc(${propStyles.height} - 65px)`,
5928
+ height: `calc(${propStyles.height} - 65px)`,
5929
+ minWidth: '18px',
5930
+ minHeight: '18px',
5593
5931
  cursor: 'pointer'
5594
5932
  }
5595
- }, closeIcon ? closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
5933
+ }, icons.close ? /*#__PURE__*/React__default["default"].createElement("img", {
5934
+ src: icons.close,
5935
+ alt: "icons",
5936
+ style: {
5937
+ width: '100%',
5938
+ height: '100%',
5939
+ objectFit: 'cover',
5940
+ objectPosition: 'center'
5941
+ }
5942
+ }) : /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
5596
5943
  };
5597
5944
  Toast.propTypes = {
5598
5945
  timer: PropTypes__default["default"].number,
@@ -5605,7 +5952,6 @@ Toast.propTypes = {
5605
5952
 
5606
5953
  let toastify = document.getElementById('toastify');
5607
5954
  let path = window.location.href;
5608
- let wWidth = window.innerWidth;
5609
5955
  const removeToast = ref => {
5610
5956
  if (ref.current) {
5611
5957
  const node = ref.current;
@@ -5621,15 +5967,66 @@ const removeToast = ref => {
5621
5967
  }
5622
5968
  }
5623
5969
  };
5970
+ const createElem$1 = (type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles) => {
5971
+ const projectTitleStyle = styleProps?.title;
5972
+ const packageTitleStyle = innerConfigStyles?.TOASTER?.title;
5973
+ const compareTitleStyles = ___default["default"].merge({
5974
+ ...packageTitleStyle
5975
+ }, {
5976
+ ...projectTitleStyle
5977
+ });
5978
+ const projectDescStyle = styleProps?.description;
5979
+ const packageDescStyle = innerConfigStyles?.TOASTER?.description;
5980
+ const compareDescStyles = ___default["default"].merge({
5981
+ ...packageDescStyle
5982
+ }, {
5983
+ ...projectDescStyle
5984
+ });
5985
+ const projectIcons = styleProps?.icons;
5986
+ const packageIcons = innerConfigStyles?.TOASTER?.icons;
5987
+ const icons = ___default["default"].merge({
5988
+ ...packageIcons
5989
+ }, {
5990
+ ...projectIcons
5991
+ });
5992
+ toastBlock.style.position = 'relative';
5993
+ toastBlock.style.flexShrink = 0;
5994
+ toastBlock.style.width = styleProps?.width ?? innerConfigStyles?.TOASTER?.width;
5995
+ toastBlock.style.height = styleProps?.height ?? innerConfigStyles?.TOASTER?.height;
5996
+ toastBlock.style.marginBottom = styleProps?.marginBottom ?? innerConfigStyles?.TOASTER?.marginBottom;
5997
+ const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
5998
+ type,
5999
+ icons,
6000
+ timer,
6001
+ title,
6002
+ position,
6003
+ description,
6004
+ removeToast,
6005
+ propStyles: {
6006
+ width: styleProps?.width ?? innerConfigStyles?.TOASTER?.width,
6007
+ height: styleProps?.height ?? innerConfigStyles?.TOASTER?.height,
6008
+ padding: styleProps?.padding ?? innerConfigStyles?.TOASTER?.padding,
6009
+ borderWidth: styleProps?.borderWidth ?? innerConfigStyles?.TOASTER?.border.width,
6010
+ borderColor: styleProps?.borderColor ?? innerConfigStyles?.TOASTER?.border.color,
6011
+ borderStyle: styleProps?.borderStyle ?? innerConfigStyles?.TOASTER?.border.style,
6012
+ borderRadius: styleProps?.borderRadius ?? innerConfigStyles?.TOASTER?.border.radius,
6013
+ backgroundColor: styleProps?.backgroundColor ?? innerConfigStyles?.TOASTER?.backgroundColor
6014
+ },
6015
+ titleStyles: compareTitleStyles,
6016
+ descriptionStyles: compareDescStyles
6017
+ });
6018
+ const root = ReactDOM__default["default"].createRoot(toastBlock);
6019
+ root.render(newElem);
6020
+ };
5624
6021
  const createToast = ({
5625
6022
  type,
5626
- icon,
5627
6023
  timer,
5628
6024
  title,
5629
6025
  position,
5630
- iconClose,
6026
+ styleProps,
5631
6027
  description
5632
6028
  }) => {
6029
+ let innerConfigStyles = {};
5633
6030
  let toastParentBlock;
5634
6031
  if (!toastify) {
5635
6032
  toastify = document.createElement('div');
@@ -5637,42 +6034,33 @@ const createToast = ({
5637
6034
  document.body.appendChild(toastify);
5638
6035
  }
5639
6036
  const toastBlock = document.createElement('div');
5640
- toastBlock.style.position = 'relative';
5641
- toastBlock.style.flexShrink = 0;
5642
- toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
5643
- toastBlock.style.height = '83px';
5644
- toastBlock.style.marginBottom = '20px';
5645
- const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
5646
- type,
5647
- icon,
5648
- timer,
5649
- title,
5650
- position,
5651
- iconClose,
5652
- description,
5653
- removeToast
6037
+ configStylesPromise.then(data => {
6038
+ innerConfigStyles = {
6039
+ ...data
6040
+ };
6041
+ createElem$1(type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles);
6042
+ }, error => {
6043
+ console.error(error);
5654
6044
  });
5655
- const root = ReactDOM__default["default"].createRoot(toastBlock);
5656
- root.render(newElem);
5657
- if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
6045
+ if (!document.getElementById(styles$6[position]) || document.getElementById(styles$6[position]) == null) {
5658
6046
  toastParentBlock = document.createElement('div');
5659
6047
  toastParentBlock.style.position = 'fixed';
5660
6048
  toastParentBlock.style.display = 'flex';
5661
6049
  toastParentBlock.style.zIndex = 999999999999;
5662
6050
  toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
5663
- toastParentBlock.setAttribute('id', styles$5[position]);
6051
+ toastParentBlock.setAttribute('id', styles$6[position]);
5664
6052
  toastParentBlock.appendChild(toastBlock);
5665
6053
  toastify.appendChild(toastParentBlock);
5666
6054
  } else {
5667
- document.getElementById(styles$5[position]).appendChild(toastBlock);
6055
+ document.getElementById(styles$6[position]).appendChild(toastBlock);
5668
6056
  }
5669
6057
  };
5670
6058
  const toast = {
5671
6059
  success: (title, props) => {
5672
- // const { icon, timer, position, iconClose, description } = props || {}
5673
6060
  const {
5674
6061
  timer,
5675
6062
  position,
6063
+ styleProps,
5676
6064
  description
5677
6065
  } = props || {};
5678
6066
  createToast({
@@ -5680,16 +6068,15 @@ const toast = {
5680
6068
  type: 'success',
5681
6069
  timer: timer ?? 5000,
5682
6070
  position: position ?? 'top-right',
5683
- description: description ?? ''
5684
- // icon: icon ?? configStyles.TOASTER.icon.success,
5685
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6071
+ description: description ?? '',
6072
+ styleProps: styleProps
5686
6073
  });
5687
6074
  },
5688
6075
  info: (title, props) => {
5689
- // const { icon, timer, position, iconClose, description } = props || {}
5690
6076
  const {
5691
6077
  timer,
5692
6078
  position,
6079
+ styleProps,
5693
6080
  description
5694
6081
  } = props || {};
5695
6082
  createToast({
@@ -5697,16 +6084,15 @@ const toast = {
5697
6084
  type: 'info',
5698
6085
  timer: timer ?? 5000,
5699
6086
  position: position ?? 'top-right',
5700
- description: description ?? ''
5701
- // icon: icon ?? configStyles.TOASTER.icon.info,
5702
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6087
+ description: description ?? '',
6088
+ styleProps: styleProps
5703
6089
  });
5704
6090
  },
5705
6091
  warn: (title, props) => {
5706
- // const { icon, timer, position, iconClose, description } = props || {}
5707
6092
  const {
5708
6093
  timer,
5709
6094
  position,
6095
+ styleProps,
5710
6096
  description
5711
6097
  } = props || {};
5712
6098
  createToast({
@@ -5714,16 +6100,15 @@ const toast = {
5714
6100
  type: 'warn',
5715
6101
  timer: timer ?? 5000,
5716
6102
  position: position ?? 'top-right',
5717
- description: description ?? ''
5718
- // icon: icon ?? configStyles.TOASTER.icon.warn,
5719
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6103
+ description: description ?? '',
6104
+ styleProps: styleProps
5720
6105
  });
5721
6106
  },
5722
6107
  error: (title, props) => {
5723
- // const { icon, timer, position, iconClose, description } = props || {}
5724
6108
  const {
5725
6109
  timer,
5726
6110
  position,
6111
+ styleProps,
5727
6112
  description
5728
6113
  } = props || {};
5729
6114
  createToast({
@@ -5731,16 +6116,12 @@ const toast = {
5731
6116
  type: 'error',
5732
6117
  timer: timer ?? 5000,
5733
6118
  position: position ?? 'top-right',
5734
- description: description ?? ''
5735
- // icon: icon ?? configStyles.TOASTER.icon.error,
5736
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6119
+ description: description ?? '',
6120
+ styleProps: styleProps
5737
6121
  });
5738
6122
  }
5739
6123
  };
5740
- const Toaster = ({
5741
- className
5742
- }) => {
5743
- const [classProps, setClassProps] = React.useState('');
6124
+ const Toaster = () => {
5744
6125
  const [configStyles, setConfigStyles] = React.useState({});
5745
6126
  window.addEventListener('popstate', () => {
5746
6127
  if (path !== window.location.href) {
@@ -5757,12 +6138,8 @@ const Toaster = ({
5757
6138
  const handleToasterClick = e => {
5758
6139
  e.stopPropagation();
5759
6140
  };
5760
- React.useEffect(() => {
5761
- className && setClassProps(() => classnames__default["default"](className ?? configStyles.TOASTER.className));
5762
- }, [className]);
5763
6141
  React.useEffect(() => {
5764
6142
  configStylesPromise.then(data => {
5765
- setClassProps(() => classnames__default["default"](className ?? data.TOASTER.className));
5766
6143
  setConfigStyles(() => {
5767
6144
  return {
5768
6145
  ...data
@@ -5774,7 +6151,6 @@ const Toaster = ({
5774
6151
  }, []);
5775
6152
  return configStyles.TOASTER && /*#__PURE__*/React__default["default"].createElement("div", {
5776
6153
  onClick: handleToasterClick,
5777
- className: classProps,
5778
6154
  id: "toastify"
5779
6155
  });
5780
6156
  };
@@ -5798,10 +6174,24 @@ const SvgTooltip = ({
5798
6174
  fill: fillColor ? fillColor : '#D1D1D1'
5799
6175
  }));
5800
6176
 
5801
- 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}";
5802
- 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"};
5803
- styleInject(css_248z$5);
6177
+ 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}";
6178
+ 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"};
6179
+ styleInject(css_248z$6);
5804
6180
 
6181
+ const TooltipDirections = {
6182
+ TOP: 'top',
6183
+ TOP_LEFT: 'top-left',
6184
+ TOP_RIGHT: 'top-right',
6185
+ LEFT: 'left',
6186
+ LEFT_TOP: 'left-top',
6187
+ LEFT_BOTTOM: 'left-bottom',
6188
+ RIGHT: 'right',
6189
+ RIGHT_TOP: 'right-top',
6190
+ RIGHT_BOTTOM: 'right-bottom',
6191
+ BOTTOM: 'bottom',
6192
+ BOTTOM_TOP: 'bottom-left',
6193
+ BOTTOM_BOTTOM: 'bottom-right'
6194
+ };
5805
6195
  const Tooltip = ({
5806
6196
  text,
5807
6197
  width,
@@ -5809,6 +6199,7 @@ const Tooltip = ({
5809
6199
  height,
5810
6200
  radius,
5811
6201
  fontSize,
6202
+ hoverOpen,
5812
6203
  className,
5813
6204
  fontStyle,
5814
6205
  fontFamily,
@@ -5818,16 +6209,28 @@ const Tooltip = ({
5818
6209
  tooltipRadius,
5819
6210
  backgroundColor,
5820
6211
  tooltipBackgroundColor,
5821
- type = 'top'
6212
+ direction = 'top'
5822
6213
  }) => {
5823
6214
  const tooltipRef = /*#__PURE__*/React.createRef(null);
6215
+ const iconBlockRef = /*#__PURE__*/React.createRef(null);
6216
+ const tooltipIconParentRef = /*#__PURE__*/React.createRef(null);
5824
6217
  const [classProps, setClassProps] = React.useState({});
5825
6218
  const [configStyles, setConfigStyles] = React.useState({});
5826
6219
  const [showTooltip, setShowTooltip] = React.useState(false);
5827
6220
  const [checkTooltipWidth, setCheckTooltipWidth] = React.useState(0);
5828
6221
  const [checkTooltipHeight, setCheckTooltipHeight] = React.useState(0);
6222
+ const [tooltipIconBlockWidth, setTooltipIconBlockWidth] = React.useState(0);
6223
+ const [tooltipIconParentWidth, setTooltipIconParentWidth] = React.useState(0);
6224
+ const [tooltipIconBlockHeight, setTooltipIconBlockHeight] = React.useState(0);
6225
+ const [tooltipIconParentHeight, setTooltipIconParentHeight] = React.useState(0);
5829
6226
  const handleShow = () => {
5830
- setShowTooltip(!showTooltip);
6227
+ setShowTooltip(() => !showTooltip);
6228
+ };
6229
+ const handleMouseEnter = () => {
6230
+ setShowTooltip(() => true);
6231
+ };
6232
+ const handleMouseLeave = () => {
6233
+ setShowTooltip(() => false);
5831
6234
  };
5832
6235
  React.useEffect(() => {
5833
6236
  if (!text) {
@@ -5836,12 +6239,32 @@ const Tooltip = ({
5836
6239
  tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
5837
6240
  tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
5838
6241
  }, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
6242
+ React.useEffect(() => {
6243
+ tooltipIconParentRef.current && tooltipIconParentRef.current.clientWidth && tooltipIconParentRef.current.clientWidth > 0 && setTooltipIconParentWidth(tooltipIconParentRef.current.clientWidth);
6244
+ tooltipIconParentRef.current && tooltipIconParentRef.current.clientHeight && tooltipIconParentRef.current.clientHeight > 0 && setTooltipIconParentHeight(tooltipIconParentRef.current.clientHeight);
6245
+ }, [tooltipIconParentRef, tooltipIconParentWidth, tooltipIconParentHeight]);
6246
+ React.useEffect(() => {
6247
+ iconBlockRef.current && iconBlockRef.current.clientWidth && iconBlockRef.current.clientWidth > 0 && setTooltipIconBlockWidth(iconBlockRef.current.clientWidth);
6248
+ iconBlockRef.current && iconBlockRef.current.clientHeight && iconBlockRef.current.clientHeight > 0 && setTooltipIconBlockHeight(iconBlockRef.current.clientHeight);
6249
+ }, [iconBlockRef, tooltipIconParentWidth, tooltipIconParentHeight]);
5839
6250
  React.useEffect(() => {
5840
6251
  className && setClassProps(() => classnames__default["default"](className ?? configStyles.TOOLTIP.className));
5841
6252
  }, [className]);
6253
+ React.useEffect(() => {
6254
+ document.addEventListener('click', () => {
6255
+ if (showTooltip) {
6256
+ handleShow();
6257
+ }
6258
+ }, false);
6259
+ return () => {
6260
+ document.removeEventListener('click', () => {
6261
+ handleShow();
6262
+ }, false);
6263
+ };
6264
+ }, [showTooltip]);
5842
6265
  React.useEffect(() => {
5843
6266
  configStylesPromise.then(data => {
5844
- setClassProps(() => classnames__default["default"](styles$4['tooltip-block'], className ?? data.TOOLTIP.className));
6267
+ setClassProps(() => classnames__default["default"](styles$5['tooltip-block'], className ?? data.TOOLTIP.className));
5845
6268
  setConfigStyles(() => {
5846
6269
  return {
5847
6270
  ...data
@@ -5852,31 +6275,33 @@ const Tooltip = ({
5852
6275
  });
5853
6276
  }, []);
5854
6277
  return configStyles.TOOLTIP && /*#__PURE__*/React__default["default"].createElement("div", {
6278
+ ref: tooltipIconParentRef,
5855
6279
  className: classProps,
5856
6280
  style: {
5857
6281
  width: width ?? configStyles.TOOLTIP.parent.width,
5858
6282
  height: height ?? configStyles.TOOLTIP.parent.height,
5859
6283
  borderRadius: radius ?? configStyles.TOOLTIP.parent.radius,
5860
6284
  backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
5861
- }
6285
+ },
6286
+ onClick: e => e.stopPropagation()
5862
6287
  }, showTooltip ? /*#__PURE__*/React__default["default"].createElement("div", {
5863
6288
  ref: tooltipRef,
5864
- className: `${styles$4['tooltip']}`,
6289
+ className: `${styles$5['tooltip']}`,
5865
6290
  style: {
5866
6291
  width: tooltipWidth ?? configStyles.TOOLTIP.width,
5867
6292
  borderRadius: tooltipRadius ?? configStyles.TOOLTIP.radius,
5868
6293
  backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
5869
- top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
5870
- left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
6294
+ 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',
6295
+ 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'
5871
6296
  }
5872
6297
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5873
- className: `${styles$4['tooltip-rel']}`
6298
+ className: `${styles$5['tooltip-rel']}`
5874
6299
  }, /*#__PURE__*/React__default["default"].createElement("div", {
5875
- className: `${styles$4['tooltip-decor']}`,
6300
+ className: `${styles$5['tooltip-decor']}`,
5876
6301
  style: {
5877
6302
  backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
5878
- left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
5879
- top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
6303
+ 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',
6304
+ 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'
5880
6305
  }
5881
6306
  }), /*#__PURE__*/React__default["default"].createElement("p", {
5882
6307
  style: {
@@ -5887,18 +6312,22 @@ const Tooltip = ({
5887
6312
  fontWeight: fontWeight ?? configStyles.TOOLTIP.font.weight
5888
6313
  }
5889
6314
  }, text))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
6315
+ ref: iconBlockRef,
6316
+ onClick: hoverOpen ? _ => _ : handleShow,
5890
6317
  style: {
6318
+ display: 'flex',
5891
6319
  cursor: 'pointer'
5892
6320
  },
5893
- onClick: handleShow
6321
+ onMouseEnter: hoverOpen ? handleMouseEnter : _ => _,
6322
+ onMouseLeave: hoverOpen ? handleMouseLeave : _ => _
5894
6323
  }, tooltipIcon ? tooltipIcon : configStyles.TOOLTIP.icon ? configStyles.TOOLTIP.icon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
5895
6324
  };
5896
6325
  Tooltip.propTypes = {
5897
- type: PropTypes__default["default"].string,
5898
6326
  width: PropTypes__default["default"].string,
5899
6327
  color: PropTypes__default["default"].string,
5900
6328
  height: PropTypes__default["default"].string,
5901
6329
  radius: PropTypes__default["default"].string,
6330
+ hoverOpen: PropTypes__default["default"].bool,
5902
6331
  fontSize: PropTypes__default["default"].string,
5903
6332
  fontStyle: PropTypes__default["default"].string,
5904
6333
  className: PropTypes__default["default"].string,
@@ -5909,7 +6338,8 @@ Tooltip.propTypes = {
5909
6338
  tooltipRadius: PropTypes__default["default"].string,
5910
6339
  text: PropTypes__default["default"].string.isRequired,
5911
6340
  backgroundColor: PropTypes__default["default"].string,
5912
- tooltipBackgroundColor: PropTypes__default["default"].string
6341
+ tooltipBackgroundColor: PropTypes__default["default"].string,
6342
+ direction: PropTypes__default["default"].oneOf(Object.values(TooltipDirections))
5913
6343
  };
5914
6344
 
5915
6345
  const SvgCaptchaArrowUp = ({
@@ -5950,9 +6380,9 @@ const SvgCaptchaArrowDown = ({
5950
6380
  fill: fillColor ? fillColor : '#00236A'
5951
6381
  }));
5952
6382
 
5953
- 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}";
5954
- 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"};
5955
- styleInject(css_248z$4);
6383
+ 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}";
6384
+ 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"};
6385
+ styleInject(css_248z$5);
5956
6386
 
5957
6387
  const Captcha = ({
5958
6388
  color,
@@ -6040,7 +6470,7 @@ const Captcha = ({
6040
6470
  alignItems: 'center',
6041
6471
  zIndex: 1
6042
6472
  },
6043
- className: styles$3['start-point']
6473
+ className: styles$4['start-point']
6044
6474
  }, /*#__PURE__*/React__default["default"].createElement("div", {
6045
6475
  style: {
6046
6476
  position: 'absolute',
@@ -6066,8 +6496,8 @@ const Captcha = ({
6066
6496
  backgroundColor: 'transparent'
6067
6497
  },
6068
6498
  className: `
6069
- ${styles$3['range']}
6070
- ${+rangeProgress === rangeNumber ? styles$3['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$3['range-error'] : styles$3['range-default']}
6499
+ ${styles$4['range']}
6500
+ ${+rangeProgress === rangeNumber ? styles$4['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$4['range-error'] : styles$4['range-default']}
6071
6501
  `,
6072
6502
  onInput: handleRange
6073
6503
  }), /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6097,9 +6527,9 @@ Captcha.propTypes = {
6097
6527
  getRange: PropTypes__default["default"].func.isRequired
6098
6528
  };
6099
6529
 
6100
- 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}";
6101
- 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"};
6102
- styleInject(css_248z$3);
6530
+ 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}";
6531
+ 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"};
6532
+ styleInject(css_248z$4);
6103
6533
 
6104
6534
  const Stepper = ({
6105
6535
  stepLength,
@@ -6109,11 +6539,11 @@ const Stepper = ({
6109
6539
  const [classProps, setClassProps] = React.useState({});
6110
6540
  const [configStyles, setConfigStyles] = React.useState({});
6111
6541
  React.useEffect(() => {
6112
- className && setClassProps(() => classnames__default["default"](className ?? configStyles.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
6542
+ className && setClassProps(() => classnames__default["default"](className ?? configStyles.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
6113
6543
  }, [className]);
6114
6544
  React.useEffect(() => {
6115
6545
  configStylesPromise.then(data => {
6116
- setClassProps(() => classnames__default["default"](className ?? data.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
6546
+ setClassProps(() => classnames__default["default"](className ?? data.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
6117
6547
  setConfigStyles(() => {
6118
6548
  return {
6119
6549
  ...data
@@ -6129,10 +6559,10 @@ const Stepper = ({
6129
6559
  let steppers = [];
6130
6560
  for (let step = 1; step <= stepLength; step++) {
6131
6561
  steppers.push( /*#__PURE__*/React__default["default"].createElement("div", {
6132
- className: classnames__default["default"](`${step <= activeSteps ? styles$2.activeRing : styles$2.bigRing}`),
6562
+ className: classnames__default["default"](`${step <= activeSteps ? styles$3.activeRing : styles$3.bigRing}`),
6133
6563
  key: step
6134
6564
  }, /*#__PURE__*/React__default["default"].createElement("div", {
6135
- className: classnames__default["default"](`${step <= activeSteps ? styles$2.smallActiveRing : styles$2.smallRing}`)
6565
+ className: classnames__default["default"](`${step <= activeSteps ? styles$3.smallActiveRing : styles$3.smallRing}`)
6136
6566
  }, step <= activeSteps ? step : '')));
6137
6567
  }
6138
6568
  return steppers;
@@ -6262,8 +6692,8 @@ Checkbox.propTypes = {
6262
6692
  data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].object), PropTypes__default["default"].object])
6263
6693
  };
6264
6694
 
6265
- 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}";
6266
- styleInject(css_248z$2);
6695
+ 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}";
6696
+ styleInject(css_248z$3);
6267
6697
 
6268
6698
  const PositionSide = {
6269
6699
  TOP: 'top',
@@ -6337,10 +6767,12 @@ const Textarea = ({
6337
6767
  if (maxLength) {
6338
6768
  if (value.length > maxLength) {
6339
6769
  onChange(value.substr(0, maxLength));
6770
+ setInnerValue(() => value.substr(0, maxLength));
6340
6771
  }
6341
6772
  } else {
6342
6773
  if (value.length > configStyles.TEXTAREA.maxLength) {
6343
6774
  onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
6775
+ setInnerValue(() => value.substr(0, configStyles.TEXTAREA.maxLength));
6344
6776
  }
6345
6777
  }
6346
6778
  };
@@ -6499,6 +6931,236 @@ Textarea.propTypes = {
6499
6931
  characterCountPosition: PropTypes__default["default"].oneOf(Object.values(PositionSide))
6500
6932
  };
6501
6933
 
6934
+ const Swipe = ({
6935
+ id,
6936
+ title,
6937
+ child,
6938
+ props,
6939
+ innerConfigStyles
6940
+ }) => {
6941
+ const {
6942
+ SWIPEMODAL
6943
+ } = innerConfigStyles || {};
6944
+ const {
6945
+ width,
6946
+ height,
6947
+ titleStyle,
6948
+ position,
6949
+ borderRadius,
6950
+ callClose,
6951
+ showCloseIcon
6952
+ } = props || {};
6953
+ return /*#__PURE__*/React__default["default"].createElement("div", {
6954
+ style: {
6955
+ width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
6956
+ height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100vh'
6957
+ }
6958
+ }, (title || showCloseIcon) && /*#__PURE__*/React__default["default"].createElement("div", {
6959
+ style: {
6960
+ width: '100%',
6961
+ display: 'flex',
6962
+ minHeight: '40px',
6963
+ alignItems: 'center',
6964
+ boxSizing: 'border-box',
6965
+ justifyContent: title ? 'space-between' : 'flex-end',
6966
+ padding: titleStyle?.padding ?? SWIPEMODAL.titleStyle.padding,
6967
+ maxHeight: titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight
6968
+ }
6969
+ }, title && /*#__PURE__*/React__default["default"].createElement("h1", {
6970
+ style: {
6971
+ color: titleStyle?.color ?? SWIPEMODAL.titleStyle.color,
6972
+ fontSize: titleStyle?.fontSize ?? SWIPEMODAL.titleStyle.font.size,
6973
+ textAlign: titleStyle?.textAlign ?? SWIPEMODAL.titleStyle.textAlign,
6974
+ fontStyle: titleStyle?.fontStyle ?? SWIPEMODAL.titleStyle.font.style,
6975
+ fontWeight: titleStyle?.fontWeight ?? SWIPEMODAL.titleStyle.font.weight,
6976
+ fontFamily: titleStyle?.fontFamily ?? SWIPEMODAL.titleStyle.font.family
6977
+ }
6978
+ }, title), showCloseIcon && /*#__PURE__*/React__default["default"].createElement("div", {
6979
+ style: {
6980
+ width: '24px',
6981
+ height: '24px',
6982
+ maxWidth: '24px',
6983
+ maxHeight: '24px',
6984
+ cursor: 'pointer'
6985
+ },
6986
+ onClick: hasOwnerProperty(props, 'callClose') && {}.toString.call(callClose) === '[object Function]' ? () => callClose(id) : _ => _
6987
+ }, /*#__PURE__*/React__default["default"].createElement("img", {
6988
+ alt: "close",
6989
+ src: hasOwnerProperty(props, 'closeIcon') && typeof props.closeIcon === 'string' ? props.closeIcon : SWIPEMODAL.closeIcon,
6990
+ style: {
6991
+ width: '100%',
6992
+ height: '100%',
6993
+ objectFit: 'contain',
6994
+ objectPosition: 'center'
6995
+ }
6996
+ }))), child && /*#__PURE__*/React__default["default"].createElement("div", {
6997
+ style: {
6998
+ width: '100%',
6999
+ height: '100%',
7000
+ overflowY: 'auto',
7001
+ overflowX: 'hidden',
7002
+ maxHeight: `calc(100% - ${titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight})`,
7003
+ borderTopLeftRadius: position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
7004
+ borderTopRightRadius: position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
7005
+ borderBottomLeftRadius: position === 'right' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
7006
+ borderBottomRightRadius: position === 'left' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius
7007
+ }
7008
+ }, child));
7009
+ };
7010
+
7011
+ 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%}}";
7012
+ 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"};
7013
+ styleInject(css_248z$2);
7014
+
7015
+ let swipeCount = 0;
7016
+ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
7017
+ const {
7018
+ width,
7019
+ height,
7020
+ position = 'left',
7021
+ animation,
7022
+ borderRadius,
7023
+ backgroundColor
7024
+ } = props || {};
7025
+ swipeBlock.style.position = 'fixed';
7026
+ swipeBlock.style.zIndex = swipeCount;
7027
+ swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
7028
+ swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
7029
+ swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100vh';
7030
+ swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7031
+ swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7032
+ swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7033
+ swipeBlock.style.borderBottomRightRadius = position === 'left' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7034
+ swipeBlock.setAttribute('id', id);
7035
+ swipeBlock.setAttribute('closePos', position);
7036
+ 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']);
7037
+ if (hasOwnerProperty(props, 'animation') && animation === true) {
7038
+ swipeBlock.setAttribute('anime', animation);
7039
+ 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'] : ''}`);
7040
+ }
7041
+ const newElem = /*#__PURE__*/React__default["default"].createElement(Swipe, {
7042
+ id,
7043
+ title,
7044
+ child,
7045
+ props,
7046
+ innerConfigStyles
7047
+ });
7048
+ const root = ReactDOM__default["default"].createRoot(swipeBlock);
7049
+ root.render(newElem);
7050
+ };
7051
+ const createSwipe = (id, title, child, props, swipable) => {
7052
+ let innerConfigStyles = {};
7053
+ const swipeBlock = document.createElement('div');
7054
+ swipeBlock.addEventListener('click', function (e) {
7055
+ e.stopPropagation();
7056
+ });
7057
+ configStylesPromise.then(data => {
7058
+ innerConfigStyles = {
7059
+ ...data
7060
+ };
7061
+ createElem(id, title, child, props, swipeBlock, innerConfigStyles);
7062
+ if (!swipable) {
7063
+ const widthParent = hasOwnerProperty(props, 'withParent') ? props.withParent === true ? true : false : innerConfigStyles.SWIPEMODAL.withParent;
7064
+ swipable = document.createElement('div');
7065
+ swipable.setAttribute('id', 'swipable');
7066
+ swipable.style.position = 'fixed';
7067
+ swipable.style.top = '0px';
7068
+ swipable.style.left = '0px';
7069
+ swipable.style.zIndex = 99999;
7070
+ swipable.style.maxWidth = '100%';
7071
+ swipable.style.maxHeight = '100vh';
7072
+ swipable.style.visibility = 'hidden';
7073
+ swipable.style.width = widthParent ? '100%' : '0px';
7074
+ swipable.style.height = widthParent ? '100vh' : '0px';
7075
+ swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
7076
+ swipable.classList.add(styles$2['visible']);
7077
+ if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
7078
+ swipable.addEventListener('click', function () {
7079
+ hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
7080
+ });
7081
+ }
7082
+ document.body.appendChild(swipable);
7083
+ }
7084
+ swipable.appendChild(swipeBlock);
7085
+ }, error => {
7086
+ console.error(error);
7087
+ });
7088
+ };
7089
+
7090
+ // Function to handle removing the element on navigation change
7091
+ const handleNavigationChange = () => {
7092
+ let swipable = document.getElementById('swipable');
7093
+ if (swipable) {
7094
+ swipable.remove();
7095
+ }
7096
+ };
7097
+
7098
+ // Wrap history methods to detect all navigation changes
7099
+ (function (history) {
7100
+ const pushState = history.pushState;
7101
+ const replaceState = history.replaceState;
7102
+ history.pushState = function (state) {
7103
+ const result = pushState.apply(history, arguments);
7104
+ window.dispatchEvent(new Event('navigationchange'));
7105
+ return result;
7106
+ };
7107
+ history.replaceState = function (state) {
7108
+ const result = replaceState.apply(history, arguments);
7109
+ window.dispatchEvent(new Event('navigationchange'));
7110
+ return result;
7111
+ };
7112
+ })(window.history);
7113
+ const swipe = {
7114
+ open: (title = '', id, child, props) => {
7115
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
7116
+ alert('Please pass valid id prop (string / number) when call swipe.open function');
7117
+ return;
7118
+ }
7119
+ if (swipeCount === 0) {
7120
+ window.addEventListener('popstate', handleNavigationChange);
7121
+ window.addEventListener('navigationchange', handleNavigationChange);
7122
+ }
7123
+ let swipable = document.getElementById('swipable');
7124
+ swipeCount += 1;
7125
+ createSwipe(id, title, child, props, swipable);
7126
+ return Promise.resolve(id);
7127
+ },
7128
+ close: id => {
7129
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
7130
+ alert('Please pass valid id prop (string / number) when call swipe.close function');
7131
+ return;
7132
+ }
7133
+ let swipable = document.getElementById('swipable');
7134
+ swipeCount -= 1;
7135
+ const removable = document.getElementById(id);
7136
+ if (swipable && removable) {
7137
+ const animation = removable.getAttribute('anime');
7138
+ const position = removable.getAttribute('closePos');
7139
+ if (animation) {
7140
+ 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']);
7141
+ setTimeout(() => {
7142
+ swipable.removeChild(removable);
7143
+ if (swipeCount === 0 && swipable) {
7144
+ window.removeEventListener('popstate', handleNavigationChange);
7145
+ window.removeEventListener('navigationchange', handleNavigationChange);
7146
+ document.body.removeChild(swipable);
7147
+ }
7148
+ }, 200);
7149
+ } else {
7150
+ swipable.removeChild(removable);
7151
+ if (swipeCount === 0 && swipable) {
7152
+ window.removeEventListener('popstate', handleNavigationChange);
7153
+ window.removeEventListener('navigationchange', handleNavigationChange);
7154
+ document.body.removeChild(swipable);
7155
+ }
7156
+ }
7157
+ }
7158
+ }
7159
+ };
7160
+ const SwipeModal = () => {
7161
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
7162
+ };
7163
+
6502
7164
  const TypographyType = {
6503
7165
  p: 'p',
6504
7166
  h1: 'h1',
@@ -7291,6 +7953,7 @@ exports.Captcha = Captcha;
7291
7953
  exports.Checkbox = Checkbox;
7292
7954
  exports.DirectionMode = DirectionMode;
7293
7955
  exports.File = File;
7956
+ exports.IconSides = IconSides;
7294
7957
  exports.Input = Input;
7295
7958
  exports.InputTypes = InputTypes;
7296
7959
  exports.Modal = Modal;
@@ -7300,10 +7963,13 @@ exports.Radio = Radio;
7300
7963
  exports.RadioDirectionMode = RadioDirectionMode;
7301
7964
  exports.Select = Select;
7302
7965
  exports.Stepper = Stepper;
7966
+ exports.SwipeModal = SwipeModal;
7303
7967
  exports.Table = Table;
7304
7968
  exports.Textarea = Textarea;
7305
7969
  exports.Toaster = Toaster;
7306
7970
  exports.Tooltip = Tooltip;
7971
+ exports.TooltipDirections = TooltipDirections;
7307
7972
  exports.Typography = Typography;
7308
7973
  exports.TypographyType = TypographyType;
7974
+ exports.swipe = swipe;
7309
7975
  exports.toast = toast;