@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.es.js CHANGED
@@ -432,6 +432,8 @@ const FileItem = /*#__PURE__*/React__default.memo(({
432
432
  }, iconDelItem ? iconDelItem : /*#__PURE__*/React__default.createElement(SvgListItemDelete, null))));
433
433
  });
434
434
 
435
+ var img$2 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_18850_5919)'%3e%3cpath d='M13.4695 11.9505L20.7595 4.66046C20.9234 4.46916 21.009 4.22308 20.9993 3.9714C20.9895 3.71973 20.8852 3.48099 20.7071 3.30289C20.529 3.1248 20.2903 3.02047 20.0386 3.01075C19.7869 3.00102 19.5408 3.08663 19.3495 3.25046L12.0595 10.5405L4.76954 3.24046C4.57824 3.07663 4.33217 2.99102 4.08049 3.00075C3.82881 3.01047 3.59008 3.1148 3.41198 3.29289C3.23389 3.47099 3.12955 3.70973 3.11983 3.9614C3.11011 4.21308 3.19572 4.45915 3.35954 4.65046L10.6495 11.9505L3.34954 19.2405C3.24486 19.3301 3.15984 19.4404 3.09982 19.5645C3.0398 19.6886 3.00606 19.8237 3.00075 19.9614C2.99543 20.0991 3.01863 20.2365 3.06891 20.3648C3.11918 20.4931 3.19544 20.6097 3.29289 20.7071C3.39035 20.8046 3.5069 20.8808 3.63522 20.9311C3.76355 20.9814 3.90088 21.0046 4.0386 20.9993C4.17632 20.9939 4.31145 20.9602 4.43551 20.9002C4.55958 20.8402 4.6699 20.7551 4.75954 20.6505L12.0595 13.3605L19.3495 20.6505C19.5408 20.8143 19.7869 20.8999 20.0386 20.8902C20.2903 20.8804 20.529 20.7761 20.7071 20.598C20.8852 20.4199 20.9895 20.1812 20.9993 19.9295C21.009 19.6778 20.9234 19.4318 20.7595 19.2405L13.4695 11.9505Z' fill='%231C212D'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_18850_5919'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
436
+
435
437
  const boxSizing = 'border-box';
436
438
  const fontStyle = 'normal';
437
439
  const fontFamily = 'Arial';
