@xaypay/tui 0.2.24 → 0.2.26

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
@@ -595,7 +595,7 @@ var packageResult = {
595
595
  ...fontObject
596
596
  },
597
597
  label: {
598
- dots: false,
598
+ useTooltip: false,
599
599
  color: presetColors.dark,
600
600
  display: 'block',
601
601
  lineHeight: '22px',
@@ -603,6 +603,15 @@ var packageResult = {
603
603
  marginBottom: '6px',
604
604
  font: {
605
605
  ...fontObject
606
+ },
607
+ tooltip: {
608
+ color: '#fff',
609
+ padding: '12px',
610
+ borderRadius: '8px',
611
+ font: {
612
+ ...fontObject
613
+ },
614
+ backgroundColor: '#000'
606
615
  }
607
616
  },
608
617
  error: {
@@ -633,6 +642,10 @@ var packageResult = {
633
642
  hover: presetColors.dark
634
643
  }
635
644
  }
645
+ },
646
+ icon: {
647
+ // comment here for example,
648
+ // required: React.createElement(SvgChecked, { fill: 'green' }),
636
649
  }
637
650
  },
638
651
  // default properties for <Tooltip /> component
@@ -775,6 +788,7 @@ var packageResult = {
775
788
  shadowHover: `0 0 0 2px ${presetColors.dark}` // like border
776
789
  },