@@ -458,17 +460,18 @@ const fontObject = {
458
460
  var packageResult = {
459
461
  // default properties for <Button /> component
460
462
  BUTTON: {
461
- type: 'button',
463
+ opacity: 1,
462
464
  width: '100%',
465
+ radius: '6px',
466
+ className: '',
467
+ type: 'button',
463
468
  height: '46px',
464
469
  color: 'white',
465
- contentWidth: false,
466
470
  border: 'none',
467
- radius: '6px',
471
+ disabled: false,
468
472
  cursor: 'pointer',
473
+ contentWidth: false,
469
474
  padding: '12px 20px',
470
- disabled: false,
471
- className: '',
472
475
  transition: 'background-color 240ms, color 240ms',
473
476
  box: {
474
477
  sizing: boxSizing
@@ -478,7 +481,11 @@ var packageResult = {
478
481
  backgroundHover: '#CB3A3A',
479
482
  disabled: 'rgba(60, 57, 62, 1)',
480
483
  disabledLine: 'rgba(60, 57, 62, 1)',
481
- disabledBackground: 'rgba(238, 238, 238, 1)'
484
+ disabledBackground: 'rgba(238, 238, 238, 1)',
485
+ withoutStyling: {
486
+ color: '#000000',
487
+ hoverColor: '#121212'
488
+ }
482
489
  },
483
490
  font: {
484
491
  ...fontObject
@@ -490,8 +497,10 @@ var packageResult = {
490
497
  }
491
498
  },
492
499
  icon: {
500
+ marginLeft: '10px',
493
501
  marginRight: '10px'
494
- }
502
+ },
503
+ withoutStyling: false
495
504
  },
496
505
  // default properties for <Input /> component
497
506
  INPUT: {
@@ -521,9 +530,11 @@ var packageResult = {
521
530
  ...fontObject
522
531
  },
523
532
  label: {
533
+ dots: false,
524
534
  color: presetColors.dark,
525
535
  display: 'block',
526
536
  lineHeight: '22px',
537
+ iconMargin: '10px',
527
538
  marginBottom: '6px',
528
539
  font: {
529
540
  ...fontObject
@@ -535,6 +546,7 @@ var packageResult = {
535
546
  zIndex: '1',
536
547
  className: '',
537
548
  marginTop: '10px',
549
+ iconMargin: '10px',
538
550
  lineHeight: '19px',
539
551
  font: {
540
552
  ...fontObject
@@ -1080,6 +1092,36 @@ var packageResult = {
1080
1092
  },
1081
1093
  closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
1082
1094
  },
1095
+ // default properties for <SwipeModal /> component
1096
+ SWIPEMODAL: {
1097
+ width: '300px',
1098
+ height: '100vh',
1099
+ titleStyle: {
1100
+ color: '#1C212D',
1101
+ textAlign: 'left',
1102
+ maxHeight: '66px',
1103
+ padding: '0px 20px',
1104
+ font: {
1105
+ ...fontObject
1106
+ }
1107
+ },
1108
+ parent: {
1109
+ width: '100%',
1110
+ height: '100vh',
1111
+ colors: {
1112
+ background: 'rgba(60, 61, 70, 0.2)'
1113
+ }
1114
+ },
1115
+ colors: {
1116
+ background: 'white'
1117
+ },
1118
+ border: {
1119
+ radius: '10px'
1120
+ },
1121
+ withParent: true,
1122
+ outSideClose: false,
1123
+ closeIcon: img$2
1124
+ },
1083
1125
  // default properties for <Checkbox /> component
1084
1126
  CHECKBOX: {
1085
1127
  className: '',
@@ -1148,6 +1190,12 @@ var packageResult = {
1148
1190
  font: {
1149
1191
  ...fontObject
1150
1192
  }
1193
+ },
1194
+ draggable: {
1195
+ boxShadow: '1px 1px 9px black',
1196
+ color: {
1197
+ background: 'white'
1198
+ }
1151
1199
  }
1152
1200
  },
1153
1201
  // default properties for <Pagination /> component
@@ -1156,13 +1204,48 @@ var packageResult = {
1156
1204
  },
1157
1205
  // default properties for <Toaster /> component
1158
1206
  TOASTER: {
1207
+ width: '440px',
1208
+ height: '83px',
1159
1209
  className: '',
1160
- icon: {
1161
- // info: React.createElement(SvgChecked, { just: 'must' }),
1162
- // warn: React.createElement(SvgUnchecked, { just: 'must' }),
1163
- // close: React.createElement(SvgChecked, { fill: 'green' }),
1164
- // error: React.createElement(SvgChecked, { fill: 'green' }),
1165
- // success: React.createElement(SvgChecked, { fill: 'green' }),
1210
+ marginBottom: '20px',
1211
+ backgroundColor: '#FFFFFF',
1212
+ padding: '14px 29px 14px 12px',
1213
+ border: {
1214
+ width: '2px',
1215
+ style: 'solid',
1216
+ radius: '40px',
1217
+ color: '#EEEEEE'
1218
+ },
1219
+ title: {
1220
+ color: '#3C393E',
1221
+ lineHeight: '22px',
1222
+ font: {
1223
+ size: '16px',
1224
+ style: 'normal',
1225
+ weight: 600,
1226
+ family: ''
1227
+ },
1228
+ props: {}
1229
+ },
1230
+ description: {
1231
+ color: '#3C393E',
1232
+ lineHeight: '16px',
1233
+ font: {
1234
+ size: '12px',
1235
+ style: 'normal',
1236
+ weight: 500,
1237
+ family: ''
1238
+ },
1239
+ props: {
1240
+ opacity: 0.8
1241
+ }
1242
+ },
1243
+ icons: {
1244
+ info: '',
1245
+ warn: '',
1246
+ error: '',
1247
+ close: '',
1248
+ success: ''
1166
1249
  }
1167
1250
  },
1168
1251
  // default properties for <Stepper /> component
@@ -1248,6 +1331,7 @@ const Button = ({
1248
1331
  radius,
1249
1332
  outline,
1250
1333
  padding,
1334
+ opacity,
1251
1335
  onClick,
1252
1336
  disabled,
1253
1337
  className,
@@ -1256,13 +1340,18 @@ const Button = ({
1256
1340
  hoverColor,
1257
1341
  transition,
1258
1342
  contentWidth,
1343
+ iconRightSide,
1259
1344
  disabledColor,
1260
1345
  textTransform,
1346
+ withoutStyling,
1261
1347
  backgroundColor,
1262
1348
  disabledLineColor,
1349
+ btnIconMarginLeft,
1263
1350
  btnIconMarginRight,
1351
+ withoutStylingColor,
1264
1352
  backgroundHoverColor,
1265
1353
  disabledBackgroundColor,
1354
+ withoutStylingHoverColor,
1266
1355
  ...props
1267
1356
  }) => {
1268
1357
  const [classProps, setClassProps] = useState({});
@@ -1298,22 +1387,23 @@ const Button = ({
1298
1387
  outline: 'none',
1299
1388
  alignItems: 'center',
1300
1389
  justifyContent: 'center',
1390
+ height: height ?? configStyles.BUTTON.height,
1391
+ padding: padding ?? configStyles.BUTTON.padding,
1301
1392
  fontSize: size ?? configStyles.BUTTON.font.size,
1393
+ borderRadius: radius ?? configStyles.BUTTON.radius,
1302
1394
  fontStyle: style ?? configStyles.BUTTON.font.style,
1303
1395
  fontFamily: font ?? configStyles.BUTTON.font.family,
1304
- height: height ?? configStyles.BUTTON.height,
1305
1396
  fontWeight: weight ?? configStyles.BUTTON.font.weight,
1306
- padding: padding ?? configStyles.BUTTON.padding,
1307
- borderRadius: radius ?? configStyles.BUTTON.radius,
1308
1397
  boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
1309
1398
  transition: transition ?? configStyles.BUTTON.transition,
1310
1399
  border: outline ? 'none' : border ?? configStyles.BUTTON.border,
1311
1400
  width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
1312
- cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
1313
1401
  textTransform: textTransform ?? configStyles.BUTTON.text.transform,
1314
- 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,
1315
- 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',
1316
- color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
1402
+ cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
1403
+ opacity: opacity ?? configStyles.BUTTON.opacity,
1404
+ backgroundColor: withoutStyling ?? configStyles.BUTTON.withoutStyling ? 'transparent' : (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
1405
+ boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background}` : 'none',
1406
+ color: withoutStyling ?? configStyles.BUTTON.withoutStyling ? isHover ? withoutStylingHoverColor ?? configStyles.BUTTON.colors.withoutStyling.hoverColor : withoutStylingColor ?? configStyles.BUTTON.colors.withoutStyling.color : (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
1317
1407
  },
1318
1408
  type: type ?? configStyles.BUTTON.type,
1319
1409
  disabled: disabled ?? configStyles.BUTTON.disabled,
@@ -1321,43 +1411,50 @@ const Button = ({
1321
1411
  onMouseEnter: handleMouseEnter,
1322
1412
  onMouseLeave: handleMouseLeave,
1323
1413
  className: classProps
1324
- }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
1414
+ }, props), !iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', ' ', label && /*#__PURE__*/React__default.createElement("span", {
1325
1415
  style: {
1326
- marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px'
1416
+ marginLeft: icon && !iconRightSide ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px',
1417
+ marginRight: icon && iconRightSide ? btnIconMarginLeft ? btnIconMarginLeft : configStyles.BUTTON.icon.marginLeft : '0px'
1327
1418
  }
1328
- }, label), ' ', !icon && !label && 'Add icon or label prop on Button component'));
1419
+ }, label), ' ', iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', !icon && !label && 'Add icon or label prop on Button component'));
1329
1420
  };
1330
1421
  Button.propTypes = {
1331
1422
  type: PropTypes.string,
1332
1423
  size: PropTypes.string,
1333
1424
  style: PropTypes.string,
1334
- weight: PropTypes.string,
1335
1425
  font: PropTypes.string,
1336
1426
  icon: PropTypes.element,
1337
- hoverIcon: PropTypes.element,
1338
1427
  color: PropTypes.string,
1339
1428
  width: PropTypes.string,
1340
1429
  outline: PropTypes.bool,
1341
1430
  onClick: PropTypes.func,
1342
1431
  label: PropTypes.string,
1432
+ weight: PropTypes.string,
1343
1433
  height: PropTypes.string,
1344
1434
  cursor: PropTypes.string,
1345
1435
  border: PropTypes.string,
1346
1436
  disabled: PropTypes.bool,
1347
1437
  radius: PropTypes.string,
1348
1438
  padding: PropTypes.string,
1439
+ opacity: PropTypes.number,
1349
1440
  boxSizing: PropTypes.string,
1350
1441
  className: PropTypes.string,
1442
+ hoverIcon: PropTypes.element,
1351
1443
  hoverColor: PropTypes.string,
1352
1444
  transition: PropTypes.string,
1353
1445
  contentWidth: PropTypes.bool,
1446
+ iconRightSide: PropTypes.bool,
1447
+ withoutStyling: PropTypes.bool,
1354
1448
  textTransform: PropTypes.string,
1355
1449
  disabledColor: PropTypes.string,
1356
1450
  backgroundColor: PropTypes.string,
1357
1451
  disabledLineColor: PropTypes.string,
1452
+ btnIconMarginLeft: PropTypes.string,
1358
1453
  btnIconMarginRight: PropTypes.string,
1454
+ withoutStylingColor: PropTypes.string,
1359
1455
  backgroundHoverColor: PropTypes.string,
1360
- disabledBackgroundColor: PropTypes.string
1456
+ disabledBackgroundColor: PropTypes.string,
1457
+ withoutStylingHoverColor: PropTypes.string
1361
1458
  };
1362
1459
 
1363
1460
  const SvgPdf = ({
@@ -1730,19 +1827,19 @@ const File = /*#__PURE__*/forwardRef(({
1730
1827
  setError('');
1731
1828
  if (file[0].type === 'application/pdf') {
1732
1829
  setImage('pdf');
1733
- change(file[0]);
1734
- setSingleFile(file[0]);
1830
+ change(file);
1831
+ setSingleFile(file);
1735
1832
  } else if (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) {
1736
1833
  handleCheckHeicFormat(file[0]).then(() => {
1737
1834
  setImage('heic');
1738
- change(file[0]);
1739
- setSingleFile(file[0]);
1835
+ change(file);
1836
+ setSingleFile(file);
1740
1837
  }).catch(() => {
1741
1838
  setImage(null);
1742
1839
  setError(formatError ?? configStyles.FILE.error.format);
1743
1840
  });
1744
1841
  } else {
1745
- change(file[0]);
1842
+ change(file);
1746
1843
  setImage(URL.createObjectURL(file[0]));
1747
1844
  }
1748
1845
  } else {
@@ -2351,7 +2448,7 @@ const handleUtilsCheckTypeTel = (val, prevVal) => {
2351
2448
  }
2352
2449
  return val;
2353
2450
  };
2354
- const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize) => {
2451
+ const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength) => {
2355
2452
  if (maxLength && maxLength > 0) {
2356
2453
  if (val.length > maxLength) {
2357
2454
  val = val.substr(0, maxLength);
@@ -2361,6 +2458,9 @@ const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumS
2361
2458
  if (val.length > 16 && !val.includes('.')) {
2362
2459
  val = val.substr(0, 16);
2363
2460
  }
2461
+ if (numberMaxLength && numberMaxLength > 0 && !val.includes('.')) {
2462
+ val = val.substr(0, numberMaxLength);
2463
+ }
2364
2464
  const floatNumParts = typeof val === 'string' ? val.split(/\.|\․|\.|\,/) : val;
2365
2465
  const int = floatNumParts[0];
2366
2466
  const float = floatNumParts[1];
@@ -2432,9 +2532,9 @@ function styleInject(css, ref) {
2432
2532
  }
2433
2533
  }
2434
2534
 
2435
- 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}";
2436
- 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"};
2437
- styleInject(css_248z$a);
2535
+ var css_248z$b = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}";
2536
+ var styles$a = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO"};
2537
+ styleInject(css_248z$b);
2438
2538
 
2439
2539
  /* eslint-disable no-prototype-builtins */
2440
2540
  const TH = ({
@@ -2476,7 +2576,7 @@ const TH = ({
2476
2576
  borderColor: hideBorder ? 'transparent' : '#eeeeee'
2477
2577
  },
2478
2578
  onClick: handleHeaderItemClick,
2479
- className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$9['sorting-arrows'] : '' : ''}`
2579
+ className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$a['sorting-arrows'] : '' : ''}`
2480
2580
  }, /*#__PURE__*/React__default.createElement("div", {
2481
2581
  style: {
2482
2582
  display: 'flex',
@@ -2505,16 +2605,16 @@ const TD = ({
2505
2605
  item,
2506
2606
  index,
2507
2607
  rowItem,
2608
+ dragged,
2609
+ dragEnd,
2508
2610
  rowRadius,
2509
2611
  dragStart,
2510
- handleMouseDown,
2511
2612
  hideBorder,
2512
2613
  innerIndex,
2513
2614
  tBodyColor,
2514
2615
  orderColor,
2515
2616
  borderRight,
2516
2617
  tBodyPadding,
2517
- setIsDragging,
2518
2618
  orderFontSize,
2519
2619
  tBodyFontSize,
2520
2620
  openListColor,
@@ -2610,7 +2710,7 @@ const TD = ({
2610
2710
  },
2611
2711
  id: newItem.id,
2612
2712
  type: newItem.type,
2613
- className: styles$9['td-span'],
2713
+ className: styles$a['td-span'],
2614
2714
  key: `${newItem.id}_${newIndex}`,
2615
2715
  onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
2616
2716
  }, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
@@ -2632,7 +2732,7 @@ const TD = ({
2632
2732
  },
2633
2733
  id: iT.id ? iT.id : '',
2634
2734
  type: iT.type ? iT.type : '',
2635
- className: styles$9['td-span'],
2735
+ className: styles$a['td-span'],
2636
2736
  onClick: e => handleCheckActions(e, iT, 'type', iN),
2637
2737
  key: `${iT.id || iT.content}_${iN}`
2638
2738
  }, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
@@ -2656,7 +2756,7 @@ const TD = ({
2656
2756
  cursor: 'pointer'
2657
2757
  },
2658
2758
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
2659
- className: styles$9['td-span']
2759
+ className: styles$a['td-span']
2660
2760
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'draggableIcon') && /*#__PURE__*/React__default.createElement("div", {
2661
2761
  draggable: true,
2662
2762
  style: {
@@ -2664,7 +2764,9 @@ const TD = ({
2664
2764
  height: '24px',
2665
2765
  cursor: 'grab'
2666
2766
  },
2667
- onDragStart: () => dragStart(index)
2767
+ onDrag: dragged,
2768
+ onDragEnd: dragEnd,
2769
+ onDragStart: e => dragStart(e, index, row)
2668
2770
  }, /*#__PURE__*/React__default.createElement("img", {
2669
2771
  src: img$1,
2670
2772
  alt: "drag"
@@ -2723,7 +2825,7 @@ const TD = ({
2723
2825
  }, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
2724
2826
  return /*#__PURE__*/React__default.createElement("span", {
2725
2827
  key: `${optionItem.content}_${optionIndex}`,
2726
- className: styles$9['dots-option-item'],
2828
+ className: styles$a['dots-option-item'],
2727
2829
  style: {
2728
2830
  color: '#3C393E',
2729
2831
  fontSize: '14px',
@@ -2765,7 +2867,7 @@ const TD = ({
2765
2867
  }, innerItem.content.map((contInnerItem, contInnerIndex) => {
2766
2868
  return /*#__PURE__*/React__default.createElement("p", {
2767
2869
  key: `${contInnerItem}_${contInnerIndex}`,
2768
- className: styles$9['list-text'],
2870
+ className: styles$a['list-text'],
2769
2871
  style: {
2770
2872
  maxWidth: '100%',
2771
2873
  color: openListColor,
@@ -2782,7 +2884,7 @@ const TD = ({
2782
2884
  } else {
2783
2885
  return /*#__PURE__*/React__default.createElement("p", {
2784
2886
  key: `${innerItem}_${innerItemIndex}`,
2785
- className: styles$9['list-text'],
2887
+ className: styles$a['list-text'],
2786
2888
  style: {
2787
2889
  maxWidth: '100%',
2788
2890
  color: openListColor,
@@ -2803,7 +2905,7 @@ const TD = ({
2803
2905
  cursor: 'pointer'
2804
2906
  },
2805
2907
  onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
2806
- className: styles$9['td-span']
2908
+ className: styles$a['td-span']
2807
2909
  }, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
2808
2910
  };
2809
2911
 
@@ -2904,8 +3006,11 @@ const Table = ({
2904
3006
  draggable,
2905
3007
  showOrder,
2906
3008
  draggableColor,
2907
- getDraggableData
3009
+ getDraggableData,
3010
+ draggableItemBoxShadow,
3011
+ draggableItemBackgroundColor
2908
3012
  }) => {
3013
+ const itemRefs = useRef({});
2909
3014
  const headerRef = useRef(null);
2910
3015
  const draggedRowIndex = useRef(null);
2911
3016
  const [body, setBody] = useState([]);
@@ -2915,8 +3020,12 @@ const Table = ({
2915
3020
  const [checkDrag, setCheckDrag] = useState(false);
2916
3021
  const [checkedArray, setCheckedArray] = useState([]);
2917
3022
  const [configStyles, setConfigStyles] = useState({});
2918
- useState(false);
2919
- const [draggingIndex, setDraggingIndex] = useState(null);
3023
+ const [dragging, setDragging] = useState(false);
3024
+ const [draggedItem, setDraggedItem] = useState(null);
3025
+ const [position, setPosition] = useState({
3026
+ x: 0,
3027
+ y: 0
3028
+ });
2920
3029
  const handleCheckIfArrow = (bodyData, data) => {
2921
3030
  let removeItemIndex;
2922
3031
  let headerWithoutArrow = [];
@@ -3163,9 +3272,18 @@ const Table = ({
3163
3272
  tempCheckedArray.push(innerItem.checked);
3164
3273
  });
3165
3274
  if (tempCheckedArray.every(i => i)) {
3166
- item.checkBox.checked = true;
3275
+ if (hasOwnerProperty(item, 'checkBox')) {
3276
+ if (hasOwnerProperty(item.checkBox, 'checked')) {
3277
+ item.checkBox.checked = true;
3278
+ return item;
3279
+ }
3280
+ }
3167
3281
  } else {
3168
- item.checkBox.checked = false;
3282
+ if (hasOwnerProperty(item, 'checkBox')) {
3283
+ if (hasOwnerProperty(item.checkBox, 'checked')) {
3284
+ item.checkBox.checked = false;
3285
+ }
3286
+ }
3169
3287
  }
3170
3288
  }
3171
3289
  return item;
@@ -3230,7 +3348,7 @@ const Table = ({
3230
3348
  const handleCheckArrowActionHeader = (e, item) => {
3231
3349
  e.stopPropagation();
3232
3350
  const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
3233
- if (item.checkIndex === innerIndex) {
3351
+ if (item.checkIndex === (draggable && !showOrder ? innerIndex - 1 : draggable && showOrder ? innerIndex - 2 : innerIndex)) {
3234
3352
  if (item.status === 'close') {
3235
3353
  innerItem.status = 'open';
3236
3354
  } else {
@@ -3323,24 +3441,59 @@ const Table = ({
3323
3441
  });
3324
3442
  setBody(() => checkBodyMore);
3325
3443
  };
3326
- const handleDragStart = index => {
3444
+ const handleDragStart = (e, index, row) => {
3445
+ setDragging(true);
3446
+ setDraggedItem(row);
3327
3447
  draggedRowIndex.current = index;
3328
- setDraggingIndex(() => index);
3448
+ e.dataTransfer.setDragImage(new Image(), 0, 0);
3449
+ };
3450
+ const handleDrag = e => {
3451
+ setPosition({
3452
+ x: e.clientX,
3453
+ y: e.clientY
3454
+ });
3329
3455
  };
3330
- const handleDrop = index => {
3456
+ const handleDrop = (e, index) => {
3331
3457
  let correctData = [];
3332
3458
  const newRows = body;
3333
3459
  const [draggedRow] = newRows.splice(draggedRowIndex.current, 1);
3334
3460
  newRows.splice(index, 0, draggedRow);
3335
- newRows.map(item => {
3461
+ newRows.map((item, newIndex) => {
3462
+ item.map(innerItem => {
3463
+ if (hasOwnerProperty(innerItem, 'checkIndex')) {
3464
+ innerItem.checkIndex = newIndex;
3465
+ }
3466
+ });
3336
3467
  correctData.push([...item]);
3337
3468
  });
3338
3469
  setBody(correctData);
3339
3470
  getDraggableData && getDraggableData(correctData);
3340
3471
  setCheckDrag(prev => !prev);
3341
3472
  draggedRowIndex.current = null;
3342
- setDraggingIndex(() => null);
3343
3473
  correctData = null;
3474
+ setDraggedItem(null);
3475
+ setDragging(false);
3476
+ e.dataTransfer.setDragImage(new Image(), 0, 0);
3477
+ };
3478
+ const handleDragEnd = e => {
3479
+ setDraggedItem(null);
3480
+ setDragging(false);
3481
+ e.dataTransfer.setDragImage(new Image(), 0, 0);
3482
+ };
3483
+ const setRef = (index, element) => {
3484
+ if (element) {
3485
+ itemRefs.current[index] = element;
3486
+ }
3487
+ };
3488
+ const handleSafeStringify = obj => {
3489
+ const seen = new WeakSet();
3490
+ return JSON.stringify(obj, (key, value) => {
3491
+ if (typeof value === "object" && value !== null) {
3492
+ if (seen.has(value)) return; // Ignore circular reference
3493
+ seen.add(value);
3494
+ }
3495
+ return value;
3496
+ });
3344
3497
  };
3345
3498
  useEffect(() => {
3346
3499
  const draggableArray = body && body.length && body.map((item, index) => {
@@ -3358,7 +3511,7 @@ const Table = ({
3358
3511
  setBody(() => draggableArray);
3359
3512
  }, [checkDrag]);
3360
3513
  useEffect(() => {
3361
- const isEqual = JSON.stringify(body) === JSON.stringify(dataBody);
3514
+ const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
3362
3515
  if (!isEqual) {
3363
3516
  let insert = [];
3364
3517
  let newArray = [];
@@ -3366,7 +3519,11 @@ const Table = ({
3366
3519
  const disabledArray = [];
3367
3520
  const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
3368
3521
  if (arrowShow) {
3369
- const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], arrowColumn);
3522
+ let column = arrowColumn;
3523
+ if (draggable) {
3524
+ column -= 1;
3525
+ }
3526
+ const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], column);
3370
3527
  const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
3371
3528
  insert = checkForInsertArrow.map((item, index) => {
3372
3529
  item.map((innerItem, innerIndex) => {
@@ -3385,27 +3542,8 @@ const Table = ({
3385
3542
  });
3386
3543
  return item;
3387
3544
  });
3545
+ newArray = insert;
3388
3546
  checkedItems = handleSetCheckboxArray(insert);
3389
- if (draggable) {
3390
- newArray = insert && insert.length && insert.map((item, index) => {
3391
- item.map(innerItem => {
3392
- if (hasOwnerProperty(innerItem, 'colorStatus')) {
3393
- innerItem.colorStatus = null;
3394
- }
3395
- });
3396
- if (showOrder) {
3397
- item.unshift({
3398
- content: index + 1,
3399
- draggable: true
3400
- });
3401
- }
3402
- item.unshift({
3403
- draggableIcon: '',
3404
- colorStatus: draggableColor
3405
- });
3406
- return item;
3407
- });
3408
- }
3409
3547
  } else {
3410
3548
  insert = checkBodyForChackedItems.map((item, index) => {
3411
3549
  item.map((innerItem, innerIndex) => {
@@ -3424,69 +3562,62 @@ const Table = ({
3424
3562
  });
3425
3563
  return item;
3426
3564
  });
3565
+ newArray = insert;
3427
3566
  checkedItems = handleSetCheckboxArray(insert);
3428
- if (draggable) {
3429
- newArray = insert && insert.length && insert.map((item, index) => {
3430
- item.map(innerItem => {
3431
- if (hasOwnerProperty(innerItem, 'colorStatus')) {
3432
- innerItem.colorStatus = null;
3433
- }
3434
- });
3435
- if (showOrder) {
3436
- item.unshift({
3437
- content: index + 1,
3438
- draggable: true
3439
- });
3567
+ }
3568
+ if (draggable) {
3569
+ newArray = insert && insert.length && insert.map((item, index) => {
3570
+ item.map(innerItem => {
3571
+ if (hasOwnerProperty(innerItem, 'colorStatus')) {
3572
+ innerItem.colorStatus = null;
3440
3573
  }
3574
+ });
3575
+ if (showOrder) {
3441
3576
  item.unshift({
3442
- draggableIcon: '',
3443
- colorStatus: draggableColor
3577
+ content: index + 1,
3578
+ draggable: true
3444
3579
  });
3445
- return item;
3580
+ }
3581
+ item.unshift({
3582
+ draggableIcon: '',
3583
+ colorStatus: draggableColor
3446
3584
  });
3447
- }
3585
+ return item;
3586
+ });
3448
3587
  }
3449
- getDraggableData && getDraggableData(newArray && newArray.length ? newArray : insert);
3450
- setBody(() => newArray && newArray.length ? newArray : insert);
3588
+ setBody(() => [...newArray]);
3451
3589
  setDisableArr(disabledArray);
3452
3590
  setCheckedArray(() => checkedItems);
3591
+ getDraggableData && getDraggableData(newArray);
3453
3592
  }
3454
3593
  }, [dataBody, arrowColumn, arrowShow, draggable]);
3455
3594
  useEffect(() => {
3456
- const isEqual = JSON.stringify(header) === JSON.stringify(dataHeader);
3595
+ const isEqual = handleSafeStringify(header) === handleSafeStringify(dataHeader);
3457
3596
  if (!isEqual) {
3458
- let insert = [];
3459
3597
  let newArray = [];
3460
3598
  if (arrowShow) {
3461
- const header = dataHeader.slice();
3462
- const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
3463
- const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
3464
- insert = checkForInsertArrow;
3599
+ let column = arrowColumn;
3465
3600
  if (draggable) {
3466
- newArray = insert;
3467
- newArray && newArray.length && newArray.unshift({
3468
- content: ''
3469
- });
3470
- if (showOrder) {
3471
- newArray.unshift({
3472
- content: ''
3473
- });
3474
- }
3601
+ column -= 1;
3475
3602
  }
3603
+ const header = dataHeader.slice();
3604
+ const arrowColumnCount = handleSetInsertIndex(header, column);
3605
+ const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
3606
+ newArray = checkForInsertArrow;
3476
3607
  } else {
3477
- if (draggable) {
3478
- newArray = dataHeader;
3479
- newArray && newArray.length && newArray.unshift({
3608
+ newArray = dataHeader.slice();
3609
+ }
3610
+ if (draggable) {
3611
+ newArray && newArray.length && newArray.unshift({
3612
+ content: ''
3613
+ });
3614
+ if (showOrder) {
3615
+ newArray.unshift({
3480
3616
  content: ''
3481
3617
  });
3482
- if (showOrder) {
3483
- newArray.unshift({
3484
- content: ''
3485
- });
3486
- }
3487
3618
  }
3488
3619
  }
3489
- setHeader(() => newArray && newArray.length ? newArray : insert);
3620
+ setHeader(() => [...newArray]);
3490
3621
  }
3491
3622
  }, [dataHeader, arrowColumn, arrowShow, disableArr, draggable]);
3492
3623
  useEffect(() => {
@@ -3545,22 +3676,24 @@ const Table = ({
3545
3676
  }
3546
3677
  }, body.map((item, index) => {
3547
3678
  return /*#__PURE__*/React__default.createElement("tr", {
3548
- onDragStart: () => handleDragStart(index),
3549
3679
  onDragOver: e => e.preventDefault(),
3550
- onDrop: () => handleDrop(index),
3680
+ onDrop: e => handleDrop(e, index),
3551
3681
  key: `${item}_${index}`,
3552
3682
  style: {
3553
3683
  backgroundColor: tableRowBGColor ?? configStyles.TABLE.body.row.colors.background,
3554
3684
  borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.body.row.border,
3555
3685
  borderColor: hideBorder ? 'transparent' : configStyles.TABLE.body.row.borderColor,
3556
3686
  boxShadow: (tableRowItem ? tableRowItem : configStyles.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : configStyles.TABLE.body.row.box.shadow : 'none'
3557
- }
3687
+ },
3688
+ ref: el => setRef(index, el)
3558
3689
  }, Object.values(item).map((innerItem, innerIndex) => {
3559
3690
  return /*#__PURE__*/React__default.createElement(TD, {
3560
3691
  index: index,
3561
3692
  item: innerItem,
3693
+ dragged: handleDrag,
3562
3694
  hideBorder: hideBorder,
3563
3695
  innerIndex: innerIndex,
3696
+ dragEnd: handleDragEnd,
3564
3697
  row: Object.values(item),
3565
3698
  dragStart: handleDragStart,
3566
3699
  id: item.id ? item.id : '',
@@ -3596,10 +3729,59 @@ const Table = ({
3596
3729
  handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
3597
3730
  });
3598
3731
  }));
3732
+ })), draggable && dragging && draggedItem && /*#__PURE__*/React__default.createElement("div", {
3733
+ style: {
3734
+ position: 'fixed',
3735
+ top: `${position.y - 30}px`,
3736
+ left: `${position.x - 30}px`,
3737
+ borderSpacing: '0px',
3738
+ pointerEvents: 'none',
3739
+ height: 'fit-content',
3740
+ blockSize: 'fit-content',
3741
+ borderRadius: tableRowItem ? tableRowRadius ?? configStyles.TABLE.body.row.radius : '0px',
3742
+ boxShadow: draggableItemBoxShadow ?? configStyles.TABLE.draggable.boxShadow,
3743
+ backgroundColor: draggableItemBackgroundColor ?? configStyles.TABLE.draggable.color.background
3744
+ }
3745
+ }, draggedItem.map((innerItem, innerIndex) => {
3746
+ return /*#__PURE__*/React__default.createElement(TD, {
3747
+ item: innerItem,
3748
+ dragged: handleDrag,
3749
+ hideBorder: hideBorder,
3750
+ innerIndex: innerIndex,
3751
+ row: Object.values(draggedItem),
3752
+ dragStart: handleDragStart,
3753
+ handleCheckDots: handleCheckDots,
3754
+ key: `${innerItem}__${innerIndex}`,
3755
+ openListColor: openListColor ?? configStyles.TABLE.openList.color,
3756
+ tableColumnMinWidth: tableColumnMinWidth ?? configStyles.TABLE.column.minWidth,
3757
+ tableColumnMaxWidth: tableColumnMaxWidth ?? configStyles.TABLE.column.maxWidth,
3758
+ openListFontSize: openListFontSize ?? configStyles.TABLE.openList.font.size,
3759
+ openListFontStyle: openListFontStyle ?? configStyles.TABLE.openList.font.style,
3760
+ openListFontWeight: openListFontWeight ?? configStyles.TABLE.openList.font.weight,
3761
+ openListFontFamily: openListFontFamily ?? configStyles.TABLE.openList.font.family,
3762
+ tBodyColor: tBodyColor ?? configStyles.TABLE.body.color,
3763
+ orderColor: orderColor ?? configStyles.TABLE.order.color,
3764
+ rowItem: tableRowItem ?? configStyles.TABLE.body.row.isItem,
3765
+ tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
3766
+ tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
3767
+ rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
3768
+ tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
3769
+ orderFontSize: orderFontSize ?? configStyles.TABLE.order.font.size,
3770
+ orderFontStyle: orderFontStyle ?? configStyles.TABLE.order.font.style,
3771
+ tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
3772
+ tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
3773
+ orderFontFamily: orderFontFamily ?? configStyles.TABLE.order.font.family,
3774
+ orderFontWeight: orderFontWeight ?? configStyles.TABLE.order.font.weight,
3775
+ borderRight: innerIndex === Object.values(draggedItem).length - 1 ? 'none' : configStyles.TABLE.body.row.border,
3776
+ borderRightColor: innerIndex === Object.values(draggedItem).length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor
3777
+ });
3599
3778
  })));
3600
3779
  };
3601
3780
  Table.propTypes = {
3602
3781
  getData: PropTypes.func,
3782
+ getDraggableData: PropTypes.func,
3783
+ draggable: PropTypes.bool,
3784
+ showOrder: PropTypes.bool,
3603
3785
  dataBody: PropTypes.array,
3604
3786
  arrowShow: PropTypes.bool,
3605
3787
  dataHeader: PropTypes.array,
@@ -3637,9 +3819,9 @@ Table.propTypes = {
3637
3819
  hideBorder: PropTypes.bool
3638
3820
  };
3639
3821
 
3640
- 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)}}";
3641
- var styles$8 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
3642
- styleInject(css_248z$9);
3822
+ var css_248z$a = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
3823
+ var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
3824
+ styleInject(css_248z$a);
3643
3825
 
3644
3826
  const SvgNext = ({
3645
3827
  title,
@@ -3914,7 +4096,7 @@ const Modal = ({
3914
4096
  justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
3915
4097
  }
3916
4098
  }, /*#__PURE__*/React__default.createElement("div", {
3917
- className: `${styles$8['animation__modal']}`,
4099
+ className: `${styles$9['animation__modal']}`,
3918
4100
  onClick: handleStopClosing,
3919
4101
  style: {
3920
4102
  position: 'relative',
@@ -4308,6 +4490,7 @@ const NumberInput = ({
4308
4490
  value,
4309
4491
  float,
4310
4492
  radius,
4493
+ withZero,
4311
4494
  disabled,
4312
4495
  inpStyles,
4313
4496
  minNumSize,
@@ -4315,6 +4498,7 @@ const NumberInput = ({
4315
4498
  insideError,
4316
4499
  inputChange,
4317
4500
  inpAttributes,
4501
+ numberMaxLength,
4318
4502
  setInnerErrorMessage
4319
4503
  }) => {
4320
4504
  const [innerValue, setInnerValue] = useState('');
@@ -4322,7 +4506,7 @@ const NumberInput = ({
4322
4506
  const handleChange = event => {
4323
4507
  let prevValue = innerValue;
4324
4508
  let currentValue = event.target.value.replace(/\.|․|\.|,/g, '.');
4325
- currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots);
4509
+ currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
4326
4510
  setInnerValue(() => currentValue);
4327
4511
  if (inputChange && currentValue !== prevValue) {
4328
4512
  if (currentValue < Number.MIN_SAFE_INTEGER || currentValue > Number.MAX_SAFE_INTEGER) {
@@ -4352,11 +4536,13 @@ const NumberInput = ({
4352
4536
  }
4353
4537
  };
4354
4538
  const handleBlur = () => {
4355
- const newVal = handleRemoveLeadingZeros(innerValue);
4356
- if (parseFloat(newVal) === 0) {
4357
- inputChange('');
4358
- } else {
4359
- inputChange(newVal);
4539
+ if (!withZero) {
4540
+ const newVal = handleRemoveLeadingZeros(innerValue);
4541
+ if (parseFloat(newVal) === 0) {
4542
+ inputChange('');
4543
+ } else {
4544
+ inputChange(newVal);
4545
+ }
4360
4546
  }
4361
4547
  };
4362
4548
  useEffect(() => {
@@ -4373,10 +4559,10 @@ const NumberInput = ({
4373
4559
  useEffect(() => {
4374
4560
  let newValue = '';
4375
4561
  if (value !== undefined && value !== null) {
4376
- newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots);
4562
+ newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
4377
4563
  }
4378
4564
  setInnerValue(() => newValue);
4379
- }, [dots, value, float, maxNumSize, minNumSize]);
4565
+ }, [dots, value, float, maxNumSize, minNumSize, numberMaxLength]);
4380
4566
  return /*#__PURE__*/React__default.createElement("input", {
4381
4567
  type: "text",
4382
4568
  value: innerValue,
@@ -4397,9 +4583,9 @@ const NumberInput = ({
4397
4583
  });
4398
4584
  };
4399
4585
 
4400
- 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)}}";
4401
- 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"};
4402
- styleInject(css_248z$8);
4586
+ var css_248z$9 = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
4587
+ var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
4588
+ styleInject(css_248z$9);
4403
4589
 
4404
4590
  const InputTypes = {
4405
4591
  TEL: 'tel',
@@ -4407,6 +4593,10 @@ const InputTypes = {
4407
4593
  NUMBER: 'number',
4408
4594
  PASSWORD: 'password'
4409
4595
  };
4596
+ const IconSides = {
4597
+ LEFT: 'left',
4598
+ RIGHT: 'right'
4599
+ };
4410
4600
  const P = styled.span`
4411
4601
  animation: ${true};
4412
4602
  `;
@@ -4429,6 +4619,9 @@ const Input = ({
4429
4619
  leftIcon,
4430
4620
  required,
4431
4621
  disabled,
4622
+ errorDots,
4623
+ errorIcon,
4624
+ labelDots,
4432
4625
  iconWidth,
4433
4626
  rightIcon,
4434
4627
  className,
@@ -4438,6 +4631,7 @@ const Input = ({
4438
4631
  errorSize,
4439
4632
  labelSize,
4440
4633
  maxLength,
4634
+ labelIcon,
4441
4635
  labelStyle,
4442
4636
  floatToFix,
4443
4637
  minNumSize,
@@ -4446,6 +4640,8 @@ const Input = ({
4446
4640
  errorColor,
4447
4641
  withoutDot,
4448
4642
  errorStyle,
4643
+ labelAction,
4644
+ errorAction,
4449
4645
  placeholder,
4450
4646
  errorZindex,
4451
4647
  labelWeight,
@@ -4455,14 +4651,22 @@ const Input = ({
4455
4651
  errorMessage,
4456
4652
  autoComplete,
4457
4653
  labelDisplay,
4654
+ labelIconSide,
4655
+ showLabelIcon,
4656
+ errorIconSide,
4657
+ showErrorIcon,
4458
4658
  errorMarginTop,
4459
4659
  boxShadowHover,
4460
4660
  errorClassName,
4661
+ labelIconMargin,
4461
4662
  labelFontFamily,
4462
4663
  phoneAlignItems,
4463
4664
  errorLineHeight,
4464
4665
  labelLineHeight,
4666
+ numberMaxLength,
4465
4667
  backgroundColor,
4668
+ errorIconMargin,
4669
+ withZero = false,
4466
4670
  labelMarginBottom,
4467
4671
  regexpErrorMessage,
4468
4672
  phoneJustifyContent,
@@ -4479,7 +4683,11 @@ const Input = ({
4479
4683
  const [classProps, setClassProps] = useState({});
4480
4684
  const [innerValue, setInnerValue] = useState('');
4481
4685
  const [configStyles, setConfigStyles] = useState({});
4686
+ const [innerErrorIcon, setInnerErrorIcon] = useState('');
4687
+ const [innerLabelIcon, setInnerLabelIcon] = useState('');
4482
4688
  const [innerErrorMessage, setInnerErrorMessage] = useState('');
4689
+ const [innerErrorIconSide, setInnerErrorIconSide] = useState('left');
4690
+ const [innerLabelIconSide, setInnerLabelIconSide] = useState('left');
4483
4691
  const inpStyles = configStyles.INPUT && {
4484
4692
  width: width ?? configStyles.INPUT.width,
4485
4693
  cursor: disabled ? 'not-allowed' : 'auto',
@@ -4536,11 +4744,27 @@ const Input = ({
4536
4744
  setInnerValue(() => val);
4537
4745
  }, [value]);
4538
4746
  useEffect(() => {
4539
- className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
4747
+ className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
4540
4748
  }, [className]);
4749
+ useEffect(() => {
4750
+ setInnerErrorIcon(() => errorIcon);
4751
+ }, [errorIcon]);
4752
+ useEffect(() => {
4753
+ if (errorIconSide) {
4754
+ setInnerErrorIconSide(() => errorIconSide);
4755
+ }
4756
+ }, [errorIconSide]);
4757
+ useEffect(() => {
4758
+ setInnerLabelIcon(() => labelIcon);
4759
+ }, [labelIcon]);
4760
+ useEffect(() => {
4761
+ if (labelIconSide) {
4762
+ setInnerLabelIconSide(() => labelIconSide);
4763
+ }
4764
+ }, [labelIconSide]);
4541
4765
  useEffect(() => {
4542
4766
  configStylesPromise.then(data => {
4543
- setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
4767
+ setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
4544
4768
  setConfigStyles(() => {
4545
4769
  return {
4546
4770
  ...data
@@ -4554,6 +4778,7 @@ const Input = ({
4554
4778
  className: classProps
4555
4779
  }, label ? /*#__PURE__*/React__default.createElement("label", {
4556
4780
  style: {
4781
+ maxWidth: '100%',
4557
4782
  color: labelColor ?? configStyles.INPUT.label.color,
4558
4783
  fontSize: labelSize ?? configStyles.INPUT.label.font.size,
4559
4784
  fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
@@ -4561,10 +4786,34 @@ const Input = ({
4561
4786
  fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
4562
4787
  lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
4563
4788
  marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
4564
- fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family
4565
- }
4566
- }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
4567
- className: `${styles$7['input-content']}`,
4789
+ fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
4790
+ whiteSpace: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'nowrap' : 'normal',
4791
+ overflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'hidden' : 'visible',
4792
+ textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
4793
+ },
4794
+ title: label
4795
+ }, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
4796
+ alt: "label icon",
4797
+ src: innerLabelIcon,
4798
+ style: {
4799
+ width: '14px',
4800
+ height: '14px',
4801
+ cursor: labelAction ? 'pointer' : 'normal',
4802
+ marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
4803
+ },
4804
+ onClick: labelAction ? () => labelAction() : _ => _
4805
+ }) : '', label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default.createElement("img", {
4806
+ alt: "label icon",
4807
+ src: innerLabelIcon,
4808
+ style: {
4809
+ width: '14px',
4810
+ height: '14px',
4811
+ cursor: labelAction ? 'pointer' : 'normal',
4812
+ marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
4813
+ },
4814
+ onClick: labelAction ? () => labelAction() : _ => _
4815
+ }) : '') : '', /*#__PURE__*/React__default.createElement("div", {
4816
+ className: `${styles$8['input-content']}`,
4568
4817
  style: {
4569
4818
  width: width ?? configStyles.INPUT.width,
4570
4819
  borderRadius: radius ?? configStyles.INPUT.radius,
@@ -4608,9 +4857,11 @@ const Input = ({
4608
4857
  value: innerValue,
4609
4858
  float: floatToFix,
4610
4859
  disabled: disabled,
4860
+ withZero: withZero,
4611
4861
  inputChange: change,
4612
4862
  inpStyles: inpStyles,
4613
4863
  inpAttributes: inpAttributes,
4864
+ numberMaxLength: numberMaxLength,
4614
4865
  insideError: fireInputInsideError,
4615
4866
  minNumSize: minNumSize ? minNumSize : '',
4616
4867
  maxNumSize: maxNumSize ? maxNumSize : '',
@@ -4653,32 +4904,62 @@ const Input = ({
4653
4904
  animation: animation,
4654
4905
  style: {
4655
4906
  margin: '0px',
4907
+ display: 'flex',
4908
+ alignItems: 'center',
4656
4909
  position: 'absolute',
4657
4910
  width: width ?? configStyles.INPUT.width,
4658
4911
  left: errorLeft ?? configStyles.INPUT.error.left,
4659
4912
  color: errorColor ?? configStyles.INPUT.error.color,
4913
+ zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
4660
4914
  fontSize: errorSize ?? configStyles.INPUT.error.font.size,
4661
4915
  fontStyle: errorStyle ?? configStyles.INPUT.error.font.style,
4662
4916
  fontFamily: errorFamily ?? configStyles.INPUT.error.font.family,
4663
4917
  fontWeight: errorWeight ?? configStyles.INPUT.error.font.weight,
4664
- zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
4665
4918
  lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
4666
4919
  top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
4667
4920
  transform: 'scale3d(1,1,1)'
4668
4921
  },
4669
4922
  className: errorClassName ?? configStyles.INPUT.error.className
4670
- }, innerErrorMessage) : '');
4923
+ }, showErrorIcon && innerErrorIcon && innerErrorIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
4924
+ alt: "error icon",
4925
+ src: innerErrorIcon,
4926
+ style: {
4927
+ width: '14px',
4928
+ height: '14px',
4929
+ cursor: errorAction ? 'pointer' : 'normal',
4930
+ marginRight: errorIconMargin ?? configStyles.INPUT.error.iconMargin
4931
+ },
4932
+ onClick: errorAction ? () => errorAction() : _ => _
4933
+ }) : '', /*#__PURE__*/React__default.createElement("span", {
4934
+ style: {
4935
+ display: 'inline-block',
4936
+ whiteSpace: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'nowrap' : 'normal',
4937
+ overflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'hidden' : 'visible',
4938
+ textOverflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'ellipsis' : '',
4939
+ maxWidth: `calc(100% - ${(errorIconMargin ? Number(errorIconMargin.match(/\d+/)[0]) : Number(configStyles.INPUT.error.iconMargin.match(/\d+/)[0])) + 14}px)`
4940
+ }
4941
+ }, innerErrorMessage), showErrorIcon && innerErrorIcon && innerErrorIconSide === 'right' && /*#__PURE__*/React__default.createElement("img", {
4942
+ alt: "error icon",
4943
+ src: innerErrorIcon,
4944
+ style: {
4945
+ width: '14px',
4946
+ height: '14px',
4947
+ cursor: errorAction ? 'pointer' : 'normal',
4948
+ marginLeft: errorIconMargin ?? configStyles.INPUT.error.iconMargin
4949
+ },
4950
+ onClick: errorAction ? () => errorAction() : _ => _
4951
+ })) : '');
4671
4952
  };
4672
4953
  Input.propTypes = {
4673
4954
  size: PropTypes.string,
4674
4955
  name: PropTypes.string,
4675
- style: PropTypes.string,
4676
- weight: PropTypes.string,
4677
- family: PropTypes.string,
4678
4956
  change: PropTypes.func,
4957
+ style: PropTypes.string,
4679
4958
  color: PropTypes.string,
4680
4959
  width: PropTypes.string,
4681
- label: PropTypes.string,
4960
+ withZero: PropTypes.bool,
4961
+ weight: PropTypes.string,
4962
+ family: PropTypes.string,
4682
4963
  required: PropTypes.bool,
4683
4964
  disabled: PropTypes.bool,
4684
4965
  height: PropTypes.string,
@@ -4688,39 +4969,52 @@ Input.propTypes = {
4688
4969
  withoutDot: PropTypes.bool,
4689
4970
  className: PropTypes.string,
4690
4971
  iconWidth: PropTypes.string,
4691
- boxSizing: PropTypes.string,
4692
- boxShadow: PropTypes.string,
4693
- errorSize: PropTypes.string,
4694
- errorLeft: PropTypes.string,
4695
- labelSize: PropTypes.string,
4696
4972
  maxLength: PropTypes.number,
4697
4973
  floatToFix: PropTypes.number,
4698
4974
  minNumSize: PropTypes.number,
4699
4975
  maxNumSize: PropTypes.number,
4700
- errorColor: PropTypes.string,
4976
+ label: PropTypes.string,
4977
+ labelDots: PropTypes.bool,
4978
+ labelAction: PropTypes.func,
4979
+ labelIcon: PropTypes.string,
4980
+ labelSize: PropTypes.string,
4701
4981
  labelColor: PropTypes.string,
4702
4982
  labelStyle: PropTypes.string,
4983
+ showLabelIcon: PropTypes.bool,
4984
+ labelWeight: PropTypes.string,
4985
+ labelDisplay: PropTypes.string,
4986
+ labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
4987
+ labelLineHeight: PropTypes.string,
4988
+ labelFontFamily: PropTypes.string,
4989
+ labelIconMargin: PropTypes.string,
4990
+ labelMarginBottom: PropTypes.string,
4991
+ borderRight: PropTypes.string,
4992
+ placeholder: PropTypes.string,
4993
+ phoneDisplay: PropTypes.string,
4994
+ autoComplete: PropTypes.string,
4995
+ errorDots: PropTypes.bool,
4996
+ errorLeft: PropTypes.string,
4997
+ errorSize: PropTypes.string,
4998
+ errorIcon: PropTypes.string,
4999
+ errorAction: PropTypes.func,
5000
+ errorColor: PropTypes.string,
4703
5001
  errorStyle: PropTypes.string,
5002
+ showErrorIcon: PropTypes.bool,
4704
5003
  errorWeight: PropTypes.string,
4705
5004
  errorFamily: PropTypes.string,
4706
- borderRight: PropTypes.string,
4707
- placeholder: PropTypes.string,
4708
5005
  errorZindex: PropTypes.string,
4709
- labelWeight: PropTypes.string,
5006
+ errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
4710
5007
  errorMessage: PropTypes.string,
4711
- phoneDisplay: PropTypes.string,
4712
- autoComplete: PropTypes.string,
4713
- labelDisplay: PropTypes.string,
4714
5008
  errorPosition: PropTypes.string,
4715
5009
  errorMarginTop: PropTypes.string,
4716
- boxShadowHover: PropTypes.string,
4717
5010
  errorClassName: PropTypes.string,
4718
- labelFontFamily: PropTypes.string,
4719
- backgroundColor: PropTypes.string,
4720
- phoneAlignItems: PropTypes.string,
5011
+ errorIconMargin: PropTypes.string,
4721
5012
  errorLineHeight: PropTypes.string,
4722
- labelLineHeight: PropTypes.string,
4723
- labelMarginBottom: PropTypes.string,
5013
+ boxSizing: PropTypes.string,
5014
+ boxShadow: PropTypes.string,
5015
+ boxShadowHover: PropTypes.string,
5016
+ phoneAlignItems: PropTypes.string,
5017
+ numberMaxLength: PropTypes.number,
4724
5018
  regexpErrorMessage: PropTypes.string,
4725
5019
  regexp: PropTypes.instanceOf(RegExp),
4726
5020
  fireInputInsideError: PropTypes.func,
@@ -4728,6 +5022,7 @@ Input.propTypes = {
4728
5022
  telBorderRightStyle: PropTypes.string,
4729
5023
  telBorderRightColor: PropTypes.string,
4730
5024
  phoneJustifyContent: PropTypes.string,
5025
+ backgroundColor: PropTypes.string,
4731
5026
  backgroundDisableColor: PropTypes.string,
4732
5027
  telBorderRightColorHover: PropTypes.string,
4733
5028
  leftIcon: PropTypes.arrayOf(PropTypes.element),
@@ -4951,9 +5246,9 @@ const SvgArrow = ({
4951
5246
  fill: fillColor ? fillColor : '#3C393E'
4952
5247
  }));
4953
5248
 
4954
- 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}}";
4955
- 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"};
4956
- styleInject(css_248z$7);
5249
+ var css_248z$8 = ".select-module_select-content__GCMDX{-webkit-appearance:none;display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;-webkit-appearance:none;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:99999999999}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_ellipsis__uNgol{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
5250
+ var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","ellipsis":"select-module_ellipsis__uNgol"};
5251
+ styleInject(css_248z$8);
4957
5252
 
4958
5253
  const Select = ({
4959
5254
  dots,
@@ -5165,7 +5460,7 @@ const Select = ({
5165
5460
  }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
5166
5461
  ref: ref
5167
5462
  }, /*#__PURE__*/React__default.createElement("div", {
5168
- className: styles$6['select-content']
5463
+ className: styles$7['select-content']
5169
5464
  }, /*#__PURE__*/React__default.createElement("div", {
5170
5465
  style: {
5171
5466
  cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.selected.cursor,
@@ -5185,9 +5480,9 @@ const Select = ({
5185
5480
  onClick: disabled ? _ => _ : () => handleOpenClose(),
5186
5481
  onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
5187
5482
  onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
5188
- className: `${styles$6['select-content-top']}`
5483
+ className: `${styles$7['select-content-top']}`
5189
5484
  }, /*#__PURE__*/React__default.createElement("div", {
5190
- className: `${styles$6['select-content-top-text']}`,
5485
+ className: `${styles$7['select-content-top-text']}`,
5191
5486
  style: {
5192
5487
  whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
5193
5488
  overflow: 'hidden',
@@ -5203,9 +5498,9 @@ const Select = ({
5203
5498
  }
5204
5499
  }
5205
5500
  }) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
5206
- className: `${styles$6['select-content-top-icon']}`
5501
+ className: `${styles$7['select-content-top-icon']}`
5207
5502
  }, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
5208
- className: `${styles$6['close-icon']}`,
5503
+ className: `${styles$7['close-icon']}`,
5209
5504
  onClick: disabled ? _ => _ : handleClearSelect,
5210
5505
  style: {
5211
5506
  marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
@@ -5214,7 +5509,7 @@ const Select = ({
5214
5509
  style: {
5215
5510
  transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
5216
5511
  },
5217
- className: `${styles$6['arrow-icon']}`
5512
+ className: `${styles$7['arrow-icon']}`
5218
5513
  }, arrowIcon ? arrowIcon : configStyles.SELECT.arrowIcon ? configStyles.SELECT.arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && existOptions && existOptions.length > 0 && !disabled ? /*#__PURE__*/React__default.createElement("div", {
5219
5514
  style: {
5220
5515
  boxShadow: optionsBoxShadow ?? configStyles.SELECT.options.box.shadow,
@@ -5222,9 +5517,9 @@ const Select = ({
5222
5517
  backgroundColor: optionsBackgroundColor ?? configStyles.SELECT.options.colors.background,
5223
5518
  top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : configStyles.SELECT.selected.minHeight.includes('rem') ? parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 2)) + 6 + 'px'
5224
5519
  },
5225
- className: `${styles$6['select-content-bottom']}`
5520
+ className: `${styles$7['select-content-bottom']}`
5226
5521
  }, /*#__PURE__*/React__default.createElement("div", {
5227
- className: `${styles$6['select-content-bottom-inner']}`
5522
+ className: `${styles$7['select-content-bottom-inner']}`
5228
5523
  }, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
5229
5524
  return /*#__PURE__*/React__default.createElement("div", {
5230
5525
  key: i,
@@ -5233,7 +5528,7 @@ const Select = ({
5233
5528
  onClick: disabled ? _ => _ : () => handleSelectItem(option),
5234
5529
  onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
5235
5530
  onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
5236
- className: `${styles$6['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$6['ellipsis'] : ''}`,
5531
+ className: `${styles$7['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$7['ellipsis'] : ''}`,
5237
5532
  style: {
5238
5533
  overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
5239
5534
  color: optionItemColor ?? configStyles.SELECT.options.item.color,
@@ -5446,11 +5741,10 @@ const SvgToasterSuccess = ({
5446
5741
  fill: fillColor ? fillColor : '#0DA574'
5447
5742
  }));
5448
5743
 
5449
- 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}}";
5450
- 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"};
5451
- styleInject(css_248z$6);
5744
+ var css_248z$7 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceInLeftMobile__CA2dc{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:0}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}@media(max-width:480px){.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeftMobile__CA2dc;animation-name:toaster-module_bounceInLeftMobile__CA2dc}}";
5745
+ var styles$6 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO","bounceInLeftMobile":"toaster-module_bounceInLeftMobile__CA2dc"};
5746
+ styleInject(css_248z$7);
5452
5747
 
5453
- let wWidth$1 = window.innerWidth;
5454
5748
  const ToasterType = {
5455
5749
  info: 'info',
5456
5750
  warn: 'warn',
@@ -5467,16 +5761,21 @@ const ToasterPosition = {
5467
5761
  };
5468
5762
  const Toast = ({
5469
5763
  type,
5470
- icon,
5471
- closeIcon,
5764
+ icons,
5765
+ title,
5766
+ timer,
5767
+ propStyles,
5472
5768
  removeToast,
5473
5769
  description,
5474
- timer = 5000,
5475
- position = 'top-right',
5476
- title = 'toaster title'
5770
+ titleStyles,
5771
+ descriptionStyles,
5772
+ position = 'top-right'
5477
5773
  }) => {
5478
5774
  let timeoutCall;
5479
5775
  let timeoutClick;
5776
+ const firstCheck = propStyles.height.replace(/\D/g, '') - 28 < 30 ? 30 : propStyles.height.replace(/\D/g, '') - 28;
5777
+ const secondCheck = propStyles.height.replace(/\D/g, '') - 65 < 18 ? 18 : propStyles.height.replace(/\D/g, '') - 65;
5778
+ const finalCheck = firstCheck + secondCheck + 'px';
5480
5779
  const ref = useRef(null);
5481
5780
  const [showToaster, setShowToaster] = useState(true);
5482
5781
  const handleToasterClick = e => {
@@ -5505,63 +5804,111 @@ const Toast = ({
5505
5804
  style: {
5506
5805
  position: 'absolute',
5507
5806
  display: 'flex',
5508
- width: wWidth$1 > 480 ? '440px' : '300px',
5509
- height: '83px',
5510
- borderRadius: '40px',
5511
5807
  alignItems: 'center',
5512
5808
  boxSizing: 'border-box',
5513
- backgroundColor: '#FFFFFF',
5514
- border: '2px solid #EEEEEE',
5515
- padding: '14px 29px 14px 12px',
5516
- justifyContent: 'space-between'
5809
+ justifyContent: 'space-between',
5810
+ ...propStyles
5517
5811
  },
5518
5812
  className: `
5519
- ${styles$5['notify-block']}
5520
- ${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'] : ''}
5521
- `
5813
+ ${styles$6['notify-block']}
5814
+ ${position === 'top-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'top-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'top-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'bottom-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : ''}
5815
+ `
5522
5816
  }, /*#__PURE__*/React__default.createElement("div", {
5523
5817
  style: {
5524
5818
  display: 'flex',
5525
- width: '60px',
5526
- height: '60px',
5527
- borderRadius: '30px',
5819
+ height: `calc(${propStyles.height} - 28px)`,
5820
+ width: `calc(${propStyles.height} - 28px)`,
5821
+ minWidth: '30px',
5822
+ minHeight: '30px',
5823
+ borderRadius: '50%',
5528
5824
  alignItems: 'center',
5529
5825
  justifyContent: 'center'
5530
5826
  }
5531
- }, type === 'info' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
5827
+ }, type === 'info' ? icons.info ? /*#__PURE__*/React__default.createElement("img", {
5828
+ src: icons.info,
5829
+ alt: "icons",
5532
5830
  style: {
5831
+ width: '100%',
5533
5832
  height: '100%',
5534
- width: 'calc(100% - 90px)'
5833
+ objectFit: 'cover',
5834
+ objectPosition: 'center'
5535
5835
  }
5536
- }, /*#__PURE__*/React__default.createElement("p", {
5836
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? icons.warn ? /*#__PURE__*/React__default.createElement("img", {
5837
+ src: icons.warn,
5838
+ alt: "icons",
5839
+ style: {
5840
+ width: '100%',
5841
+ height: '100%',
5842
+ objectFit: 'cover',
5843
+ objectPosition: 'center'
5844
+ }
5845
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? icons.error ? /*#__PURE__*/React__default.createElement("img", {
5846
+ src: icons.error,
5847
+ alt: "icons",
5848
+ style: {
5849
+ width: '100%',
5850
+ height: '100%',
5851
+ objectFit: 'cover',
5852
+ objectPosition: 'center'
5853
+ }
5854
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? icons.success ? /*#__PURE__*/React__default.createElement("img", {
5855
+ src: icons.success,
5856
+ alt: "icons",
5857
+ style: {
5858
+ width: '100%',
5859
+ height: '100%',
5860
+ objectFit: 'cover',
5861
+ objectPosition: 'center'
5862
+ }
5863
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
5864
+ style: {
5865
+ height: '100%',
5866
+ width: `calc(100% - ${finalCheck})`,
5867
+ minWidth: '50%',
5868
+ maxWidth: 'calc(100% - 90px)'
5869
+ }
5870
+ }, title && /*#__PURE__*/React__default.createElement("p", {
5537
5871
  style: {
5538
5872
  margin: '0px',
5539
- fontWeight: 600,
5540
- color: '#3C393E',
5541
- fontSize: '16px',
5542
- lineHeight: '22px',
5543
- fontStyle: 'normal'
5873
+ color: titleStyles.color,
5874
+ fontSize: titleStyles.font.size,
5875
+ fontStyle: titleStyles.font.style,
5876
+ lineHeight: titleStyles.lineHeight,
5877
+ fontWeight: titleStyles.font.weight,
5878
+ fontFamily: titleStyles.font.family,
5879
+ ...titleStyles.props
5544
5880
  },
5545
- className: styles$5['notify-title']
5546
- }, title ? title : ''), /*#__PURE__*/React__default.createElement("span", {
5881
+ className: styles$6['notify-title']
5882
+ }, title), description && /*#__PURE__*/React__default.createElement("span", {
5547
5883
  style: {
5548
- fontWeight: 500,
5549
- color: '#3C393E',
5550
- fontSize: '12px',
5551
- lineHeight: '16px',
5552
- fontStyle: 'normal',
5553
- fontFamily: '',
5554
- opacity: 0.8
5884
+ color: descriptionStyles.color,
5885
+ fontSize: descriptionStyles.font.size,
5886
+ fontStyle: descriptionStyles.font.style,
5887
+ lineHeight: descriptionStyles.lineHeight,
5888
+ fontWeight: descriptionStyles.font.weight,
5889
+ fontFamily: descriptionStyles.font.family,
5890
+ ...descriptionStyles.props
5555
5891
  },
5556
- className: styles$5['notify-desc']
5557
- }, description ? description : '')), /*#__PURE__*/React__default.createElement("div", {
5892
+ className: styles$6['notify-desc']
5893
+ }, description)), /*#__PURE__*/React__default.createElement("div", {
5558
5894
  onClick: () => handleCloseToaster(ref),
5559
5895
  style: {
5560
- width: '18px',
5561
- height: '18px',
5896
+ width: `calc(${propStyles.height} - 65px)`,
5897
+ height: `calc(${propStyles.height} - 65px)`,
5898
+ minWidth: '18px',
5899
+ minHeight: '18px',
5562
5900
  cursor: 'pointer'
5563
5901
  }
5564
- }, closeIcon ? closeIcon : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
5902
+ }, icons.close ? /*#__PURE__*/React__default.createElement("img", {
5903
+ src: icons.close,
5904
+ alt: "icons",
5905
+ style: {
5906
+ width: '100%',
5907
+ height: '100%',
5908
+ objectFit: 'cover',
5909
+ objectPosition: 'center'
5910
+ }
5911
+ }) : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
5565
5912
  };
5566
5913
  Toast.propTypes = {
5567
5914
  timer: PropTypes.number,
@@ -5574,7 +5921,6 @@ Toast.propTypes = {
5574
5921
 
5575
5922
  let toastify = document.getElementById('toastify');
5576
5923
  let path = window.location.href;
5577
- let wWidth = window.innerWidth;
5578
5924
  const removeToast = ref => {
5579
5925
  if (ref.current) {
5580
5926
  const node = ref.current;
@@ -5590,15 +5936,66 @@ const removeToast = ref => {
5590
5936
  }
5591
5937
  }
5592
5938
  };
5939
+ const createElem$1 = (type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles) => {
5940
+ const projectTitleStyle = styleProps?.title;
5941
+ const packageTitleStyle = innerConfigStyles?.TOASTER?.title;
5942
+ const compareTitleStyles = _.merge({
5943
+ ...packageTitleStyle
5944
+ }, {
5945
+ ...projectTitleStyle
5946
+ });
5947
+ const projectDescStyle = styleProps?.description;
5948
+ const packageDescStyle = innerConfigStyles?.TOASTER?.description;
5949
+ const compareDescStyles = _.merge({
5950
+ ...packageDescStyle
5951
+ }, {
5952
+ ...projectDescStyle
5953
+ });
5954
+ const projectIcons = styleProps?.icons;
5955
+ const packageIcons = innerConfigStyles?.TOASTER?.icons;
5956
+ const icons = _.merge({
5957
+ ...packageIcons
5958
+ }, {
5959
+ ...projectIcons
5960
+ });
5961
+ toastBlock.style.position = 'relative';
5962
+ toastBlock.style.flexShrink = 0;
5963
+ toastBlock.style.width = styleProps?.width ?? innerConfigStyles?.TOASTER?.width;
5964
+ toastBlock.style.height = styleProps?.height ?? innerConfigStyles?.TOASTER?.height;
5965
+ toastBlock.style.marginBottom = styleProps?.marginBottom ?? innerConfigStyles?.TOASTER?.marginBottom;
5966
+ const newElem = /*#__PURE__*/React__default.createElement(Toast, {
5967
+ type,
5968
+ icons,
5969
+ timer,
5970
+ title,
5971
+ position,
5972
+ description,
5973
+ removeToast,
5974
+ propStyles: {
5975
+ width: styleProps?.width ?? innerConfigStyles?.TOASTER?.width,
5976
+ height: styleProps?.height ?? innerConfigStyles?.TOASTER?.height,
5977
+ padding: styleProps?.padding ?? innerConfigStyles?.TOASTER?.padding,
5978
+ borderWidth: styleProps?.borderWidth ?? innerConfigStyles?.TOASTER?.border.width,
5979
+ borderColor: styleProps?.borderColor ?? innerConfigStyles?.TOASTER?.border.color,
5980
+ borderStyle: styleProps?.borderStyle ?? innerConfigStyles?.TOASTER?.border.style,
5981
+ borderRadius: styleProps?.borderRadius ?? innerConfigStyles?.TOASTER?.border.radius,
5982
+ backgroundColor: styleProps?.backgroundColor ?? innerConfigStyles?.TOASTER?.backgroundColor
5983
+ },
5984
+ titleStyles: compareTitleStyles,
5985
+ descriptionStyles: compareDescStyles
5986
+ });
5987
+ const root = ReactDOM.createRoot(toastBlock);
5988
+ root.render(newElem);
5989
+ };
5593
5990
  const createToast = ({
5594
5991
  type,
5595
- icon,
5596
5992
  timer,
5597
5993
  title,
5598
5994
  position,
5599
- iconClose,
5995
+ styleProps,
5600
5996
  description
5601
5997
  }) => {
5998
+ let innerConfigStyles = {};
5602
5999
  let toastParentBlock;
5603
6000
  if (!toastify) {
5604
6001
  toastify = document.createElement('div');
@@ -5606,42 +6003,33 @@ const createToast = ({
5606
6003
  document.body.appendChild(toastify);
5607
6004
  }
5608
6005
  const toastBlock = document.createElement('div');
5609
- toastBlock.style.position = 'relative';
5610
- toastBlock.style.flexShrink = 0;
5611
- toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
5612
- toastBlock.style.height = '83px';
5613
- toastBlock.style.marginBottom = '20px';
5614
- const newElem = /*#__PURE__*/React__default.createElement(Toast, {
5615
- type,
5616
- icon,
5617
- timer,
5618
- title,
5619
- position,
5620
- iconClose,
5621
- description,
5622
- removeToast
6006
+ configStylesPromise.then(data => {
6007
+ innerConfigStyles = {
6008
+ ...data
6009
+ };
6010
+ createElem$1(type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles);
6011
+ }, error => {
6012
+ console.error(error);
5623
6013
  });
5624
- const root = ReactDOM.createRoot(toastBlock);
5625
- root.render(newElem);
5626
- if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
6014
+ if (!document.getElementById(styles$6[position]) || document.getElementById(styles$6[position]) == null) {
5627
6015
  toastParentBlock = document.createElement('div');
5628
6016
  toastParentBlock.style.position = 'fixed';
5629
6017
  toastParentBlock.style.display = 'flex';
5630
6018
  toastParentBlock.style.zIndex = 999999999999;
5631
6019
  toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
5632
- toastParentBlock.setAttribute('id', styles$5[position]);
6020
+ toastParentBlock.setAttribute('id', styles$6[position]);
5633
6021
  toastParentBlock.appendChild(toastBlock);
5634
6022
  toastify.appendChild(toastParentBlock);
5635
6023
  } else {
5636
- document.getElementById(styles$5[position]).appendChild(toastBlock);
6024
+ document.getElementById(styles$6[position]).appendChild(toastBlock);
5637
6025
  }
5638
6026
  };
5639
6027
  const toast = {
5640
6028
  success: (title, props) => {
5641
- // const { icon, timer, position, iconClose, description } = props || {}
5642
6029
  const {
5643
6030
  timer,
5644
6031
  position,
6032
+ styleProps,
5645
6033
  description
5646
6034
  } = props || {};
5647
6035
  createToast({
@@ -5649,16 +6037,15 @@ const toast = {
5649
6037
  type: 'success',
5650
6038
  timer: timer ?? 5000,
5651
6039
  position: position ?? 'top-right',
5652
- description: description ?? ''
5653
- // icon: icon ?? configStyles.TOASTER.icon.success,
5654
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6040
+ description: description ?? '',
6041
+ styleProps: styleProps
5655
6042
  });
5656
6043
  },
5657
6044
  info: (title, props) => {
5658
- // const { icon, timer, position, iconClose, description } = props || {}
5659
6045
  const {
5660
6046
  timer,
5661
6047
  position,
6048
+ styleProps,
5662
6049
  description
5663
6050
  } = props || {};
5664
6051
  createToast({
@@ -5666,16 +6053,15 @@ const toast = {
5666
6053
  type: 'info',
5667
6054
  timer: timer ?? 5000,
5668
6055
  position: position ?? 'top-right',
5669
- description: description ?? ''
5670
- // icon: icon ?? configStyles.TOASTER.icon.info,
5671
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6056
+ description: description ?? '',
6057
+ styleProps: styleProps
5672
6058
  });
5673
6059
  },
5674
6060
  warn: (title, props) => {
5675
- // const { icon, timer, position, iconClose, description } = props || {}
5676
6061
  const {
5677
6062
  timer,
5678
6063
  position,
6064
+ styleProps,
5679
6065
  description
5680
6066
  } = props || {};
5681
6067
  createToast({
@@ -5683,16 +6069,15 @@ const toast = {
5683
6069
  type: 'warn',
5684
6070
  timer: timer ?? 5000,
5685
6071
  position: position ?? 'top-right',
5686
- description: description ?? ''
5687
- // icon: icon ?? configStyles.TOASTER.icon.warn,
5688
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6072
+ description: description ?? '',
6073
+ styleProps: styleProps
5689
6074
  });
5690
6075
  },
5691
6076
  error: (title, props) => {
5692
- // const { icon, timer, position, iconClose, description } = props || {}
5693
6077
  const {
5694
6078
  timer,
5695
6079
  position,
6080
+ styleProps,
5696
6081
  description
5697
6082
  } = props || {};
5698
6083
  createToast({
@@ -5700,16 +6085,12 @@ const toast = {
5700
6085
  type: 'error',
5701
6086
  timer: timer ?? 5000,
5702
6087
  position: position ?? 'top-right',
5703
- description: description ?? ''
5704
- // icon: icon ?? configStyles.TOASTER.icon.error,
5705
- // iconClose: iconClose ?? configStyles.TOASTER.icon.close,
6088
+ description: description ?? '',
6089
+ styleProps: styleProps
5706
6090
  });
5707
6091
  }
5708
6092
  };
5709
- const Toaster = ({
5710
- className
5711
- }) => {
5712
- const [classProps, setClassProps] = useState('');
6093
+ const Toaster = () => {
5713
6094
  const [configStyles, setConfigStyles] = useState({});
5714
6095
  window.addEventListener('popstate', () => {
5715
6096
  if (path !== window.location.href) {
@@ -5726,12 +6107,8 @@ const Toaster = ({
5726
6107
  const handleToasterClick = e => {
5727
6108
  e.stopPropagation();
5728
6109
  };
5729
- useEffect(() => {
5730
- className && setClassProps(() => classnames(className ?? configStyles.TOASTER.className));
5731
- }, [className]);
5732
6110
  useEffect(() => {
5733
6111
  configStylesPromise.then(data => {
5734
- setClassProps(() => classnames(className ?? data.TOASTER.className));
5735
6112
  setConfigStyles(() => {
5736
6113
  return {
5737
6114
  ...data
@@ -5743,7 +6120,6 @@ const Toaster = ({
5743
6120
  }, []);
5744
6121
  return configStyles.TOASTER && /*#__PURE__*/React__default.createElement("div", {
5745
6122
  onClick: handleToasterClick,
5746
- className: classProps,
5747
6123
  id: "toastify"
5748
6124
  });
5749
6125
  };
@@ -5767,10 +6143,24 @@ const SvgTooltip = ({
5767
6143
  fill: fillColor ? fillColor : '#D1D1D1'
5768
6144
  }));
5769
6145
 
5770
- 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}";
5771
- 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"};
5772
- styleInject(css_248z$5);
6146
+ var css_248z$6 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{box-sizing:border-box;padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
6147
+ var styles$5 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
6148
+ styleInject(css_248z$6);
5773
6149
 
6150
+ const TooltipDirections = {
6151
+ TOP: 'top',
6152
+ TOP_LEFT: 'top-left',
6153
+ TOP_RIGHT: 'top-right',
6154
+ LEFT: 'left',
6155
+ LEFT_TOP: 'left-top',
6156
+ LEFT_BOTTOM: 'left-bottom',
6157
+ RIGHT: 'right',
6158
+ RIGHT_TOP: 'right-top',
6159
+ RIGHT_BOTTOM: 'right-bottom',
6160
+ BOTTOM: 'bottom',
6161
+ BOTTOM_TOP: 'bottom-left',
6162
+ BOTTOM_BOTTOM: 'bottom-right'
6163
+ };
5774
6164
  const Tooltip = ({
5775
6165
  text,
5776
6166
  width,
@@ -5778,6 +6168,7 @@ const Tooltip = ({
5778
6168
  height,
5779
6169
  radius,
5780
6170
  fontSize,
6171
+ hoverOpen,
5781
6172
  className,
5782
6173
  fontStyle,
5783
6174
  fontFamily,
@@ -5787,16 +6178,28 @@ const Tooltip = ({
5787
6178
  tooltipRadius,
5788
6179
  backgroundColor,
5789
6180
  tooltipBackgroundColor,
5790
- type = 'top'
6181
+ direction = 'top'
5791
6182
  }) => {
5792
6183
  const tooltipRef = /*#__PURE__*/createRef(null);
6184
+ const iconBlockRef = /*#__PURE__*/createRef(null);
6185
+ const tooltipIconParentRef = /*#__PURE__*/createRef(null);
5793
6186
  const [classProps, setClassProps] = useState({});
5794
6187
  const [configStyles, setConfigStyles] = useState({});
5795
6188
  const [showTooltip, setShowTooltip] = useState(false);
5796
6189
  const [checkTooltipWidth, setCheckTooltipWidth] = useState(0);
5797
6190
  const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
6191
+ const [tooltipIconBlockWidth, setTooltipIconBlockWidth] = useState(0);
6192
+ const [tooltipIconParentWidth, setTooltipIconParentWidth] = useState(0);
6193
+ const [tooltipIconBlockHeight, setTooltipIconBlockHeight] = useState(0);
6194
+ const [tooltipIconParentHeight, setTooltipIconParentHeight] = useState(0);
5798
6195
  const handleShow = () => {
5799
- setShowTooltip(!showTooltip);
6196
+ setShowTooltip(() => !showTooltip);
6197
+ };
6198
+ const handleMouseEnter = () => {
6199
+ setShowTooltip(() => true);
6200
+ };
6201
+ const handleMouseLeave = () => {
6202
+ setShowTooltip(() => false);
5800
6203
  };
5801
6204
  useEffect(() => {
5802
6205
  if (!text) {
@@ -5805,12 +6208,32 @@ const Tooltip = ({
5805
6208
  tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
5806
6209
  tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
5807
6210
  }, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
6211
+ useEffect(() => {
6212
+ tooltipIconParentRef.current && tooltipIconParentRef.current.clientWidth && tooltipIconParentRef.current.clientWidth > 0 && setTooltipIconParentWidth(tooltipIconParentRef.current.clientWidth);
6213
+ tooltipIconParentRef.current && tooltipIconParentRef.current.clientHeight && tooltipIconParentRef.current.clientHeight > 0 && setTooltipIconParentHeight(tooltipIconParentRef.current.clientHeight);
6214
+ }, [tooltipIconParentRef, tooltipIconParentWidth, tooltipIconParentHeight]);
6215
+ useEffect(() => {
6216
+ iconBlockRef.current && iconBlockRef.current.clientWidth && iconBlockRef.current.clientWidth > 0 && setTooltipIconBlockWidth(iconBlockRef.current.clientWidth);
6217
+ iconBlockRef.current && iconBlockRef.current.clientHeight && iconBlockRef.current.clientHeight > 0 && setTooltipIconBlockHeight(iconBlockRef.current.clientHeight);
6218
+ }, [iconBlockRef, tooltipIconParentWidth, tooltipIconParentHeight]);
5808
6219
  useEffect(() => {
5809
6220
  className && setClassProps(() => classnames(className ?? configStyles.TOOLTIP.className));
5810
6221
  }, [className]);
6222
+ useEffect(() => {
6223
+ document.addEventListener('click', () => {
6224
+ if (showTooltip) {
6225
+ handleShow();
6226
+ }
6227
+ }, false);
6228
+ return () => {
6229
+ document.removeEventListener('click', () => {
6230
+ handleShow();
6231
+ }, false);
6232
+ };
6233
+ }, [showTooltip]);
5811
6234
  useEffect(() => {
5812
6235
  configStylesPromise.then(data => {
5813
- setClassProps(() => classnames(styles$4['tooltip-block'], className ?? data.TOOLTIP.className));
6236
+ setClassProps(() => classnames(styles$5['tooltip-block'], className ?? data.TOOLTIP.className));
5814
6237
  setConfigStyles(() => {
5815
6238
  return {
5816
6239
  ...data
@@ -5821,31 +6244,33 @@ const Tooltip = ({
5821
6244
  });
5822
6245
  }, []);
5823
6246
  return configStyles.TOOLTIP && /*#__PURE__*/React__default.createElement("div", {
6247
+ ref: tooltipIconParentRef,
5824
6248
  className: classProps,
5825
6249
  style: {
5826
6250
  width: width ?? configStyles.TOOLTIP.parent.width,
5827
6251
  height: height ?? configStyles.TOOLTIP.parent.height,
5828
6252
  borderRadius: radius ?? configStyles.TOOLTIP.parent.radius,
5829
6253
  backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
5830
- }
6254
+ },
6255
+ onClick: e => e.stopPropagation()
5831
6256
  }, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
5832
6257
  ref: tooltipRef,
5833
- className: `${styles$4['tooltip']}`,
6258
+ className: `${styles$5['tooltip']}`,
5834
6259
  style: {
5835
6260
  width: tooltipWidth ?? configStyles.TOOLTIP.width,
5836
6261
  borderRadius: tooltipRadius ?? configStyles.TOOLTIP.radius,
5837
6262
  backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
5838
- top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
5839
- left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
6263
+ top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? `calc(-${checkTooltipHeight + 7}px)` : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? 'calc(100% + 7px)' : direction === 'left' || direction === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : direction === 'left-top' || direction === 'right-top' ? '0px' : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(-${checkTooltipHeight - tooltipIconParentHeight}px)` : '0px',
6264
+ left: direction === 'top' || direction === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? `-${checkTooltipWidth + 7}px` : direction === 'top-left' || direction === 'bottom-left' ? `0px` : direction === 'top-right' || direction === 'bottom-right' ? `-${checkTooltipWidth - tooltipIconParentWidth}px` : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? 'calc(100% + 7px)' : '0px'
5840
6265
  }
5841
6266
  }, /*#__PURE__*/React__default.createElement("div", {
5842
- className: `${styles$4['tooltip-rel']}`
6267
+ className: `${styles$5['tooltip-rel']}`
5843
6268
  }, /*#__PURE__*/React__default.createElement("div", {
5844
- className: `${styles$4['tooltip-decor']}`,
6269
+ className: `${styles$5['tooltip-decor']}`,
5845
6270
  style: {
5846
6271
  backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
5847
- left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
5848
- top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
6272
+ left: direction === 'top' || direction === 'bottom' ? 'calc(50% - 5px)' : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? '-15px' : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? 'calc(100% + 5px)' : direction === 'top-left' || direction === 'bottom-left' ? `${tooltipIconParentWidth / 2 - tooltipIconBlockWidth}px` : direction === 'top-right' || direction === 'bottom-right' ? `calc(100% - ${tooltipIconParentWidth / 2 - tooltipIconBlockWidth / 2}px` : '0px',
6273
+ top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? 'calc(100% + 5px)' : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? '-15px' : direction === 'right' || direction === 'left' ? 'calc(50% - 5px)' : direction === 'left-top' || direction === 'right-top' ? `${tooltipIconParentHeight / 2 - tooltipIconBlockHeight}px` : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(100% - ${tooltipIconParentHeight / 2 - tooltipIconBlockHeight / 2}px` : '0px'
5849
6274
  }
5850
6275
  }), /*#__PURE__*/React__default.createElement("p", {
5851
6276
  style: {
@@ -5856,18 +6281,22 @@ const Tooltip = ({
5856
6281
  fontWeight: fontWeight ?? configStyles.TOOLTIP.font.weight
5857
6282
  }
5858
6283
  }, text))) : '', /*#__PURE__*/React__default.createElement("div", {
6284
+ ref: iconBlockRef,
6285
+ onClick: hoverOpen ? _ => _ : handleShow,
5859
6286
  style: {
6287
+ display: 'flex',
5860
6288
  cursor: 'pointer'
5861
6289
  },
5862
- onClick: handleShow
6290
+ onMouseEnter: hoverOpen ? handleMouseEnter : _ => _,
6291
+ onMouseLeave: hoverOpen ? handleMouseLeave : _ => _
5863
6292
  }, tooltipIcon ? tooltipIcon : configStyles.TOOLTIP.icon ? configStyles.TOOLTIP.icon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
5864
6293
  };
5865
6294
  Tooltip.propTypes = {
5866
- type: PropTypes.string,
5867
6295
  width: PropTypes.string,
5868
6296
  color: PropTypes.string,
5869
6297
  height: PropTypes.string,
5870
6298
  radius: PropTypes.string,
6299
+ hoverOpen: PropTypes.bool,
5871
6300
  fontSize: PropTypes.string,
5872
6301
  fontStyle: PropTypes.string,
5873
6302
  className: PropTypes.string,
@@ -5878,7 +6307,8 @@ Tooltip.propTypes = {
5878
6307
  tooltipRadius: PropTypes.string,
5879
6308
  text: PropTypes.string.isRequired,
5880
6309
  backgroundColor: PropTypes.string,
5881
- tooltipBackgroundColor: PropTypes.string
6310
+ tooltipBackgroundColor: PropTypes.string,
6311
+ direction: PropTypes.oneOf(Object.values(TooltipDirections))
5882
6312
  };
5883
6313
 
5884
6314
  const SvgCaptchaArrowUp = ({
@@ -5919,9 +6349,9 @@ const SvgCaptchaArrowDown = ({
5919
6349
  fill: fillColor ? fillColor : '#00236A'
5920
6350
  }));
5921
6351
 
5922
- 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}";
5923
- 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"};
5924
- styleInject(css_248z$4);
6352
+ var css_248z$5 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
6353
+ var styles$4 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
6354
+ styleInject(css_248z$5);
5925
6355
 
5926
6356
  const Captcha = ({
5927
6357
  color,
@@ -6009,7 +6439,7 @@ const Captcha = ({
6009
6439
  alignItems: 'center',
6010
6440
  zIndex: 1
6011
6441
  },
6012
- className: styles$3['start-point']
6442
+ className: styles$4['start-point']
6013
6443
  }, /*#__PURE__*/React__default.createElement("div", {
6014
6444
  style: {
6015
6445
  position: 'absolute',
@@ -6035,8 +6465,8 @@ const Captcha = ({
6035
6465
  backgroundColor: 'transparent'
6036
6466
  },
6037
6467
  className: `
6038
- ${styles$3['range']}
6039
- ${+rangeProgress === rangeNumber ? styles$3['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$3['range-error'] : styles$3['range-default']}
6468
+ ${styles$4['range']}
6469
+ ${+rangeProgress === rangeNumber ? styles$4['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$4['range-error'] : styles$4['range-default']}
6040
6470
  `,
6041
6471
  onInput: handleRange
6042
6472
  }), /*#__PURE__*/React__default.createElement("div", {
@@ -6066,9 +6496,9 @@ Captcha.propTypes = {
6066
6496
  getRange: PropTypes.func.isRequired
6067
6497
  };
6068
6498
 
6069
- 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}";
6070
- 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"};
6071
- styleInject(css_248z$3);
6499
+ var css_248z$4 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
6500
+ var styles$3 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
6501
+ styleInject(css_248z$4);
6072
6502
 
6073
6503
  const Stepper = ({
6074
6504
  stepLength,
@@ -6078,11 +6508,11 @@ const Stepper = ({
6078
6508
  const [classProps, setClassProps] = useState({});
6079
6509
  const [configStyles, setConfigStyles] = useState({});
6080
6510
  useEffect(() => {
6081
- className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
6511
+ className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
6082
6512
  }, [className]);
6083
6513
  useEffect(() => {
6084
6514
  configStylesPromise.then(data => {
6085
- setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
6515
+ setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
6086
6516
  setConfigStyles(() => {
6087
6517
  return {
6088
6518
  ...data
@@ -6098,10 +6528,10 @@ const Stepper = ({
6098
6528
  let steppers = [];
6099
6529
  for (let step = 1; step <= stepLength; step++) {
6100
6530
  steppers.push( /*#__PURE__*/React__default.createElement("div", {
6101
- className: classnames(`${step <= activeSteps ? styles$2.activeRing : styles$2.bigRing}`),
6531
+ className: classnames(`${step <= activeSteps ? styles$3.activeRing : styles$3.bigRing}`),
6102
6532
  key: step
6103
6533
  }, /*#__PURE__*/React__default.createElement("div", {
6104
- className: classnames(`${step <= activeSteps ? styles$2.smallActiveRing : styles$2.smallRing}`)
6534
+ className: classnames(`${step <= activeSteps ? styles$3.smallActiveRing : styles$3.smallRing}`)
6105
6535
  }, step <= activeSteps ? step : '')));
6106
6536
  }
6107
6537
  return steppers;
@@ -6231,8 +6661,8 @@ Checkbox.propTypes = {
6231
6661
  data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
6232
6662
  };
6233
6663
 
6234
- 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}";
6235
- styleInject(css_248z$2);
6664
+ var css_248z$3 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
6665
+ styleInject(css_248z$3);
6236
6666
 
6237
6667
  const PositionSide = {
6238
6668
  TOP: 'top',
@@ -6306,10 +6736,12 @@ const Textarea = ({
6306
6736
  if (maxLength) {
6307
6737
  if (value.length > maxLength) {
6308
6738
  onChange(value.substr(0, maxLength));
6739
+ setInnerValue(() => value.substr(0, maxLength));
6309
6740
  }
6310
6741
  } else {
6311
6742
  if (value.length > configStyles.TEXTAREA.maxLength) {
6312
6743
  onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
6744
+ setInnerValue(() => value.substr(0, configStyles.TEXTAREA.maxLength));
6313
6745
  }
6314
6746
  }
6315
6747
  };
@@ -6468,6 +6900,236 @@ Textarea.propTypes = {
6468
6900
  characterCountPosition: PropTypes.oneOf(Object.values(PositionSide))
6469
6901
  };
6470
6902
 
6903
+ const Swipe = ({
6904
+ id,
6905
+ title,
6906
+ child,
6907
+ props,
6908
+ innerConfigStyles
6909
+ }) => {
6910
+ const {
6911
+ SWIPEMODAL
6912
+ } = innerConfigStyles || {};
6913
+ const {
6914
+ width,
6915
+ height,
6916
+ titleStyle,
6917
+ position,
6918
+ borderRadius,
6919
+ callClose,
6920
+ showCloseIcon
6921
+ } = props || {};
6922
+ return /*#__PURE__*/React__default.createElement("div", {
6923
+ style: {
6924
+ width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
6925
+ height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100vh'
6926
+ }
6927
+ }, (title || showCloseIcon) && /*#__PURE__*/React__default.createElement("div", {
6928
+ style: {
6929
+ width: '100%',
6930
+ display: 'flex',
6931
+ minHeight: '40px',
6932
+ alignItems: 'center',
6933
+ boxSizing: 'border-box',
6934
+ justifyContent: title ? 'space-between' : 'flex-end',
6935
+ padding: titleStyle?.padding ?? SWIPEMODAL.titleStyle.padding,
6936
+ maxHeight: titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight
6937
+ }
6938
+ }, title && /*#__PURE__*/React__default.createElement("h1", {
6939
+ style: {
6940
+ color: titleStyle?.color ?? SWIPEMODAL.titleStyle.color,
6941
+ fontSize: titleStyle?.fontSize ?? SWIPEMODAL.titleStyle.font.size,
6942
+ textAlign: titleStyle?.textAlign ?? SWIPEMODAL.titleStyle.textAlign,
6943
+ fontStyle: titleStyle?.fontStyle ?? SWIPEMODAL.titleStyle.font.style,
6944
+ fontWeight: titleStyle?.fontWeight ?? SWIPEMODAL.titleStyle.font.weight,
6945
+ fontFamily: titleStyle?.fontFamily ?? SWIPEMODAL.titleStyle.font.family
6946
+ }
6947
+ }, title), showCloseIcon && /*#__PURE__*/React__default.createElement("div", {
6948
+ style: {
6949
+ width: '24px',
6950
+ height: '24px',
6951
+ maxWidth: '24px',
6952
+ maxHeight: '24px',
6953
+ cursor: 'pointer'
6954
+ },
6955
+ onClick: hasOwnerProperty(props, 'callClose') && {}.toString.call(callClose) === '[object Function]' ? () => callClose(id) : _ => _
6956
+ }, /*#__PURE__*/React__default.createElement("img", {
6957
+ alt: "close",
6958
+ src: hasOwnerProperty(props, 'closeIcon') && typeof props.closeIcon === 'string' ? props.closeIcon : SWIPEMODAL.closeIcon,
6959
+ style: {
6960
+ width: '100%',
6961
+ height: '100%',
6962
+ objectFit: 'contain',
6963
+ objectPosition: 'center'
6964
+ }
6965
+ }))), child && /*#__PURE__*/React__default.createElement("div", {
6966
+ style: {
6967
+ width: '100%',
6968
+ height: '100%',
6969
+ overflowY: 'auto',
6970
+ overflowX: 'hidden',
6971
+ maxHeight: `calc(100% - ${titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight})`,
6972
+ borderTopLeftRadius: position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
6973
+ borderTopRightRadius: position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
6974
+ borderBottomLeftRadius: position === 'right' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
6975
+ borderBottomRightRadius: position === 'left' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius
6976
+ }
6977
+ }, child));
6978
+ };
6979
+
6980
+ var css_248z$2 = ".swipe-module_to-top__lrHfG{bottom:0}.swipe-module_to-left__kgLsE{right:0}.swipe-module_to-right__Xu3Ul{left:0}.swipe-module_to-bottom__94M7H{top:0}.swipe-module_visible__---aC{visibility:visible!important}.swipe-module_swipe-block__Yv1B3{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.swipe-module_move-top__m6t2O{-webkit-animation-name:swipe-module_slideTop__-Bbap;animation-name:swipe-module_slideTop__-Bbap}.swipe-module_move-left__4TDLs{-webkit-animation-name:swipe-module_slideLeft__i24cS;animation-name:swipe-module_slideLeft__i24cS}.swipe-module_move-right__FrYo0{-webkit-animation-name:swipe-module_slideRight__swgSY;animation-name:swipe-module_slideRight__swgSY}.swipe-module_move-bottom__eYDx6{-webkit-animation-name:swipe-module_slideBottom__TBoZo;animation-name:swipe-module_slideBottom__TBoZo}.swipe-module_back-top__gJZv0{-webkit-animation-name:swipe-module_backTop__32loc;animation-name:swipe-module_backTop__32loc}.swipe-module_back-left__Wd3aY{-webkit-animation-name:swipe-module_backLeft__q89ub;animation-name:swipe-module_backLeft__q89ub}.swipe-module_back-right__Lgwz7{-webkit-animation-name:swipe-module_backRight__8t5Dm;animation-name:swipe-module_backRight__8t5Dm}.swipe-module_back-bottom__JRN-7{-webkit-animation-name:swipe-module_backBottom__lwR8B;animation-name:swipe-module_backBottom__lwR8B}@keyframes swipe-module_slideTop__-Bbap{0%{bottom:-100%}to{bottom:0}}@keyframes swipe-module_slideLeft__i24cS{0%{right:-100%}to{right:0}}@keyframes swipe-module_slideRight__swgSY{0%{left:-100%}to{left:0}}@keyframes swipe-module_slideBottom__TBoZo{0%{top:-100%}to{top:0}}@keyframes swipe-module_backTop__32loc{0%{bottom:0}to{bottom:-100%}}@keyframes swipe-module_backLeft__q89ub{0%{right:0}to{right:-100%}}@keyframes swipe-module_backRight__8t5Dm{0%{left:0}to{left:-100%}}@keyframes swipe-module_backBottom__lwR8B{0%{top:0}to{top:-100%}}";
6981
+ var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","slideTop":"swipe-module_slideTop__-Bbap","move-left":"swipe-module_move-left__4TDLs","slideLeft":"swipe-module_slideLeft__i24cS","move-right":"swipe-module_move-right__FrYo0","slideRight":"swipe-module_slideRight__swgSY","move-bottom":"swipe-module_move-bottom__eYDx6","slideBottom":"swipe-module_slideBottom__TBoZo","back-top":"swipe-module_back-top__gJZv0","backTop":"swipe-module_backTop__32loc","back-left":"swipe-module_back-left__Wd3aY","backLeft":"swipe-module_backLeft__q89ub","back-right":"swipe-module_back-right__Lgwz7","backRight":"swipe-module_backRight__8t5Dm","back-bottom":"swipe-module_back-bottom__JRN-7","backBottom":"swipe-module_backBottom__lwR8B"};
6982
+ styleInject(css_248z$2);
6983
+
6984
+ let swipeCount = 0;
6985
+ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
6986
+ const {
6987
+ width,
6988
+ height,
6989
+ position = 'left',
6990
+ animation,
6991
+ borderRadius,
6992
+ backgroundColor
6993
+ } = props || {};
6994
+ swipeBlock.style.position = 'fixed';
6995
+ swipeBlock.style.zIndex = swipeCount;
6996
+ swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
6997
+ swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
6998
+ swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100vh';
6999
+ swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7000
+ swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7001
+ swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7002
+ swipeBlock.style.borderBottomRightRadius = position === 'left' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
7003
+ swipeBlock.setAttribute('id', id);
7004
+ swipeBlock.setAttribute('closePos', position);
7005
+ swipeBlock.classList.add(styles$2['swipe-block'], position === 'top' ? styles$2['to-top'] : position === 'bottom' ? styles$2['to-bottom'] : position === 'left' ? styles$2['to-left'] : styles$2['to-right']);
7006
+ if (hasOwnerProperty(props, 'animation') && animation === true) {
7007
+ swipeBlock.setAttribute('anime', animation);
7008
+ swipeBlock.classList.add(position === 'top' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-top'] : ''}` : position === 'bottom' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-bottom'] : ''}` : position === 'left' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-left'] : ''}` : `${hasOwnerProperty(props, 'animation') && props.animation === true ? styles$2['move-right'] : ''}`);
7009
+ }
7010
+ const newElem = /*#__PURE__*/React__default.createElement(Swipe, {
7011
+ id,
7012
+ title,
7013
+ child,
7014
+ props,
7015
+ innerConfigStyles
7016
+ });
7017
+ const root = ReactDOM.createRoot(swipeBlock);
7018
+ root.render(newElem);
7019
+ };
7020
+ const createSwipe = (id, title, child, props, swipable) => {
7021
+ let innerConfigStyles = {};
7022
+ const swipeBlock = document.createElement('div');
7023
+ swipeBlock.addEventListener('click', function (e) {
7024
+ e.stopPropagation();
7025
+ });
7026
+ configStylesPromise.then(data => {
7027
+ innerConfigStyles = {
7028
+ ...data
7029
+ };
7030
+ createElem(id, title, child, props, swipeBlock, innerConfigStyles);
7031
+ if (!swipable) {
7032
+ const widthParent = hasOwnerProperty(props, 'withParent') ? props.withParent === true ? true : false : innerConfigStyles.SWIPEMODAL.withParent;
7033
+ swipable = document.createElement('div');
7034
+ swipable.setAttribute('id', 'swipable');
7035
+ swipable.style.position = 'fixed';
7036
+ swipable.style.top = '0px';
7037
+ swipable.style.left = '0px';
7038
+ swipable.style.zIndex = 99999;
7039
+ swipable.style.maxWidth = '100%';
7040
+ swipable.style.maxHeight = '100vh';
7041
+ swipable.style.visibility = 'hidden';
7042
+ swipable.style.width = widthParent ? '100%' : '0px';
7043
+ swipable.style.height = widthParent ? '100vh' : '0px';
7044
+ swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
7045
+ swipable.classList.add(styles$2['visible']);
7046
+ if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
7047
+ swipable.addEventListener('click', function () {
7048
+ hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
7049
+ });
7050
+ }
7051
+ document.body.appendChild(swipable);
7052
+ }
7053
+ swipable.appendChild(swipeBlock);
7054
+ }, error => {
7055
+ console.error(error);
7056
+ });
7057
+ };
7058
+
7059
+ // Function to handle removing the element on navigation change
7060
+ const handleNavigationChange = () => {
7061
+ let swipable = document.getElementById('swipable');
7062
+ if (swipable) {
7063
+ swipable.remove();
7064
+ }
7065
+ };
7066
+
7067
+ // Wrap history methods to detect all navigation changes
7068
+ (function (history) {
7069
+ const pushState = history.pushState;
7070
+ const replaceState = history.replaceState;
7071
+ history.pushState = function (state) {
7072
+ const result = pushState.apply(history, arguments);
7073
+ window.dispatchEvent(new Event('navigationchange'));
7074
+ return result;
7075
+ };
7076
+ history.replaceState = function (state) {
7077
+ const result = replaceState.apply(history, arguments);
7078
+ window.dispatchEvent(new Event('navigationchange'));
7079
+ return result;
7080
+ };
7081
+ })(window.history);
7082
+ const swipe = {
7083
+ open: (title = '', id, child, props) => {
7084
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
7085
+ alert('Please pass valid id prop (string / number) when call swipe.open function');
7086
+ return;
7087
+ }
7088
+ if (swipeCount === 0) {
7089
+ window.addEventListener('popstate', handleNavigationChange);
7090
+ window.addEventListener('navigationchange', handleNavigationChange);
7091
+ }
7092
+ let swipable = document.getElementById('swipable');
7093
+ swipeCount += 1;
7094
+ createSwipe(id, title, child, props, swipable);
7095
+ return Promise.resolve(id);
7096
+ },
7097
+ close: id => {
7098
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
7099
+ alert('Please pass valid id prop (string / number) when call swipe.close function');
7100
+ return;
7101
+ }
7102
+ let swipable = document.getElementById('swipable');
7103
+ swipeCount -= 1;
7104
+ const removable = document.getElementById(id);
7105
+ if (swipable && removable) {
7106
+ const animation = removable.getAttribute('anime');
7107
+ const position = removable.getAttribute('closePos');
7108
+ if (animation) {
7109
+ removable.classList.add(position === 'top' ? styles$2['back-top'] : position === 'left' ? styles$2['back-left'] : position === 'right' ? styles$2['back-right'] : styles$2['back-bottom']);
7110
+ setTimeout(() => {
7111
+ swipable.removeChild(removable);
7112
+ if (swipeCount === 0 && swipable) {
7113
+ window.removeEventListener('popstate', handleNavigationChange);
7114
+ window.removeEventListener('navigationchange', handleNavigationChange);
7115
+ document.body.removeChild(swipable);
7116
+ }
7117
+ }, 200);
7118
+ } else {
7119
+ swipable.removeChild(removable);
7120
+ if (swipeCount === 0 && swipable) {
7121
+ window.removeEventListener('popstate', handleNavigationChange);
7122
+ window.removeEventListener('navigationchange', handleNavigationChange);
7123
+ document.body.removeChild(swipable);
7124
+ }
7125
+ }
7126
+ }
7127
+ }
7128
+ };
7129
+ const SwipeModal = () => {
7130
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
7131
+ };
7132
+
6471
7133
  const TypographyType = {
6472
7134
  p: 'p',
6473
7135
  h1: 'h1',
@@ -7254,4 +7916,4 @@ Autocomplete.propTypes = {
7254
7916
  backgroundDisableColor: PropTypes.string
7255
7917
  };
7256
7918
 
7257
- export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
7919
+ export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, IconSides, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, SwipeModal, Table, Textarea, Toaster, Tooltip, TooltipDirections, Typography, TypographyType, swipe, toast };