777
790
  label: {
791
+ useTooltip: false,
778
792
  color: presetColors.dark,
779
793
  display: 'block',
780
794
  lineHeight: '22px',
@@ -782,6 +796,15 @@ var packageResult = {
782
796
  textTransform: 'none',
783
797
  font: {
784
798
  ...fontObject
799
+ },
800
+ tooltip: {
801
+ color: '#fff',
802
+ padding: '12px',
803
+ borderRadius: '8px',
804
+ font: {
805
+ ...fontObject
806
+ },
807
+ backgroundColor: '#000'
785
808
  }
786
809
  },
787
810
  selected: {
@@ -842,6 +865,10 @@ var packageResult = {
842
865
  font: {
843
866
  ...fontObject
844
867
  }
868
+ },
869
+ icon: {
870
+ // comment here for example,
871
+ // required: React.createElement(SvgChecked, { fill: 'green' }),
845
872
  }
846
873
  },
847
874
  // default properties for <Textarea /> component
@@ -873,11 +900,21 @@ var packageResult = {
873
900
  background: 'white'
874
901
  },
875
902
  label: {
903
+ useTooltip: false,
876
904
  color: presetColors.dark,
877
905
  display: 'block',
878
906
  marginBottom: '10px',
879
907
  font: {
880
908
  ...fontObject
909
+ },
910
+ tooltip: {
911
+ color: '#fff',
912
+ padding: '12px',
913
+ borderRadius: '8px',
914
+ font: {
915
+ ...fontObject
916
+ },
917
+ backgroundColor: '#000'
881
918
  }
882
919
  },
883
920
  font: {
@@ -892,6 +929,10 @@ var packageResult = {
892
929
  font: {
893
930
  ...fontObject
894
931
  }
932
+ },
933
+ icon: {
934
+ // comment here for example,
935
+ // required: React.createElement(SvgChecked, { fill: 'green' }),
895
936
  }
896
937
  },
897
938
  // default properties for <NewAutocomplete /> component
@@ -928,6 +969,7 @@ var packageResult = {
928
969
  backgroundDisable: presetColors.secondary
929
970
  },
930
971
  label: {
972
+ useTooltip: false,
931
973
  color: presetColors.dark,
932
974
  display: 'block',
933
975
  lineHeight: '22px',
@@ -935,6 +977,15 @@ var packageResult = {
935
977
  textTransform: 'none',
936
978
  font: {
937
979
  ...fontObject
980
+ },
981
+ tooltip: {
982
+ color: '#fff',
983
+ padding: '12px',
984
+ borderRadius: '8px',
985
+ font: {
986
+ ...fontObject
987
+ },
988
+ backgroundColor: '#000'
938
989
  }
939
990
  },
940
991
  contentBottom: {
@@ -1025,6 +1076,8 @@ var packageResult = {
1025
1076
  sizeText: 'Առավելագույնը',
1026
1077
  timeForRemoveError: 4000,
1027
1078
  extentionsRowMarginTop: '40px',
1079
+ extentionsTextColor: 'black',
1080
+ extentionsTextDots: false,
1028
1081
  border: {
1029
1082
  width: '2px',
1030
1083
  style: 'dashed',
@@ -1038,6 +1091,9 @@ var packageResult = {
1038
1091
  backgroundHidden: 'rgba(60, 57, 62, 0.4)'
1039
1092
  },
1040
1093
  label: {
1094
+ showMore: false,
1095
+ useTooltip: false,
1096
+ showMoreTextColor: '#2C46C1',
1041
1097
  color: '#4A4A4D',
1042
1098
  font: {
1043
1099
  ...fontObject
@@ -1132,6 +1188,7 @@ var packageResult = {
1132
1188
  maxHeight: '95vh',
1133
1189
  minHeight: '200px',
1134
1190
  radius: '14px',
1191
+ noScroll: false,
1135
1192
  padding: '20px 20px 20px',
1136
1193
  className: '',
1137
1194
  alignItems: 'center',
@@ -1186,6 +1243,7 @@ var packageResult = {
1186
1243
  SWIPEMODAL: {
1187
1244
  width: '300px',
1188
1245
  height: '100vh',
1246
+ noScroll: false,
1189
1247
  titleStyle: {
1190
1248
  color: '#1C212D',
1191
1249
  textAlign: 'left',
@@ -1764,9 +1822,9 @@ function styleInject(css, ref) {
1764
1822
  }
1765
1823
  }
1766
1824
 
1767
- var css_248z$d = ".file-module_small-file-component__nlpcW>svg{max-height:77%!important}.file-module_file-label__uscgT{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-module_tooltip__FjCUU{background-color:#333;border-radius:4px;color:#fff;font-size:14px;pointer-events:none;position:fixed;visibility:hidden;white-space:nowrap;z-index:1000}";
1768
- var styles$b = {"small-file-component":"file-module_small-file-component__nlpcW","file-label":"file-module_file-label__uscgT","tooltip":"file-module_tooltip__FjCUU"};
1769
- styleInject(css_248z$d);
1825
+ var css_248z$c = ".file-module_small-file-component__nlpcW>svg{max-height:77%!important}.file-module_show-more-text__WIGLx{align-self:self-end;cursor:pointer}";
1826
+ var styles$b = {"small-file-component":"file-module_small-file-component__nlpcW","show-more-text":"file-module_show-more-text__WIGLx"};
1827
+ styleInject(css_248z$c);
1770
1828
 
1771
1829
  // eslint-disable-next-line react/display-name
1772
1830
  const File = /*#__PURE__*/forwardRef(({
@@ -1774,7 +1832,6 @@ const File = /*#__PURE__*/forwardRef(({
1774
1832
  size,
1775
1833
  name,
1776
1834
  color,
1777
- label,
1778
1835
  style,
1779
1836
  weight,
1780
1837
  family,
@@ -1794,10 +1851,17 @@ const File = /*#__PURE__*/forwardRef(({
1794
1851
  errorStyle,
1795
1852
  errorWeight,
1796
1853
  errorFamily,
1854
+ label,
1797
1855
  labelSize,
1856
+ labelColor,
1798
1857
  labelStyle,
1799
1858
  labelWeight,
1800
1859
  labelFamily,
1860
+ lableShowMore,
1861
+ labelShowLessText,
1862
+ labelShowMoreText,
1863
+ showMoreTextColor,
1864
+ useLabelTooltip,
1801
1865
  labelTooltipColor,
1802
1866
  labelTooltipPadding,
1803
1867
  labelTooltipFontSize,
@@ -1807,7 +1871,6 @@ const File = /*#__PURE__*/forwardRef(({
1807
1871
  labelTooltipBorderRadius,
1808
1872
  labelTooltipBackgroundColor,
1809
1873
  removeFile,
1810
- labelColor,
1811
1874
  errorColor,
1812
1875
  filesArray,
1813
1876
  componentId,
@@ -1876,6 +1939,8 @@ const File = /*#__PURE__*/forwardRef(({
1876
1939
  maxCHoosenLengthErrorHideTime,
1877
1940
  textAlignLeftInSmallComponent,
1878
1941
  showPreviewIconInSmallComponent,
1942
+ extentionsTextDots,
1943
+ extentionsTextColor,
1879
1944
  maxSize = 10,
1880
1945
  preview = true,
1881
1946
  timeForRemoveError = 5000,
@@ -1883,11 +1948,12 @@ const File = /*#__PURE__*/forwardRef(({
1883
1948
  }, ref) => {
1884
1949
  const inpRef = useRef(null);
1885
1950
  const labelRef = useRef(null);
1886
- const parentlRef = useRef(null);
1951
+ const parentRef = useRef(null);
1887
1952
  const memoizedItems = useMemo(() => filesArray, [filesArray]);
1888
1953
  const [error, setError] = useState('');
1889
- const [isHover, setIsHover] = useState(false);
1890
1954
  const [removeID, setRemoveID] = useState('');
1955
+ const [isHover, setIsHover] = useState(false);
1956
+ const [showMore, setShowMore] = useState(false);
1891
1957
  const [classProps, setClassProps] = useState({});
1892
1958
  const [singleFile, setSingleFile] = useState(null);
1893
1959
  const [configStyles, setConfigStyles] = useState({});
@@ -2182,7 +2248,7 @@ const File = /*#__PURE__*/forwardRef(({
2182
2248
  event.preventDefault();
2183
2249
  setRemoveID(() => v4());
2184
2250
  if (labelRef.current) {
2185
- const parentElem = parentlRef.current.getBoundingClientRect();
2251
+ const parentElem = parentRef.current.getBoundingClientRect();
2186
2252
  const rect = labelRef.current.getBoundingClientRect();
2187
2253
  const top = rect.top;
2188
2254
  const left = rect.left;
@@ -2243,6 +2309,21 @@ const File = /*#__PURE__*/forwardRef(({
2243
2309
  }
2244
2310
  setRemoveID(() => '');
2245
2311
  };
2312
+ const handleCheckTextWidth = () => {
2313
+ if (labelRef.current) {
2314
+ const rect = labelRef.current.getBoundingClientRect();
2315
+ const elementWidth = rect.width;
2316
+ const textWidth = getRenderedTextWidth(labelRef.current);
2317
+ if (textWidth > Math.ceil(elementWidth)) {
2318
+ return 'more';
2319
+ } else {
2320
+ return 'less';
2321
+ }
2322
+ }
2323
+ };
2324
+ const handleChangeShowMore = () => {
2325
+ setShowMore(() => !showMore);
2326
+ };
2246
2327
  useImperativeHandle(ref, () => ({
2247
2328
  handleReset() {
2248
2329
  setError('');
@@ -2298,6 +2379,15 @@ const File = /*#__PURE__*/forwardRef(({
2298
2379
  useEffect(() => {
2299
2380
  className && setClassProps(() => classnames(className ?? configStyles.FILE.className));
2300
2381
  }, [className]);
2382
+ useEffect(() => {
2383
+ if ((useLabelTooltip || configStyles.FILE?.label?.useTooltip) && (lableShowMore || configStyles.FILE?.label?.showMore)) {
2384
+ alert(`
2385
+ Please use one of this props or config,
2386
+ use ( useLabelTooltip / configStyles.FILE.label.useTooltip )
2387
+ or ( lableShowMore / configStyles.FILE.label.showMore )
2388
+ `);
2389
+ }
2390
+ }, [lableShowMore, useLabelTooltip, configStyles.FILE?.label?.useTooltip, configStyles.FILE?.label?.showMore]);
2301
2391
  useEffect(() => {
2302
2392
  configStylesPromise.then(data => {
2303
2393
  setClassProps(() => classnames(className ?? data.FILE.className));
@@ -2315,9 +2405,8 @@ const File = /*#__PURE__*/forwardRef(({
2315
2405
  }
2316
2406
  };
2317
2407
  }, []);
2318
- console.log(image, ' - - - -image');
2319
2408
  return configStyles.FILE && /*#__PURE__*/React__default.createElement("div", {
2320
- ref: parentlRef,
2409
+ ref: parentRef,
2321
2410
  style: {
2322
2411
  width: '100%',
2323
2412
  maxWidth: maxWidth ?? configStyles.FILE.maxWidth
@@ -2328,30 +2417,43 @@ const File = /*#__PURE__*/forwardRef(({
2328
2417
  display: 'flex',
2329
2418
  marginBottom: '6px',
2330
2419
  alignItems: 'center',
2331
- justifyContent: label ? 'space-between' : 'flex-end'
2420
+ justifyContent: label ? 'space-between' : 'flex-end',
2421
+ width: deleteComponent && useLabelTooltip && handleCheckTextWidth() === 'more' ? 'calc(100% - 26px)' : '100%'
2332
2422
  }
2333
2423
  }, label && /*#__PURE__*/React__default.createElement("div", {
2334
2424
  style: {
2335
2425
  display: 'flex',
2336
2426
  maxWidth: '100%',
2337
- width: 'fit-content',
2338
2427
  columnGap: '4px',
2428
+ width: 'fit-content',
2339
2429
  justifyContent: 'flex-start'
2340
2430
  }
2341
2431
  }, /*#__PURE__*/React__default.createElement("label", {
2342
2432
  ref: labelRef,
2343
- className: styles$b['file-label'],
2344
2433
  style: {
2345
2434
  width: '100%',
2346
2435
  color: labelColor ?? configStyles.FILE.label.color,
2347
2436
  fontSize: labelSize ?? configStyles.FILE.label.font.size,
2348
2437
  fontStyle: labelStyle ?? configStyles.FILE.label.font.style,
2349
2438
  fontWeight: labelWeight ?? configStyles.FILE.label.font.weight,
2350
- fontFamily: labelFamily ?? configStyles.FILE.label.font.family
2439
+ fontFamily: labelFamily ?? configStyles.FILE.label.font.family,
2440
+ whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'nowrap' : 'normal',
2441
+ overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'hidden' : 'visible',
2442
+ textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'ellipsis' : ''
2443
+ },
2444
+ onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) && !lableShowMore && !configStyles.FILE.label.showMore ? handleLabelMouseEnter : _ => _,
2445
+ onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) && !lableShowMore && !configStyles.FILE.label.showMore ? handleLabelMouseLeave : _ => _
2446
+ }, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), lableShowMore || configStyles.FILE.label.showMore ? /*#__PURE__*/React__default.createElement("span", {
2447
+ className: styles$b['show-more-text'],
2448
+ style: {
2449
+ fontSize: labelSize ?? configStyles.FILE.label.font.size,
2450
+ fontStyle: labelStyle ?? configStyles.FILE.label.font.style,
2451
+ fontWeight: labelWeight ?? configStyles.FILE.label.font.weight,
2452
+ fontFamily: labelFamily ?? configStyles.FILE.label.font.family,
2453
+ color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
2351
2454
  },
2352
- onMouseEnter: handleLabelMouseEnter,
2353
- onMouseLeave: handleLabelMouseLeave
2354
- }, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
2455
+ onClick: handleChangeShowMore
2456
+ }, showMore ? labelShowLessText ? labelShowLessText : '' : labelShowMoreText ? labelShowMoreText : '') : ''), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
2355
2457
  style: {
2356
2458
  cursor: 'pointer'
2357
2459
  },
@@ -2421,14 +2523,23 @@ const File = /*#__PURE__*/forwardRef(({
2421
2523
  }
2422
2524
  }, upload ?? configStyles.FILE.upload))), /*#__PURE__*/React__default.createElement("div", {
2423
2525
  style: {
2526
+ maxWidth: '100%',
2424
2527
  marginTop: extentionsRowMarginTop ?? configStyles.FILE.extentionsRowMarginTop
2425
2528
  }
2426
2529
  }, /*#__PURE__*/React__default.createElement("p", {
2427
2530
  style: {
2428
2531
  margin: '0px',
2429
- padding: '0px 10px'
2532
+ padding: '0px 10px',
2533
+ color: color ?? configStyles.FILE.color,
2534
+ whiteSpace: extentionsTextDots || configStyles.FILE.extentionsTextDots ? 'nowrap' : 'normal',
2535
+ overflow: extentionsTextDots || configStyles.FILE.extentionsTextDots ? 'hidden' : 'visible',
2536
+ textOverflow: extentionsTextDots || configStyles.FILE.extentionsTextDots ? 'ellipsis' : ''
2537
+ }
2538
+ }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532", /*#__PURE__*/React__default.createElement("span", {
2539
+ style: {
2540
+ color: extentionsTextColor ?? configStyles.FILE.extentionsTextColor
2430
2541
  }
2431
- }, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2542
+ }, "(", ' ', " ", fileExtensions.toString().split(',').join(', '), ")"))))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2432
2543
  className: styles$b['small-file-component'],
2433
2544
  style: {
2434
2545
  width: '100%',
@@ -2467,12 +2578,17 @@ const File = /*#__PURE__*/forwardRef(({
2467
2578
  }), /*#__PURE__*/React__default.createElement("p", {
2468
2579
  style: {
2469
2580
  margin: '0px',
2470
- marginLeft: '5px',
2471
- overflow: 'hidden',
2472
- whiteSpace: 'nowrap',
2473
- textOverflow: 'ellipsis'
2581
+ padding: '0px 10px',
2582
+ color: color ?? configStyles.FILE.color,
2583
+ whiteSpace: extentionsTextDots || configStyles.FILE.extentionsTextDots ? 'nowrap' : 'normal',
2584
+ overflow: extentionsTextDots || configStyles.FILE.extentionsTextDots ? 'hidden' : 'visible',
2585
+ textOverflow: extentionsTextDots || configStyles.FILE.extentionsTextDots ? 'ellipsis' : ''
2586
+ }
2587
+ }, singleFile && singleFile[`${0}`] ? singleFile[`${0}`].name : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532", /*#__PURE__*/React__default.createElement("span", {
2588
+ style: {
2589
+ color: extentionsTextColor ?? configStyles.FILE.extentionsTextColor
2474
2590
  }
2475
- }, singleFile && singleFile[`${0}`] ? singleFile[`${0}`].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
2591
+ }, "(", ' ', " ", fileExtensions.toString().split(',').join(', '), ")")))))), /*#__PURE__*/React__default.createElement("div", {
2476
2592
  style: {
2477
2593
  position: 'absolute',
2478
2594
  top: '0px',
@@ -2580,6 +2696,11 @@ File.propTypes = {
2580
2696
  labelWeight: PropTypes.string,
2581
2697
  labelFamily: PropTypes.string,
2582
2698
  labelColor: PropTypes.string,
2699
+ lableShowMore: PropTypes.bool,
2700
+ labelShowLessText: PropTypes.string,
2701
+ labelShowMoreText: PropTypes.string,
2702
+ showMoreTextColor: PropTypes.string,
2703
+ useLabelTooltip: PropTypes.bool,
2583
2704
  labelTooltipColor: PropTypes.string,
2584
2705
  labelTooltipPadding: PropTypes.string,
2585
2706
  labelTooltipFontSize: PropTypes.string,
@@ -2657,7 +2778,9 @@ File.propTypes = {
2657
2778
  filesArray: PropTypes.arrayOf(PropTypes.object),
2658
2779
  textAlignLeftInSmallComponent: PropTypes.bool,
2659
2780
  showPreviewIconInSmallComponent: PropTypes.bool,
2660
- fileExtensions: PropTypes.arrayOf(PropTypes.string)
2781
+ fileExtensions: PropTypes.arrayOf(PropTypes.string),
2782
+ extentionsTextDots: PropTypes.bool,
2783
+ extentionsTextColor: PropTypes.string
2661
2784
  };
2662
2785
 
2663
2786
  const hasOwnerProperty = (object, property) => {
@@ -2921,9 +3044,9 @@ SingleCheckbox.propTypes = {
2921
3044
  ignoreDisabledForChecked: PropTypes.bool
2922
3045
  };
2923
3046
 
2924
- var css_248z$c = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{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}.table-module_no-tabel-data__6xp3N{align-items:center;display:flex;height:200px;justify-content:center;width:100%}";
3047
+ 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}.table-module_no-tabel-data__6xp3N{align-items:center;display:flex;height:200px;justify-content:center;width:100%}";
2925
3048
  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","no-tabel-data":"table-module_no-tabel-data__6xp3N"};
2926
- styleInject(css_248z$c);
3049
+ styleInject(css_248z$b);
2927
3050
 
2928
3051
  /* eslint-disable no-prototype-builtins */
2929
3052
  const TH = ({
@@ -4209,7 +4332,7 @@ const Table = ({
4209
4332
  }, body.map((item, index) => {
4210
4333
  return /*#__PURE__*/React__default.createElement("tr", {
4211
4334
  onDragOver: e => e.preventDefault(),
4212
- onDrop: e => handleDrop(e, index),
4335
+ onDrop: draggable ? e => handleDrop(e, index) : _ => _,
4213
4336
  key: `${item}_${index}`,
4214
4337
  style: {
4215
4338
  backgroundColor: tableRowBGColor ?? configStyles.TABLE.body.row.colors.background,
@@ -4222,12 +4345,12 @@ const Table = ({
4222
4345
  return /*#__PURE__*/React__default.createElement(TD, {
4223
4346
  index: index,
4224
4347
  item: innerItem,
4225
- dragged: handleDrag,
4348
+ dragged: draggable ? handleDrag : _ => _,
4226
4349
  hideBorder: hideBorder,
4227
4350
  innerIndex: innerIndex,
4228
- dragEnd: handleDragEnd,
4351
+ dragEnd: draggable ? handleDragEnd : _ => _,
4229
4352
  row: Object.values(item),
4230
- dragStart: handleDragStart,
4353
+ dragStart: draggable ? handleDragStart : _ => _,
4231
4354
  id: item.id ? item.id : '',
4232
4355
  handleCheckDots: handleCheckDots,
4233
4356
  key: `${innerItem}_${index}_${innerIndex}`,
@@ -4279,11 +4402,11 @@ const Table = ({
4279
4402
  }, draggedItem.map((innerItem, innerIndex) => {
4280
4403
  return /*#__PURE__*/React__default.createElement(TD, {
4281
4404
  item: innerItem,
4282
- dragged: handleDrag,
4405
+ dragged: draggable ? handleDrag : _ => _,
4283
4406
  hideBorder: hideBorder,
4284
4407
  innerIndex: innerIndex,
4285
4408
  row: Object.values(draggedItem),
4286
- dragStart: handleDragStart,
4409
+ dragStart: draggable ? handleDragStart : _ => _,
4287
4410
  handleCheckDots: handleCheckDots,
4288
4411
  key: `${innerItem}__${innerIndex}`,
4289
4412
  openListColor: openListColor ?? configStyles.TABLE.openList.color,
@@ -4361,9 +4484,9 @@ Table.propTypes = {
4361
4484
  clickableRowColumnTd: PropTypes.bool
4362
4485
  };
4363
4486
 
4364
- var css_248z$b = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
4365
- var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
4366
- styleInject(css_248z$b);
4487
+ var css_248z$a = "body.modal-module_tui-no-srcoll-class__gZjNK,html.modal-module_tui-no-srcoll-class__gZjNK{height:100%;overflow:hidden!important}.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)}}";
4488
+ var styles$9 = {"tui-no-srcoll-class":"modal-module_tui-no-srcoll-class__gZjNK","animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
4489
+ styleInject(css_248z$a);
4367
4490
 
4368
4491
  const SvgNext = ({
4369
4492
  title,
@@ -4611,11 +4734,22 @@ const Modal = ({
4611
4734
  className && setClassProps(() => classnames(className ?? configStyles.MODAL.className));
4612
4735
  }, [className]);
4613
4736
  useEffect(() => {
4737
+ let newConfigStyles = {};
4738
+ const style = document.createElement('style');
4614
4739
  document.addEventListener('keydown', e => {
4615
4740
  handleESC(e);
4616
4741
  handleNavigateArrow(e);
4617
4742
  }, false);
4618
4743
  configStylesPromise.then(data => {
4744
+ newConfigStyles = {
4745
+ ...data
4746
+ };
4747
+ if (hasOwnerProperty(newConfigStyles.MODAL, 'noScroll') && newConfigStyles.MODAL.noScroll) {
4748
+ style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
4749
+ document.head.appendChild(style);
4750
+ document.body.classList.add('tui-no-srcoll-class');
4751
+ document.documentElement.classList.add('tui-no-srcoll-class');
4752
+ }
4619
4753
  setClassProps(() => classnames(className ?? data.MODAL.className));
4620
4754
  setConfigStyles(() => {
4621
4755
  return {
@@ -4628,6 +4762,14 @@ const Modal = ({
4628
4762
  return () => {
4629
4763
  setSelect(0);
4630
4764
  setInnerData([]);
4765
+ if (hasOwnerProperty(newConfigStyles.MODAL, 'noScroll') && newConfigStyles.MODAL.noScroll) {
4766
+ const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
4767
+ if (noScrllable) {
4768
+ style.remove();
4769
+ document.body.classList.remove('tui-no-srcoll-class');
4770
+ document.documentElement.classList.remove('tui-no-srcoll-class');
4771
+ }
4772
+ }
4631
4773
  document.removeEventListener('keydown', e => {
4632
4774
  handleESC(e);
4633
4775
  handleNavigateArrow(e);
@@ -4661,14 +4803,14 @@ const Modal = ({
4661
4803
  style: {
4662
4804
  position: 'relative',
4663
4805
  boxSizing: 'border-box',
4664
- display: type === 'content' ? 'grid' : 'block',
4665
4806
  width: width ?? configStyles.MODAL.width,
4666
- overflow: type === 'content' ? 'auto' : 'hidden',
4667
4807
  height: height ?? configStyles.MODAL.height,
4668
- gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
4808
+ display: type === 'content' ? 'grid' : 'block',
4809
+ overflow: type === 'content' ? 'auto' : 'hidden',
4669
4810
  borderRadius: radius ?? configStyles.MODAL.radius,
4670
4811
  maxWidth: mMaxWidth ?? configStyles.MODAL.maxWidth,
4671
4812
  maxHeight: mMaxHeight ?? configStyles.MODAL.maxHeight,
4813
+ gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
4672
4814
  minWidth: type === 'content' ? minWidth ?? configStyles.MODAL.minWidth : '',
4673
4815
  backgroundColor: backgroundColor ?? configStyles.MODAL.colors.background,
4674
4816
  minHeight: type === 'content' ? minHeight ?? configStyles.MODAL.minHeight : ''
@@ -5239,9 +5381,9 @@ const NumberInput = ({
5239
5381
  });
5240
5382
  };
5241
5383
 
5242
- var css_248z$a = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
5384
+ 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)}}";
5243
5385
  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"};
5244
- styleInject(css_248z$a);
5386
+ styleInject(css_248z$9);
5245
5387
 
5246
5388
  const InputTypes = {
5247
5389
  TEL: 'tel',
@@ -5262,7 +5404,6 @@ const Input = ({
5262
5404
  name,
5263
5405
  style,
5264
5406
  color,
5265
- label,
5266
5407
  value,
5267
5408
  width,
5268
5409
  regexp,
@@ -5272,14 +5413,12 @@ const Input = ({
5272
5413
  weight,
5273
5414
  family,
5274
5415
  padding,
5275
- tooltip,
5276
5416
  telClass,
5277
5417
  leftIcon,
5278
5418
  required,
5279
5419
  disabled,
5280
5420
  errorDots,
5281
5421
  errorIcon,
5282
- labelDots,
5283
5422
  iconWidth,
5284
5423
  rightIcon,
5285
5424
  className,
@@ -5287,30 +5426,22 @@ const Input = ({
5287
5426
  boxShadow,
5288
5427
  errorLeft,
5289
5428
  errorSize,
5290
- labelSize,
5291
5429
  maxLength,
5292
- labelIcon,
5293
- labelStyle,
5294
5430
  floatToFix,
5295
5431
  minNumSize,
5296
5432
  maxNumSize,
5297
- labelColor,
5298
5433
  errorColor,
5299
5434
  withoutDot,
5300
5435
  errorStyle,
5301
5436
  iconPadding,
5302
- labelAction,
5303
5437
  errorAction,
5304
5438
  placeholder,
5305
5439
  errorZindex,
5306
- labelWeight,
5307
5440
  errorWeight,
5308
5441
  errorFamily,
5309
5442
  phoneDisplay,
5310
5443
  errorMessage,
5311
5444
  autoComplete,
5312
- labelDisplay,
5313
- labelIconSide,
5314
5445
  showLabelIcon,
5315
5446
  errorIconSide,
5316
5447
  showErrorIcon,
@@ -5318,17 +5449,13 @@ const Input = ({
5318
5449
  errorBoxShadow,
5319
5450
  boxShadowHover,
5320
5451
  errorClassName,
5321
- labelIconMargin,
5322
- labelFontFamily,
5323
5452
  phoneAlignItems,
5324
5453
  errorLineHeight,
5325
- labelLineHeight,
5326
5454
  numberMaxLength,
5327
5455
  backgroundColor,
5328
5456
  errorIconMargin,
5329
5457
  placeholderColor,
5330
5458
  withZero = false,
5331
- labelMarginBottom,
5332
5459
  regexpErrorMessage,
5333
5460
  phoneJustifyContent,
5334
5461
  telBorderRightWidth,
@@ -5337,13 +5464,40 @@ const Input = ({
5337
5464
  fireInputInsideError,
5338
5465
  backgroundDisableColor,
5339
5466
  telBorderRightColorHover,
5467
+ label,
5468
+ labelSize,
5469
+ labelIcon,
5470
+ labelStyle,
5471
+ labelColor,
5472
+ labelAction,
5473
+ labelWeight,
5474
+ labelDisplay,
5475
+ labelIconSide,
5476
+ labelIconMargin,
5477
+ labelFontFamily,
5478
+ labelLineHeight,
5479
+ labelMarginBottom,
5480
+ iconRequired,
5481
+ useLabelTooltip,
5482
+ labelTooltipColor,
5483
+ labelTooltipPadding,
5484
+ labelTooltipFontSize,
5485
+ labelTooltipFontStyle,
5486
+ labelTooltipFontFamily,
5487
+ labelTooltipFontWeight,
5488
+ labelTooltipBorderRadius,
5489
+ labelTooltipBackgroundColor,
5340
5490
  cardNumber,
5341
5491
  type = 'text'
5342
5492
  }) => {
5493
+ const labelRef = useRef(null);
5494
+ const parentRef = useRef(null);
5343
5495
  const [show, setShow] = useState(false);
5496
+ const [removeID, setRemoveID] = useState('');
5344
5497
  const [isHover, setIsHover] = useState(false);
5345
5498
  const [classProps, setClassProps] = useState({});
5346
5499
  const [innerValue, setInnerValue] = useState('');
5500
+ const [tooltipElem, setTooltipElem] = useState(null);
5347
5501
  const [configStyles, setConfigStyles] = useState({});
5348
5502
  const [innerErrorIcon, setInnerErrorIcon] = useState('');
5349
5503
  const [innerLabelIcon, setInnerLabelIcon] = useState('');
@@ -5394,6 +5548,79 @@ const Input = ({
5394
5548
  const handleShowPass = () => {
5395
5549
  setShow(!show);
5396
5550
  };
5551
+ const getRenderedTextWidth = element => {
5552
+ const clone = element.cloneNode(true);
5553
+ clone.style.width = 'fit-content';
5554
+ document.body.appendChild(clone);
5555
+ const width = clone.offsetWidth;
5556
+ document.body.removeChild(clone);
5557
+ return width;
5558
+ };
5559
+ const handleLabelMouseEnter = event => {
5560
+ event.preventDefault();
5561
+ setRemoveID(() => v4());
5562
+ if (labelRef.current) {
5563
+ const parentElem = parentRef.current.getBoundingClientRect();
5564
+ const rect = labelRef.current.getBoundingClientRect();
5565
+ const top = rect.top;
5566
+ const left = rect.left;
5567
+ const height = rect.height;
5568
+ const elementWidth = rect.width;
5569
+ const x = event.clientX - rect.left;
5570
+ const parentWidth = parentElem.width;
5571
+ const textWidth = getRenderedTextWidth(labelRef.current);
5572
+ if (textWidth > Math.ceil(elementWidth)) {
5573
+ const newTooltipElem = document.createElement('div');
5574
+ newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
5575
+ const newTootltipTextElem = document.createElement('p');
5576
+ const newTooltipChildElem = document.createElement('div');
5577
+ const newTooltipDecorElem = document.createElement('div');
5578
+ newTooltipElem.style.position = 'fixed';
5579
+ newTooltipElem.style.left = showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? left - 14 - (labelIconMargin ? labelIconMargin : configStyles.INPUT.label.iconMargin) + 'px' : left + 'px';
5580
+ newTooltipElem.style.paddingTop = '20px';
5581
+ newTooltipElem.style.height = 'fit-content';
5582
+ newTooltipElem.style.boxSizing = 'border-box';
5583
+ newTooltipElem.style.top = top + height + 'px';
5584
+ newTooltipElem.style.width = parentWidth + 'px';
5585
+ newTooltipChildElem.style.width = '100%';
5586
+ newTooltipChildElem.style.position = 'relative';
5587
+ newTooltipChildElem.style.height = 'fit-content';
5588
+ newTooltipChildElem.style.boxSizing = 'border-box';
5589
+ newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.INPUT.label.tooltip.padding;
5590
+ newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.INPUT.label.tooltip.borderRadius;
5591
+ newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.INPUT.label.tooltip.backgroundColor;
5592
+ newTooltipDecorElem.style.zIndex = -1;
5593
+ newTooltipDecorElem.style.top = '-8px';
5594
+ newTooltipDecorElem.style.width = '18px';
5595
+ newTooltipDecorElem.style.height = '18px';
5596
+ newTooltipDecorElem.style.rotate = '45deg';
5597
+ newTooltipDecorElem.style.position = 'absolute';
5598
+ newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
5599
+ newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.INPUT.label.tooltip.backgroundColor;
5600
+ newTootltipTextElem.innerText = label;
5601
+ newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.INPUT.label.tooltip.color;
5602
+ newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.INPUT.label.tooltip.font.size;
5603
+ newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.INPUT.label.tooltip.font.style;
5604
+ newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.INPUT.label.tooltip.font.family;
5605
+ newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.INPUT.label.tooltip.font.weight;
5606
+ document.body.appendChild(newTooltipElem);
5607
+ newTooltipElem.appendChild(newTooltipChildElem);
5608
+ newTooltipChildElem.appendChild(newTooltipDecorElem);
5609
+ newTooltipChildElem.appendChild(newTootltipTextElem);
5610
+ setTooltipElem(() => newTooltipElem);
5611
+ }
5612
+ }
5613
+ };
5614
+ const handleLabelMouseLeave = () => {
5615
+ const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
5616
+ if (removableElem) {
5617
+ document.body.removeChild(removableElem);
5618
+ }
5619
+ if (tooltipElem) {
5620
+ document.body.removeChild(tooltipElem);
5621
+ }
5622
+ setRemoveID(() => '');
5623
+ };
5397
5624
  useEffect(() => {
5398
5625
  if (errorMessage) {
5399
5626
  setInnerErrorMessage(errorMessage);
@@ -5440,25 +5667,18 @@ const Input = ({
5440
5667
  });
5441
5668
  }, []);
5442
5669
  return configStyles.INPUT && /*#__PURE__*/React__default.createElement("div", {
5670
+ ref: parentRef,
5443
5671
  className: classProps
5444
5672
  }, /*#__PURE__*/React__default.createElement("style", null, `.tui-color-placeholder::placeholder {
5445
5673
  color: ${placeholderColor ?? configStyles.INPUT.colors.placeholder};
5446
- }`), label ? /*#__PURE__*/React__default.createElement("label", {
5674
+ }`), label && /*#__PURE__*/React__default.createElement("div", {
5447
5675
  style: {
5676
+ display: 'flex',
5448
5677
  maxWidth: '100%',
5449
- color: labelColor ?? configStyles.INPUT.label.color,
5450
- fontSize: labelSize ?? configStyles.INPUT.label.font.size,
5451
- fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
5452
- display: labelDisplay ?? configStyles.INPUT.label.display,
5453
- fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
5454
- lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
5455
- marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
5456
- fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
5457
- whiteSpace: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'nowrap' : 'normal',
5458
- overflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'hidden' : 'visible',
5459
- textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
5460
- },
5461
- title: label
5678
+ width: 'fit-content',
5679
+ columnGap: '4px',
5680
+ justifyContent: 'flex-start'
5681
+ }
5462
5682
  }, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
5463
5683
  alt: "label icon",
5464
5684
  src: innerLabelIcon,
@@ -5469,7 +5689,24 @@ const Input = ({
5469
5689
  marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
5470
5690
  },
5471
5691
  onClick: labelAction ? () => labelAction() : _ => _
5472
- }) : '', label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default.createElement("img", {
5692
+ }) : '', /*#__PURE__*/React__default.createElement("label", {
5693
+ ref: labelRef,
5694
+ style: {
5695
+ color: labelColor ?? configStyles.INPUT.label.color,
5696
+ fontSize: labelSize ?? configStyles.INPUT.label.font.size,
5697
+ fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
5698
+ display: labelDisplay ?? configStyles.INPUT.label.display,
5699
+ fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
5700
+ lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
5701
+ marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
5702
+ fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
5703
+ whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? 'nowrap' : 'normal',
5704
+ overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? 'hidden' : 'visible',
5705
+ textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? 'ellipsis' : ''
5706
+ },
5707
+ onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? handleLabelMouseEnter : _ => _,
5708
+ onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? handleLabelMouseLeave : _ => _
5709
+ }, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.INPUT.icon.required ? configStyles.INPUT.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default.createElement("img", {
5473
5710
  alt: "label icon",
5474
5711
  src: innerLabelIcon,
5475
5712
  style: {
@@ -5479,7 +5716,7 @@ const Input = ({
5479
5716
  marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
5480
5717
  },
5481
5718
  onClick: labelAction ? () => labelAction() : _ => _
5482
- }) : '') : '', /*#__PURE__*/React__default.createElement("div", {
5719
+ }) : ''), /*#__PURE__*/React__default.createElement("div", {
5483
5720
  className: `${styles$8['input-content']}`,
5484
5721
  style: {
5485
5722
  width: width ?? configStyles.INPUT.width,
@@ -5577,7 +5814,7 @@ const Input = ({
5577
5814
  borderBottomRightRadius: radius ?? configStyles.INPUT.radius,
5578
5815
  backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
5579
5816
  }
5580
- }, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
5817
+ }, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
5581
5818
  // animation={animation}
5582
5819
  , {
5583
5820
  style: {
@@ -5645,7 +5882,6 @@ Input.propTypes = {
5645
5882
  radius: PropTypes.string,
5646
5883
  padding: PropTypes.string,
5647
5884
  cardNumber: PropTypes.bool,
5648
- tooltip: PropTypes.element,
5649
5885
  withoutDot: PropTypes.bool,
5650
5886
  className: PropTypes.string,
5651
5887
  iconWidth: PropTypes.string,
@@ -5654,21 +5890,6 @@ Input.propTypes = {
5654
5890
  floatToFix: PropTypes.number,
5655
5891
  minNumSize: PropTypes.number,
5656
5892
  maxNumSize: PropTypes.number,
5657
- label: PropTypes.string,
5658
- labelDots: PropTypes.bool,
5659
- labelAction: PropTypes.func,
5660
- labelIcon: PropTypes.string,
5661
- labelSize: PropTypes.string,
5662
- labelColor: PropTypes.string,
5663
- labelStyle: PropTypes.string,
5664
- showLabelIcon: PropTypes.bool,
5665
- labelWeight: PropTypes.string,
5666
- labelDisplay: PropTypes.string,
5667
- labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
5668
- labelLineHeight: PropTypes.string,
5669
- labelFontFamily: PropTypes.string,
5670
- labelIconMargin: PropTypes.string,
5671
- labelMarginBottom: PropTypes.string,
5672
5893
  borderRight: PropTypes.string,
5673
5894
  placeholder: PropTypes.string,
5674
5895
  placeholderColor: PropTypes.string,
@@ -5712,7 +5933,31 @@ Input.propTypes = {
5712
5933
  leftIcon: PropTypes.arrayOf(PropTypes.element),
5713
5934
  rightIcon: PropTypes.arrayOf(PropTypes.element),
5714
5935
  type: PropTypes.oneOf(Object.values(InputTypes)),
5715
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])
5936
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
5937
+ iconRequired: PropTypes.element,
5938
+ label: PropTypes.string,
5939
+ labelAction: PropTypes.func,
5940
+ labelIcon: PropTypes.string,
5941
+ labelSize: PropTypes.string,
5942
+ labelColor: PropTypes.string,
5943
+ labelStyle: PropTypes.string,
5944
+ showLabelIcon: PropTypes.bool,
5945
+ labelWeight: PropTypes.string,
5946
+ labelDisplay: PropTypes.string,
5947
+ labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
5948
+ labelLineHeight: PropTypes.string,
5949
+ labelFontFamily: PropTypes.string,
5950
+ labelIconMargin: PropTypes.string,
5951
+ labelMarginBottom: PropTypes.string,
5952
+ useLabelTooltip: PropTypes.bool,
5953
+ labelTooltipColor: PropTypes.string,
5954
+ labelTooltipPadding: PropTypes.string,
5955
+ labelTooltipFontSize: PropTypes.string,
5956
+ labelTooltipFontStyle: PropTypes.string,
5957
+ labelTooltipFontFamily: PropTypes.string,
5958
+ labelTooltipFontWeight: PropTypes.string,
5959
+ labelTooltipBorderRadius: PropTypes.string,
5960
+ labelTooltipBackgroundColor: PropTypes.string
5716
5961
  };
5717
5962
 
5718
5963
  const RadioDirectionMode = {
@@ -5924,9 +6169,9 @@ const SvgArrow = ({
5924
6169
  fill: fillColor ? fillColor : '#3C393E'
5925
6170
  }));
5926
6171
 
5927
- var css_248z$9 = ".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}.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}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:fit-content;justify-content:center;max-height:30px;max-width:30px;min-height:14px;min-width:14px;width:fit-content}.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}}";
6172
+ 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}.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}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:fit-content;justify-content:center;max-height:30px;max-width:30px;min-height:14px;min-width:14px;width:fit-content}.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}}";
5928
6173
  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"};
5929
- styleInject(css_248z$9);
6174
+ styleInject(css_248z$8);
5930
6175
 
5931
6176
  const Select = ({
5932
6177
  dots,
@@ -5958,6 +6203,16 @@ const Select = ({
5958
6203
  labelFontFamily,
5959
6204
  labelMarginBottom,
5960
6205
  labelTextTransform,
6206
+ iconRequired,
6207
+ useLabelTooltip,
6208
+ labelTooltipColor,
6209
+ labelTooltipPadding,
6210
+ labelTooltipFontSize,
6211
+ labelTooltipFontStyle,
6212
+ labelTooltipFontFamily,
6213
+ labelTooltipFontWeight,
6214
+ labelTooltipBorderRadius,
6215
+ labelTooltipBackgroundColor,
5961
6216
  cursor,
5962
6217
  errorIcon,
5963
6218
  errorSize,
@@ -5999,13 +6254,18 @@ const Select = ({
5999
6254
  optionItemBackgroudColorHover,
6000
6255
  boxShadow,
6001
6256
  boxShadowHover,
6002
- insidePagination
6257
+ insidePagination,
6258
+ placeholderColor
6003
6259
  }) => {
6004
- const ref = useRef();
6260
+ const ref = useRef(null);
6261
+ const labelRef = useRef(null);
6262
+ const parentRef = useRef(null);
6005
6263
  const [opened, setOpened] = useState(false);
6264
+ const [removeID, setRemoveID] = useState('');
6006
6265
  const [isHover, setIsHover] = useState(false);
6007
6266
  const [classProps, setClassProps] = useState({});
6008
6267
  const [newSelected, setNewSelected] = useState([]);
6268
+ const [tooltipElem, setTooltipElem] = useState(null);
6009
6269
  const [existOptions, setExistOptions] = useState([]);
6010
6270
  const [configStyles, setConfigStyles] = useState({});
6011
6271
  const handleOpenClose = () => {
@@ -6071,6 +6331,79 @@ const Select = ({
6071
6331
  }
6072
6332
  return true;
6073
6333
  };
6334
+ const getRenderedTextWidth = element => {
6335
+ const clone = element.cloneNode(true);
6336
+ clone.style.width = 'fit-content';
6337
+ document.body.appendChild(clone);
6338
+ const width = clone.offsetWidth;
6339
+ document.body.removeChild(clone);
6340
+ return width;
6341
+ };
6342
+ const handleLabelMouseEnter = event => {
6343
+ event.preventDefault();
6344
+ setRemoveID(() => v4());
6345
+ if (labelRef.current) {
6346
+ const parentElem = parentRef.current.getBoundingClientRect();
6347
+ const rect = labelRef.current.getBoundingClientRect();
6348
+ const top = rect.top;
6349
+ const left = rect.left;
6350
+ const height = rect.height;
6351
+ const elementWidth = rect.width;
6352
+ const x = event.clientX - rect.left;
6353
+ const parentWidth = parentElem.width;
6354
+ const textWidth = getRenderedTextWidth(labelRef.current);
6355
+ if (textWidth > Math.ceil(elementWidth)) {
6356
+ const newTooltipElem = document.createElement('div');
6357
+ newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
6358
+ const newTootltipTextElem = document.createElement('p');
6359
+ const newTooltipChildElem = document.createElement('div');
6360
+ const newTooltipDecorElem = document.createElement('div');
6361
+ newTooltipElem.style.position = 'fixed';
6362
+ newTooltipElem.style.left = left + 'px';
6363
+ newTooltipElem.style.paddingTop = '20px';
6364
+ newTooltipElem.style.height = 'fit-content';
6365
+ newTooltipElem.style.boxSizing = 'border-box';
6366
+ newTooltipElem.style.top = top + height + 'px';
6367
+ newTooltipElem.style.width = parentWidth + 'px';
6368
+ newTooltipChildElem.style.width = '100%';
6369
+ newTooltipChildElem.style.position = 'relative';
6370
+ newTooltipChildElem.style.height = 'fit-content';
6371
+ newTooltipChildElem.style.boxSizing = 'border-box';
6372
+ newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.SELECT.label.tooltip.padding;
6373
+ newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.SELECT.label.tooltip.borderRadius;
6374
+ newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.SELECT.label.tooltip.backgroundColor;
6375
+ newTooltipDecorElem.style.zIndex = -1;
6376
+ newTooltipDecorElem.style.top = '-8px';
6377
+ newTooltipDecorElem.style.width = '18px';
6378
+ newTooltipDecorElem.style.height = '18px';
6379
+ newTooltipDecorElem.style.rotate = '45deg';
6380
+ newTooltipDecorElem.style.position = 'absolute';
6381
+ newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
6382
+ newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.SELECT.label.tooltip.backgroundColor;
6383
+ newTootltipTextElem.innerText = label;
6384
+ newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.SELECT.label.tooltip.color;
6385
+ newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.SELECT.label.tooltip.font.size;
6386
+ newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.SELECT.label.tooltip.font.style;
6387
+ newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.SELECT.label.tooltip.font.family;
6388
+ newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.SELECT.label.tooltip.font.weight;
6389
+ document.body.appendChild(newTooltipElem);
6390
+ newTooltipElem.appendChild(newTooltipChildElem);
6391
+ newTooltipChildElem.appendChild(newTooltipDecorElem);
6392
+ newTooltipChildElem.appendChild(newTootltipTextElem);
6393
+ setTooltipElem(() => newTooltipElem);
6394
+ }
6395
+ }
6396
+ };
6397
+ const handleLabelMouseLeave = () => {
6398
+ const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
6399
+ if (removableElem) {
6400
+ document.body.removeChild(removableElem);
6401
+ }
6402
+ if (tooltipElem) {
6403
+ document.body.removeChild(tooltipElem);
6404
+ }
6405
+ setRemoveID(() => '');
6406
+ };
6074
6407
  useEffect(() => {
6075
6408
  if (opened) {
6076
6409
  const checkIfClickedOutside = e => {
@@ -6125,12 +6458,22 @@ const Select = ({
6125
6458
  });
6126
6459
  }, []);
6127
6460
  return configStyles.SELECT && /*#__PURE__*/React__default.createElement("div", {
6461
+ ref: parentRef,
6128
6462
  className: classProps,
6129
6463
  style: {
6130
6464
  position: 'relative',
6131
6465
  width: '100%'
6132
6466
  }
6133
- }, label ? /*#__PURE__*/React__default.createElement("label", {
6467
+ }, label && /*#__PURE__*/React__default.createElement("div", {
6468
+ style: {
6469
+ display: 'flex',
6470
+ maxWidth: '100%',
6471
+ width: 'fit-content',
6472
+ columnGap: '4px',
6473
+ justifyContent: 'flex-start'
6474
+ }
6475
+ }, /*#__PURE__*/React__default.createElement("label", {
6476
+ ref: labelRef,
6134
6477
  style: {
6135
6478
  color: labelColor ?? configStyles.SELECT.label.color,
6136
6479
  fontWeight: labelWeight ?? configStyles.SELECT.label.font.weight,
@@ -6140,9 +6483,14 @@ const Select = ({
6140
6483
  fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
6141
6484
  lineHeight: labelLineHeight ?? configStyles.SELECT.label.lineHeight,
6142
6485
  marginBottom: labelMarginBottom ?? configStyles.SELECT.label.marginBottom,
6143
- textTransform: labelTextTransform ?? configStyles.SELECT.label.textTransform
6144
- }
6145
- }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
6486
+ textTransform: labelTextTransform ?? configStyles.SELECT.label.textTransform,
6487
+ whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? 'nowrap' : 'normal',
6488
+ overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? 'hidden' : 'visible',
6489
+ textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? 'ellipsis' : ''
6490
+ },
6491
+ onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? handleLabelMouseEnter : _ => _,
6492
+ onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? handleLabelMouseLeave : _ => _
6493
+ }, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.SELECT.icon.required ? configStyles.SELECT.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), /*#__PURE__*/React__default.createElement("div", {
6146
6494
  ref: ref
6147
6495
  }, /*#__PURE__*/React__default.createElement("div", {
6148
6496
  className: styles$7['select-content']
@@ -6168,12 +6516,12 @@ const Select = ({
6168
6516
  onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
6169
6517
  onMouseLeave: disabled ? _ => _ : () => handleMouseLeave()
6170
6518
  }, /*#__PURE__*/React__default.createElement("div", {
6171
- className: `${styles$7['select-content-top-text']}`,
6519
+ className: "select-content-top-text",
6172
6520
  style: {
6173
6521
  whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
6174
6522
  overflow: insidePagination ? 'visible' : 'hidden',
6175
6523
  textOverflow: insidePagination ? 'initial' : 'ellipsis',
6176
- color: isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
6524
+ color: placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
6177
6525
  }
6178
6526
  }, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
6179
6527
  if (newSelected[index][keyNames.name]) {
@@ -6319,9 +6667,20 @@ Select.propTypes = {
6319
6667
  optionItemMarginBottom: PropTypes.string,
6320
6668
  optionItemBackgroudColor: PropTypes.string,
6321
6669
  optionItemBackgroudColorHover: PropTypes.string,
6670
+ iconRequired: PropTypes.element,
6671
+ useLabelTooltip: PropTypes.bool,
6672
+ labelTooltipColor: PropTypes.string,
6673
+ labelTooltipPadding: PropTypes.string,
6674
+ labelTooltipFontSize: PropTypes.string,
6675
+ labelTooltipFontStyle: PropTypes.string,
6676
+ labelTooltipFontFamily: PropTypes.string,
6677
+ labelTooltipFontWeight: PropTypes.string,
6678
+ labelTooltipBorderRadius: PropTypes.string,
6679
+ labelTooltipBackgroundColor: PropTypes.string,
6322
6680
  boxShadow: PropTypes.string,
6323
6681
  boxShadowHover: PropTypes.string,
6324
- insidePagination: PropTypes.bool
6682
+ insidePagination: PropTypes.bool,
6683
+ placeholderColor: PropTypes.string
6325
6684
  };
6326
6685
 
6327
6686
  const SvgToasterInfo = ({
@@ -6443,9 +6802,9 @@ const SvgToasterSuccess = ({
6443
6802
  fill: fillColor ? fillColor : '#0DA574'
6444
6803
  }));
6445
6804
 
6446
- var css_248z$8 = "#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}}";
6805
+ 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}}";
6447
6806
  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"};
6448
- styleInject(css_248z$8);
6807
+ styleInject(css_248z$7);
6449
6808
 
6450
6809
  const ToasterType = {
6451
6810
  info: 'info',
@@ -6845,9 +7204,9 @@ const SvgTooltip = ({
6845
7204
  fill: fillColor ? fillColor : '#D1D1D1'
6846
7205
  }));
6847
7206
 
6848
- var css_248z$7 = ".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}";
7207
+ 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}";
6849
7208
  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"};
6850
- styleInject(css_248z$7);
7209
+ styleInject(css_248z$6);
6851
7210
 
6852
7211
  const TooltipDirections = {
6853
7212
  TOP: 'top',
@@ -7051,9 +7410,9 @@ const SvgCaptchaArrowDown = ({
7051
7410
  fill: fillColor ? fillColor : '#00236A'
7052
7411
  }));
7053
7412
 
7054
- var css_248z$6 = ".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}";
7413
+ 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}";
7055
7414
  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"};
7056
- styleInject(css_248z$6);
7415
+ styleInject(css_248z$5);
7057
7416
 
7058
7417
  const Captcha = ({
7059
7418
  color,
@@ -7198,9 +7557,9 @@ Captcha.propTypes = {
7198
7557
  getRange: PropTypes.func.isRequired
7199
7558
  };
7200
7559
 
7201
- var css_248z$5 = ".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}";
7560
+ 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}";
7202
7561
  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"};
7203
- styleInject(css_248z$5);
7562
+ styleInject(css_248z$4);
7204
7563
 
7205
7564
  const Stepper = ({
7206
7565
  stepLength,
@@ -7363,9 +7722,6 @@ Checkbox.propTypes = {
7363
7722
  data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
7364
7723
  };
7365
7724
 
7366
- var css_248z$4 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
7367
- styleInject(css_248z$4);
7368
-
7369
7725
  const PositionSide = {
7370
7726
  TOP: 'top',
7371
7727
  BOTTOM: 'bottom'
@@ -7376,7 +7732,6 @@ const Textarea = ({
7376
7732
  style,
7377
7733
  family,
7378
7734
  weight,
7379
- label,
7380
7735
  width,
7381
7736
  value,
7382
7737
  height,
@@ -7393,32 +7748,47 @@ const Textarea = ({
7393
7748
  maxHeight,
7394
7749
  boxSizing,
7395
7750
  maxLength,
7396
- labelSize,
7397
7751
  errorSize,
7398
7752
  errorStyle,
7399
7753
  errorWeight,
7400
7754
  errorFamily,
7401
7755
  marginTop,
7402
7756
  className,
7403
- labelColor,
7404
7757
  errorColor,
7405
- labelWeight,
7406
7758
  placeholder,
7407
- labelDisplay,
7408
7759
  errorMessage,
7409
- labelFontFamily,
7410
7760
  backgroundColor,
7411
7761
  borderFocusColor,
7412
7762
  borderHoverColor,
7413
- labelMarginBottom,
7414
7763
  showCharacterCount,
7764
+ label,
7765
+ labelSize,
7766
+ labelColor,
7767
+ labelWeight,
7768
+ labelDisplay,
7769
+ labelFontFamily,
7770
+ labelMarginBottom,
7771
+ iconRequired,
7772
+ useLabelTooltip,
7773
+ labelTooltipColor,
7774
+ labelTooltipPadding,
7775
+ labelTooltipFontSize,
7776
+ labelTooltipFontStyle,
7777
+ labelTooltipFontFamily,
7778
+ labelTooltipFontWeight,
7779
+ labelTooltipBorderRadius,
7780
+ labelTooltipBackgroundColor,
7415
7781
  characterCountPosition = 'top'
7416
7782
  }) => {
7783
+ const labelRef = useRef(null);
7784
+ const parentRef = useRef(null);
7417
7785
  const [error, setError] = useState('');
7786
+ const [removeID, setRemoveID] = useState('');
7418
7787
  const [isHover, setIsHover] = useState(false);
7419
7788
  const [isFocus, setIsFocus] = useState(false);
7420
7789
  const [innerValue, setInnerValue] = useState('');
7421
7790
  const [classProps, setClassProps] = useState({});
7791
+ const [tooltipElem, setTooltipElem] = useState(null);
7422
7792
  const [configStyles, setConfigStyles] = useState({});
7423
7793
  const handleMouseEnter = () => {
7424
7794
  setIsHover(true);
@@ -7454,6 +7824,79 @@ const Textarea = ({
7454
7824
  }
7455
7825
  }
7456
7826
  };
7827
+ const getRenderedTextWidth = element => {
7828
+ const clone = element.cloneNode(true);
7829
+ clone.style.width = 'fit-content';
7830
+ document.body.appendChild(clone);
7831
+ const width = clone.offsetWidth;
7832
+ document.body.removeChild(clone);
7833
+ return width;
7834
+ };
7835
+ const handleLabelMouseEnter = event => {
7836
+ event.preventDefault();
7837
+ setRemoveID(() => v4());
7838
+ if (labelRef.current) {
7839
+ const parentElem = parentRef.current.getBoundingClientRect();
7840
+ const rect = labelRef.current.getBoundingClientRect();
7841
+ const top = rect.top;
7842
+ const left = rect.left;
7843
+ const height = rect.height;
7844
+ const elementWidth = rect.width;
7845
+ const x = event.clientX - rect.left;
7846
+ const parentWidth = parentElem.width;
7847
+ const textWidth = getRenderedTextWidth(labelRef.current);
7848
+ if (textWidth > Math.ceil(elementWidth)) {
7849
+ const newTooltipElem = document.createElement('div');
7850
+ newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
7851
+ const newTootltipTextElem = document.createElement('p');
7852
+ const newTooltipChildElem = document.createElement('div');
7853
+ const newTooltipDecorElem = document.createElement('div');
7854
+ newTooltipElem.style.position = 'fixed';
7855
+ newTooltipElem.style.left = left + 'px';
7856
+ newTooltipElem.style.paddingTop = '20px';
7857
+ newTooltipElem.style.height = 'fit-content';
7858
+ newTooltipElem.style.boxSizing = 'border-box';
7859
+ newTooltipElem.style.top = top + height + 'px';
7860
+ newTooltipElem.style.width = parentWidth + 'px';
7861
+ newTooltipChildElem.style.width = '100%';
7862
+ newTooltipChildElem.style.position = 'relative';
7863
+ newTooltipChildElem.style.height = 'fit-content';
7864
+ newTooltipChildElem.style.boxSizing = 'border-box';
7865
+ newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.TEXTAREA.label.tooltip.padding;
7866
+ newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.TEXTAREA.label.tooltip.borderRadius;
7867
+ newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.TEXTAREA.label.tooltip.backgroundColor;
7868
+ newTooltipDecorElem.style.zIndex = -1;
7869
+ newTooltipDecorElem.style.top = '-8px';
7870
+ newTooltipDecorElem.style.width = '18px';
7871
+ newTooltipDecorElem.style.height = '18px';
7872
+ newTooltipDecorElem.style.rotate = '45deg';
7873
+ newTooltipDecorElem.style.position = 'absolute';
7874
+ newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
7875
+ newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.TEXTAREA.label.tooltip.backgroundColor;
7876
+ newTootltipTextElem.innerText = label;
7877
+ newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.TEXTAREA.label.tooltip.color;
7878
+ newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.TEXTAREA.label.tooltip.font.size;
7879
+ newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.TEXTAREA.label.tooltip.font.style;
7880
+ newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.TEXTAREA.label.tooltip.font.family;
7881
+ newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.TEXTAREA.label.tooltip.font.weight;
7882
+ document.body.appendChild(newTooltipElem);
7883
+ newTooltipElem.appendChild(newTooltipChildElem);
7884
+ newTooltipChildElem.appendChild(newTooltipDecorElem);
7885
+ newTooltipChildElem.appendChild(newTootltipTextElem);
7886
+ setTooltipElem(() => newTooltipElem);
7887
+ }
7888
+ }
7889
+ };
7890
+ const handleLabelMouseLeave = () => {
7891
+ const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
7892
+ if (removableElem) {
7893
+ document.body.removeChild(removableElem);
7894
+ }
7895
+ if (tooltipElem) {
7896
+ document.body.removeChild(tooltipElem);
7897
+ }
7898
+ setRemoveID(() => '');
7899
+ };
7457
7900
  useEffect(() => {
7458
7901
  if (value === undefined) {
7459
7902
  alert('Please add value prop on Textarea component');
@@ -7481,6 +7924,7 @@ const Textarea = ({
7481
7924
  });
7482
7925
  }, []);
7483
7926
  return configStyles.TEXTAREA && /*#__PURE__*/React__default.createElement("div", {
7927
+ ref: parentRef,
7484
7928
  style: {
7485
7929
  width: width ?? configStyles.TEXTAREA.width
7486
7930
  },
@@ -7496,11 +7940,30 @@ const Textarea = ({
7496
7940
  fontWeight: labelWeight ?? configStyles.TEXTAREA.label.font.weight,
7497
7941
  marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
7498
7942
  }
7499
- }, label ? /*#__PURE__*/React__default.createElement("label", {
7943
+ }, label && /*#__PURE__*/React__default.createElement("div", {
7944
+ style: {
7945
+ display: 'flex',
7946
+ maxWidth: '100%',
7947
+ columnGap: '4px',
7948
+ justifyContent: 'flex-start',
7949
+ width: showCharacterCount && maxLength && characterCountPosition === 'top' ? 'calc(100% - 80px)' : '100%'
7950
+ }
7951
+ }, /*#__PURE__*/React__default.createElement("label", {
7952
+ ref: labelRef,
7953
+ style: {
7954
+ display: labelDisplay ?? configStyles.TEXTAREA.label.display,
7955
+ whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? 'nowrap' : 'normal',
7956
+ overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? 'hidden' : 'visible',
7957
+ textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? 'ellipsis' : ''
7958
+ },
7959
+ onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? handleLabelMouseEnter : _ => _,
7960
+ onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? handleLabelMouseLeave : _ => _
7961
+ }, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.TEXTAREA.icon.required ? configStyles.TEXTAREA.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", {
7500
7962
  style: {
7501
- display: labelDisplay ?? configStyles.TEXTAREA.label.display
7963
+ width: 'fit-content',
7964
+ flexShrink: 0
7502
7965
  }
7503
- }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", null, maxLength - innerValue.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
7966
+ }, maxLength - innerValue.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
7504
7967
  style: {
7505
7968
  width: '100%',
7506
7969
  border: 'none',
@@ -7567,7 +8030,6 @@ Textarea.propTypes = {
7567
8030
  style: PropTypes.string,
7568
8031
  family: PropTypes.string,
7569
8032
  weight: PropTypes.string,
7570
- label: PropTypes.string,
7571
8033
  width: PropTypes.string,
7572
8034
  height: PropTypes.string,
7573
8035
  resize: PropTypes.string,
@@ -7584,25 +8046,36 @@ Textarea.propTypes = {
7584
8046
  minHeight: PropTypes.string,
7585
8047
  maxHeight: PropTypes.string,
7586
8048
  maxLength: PropTypes.number,
7587
- labelSize: PropTypes.string,
7588
8049
  errorSize: PropTypes.string,
7589
8050
  errorStyle: PropTypes.string,
7590
8051
  errorWeight: PropTypes.string,
7591
8052
  errorFamily: PropTypes.string,
7592
8053
  className: PropTypes.string,
7593
- labelColor: PropTypes.string,
7594
8054
  errorColor: PropTypes.string,
7595
- labelWeight: PropTypes.string,
7596
8055
  placeholder: PropTypes.string,
7597
8056
  errorMessage: PropTypes.string,
7598
- labelDisplay: PropTypes.string,
7599
- labelFontFamily: PropTypes.string,
7600
8057
  backgroundColor: PropTypes.string,
7601
8058
  showCharacterCount: PropTypes.bool,
7602
8059
  value: PropTypes.string.isRequired,
7603
8060
  borderFocusColor: PropTypes.string,
7604
8061
  borderHoverColor: PropTypes.string,
8062
+ label: PropTypes.string,
8063
+ labelSize: PropTypes.string,
8064
+ labelColor: PropTypes.string,
8065
+ labelWeight: PropTypes.string,
8066
+ labelDisplay: PropTypes.string,
8067
+ labelFontFamily: PropTypes.string,
7605
8068
  labelMarginBottom: PropTypes.string,
8069
+ iconRequired: PropTypes.element,
8070
+ useLabelTooltip: PropTypes.bool,
8071
+ labelTooltipColor: PropTypes.string,
8072
+ labelTooltipPadding: PropTypes.string,
8073
+ labelTooltipFontSize: PropTypes.string,
8074
+ labelTooltipFontStyle: PropTypes.string,
8075
+ labelTooltipFontFamily: PropTypes.string,
8076
+ labelTooltipFontWeight: PropTypes.string,
8077
+ labelTooltipBorderRadius: PropTypes.string,
8078
+ labelTooltipBackgroundColor: PropTypes.string,
7606
8079
  characterCountPosition: PropTypes.oneOf(Object.values(PositionSide))
7607
8080
  };
7608
8081
 
@@ -7618,6 +8091,7 @@ const AccordionItem = ({
7618
8091
  titleAlign,
7619
8092
  multipleOpen,
7620
8093
  openHoverIcon,
8094
+ closeHoverIcon,
7621
8095
  color,
7622
8096
  border,
7623
8097
  padding,
@@ -7698,7 +8172,7 @@ const AccordionItem = ({
7698
8172
  alignItems: 'center',
7699
8173
  justifyContent: 'center'
7700
8174
  }
7701
- }, isOpen ? closeIcon : isHover ? openHoverIcon ? openHoverIcon : openIcon : openIcon)), /*#__PURE__*/React__default.createElement("div", {
8175
+ }, isOpen ? isHover ? closeHoverIcon : closeIcon : isHover ? openHoverIcon : openIcon)), /*#__PURE__*/React__default.createElement("div", {
7702
8176
  style: {
7703
8177
  overflow: 'hidden',
7704
8178
  height: isOpen ? 'auto' : '0px'
@@ -7764,6 +8238,7 @@ const Accordion = ({
7764
8238
  titleAlign,
7765
8239
  multipleOpen,
7766
8240
  openHoverIcon,
8241
+ closeHoverIcon,
7767
8242
  borderTop,
7768
8243
  borderLeft,
7769
8244
  borderRight,
@@ -7844,6 +8319,13 @@ const Accordion = ({
7844
8319
  src: configStyles.ACCORDION.icon.close,
7845
8320
  alt: "close icon"
7846
8321
  }) : /*#__PURE__*/React__default.createElement(SvgGreenminus, null),
8322
+ closeHoverIcon: closeHoverIcon ? /*#__PURE__*/React__default.createElement("img", {
8323
+ src: closeHoverIcon,
8324
+ alt: "close icon"
8325
+ }) : configStyles.ACCORDION.icon.closeHover ? /*#__PURE__*/React__default.createElement("img", {
8326
+ src: configStyles.ACCORDION.icon.closeHover,
8327
+ alt: "close icon"
8328
+ }) : /*#__PURE__*/React__default.createElement(SvgGreenminus, null),
7847
8329
  className: classProps,
7848
8330
  color: color ?? configStyles.ACCORDION.color,
7849
8331
  padding: padding ?? configStyles.ACCORDION.padding,
@@ -7887,6 +8369,7 @@ Accordion.propTypes = {
7887
8369
  closeIcon: PropTypes.string,
7888
8370
  marginBottom: PropTypes.string,
7889
8371
  openHoverIcon: PropTypes.string,
8372
+ closeHoverIcon: PropTypes.string,
7890
8373
  borderTop: PropTypes.bool,
7891
8374
  borderLeft: PropTypes.bool,
7892
8375
  borderRight: PropTypes.bool,
@@ -7979,8 +8462,8 @@ const Swipe = ({
7979
8462
  }, child));
7980
8463
  };
7981
8464
 
7982
- 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%}}";
7983
- 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"};
8465
+ var css_248z$2 = "body.swipe-module_tui-no-srcoll-class__YS9cI,html.swipe-module_tui-no-srcoll-class__YS9cI{height:100%;overflow:hidden!important}.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%}}";
8466
+ var styles$2 = {"tui-no-srcoll-class":"swipe-module_tui-no-srcoll-class__YS9cI","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"};
7984
8467
  styleInject(css_248z$2);
7985
8468
 
7986
8469
  // import React, { useEffect, useRef } from 'react';
@@ -8082,22 +8565,45 @@ const handleNavigationChange = () => {
8082
8565
  return result;
8083
8566
  };
8084
8567
  })(window.history);
8568
+ const style = document.createElement('style');
8085
8569
  const swipe = {
8086
8570
  open: (title = '', id, child, props) => {
8087
- if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
8088
- alert('Please pass valid id prop (string / number) when call swipe.open function');
8089
- return;
8090
- }
8091
- if (swipeCount === 0) {
8092
- window.addEventListener('popstate', handleNavigationChange);
8093
- window.addEventListener('navigationchange', handleNavigationChange);
8094
- }
8095
- let swipable = document.getElementById('swipable');
8096
- swipeCount += 1;
8097
- createSwipe(id, title, child, props, swipable);
8098
- return Promise.resolve(id);
8571
+ let newConfigStyles = {};
8572
+ configStylesPromise.then(data => {
8573
+ newConfigStyles = {
8574
+ ...data
8575
+ };
8576
+ if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
8577
+ alert('Please pass valid id prop (string / number) when call swipe.open function');
8578
+ return;
8579
+ }
8580
+ if (swipeCount === 0) {
8581
+ if (hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'noScroll') && newConfigStyles.SWIPEMODAL.noScroll) {
8582
+ style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
8583
+ document.head.appendChild(style);
8584
+ document.body.classList.add('tui-no-srcoll-class');
8585
+ document.documentElement.classList.add('tui-no-srcoll-class');
8586
+ }
8587
+ window.addEventListener('popstate', handleNavigationChange);
8588
+ window.addEventListener('navigationchange', handleNavigationChange);
8589
+ }
8590
+ let swipable = document.getElementById('swipable');
8591
+ swipeCount += 1;
8592
+ createSwipe(id, title, child, props, swipable);
8593
+ return Promise.resolve(id);
8594
+ }, error => {
8595
+ console.error(error);
8596
+ });
8099
8597
  },
8100
8598
  close: id => {
8599
+ let newConfigStyles = {};
8600
+ configStylesPromise.then(data => {
8601
+ newConfigStyles = {
8602
+ ...data
8603
+ };
8604
+ }, error => {
8605
+ console.error(error);
8606
+ });
8101
8607
  if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
8102
8608
  alert('Please pass valid id prop (string / number) when call swipe.close function');
8103
8609
  return;
@@ -8116,6 +8622,14 @@ const swipe = {
8116
8622
  window.removeEventListener('popstate', handleNavigationChange);
8117
8623
  window.removeEventListener('navigationchange', handleNavigationChange);
8118
8624
  document.body.removeChild(swipable);
8625
+ if (hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'noScroll') && newConfigStyles.SWIPEMODAL.noScroll) {
8626
+ const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
8627
+ if (noScrllable) {
8628
+ style.remove();
8629
+ document.body.classList.remove('tui-no-srcoll-class');
8630
+ document.documentElement.classList.remove('tui-no-srcoll-class');
8631
+ }
8632
+ }
8119
8633
  }
8120
8634
  }, 200);
8121
8635
  } else {
@@ -8124,6 +8638,14 @@ const swipe = {
8124
8638
  window.removeEventListener('popstate', handleNavigationChange);
8125
8639
  window.removeEventListener('navigationchange', handleNavigationChange);
8126
8640
  document.body.removeChild(swipable);
8641
+ if (hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'noScroll') && newConfigStyles.SWIPEMODAL.noScroll) {
8642
+ const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
8643
+ if (noScrllable) {
8644
+ style.remove();
8645
+ document.body.classList.remove('tui-no-srcoll-class');
8646
+ document.documentElement.classList.remove('tui-no-srcoll-class');
8647
+ }
8648
+ }
8127
8649
  }
8128
8650
  }
8129
8651
  }
@@ -8696,7 +9218,6 @@ var styles = {"auto-complete":"autocomplete-module_auto-complete__oUOv9"};
8696
9218
  styleInject(css_248z);
8697
9219
 
8698
9220
  const Autocomplete = ({
8699
- label,
8700
9221
  change,
8701
9222
  options,
8702
9223
  getItem,
@@ -8707,37 +9228,28 @@ const Autocomplete = ({
8707
9228
  errorStyle,
8708
9229
  errorWeight,
8709
9230
  errorFamily,
8710
- labelSize,
8711
- labelStyle,
8712
9231
  marginTop,
8713
9232
  errorColor,
8714
- labelColor,
8715
- labelWeight,
8716
9233
  placeHolder,
8717
9234
  errorMessage,
8718
9235
  autoComplete,
8719
- labelDisplay,
8720
9236
  contentDisplay,
8721
9237
  contentTopSize,
8722
9238
  contentTopStyle,
8723
9239
  contentTopFamily,
8724
9240
  contentPosition,
8725
9241
  contentTopColor,
8726
- labelLineHeight,
8727
- labelFontFamily,
8728
9242
  contentDirection,
8729
9243
  contentTopWeight,
8730
9244
  contentTopRadius,
8731
9245
  contentTopHeight,
8732
9246
  contentTopBorder,
8733
- labelMarginBottom,
8734
9247
  contentTopDisplay,
8735
9248
  contentTopPadding,
8736
9249
  contentBottomLeft,
8737
9250
  innerErrorPadding,
8738
9251
  showOptionDuration,
8739
9252
  contentTopMaxWidth,
8740
- labelTextTransform,
8741
9253
  contentBottomWidth,
8742
9254
  contentBottomZindex,
8743
9255
  contentBottomRadius,
@@ -8774,6 +9286,26 @@ const Autocomplete = ({
8774
9286
  contentBottomRowBackgroundColor,
8775
9287
  contentBottomRowHoverBackgroundColor,
8776
9288
  backgroundDisableColor,
9289
+ label,
9290
+ labelSize,
9291
+ labelStyle,
9292
+ labelColor,
9293
+ labelWeight,
9294
+ labelDisplay,
9295
+ labelLineHeight,
9296
+ labelFontFamily,
9297
+ labelMarginBottom,
9298
+ labelTextTransform,
9299
+ iconRequired,
9300
+ useLabelTooltip,
9301
+ labelTooltipColor,
9302
+ labelTooltipPadding,
9303
+ labelTooltipFontSize,
9304
+ labelTooltipFontStyle,
9305
+ labelTooltipFontFamily,
9306
+ labelTooltipFontWeight,
9307
+ labelTooltipBorderRadius,
9308
+ labelTooltipBackgroundColor,
8777
9309
  searchCount = 3,
8778
9310
  disabled = false,
8779
9311
  keyNames = {
@@ -8782,14 +9314,18 @@ const Autocomplete = ({
8782
9314
  },
8783
9315
  ...props
8784
9316
  }) => {
9317
+ const labelRef = useRef(null);
9318
+ const parentRef = useRef(null);
8785
9319
  const [id, setId] = useState('');
8786
9320
  const [show, setShow] = useState(false);
9321
+ const [removeID, setRemoveID] = useState('');
8787
9322
  const [isHover, setIsHover] = useState(false);
8788
9323
  const [isFocus, setIsFocus] = useState(false);
8789
9324
  const [innerError, setInnerError] = useState('');
8790
9325
  const [innerValue, setInnerValue] = useState('');
8791
- const [innerOptions, setInnerOptions] = useState([]);
8792
9326
  const [classProps, setClassProps] = useState({});
9327
+ const [tooltipElem, setTooltipElem] = useState(null);
9328
+ const [innerOptions, setInnerOptions] = useState([]);
8793
9329
  const [configStyles, setConfigStyles] = useState({});
8794
9330
  const showOption = keyframes`
8795
9331
  100% {
@@ -8904,6 +9440,79 @@ const Autocomplete = ({
8904
9440
  backgroundColor: innerErrorBackgroundColor ?? configStyles.AUTOCOMPLETE.innerError.colors.background
8905
9441
  }
8906
9442
  }, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
9443
+ const getRenderedTextWidth = element => {
9444
+ const clone = element.cloneNode(true);
9445
+ clone.style.width = 'fit-content';
9446
+ document.body.appendChild(clone);
9447
+ const width = clone.offsetWidth;
9448
+ document.body.removeChild(clone);
9449
+ return width;
9450
+ };
9451
+ const handleLabelMouseEnter = event => {
9452
+ event.preventDefault();
9453
+ setRemoveID(() => v4());
9454
+ if (labelRef.current) {
9455
+ const parentElem = parentRef.current.getBoundingClientRect();
9456
+ const rect = labelRef.current.getBoundingClientRect();
9457
+ const top = rect.top;
9458
+ const left = rect.left;
9459
+ const height = rect.height;
9460
+ const elementWidth = rect.width;
9461
+ const x = event.clientX - rect.left;
9462
+ const parentWidth = parentElem.width;
9463
+ const textWidth = getRenderedTextWidth(labelRef.current);
9464
+ if (textWidth > Math.ceil(elementWidth)) {
9465
+ const newTooltipElem = document.createElement('div');
9466
+ newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
9467
+ const newTootltipTextElem = document.createElement('p');
9468
+ const newTooltipChildElem = document.createElement('div');
9469
+ const newTooltipDecorElem = document.createElement('div');
9470
+ newTooltipElem.style.position = 'fixed';
9471
+ newTooltipElem.style.left = left + 'px';
9472
+ newTooltipElem.style.paddingTop = '20px';
9473
+ newTooltipElem.style.height = 'fit-content';
9474
+ newTooltipElem.style.boxSizing = 'border-box';
9475
+ newTooltipElem.style.top = top + height + 'px';
9476
+ newTooltipElem.style.width = parentWidth + 'px';
9477
+ newTooltipChildElem.style.width = '100%';
9478
+ newTooltipChildElem.style.position = 'relative';
9479
+ newTooltipChildElem.style.height = 'fit-content';
9480
+ newTooltipChildElem.style.boxSizing = 'border-box';
9481
+ newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.FILE.label.tooltip.padding;
9482
+ newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.FILE.label.tooltip.borderRadius;
9483
+ newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.FILE.label.tooltip.backgroundColor;
9484
+ newTooltipDecorElem.style.zIndex = -1;
9485
+ newTooltipDecorElem.style.top = '-8px';
9486
+ newTooltipDecorElem.style.width = '18px';
9487
+ newTooltipDecorElem.style.height = '18px';
9488
+ newTooltipDecorElem.style.rotate = '45deg';
9489
+ newTooltipDecorElem.style.position = 'absolute';
9490
+ newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
9491
+ newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.FILE.label.tooltip.backgroundColor;
9492
+ newTootltipTextElem.innerText = label;
9493
+ newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.FILE.label.tooltip.color;
9494
+ newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.FILE.label.tooltip.font.size;
9495
+ newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.FILE.label.tooltip.font.style;
9496
+ newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.FILE.label.tooltip.font.family;
9497
+ newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.FILE.label.tooltip.font.weight;
9498
+ document.body.appendChild(newTooltipElem);
9499
+ newTooltipElem.appendChild(newTooltipChildElem);
9500
+ newTooltipChildElem.appendChild(newTooltipDecorElem);
9501
+ newTooltipChildElem.appendChild(newTootltipTextElem);
9502
+ setTooltipElem(() => newTooltipElem);
9503
+ }
9504
+ }
9505
+ };
9506
+ const handleLabelMouseLeave = () => {
9507
+ const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
9508
+ if (removableElem) {
9509
+ document.body.removeChild(removableElem);
9510
+ }
9511
+ if (tooltipElem) {
9512
+ document.body.removeChild(tooltipElem);
9513
+ }
9514
+ setRemoveID(() => '');
9515
+ };
8907
9516
  useEffect(() => {
8908
9517
  if (options === undefined) {
8909
9518
  alert('Please add options prop');
@@ -8951,24 +9560,38 @@ const Autocomplete = ({
8951
9560
  });
8952
9561
  }, []);
8953
9562
  return configStyles.AUTOCOMPLETE && /*#__PURE__*/React__default.createElement("div", {
9563
+ ref: parentRef,
8954
9564
  className: classProps,
8955
9565
  style: {
8956
9566
  width: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
8957
9567
  }
8958
- }, label ? /*#__PURE__*/React__default.createElement("label", {
9568
+ }, label && /*#__PURE__*/React__default.createElement("div", {
9569
+ style: {
9570
+ display: 'flex',
9571
+ maxWidth: '100%',
9572
+ width: 'fit-content',
9573
+ columnGap: '4px',
9574
+ justifyContent: 'flex-start'
9575
+ }
9576
+ }, /*#__PURE__*/React__default.createElement("label", {
9577
+ ref: labelRef,
8959
9578
  style: {
8960
9579
  color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
8961
9580
  display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
8962
- maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth,
8963
9581
  fontSize: labelSize ?? configStyles.AUTOCOMPLETE.label.font.size,
8964
9582
  fontStyle: labelStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
8965
9583
  fontWeight: labelWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
8966
9584
  fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
8967
9585
  lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
8968
9586
  marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
8969
- textTransform: labelTextTransform ?? configStyles.AUTOCOMPLETE.label.textTransform
8970
- }
8971
- }, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
9587
+ textTransform: labelTextTransform ?? configStyles.AUTOCOMPLETE.label.textTransform,
9588
+ whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? 'nowrap' : 'normal',
9589
+ overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? 'hidden' : 'visible',
9590
+ textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? 'ellipsis' : ''
9591
+ },
9592
+ onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? handleLabelMouseEnter : _ => _,
9593
+ onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? handleLabelMouseLeave : _ => _
9594
+ }, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), /*#__PURE__*/React__default.createElement("div", {
8972
9595
  style: {
8973
9596
  display: contentDisplay ?? configStyles.AUTOCOMPLETE.parent.display,
8974
9597
  position: contentPosition ?? configStyles.AUTOCOMPLETE.parent.position,
@@ -9044,6 +9667,7 @@ Autocomplete.propTypes = {
9044
9667
  errorMessage: PropTypes.string,
9045
9668
  labelDisplay: PropTypes.string,
9046
9669
  autoComplete: PropTypes.string,
9670
+ iconRequired: PropTypes.element,
9047
9671
  contentDisplay: PropTypes.string,
9048
9672
  contentTopSize: PropTypes.string,
9049
9673
  contentTopStyle: PropTypes.string,
@@ -9103,6 +9727,15 @@ Autocomplete.propTypes = {
9103
9727
  contentBottomBackgroundColor: PropTypes.string,
9104
9728
  contentBottomRowBackgroundColor: PropTypes.string,
9105
9729
  contentBottomRowHoverBackgroundColor: PropTypes.string,
9730
+ useLabelTooltip: PropTypes.bool,
9731
+ labelTooltipColor: PropTypes.string,
9732
+ labelTooltipPadding: PropTypes.string,
9733
+ labelTooltipFontSize: PropTypes.string,
9734
+ labelTooltipFontStyle: PropTypes.string,
9735
+ labelTooltipFontFamily: PropTypes.string,
9736
+ labelTooltipFontWeight: PropTypes.string,
9737
+ labelTooltipBorderRadius: PropTypes.string,
9738
+ labelTooltipBackgroundColor: PropTypes.string,
9106
9739
  backgroundDisableColor: PropTypes.string
9107
9740
  };
9108
9741