@xaypay/tui 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var PropTypes = require('prop-types');
7
7
  var classnames = require('classnames');
8
+ var _ = require('lodash');
8
9
  var styled = require('styled-components');
9
10
  var ReactDOM = require('react-dom');
10
11
 
@@ -32,6 +33,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
33
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
33
34
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
34
35
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
36
+ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
35
37
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
36
38
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
37
39
 
@@ -466,37 +468,39 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
466
468
  }, iconDelItem ? iconDelItem : /*#__PURE__*/React__default["default"].createElement(SvgListItemDelete, null))));
467
469
  });
468
470
 
469
- const _ = require('lodash');
471
+ async function getPProps(type) {
472
+ let packageResult;
473
+ let projectResult;
474
+ const packageImportConfig = await undefined('../../tui.config.js');
475
+ const projectImportConfig = await undefined('../../../../tui.config.js');
476
+ if (packageImportConfig['../../tui.config.js']) {
477
+ packageResult = packageImportConfig['../../tui.config.js']().then(module => module.default);
478
+ }
479
+ if (projectImportConfig['../../../../tui.config.js']) {
480
+ projectResult = projectImportConfig['../../../../tui.config.js']().then(module => module.default);
481
+ }
482
+ return type === true ? packageResult : projectResult;
483
+ }
484
+
470
485
  let projectConfig = {};
471
486
  let packageConfig = {};
472
- try {
473
- packageConfig = require('../tui.config.js');
474
- } catch (e) {
487
+ async function getProps(type) {
488
+ let props;
475
489
  try {
476
- packageConfig = require('../../tui.config.js');
477
- } catch (err) {
478
- packageConfig = {};
490
+ const newProps = await getPProps(type);
491
+ props = ___default["default"].merge(type === true ? packageConfig : projectConfig, newProps);
492
+ } catch (error) {
493
+ console.error('Error in getProps:', error);
479
494
  }
495
+ return props;
480
496
  }
481
- try {
482
- projectConfig = require('../../../../tui.config.js');
483
- } catch (error) {
484
- projectConfig = {};
485
- // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
486
- }
487
- const merge = _.merge(packageConfig.default, projectConfig.default);
497
+ packageConfig = getProps(true);
498
+ packageConfig = getProps();
499
+ const merge = ___default["default"].merge(packageConfig, projectConfig);
488
500
  const hasOwnerProperty = (object, property) => {
489
501
  return Object.prototype.hasOwnProperty.call(object, property);
490
502
  };
491
503
 
492
- const vertical = {
493
- top: 'top',
494
- bottom: 'bottom'
495
- };
496
- const horizontal = {
497
- left: 'left',
498
- right: 'right'
499
- };
500
504
  const Button = ({
501
505
  icon,
502
506
  size,
@@ -528,20 +532,6 @@ const Button = ({
528
532
  btnIconMarginRight,
529
533
  backgroundHoverColor,
530
534
  disabledBackgroundColor,
531
- title,
532
- titleSize,
533
- titleFont,
534
- titleWidth,
535
- titleStyle,
536
- titleColor,
537
- titleRadius,
538
- titleWeight,
539
- titlePadding,
540
- titleBackgroundColor,
541
- titleVerticalDistance,
542
- titleVerticalPosition,
543
- titleHorizontalDistance,
544
- titleHorizontalPosition,
545
535
  ...props
546
536
  }) => {
547
537
  const [isHover, setIsHover] = React.useState(false);
@@ -552,75 +542,45 @@ const Button = ({
552
542
  const handleMouseLeave = () => {
553
543
  setIsHover(false);
554
544
  };
555
- const buttonTemplate = () => {
556
- return /*#__PURE__*/React__default["default"].createElement("button", _extends({
557
- style: {
558
- display: 'flex',
559
- outline: 'none',
560
- alignItems: 'center',
561
- justifyContent: 'center',
562
- fontSize: size ?? merge.BUTTON.font.size,
563
- fontStyle: style ?? merge.BUTTON.font.style,
564
- fontFamily: font ?? merge.BUTTON.font.family,
565
- height: height ?? merge.BUTTON.height,
566
- fontWeight: weight ?? merge.BUTTON.font.weight,
567
- padding: padding ?? merge.BUTTON.padding,
568
- borderRadius: radius ?? merge.BUTTON.radius,
569
- boxSizing: boxSizing ?? merge.BUTTON.box.sizing,
570
- transition: transition ?? merge.BUTTON.transition,
571
- border: outline ? 'none' : border ?? merge.BUTTON.border,
572
- width: contentWidth ? title ? '100%' : 'auto' : width ?? merge.BUTTON.width,
573
- cursor: disabled ? 'not-allowed' : cursor ?? merge.BUTTON.cursor,
574
- textTransform: textTransform ?? merge.BUTTON.text.transform,
575
- backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : merge.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : merge.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : merge.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : merge.BUTTON.colors.background,
576
- boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : merge.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : merge.BUTTON.colors.background}` : 'none',
577
- color: (outline || !outline) && disabled ? disabledColor ? disabledColor : merge.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : merge.BUTTON.color : backgroundColor ? backgroundColor : merge.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : merge.BUTTON.text.colors.hover : color ? color : merge.BUTTON.color
578
- },
579
- type: type ?? merge.BUTTON.type,
580
- disabled: disabled ?? merge.BUTTON.disabled,
581
- onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
582
- onMouseEnter: handleMouseEnter,
583
- onMouseLeave: handleMouseLeave,
584
- className: classProps
585
- }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
586
- style: {
587
- marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : merge.BUTTON.icon.marginRight : '0px'
588
- }
589
- }, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
590
- };
591
545
  React.useEffect(() => {
592
546
  if (!label && !icon) {
593
547
  alert('Add icon or label props on Button component');
594
548
  }
595
549
  }, []);
596
- return title ? /*#__PURE__*/React__default["default"].createElement("div", {
550
+ return /*#__PURE__*/React__default["default"].createElement("button", _extends({
597
551
  style: {
598
- position: 'relative',
552
+ display: 'flex',
553
+ outline: 'none',
554
+ alignItems: 'center',
555
+ justifyContent: 'center',
556
+ fontSize: size ?? merge.BUTTON.font.size,
557
+ fontStyle: style ?? merge.BUTTON.font.style,
558
+ fontFamily: font ?? merge.BUTTON.font.family,
599
559
  height: height ?? merge.BUTTON.height,
600
- width: contentWidth ? '100%' : 'fit-content'
560
+ fontWeight: weight ?? merge.BUTTON.font.weight,
561
+ padding: padding ?? merge.BUTTON.padding,
562
+ borderRadius: radius ?? merge.BUTTON.radius,
563
+ boxSizing: boxSizing ?? merge.BUTTON.box.sizing,
564
+ transition: transition ?? merge.BUTTON.transition,
565
+ border: outline ? 'none' : border ?? merge.BUTTON.border,
566
+ width: contentWidth ? 'auto' : width ?? merge.BUTTON.width,
567
+ cursor: disabled ? 'not-allowed' : cursor ?? merge.BUTTON.cursor,
568
+ textTransform: textTransform ?? merge.BUTTON.text.transform,
569
+ backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : merge.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : merge.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : merge.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : merge.BUTTON.colors.background,
570
+ boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : merge.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : merge.BUTTON.colors.background}` : 'none',
571
+ color: (outline || !outline) && disabled ? disabledColor ? disabledColor : merge.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : merge.BUTTON.color : backgroundColor ? backgroundColor : merge.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : merge.BUTTON.text.colors.hover : color ? color : merge.BUTTON.color
601
572
  },
573
+ type: type ?? merge.BUTTON.type,
574
+ disabled: disabled ?? merge.BUTTON.disabled,
575
+ onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
576
+ onMouseEnter: handleMouseEnter,
577
+ onMouseLeave: handleMouseLeave,
602
578
  className: classProps
603
- }, buttonTemplate(), isHover ? /*#__PURE__*/React__default["default"].createElement("p", {
579
+ }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
604
580
  style: {
605
- position: 'absolute',
606
- margin: '0px',
607
- top: titleVerticalPosition === 'bottom' ? `calc(100% + ${titleVerticalDistance})` : '',
608
- left: titleHorizontalPosition === 'right' ? `calc(100% + ${titleHorizontalDistance})` : '',
609
- right: titleHorizontalPosition === 'left' ? `calc(100% + ${titleHorizontalDistance})` : '',
610
- bottom: titleVerticalPosition === 'top' ? `calc(100% + ${titleVerticalDistance})` : '',
611
- color: titleColor ?? merge.BUTTON.title.color,
612
- fontSize: titleSize ?? merge.BUTTON.title.font.size,
613
- fontStyle: titleStyle ?? merge.BUTTON.title.font.style,
614
- fontFamily: titleFont ?? merge.BUTTON.title.font.family,
615
- fontWeight: titleWeight ?? merge.BUTTON.title.font.weight,
616
- width: titleWidth ?? merge.BUTTON.title.width,
617
- padding: titlePadding ?? merge.BUTTON.title.padding,
618
- backgroundColor: titleBackgroundColor ?? merge.BUTTON.title.colors.background,
619
- borderRadius: titleRadius ?? merge.BUTTON.title.radius
620
- },
621
- onMouseEnter: handleMouseEnter,
622
- onMouseLeave: handleMouseLeave
623
- }, title) : '') : buttonTemplate();
581
+ marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : merge.BUTTON.icon.marginRight : '0px'
582
+ }
583
+ }, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
624
584
  };
625
585
  Button.propTypes = {
626
586
  type: PropTypes__default["default"].string,
@@ -629,6 +589,7 @@ Button.propTypes = {
629
589
  weight: PropTypes__default["default"].string,
630
590
  font: PropTypes__default["default"].string,
631
591
  icon: PropTypes__default["default"].element,
592
+ hoverIcon: PropTypes__default["default"].element,
632
593
  color: PropTypes__default["default"].string,
633
594
  width: PropTypes__default["default"].string,
634
595
  outline: PropTypes__default["default"].bool,
@@ -642,7 +603,6 @@ Button.propTypes = {
642
603
  padding: PropTypes__default["default"].string,
643
604
  boxSizing: PropTypes__default["default"].string,
644
605
  className: PropTypes__default["default"].string,
645
- hoverIcon: PropTypes__default["default"].element,
646
606
  hoverColor: PropTypes__default["default"].string,
647
607
  transition: PropTypes__default["default"].string,
648
608
  contentWidth: PropTypes__default["default"].bool,
@@ -652,27 +612,7 @@ Button.propTypes = {
652
612
  disabledLineColor: PropTypes__default["default"].string,
653
613
  btnIconMarginRight: PropTypes__default["default"].string,
654
614
  backgroundHoverColor: PropTypes__default["default"].string,
655
- disabledBackgroundColor: PropTypes__default["default"].string,
656
- title: PropTypes__default["default"].string,
657
- titleFont: PropTypes__default["default"].string,
658
- titleSize: PropTypes__default["default"].string,
659
- titleColor: PropTypes__default["default"].string,
660
- titleWidth: PropTypes__default["default"].string,
661
- titleStyle: PropTypes__default["default"].string,
662
- titleWeight: PropTypes__default["default"].string,
663
- titleRadius: PropTypes__default["default"].string,
664
- titlePadding: PropTypes__default["default"].string,
665
- titleBackgroundColor: PropTypes__default["default"].string,
666
- titleVerticalDistance: PropTypes__default["default"].string,
667
- titleHorizontalDistance: PropTypes__default["default"].string,
668
- titleVerticalPosition: PropTypes__default["default"].oneOf(Object.values(vertical)),
669
- titleHorizontalPosition: PropTypes__default["default"].oneOf(Object.values(horizontal))
670
- };
671
- Button.defaultProps = {
672
- titleVerticalDistance: '4px',
673
- titleVerticalPosition: 'top',
674
- titleHorizontalPosition: 'left',
675
- titleHorizontalDistance: '10px'
615
+ disabledBackgroundColor: PropTypes__default["default"].string
676
616
  };
677
617
 
678
618
  const SvgPdf = ({
@@ -803,8 +743,6 @@ const File = /*#__PURE__*/React.forwardRef(({
803
743
  borderStyle,
804
744
  borderColor,
805
745
  upload,
806
- preview,
807
- maxSize,
808
746
  maxWidth,
809
747
  disabled,
810
748
  multiple,
@@ -853,7 +791,6 @@ const File = /*#__PURE__*/React.forwardRef(({
853
791
  uploadBtnHoverColor,
854
792
  uploadBtnBackgroundColor,
855
793
  uploadBtnBackgroundColorHover,
856
- fileExtensions,
857
794
  listItemHeight,
858
795
  backgroundColor,
859
796
  deleteComponent,
@@ -872,7 +809,6 @@ const File = /*#__PURE__*/React.forwardRef(({
872
809
  progressTrackColor,
873
810
  fileAreaImageWidth,
874
811
  listItemErrorColor,
875
- timeForRemoveError,
876
812
  progressFailedColor,
877
813
  fileAreaImageHeight,
878
814
  progressSuccessColor,
@@ -882,7 +818,11 @@ const File = /*#__PURE__*/React.forwardRef(({
882
818
  extentionsRowMarginTop,
883
819
  listItemBackgroundColor,
884
820
  listItemBackgroundErrorColor,
885
- maxCHoosenLengthErrorHideTime
821
+ maxCHoosenLengthErrorHideTime,
822
+ maxSize = 10,
823
+ preview = true,
824
+ timeForRemoveError = 5000,
825
+ fileExtensions = ['jpg', 'jpeg', 'png', 'pdf', 'heic']
886
826
  }, ref) => {
887
827
  const inpRef = React.useRef(null);
888
828
  const memoizedItems = React.useMemo(() => filesArray, [filesArray]);
@@ -1390,12 +1330,6 @@ File.propTypes = {
1390
1330
  filesArray: PropTypes__default["default"].arrayOf(PropTypes__default["default"].object),
1391
1331
  fileExtensions: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)
1392
1332
  };
1393
- File.defaultProps = {
1394
- maxSize: 10,
1395
- preview: true,
1396
- timeForRemoveError: 5000,
1397
- fileExtensions: ['jpg', 'jpeg', 'png', 'pdf', 'heic']
1398
- };
1399
1333
 
1400
1334
  const SvgCheckboxUnchecked = ({
1401
1335
  title,
@@ -2524,8 +2458,8 @@ const Table = ({
2524
2458
  key: `${item}_${index}`,
2525
2459
  style: {
2526
2460
  backgroundColor: tableRowBGColor ?? merge.TABLE.body.row.colors.background,
2527
- borderColor: hideBorder ? 'transparent' : merge.TABLE.body.row.borderColor,
2528
2461
  borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : merge.TABLE.body.row.border,
2462
+ borderColor: hideBorder ? 'transparent' : merge.TABLE.body.row.borderColor,
2529
2463
  boxShadow: (tableRowItem ? tableRowItem : merge.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : merge.TABLE.body.row.box.shadow : 'none'
2530
2464
  }
2531
2465
  }, Object.values(item).map((innerItem, innerIndex) => {
@@ -2713,7 +2647,6 @@ const SvgCloseSlide = ({
2713
2647
  }));
2714
2648
 
2715
2649
  const Modal = ({
2716
- type,
2717
2650
  data,
2718
2651
  width,
2719
2652
  radius,
@@ -2753,7 +2686,8 @@ const Modal = ({
2753
2686
  imageWrapHeight,
2754
2687
  grayDecorHeight,
2755
2688
  layerBackgroundColor,
2756
- closeAreaBackgroundColor
2689
+ closeAreaBackgroundColor,
2690
+ type = 'content'
2757
2691
  }) => {
2758
2692
  const [select, setSelect] = React.useState(0);
2759
2693
  const [isHover, setIsHover] = React.useState(false);
@@ -3054,9 +2988,6 @@ Modal.propTypes = {
3054
2988
  layerBackgroundColor: PropTypes__default["default"].string,
3055
2989
  closeAreaBackgroundColor: PropTypes__default["default"].string
3056
2990
  };
3057
- Modal.defaultProps = {
3058
- type: 'content'
3059
- };
3060
2991
 
3061
2992
  const handleCheckTypeTel = (val, prevVal) => {
3062
2993
  const phoneNumberRegex = /^\d{0,8}$/;
@@ -3359,7 +3290,6 @@ const P = styled__default["default"].span`
3359
3290
  animation: ${true};
3360
3291
  `;
3361
3292
  const Input = ({
3362
- type,
3363
3293
  size,
3364
3294
  name,
3365
3295
  style,
@@ -3419,13 +3349,13 @@ const Input = ({
3419
3349
  telBorderRightStyle,
3420
3350
  telBorderRightColor,
3421
3351
  backgroundDisableColor,
3422
- telBorderRightColorHover
3352
+ telBorderRightColorHover,
3353
+ type = 'text'
3423
3354
  }) => {
3424
3355
  const [show, setShow] = React.useState(false);
3425
3356
  const [isHover, setIsHover] = React.useState(false);
3426
3357
  const [innerErrorMessage, setInnerErrorMessage] = React.useState('');
3427
3358
  const inpStyles = {
3428
- color: color ?? merge.INPUT.color,
3429
3359
  width: width ?? merge.INPUT.width,
3430
3360
  cursor: disabled ? 'not-allowed' : 'auto',
3431
3361
  height: height ?? merge.INPUT.height,
@@ -3435,6 +3365,7 @@ const Input = ({
3435
3365
  fontWeight: weight ?? merge.INPUT.font.weight,
3436
3366
  fontFamily: family ?? merge.INPUT.font.family,
3437
3367
  boxSizing: boxSizing ?? merge.INPUT.box.sizing,
3368
+ color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
3438
3369
  backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
3439
3370
  };
3440
3371
  const uuid = v4();
@@ -3659,9 +3590,6 @@ Input.propTypes = {
3659
3590
  type: PropTypes__default["default"].oneOf(Object.values(InputTypes)),
3660
3591
  value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].object])
3661
3592
  };
3662
- Input.defaultProps = {
3663
- type: 'text'
3664
- };
3665
3593
 
3666
3594
  const RadioDirectionMode = {
3667
3595
  VERTICAL: 'vertical',
@@ -3673,7 +3601,6 @@ const Radio = ({
3673
3601
  getData,
3674
3602
  selected,
3675
3603
  keyNames,
3676
- diraction,
3677
3604
  className,
3678
3605
  borderSize,
3679
3606
  labelColor,
@@ -3687,7 +3614,8 @@ const Radio = ({
3687
3614
  radioMarginRight,
3688
3615
  borderActiveColor,
3689
3616
  radioItemMarginRight,
3690
- radioItemMarginBottom
3617
+ radioItemMarginBottom,
3618
+ diraction = 'vertical'
3691
3619
  }) => {
3692
3620
  const classProps = classnames__default["default"](className ?? merge.RADIO.className);
3693
3621
  const [innerData, setInnerData] = React.useState([]);
@@ -3830,9 +3758,6 @@ Radio.propTypes = {
3830
3758
  diraction: PropTypes__default["default"].oneOf(Object.values(RadioDirectionMode)),
3831
3759
  data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].object), PropTypes__default["default"].object])
3832
3760
  };
3833
- Radio.defaultProps = {
3834
- diraction: 'vertical'
3835
- };
3836
3761
 
3837
3762
  const SvgArrow = ({
3838
3763
  title,
@@ -4078,7 +4003,7 @@ const Select = ({
4078
4003
  whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
4079
4004
  overflow: 'hidden',
4080
4005
  textOverflow: 'ellipsis',
4081
- color: isHover ? selectedHoverColor ? selectedHoverColor : merge.SELECT.selected.colors.hover : selectedColor ? selectedColor : merge.SELECT.selected.color
4006
+ color: errorMessage ? errorColor ? errorColor : merge.SELECT.error.color : isHover ? selectedHoverColor ? selectedHoverColor : merge.SELECT.selected.colors.hover : selectedColor ? selectedColor : merge.SELECT.selected.color
4082
4007
  }
4083
4008
  }, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
4084
4009
  if (newSelected[index][keyNames.name]) {
@@ -4354,12 +4279,12 @@ const ToasterPosition = {
4354
4279
  const Toast = ({
4355
4280
  type,
4356
4281
  icon,
4357
- title,
4358
- timer,
4359
- position,
4360
4282
  closeIcon,
4361
4283
  removeToast,
4362
- description
4284
+ description,
4285
+ timer = 5000,
4286
+ position = 'top-right',
4287
+ title = 'toaster title'
4363
4288
  }) => {
4364
4289
  let timeoutCall;
4365
4290
  let timeoutClick;
@@ -4457,11 +4382,6 @@ Toast.propTypes = {
4457
4382
  position: PropTypes__default["default"].oneOf(Object.values(ToasterPosition)),
4458
4383
  type: PropTypes__default["default"].oneOf(Object.values(ToasterType)).isRequired
4459
4384
  };
4460
- Toast.defaultProps = {
4461
- timer: 5000,
4462
- position: 'top-right',
4463
- title: 'toaster title'
4464
- };
4465
4385
 
4466
4386
  let toastify;
4467
4387
  let path = window.location.href;
@@ -4505,7 +4425,8 @@ const createToast = ({
4505
4425
  description,
4506
4426
  removeToast
4507
4427
  });
4508
- ReactDOM__default["default"].render(newElem, toastBlock);
4428
+ const root = ReactDOM__default["default"].createRoot(toastBlock);
4429
+ root.render(newElem);
4509
4430
  if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
4510
4431
  toastParentBlock = document.createElement('div');
4511
4432
  toastParentBlock.style.position = 'fixed';
@@ -4642,7 +4563,6 @@ var styles$4 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":
4642
4563
  styleInject(css_248z$5);
4643
4564
 
4644
4565
  const Tooltip = ({
4645
- type,
4646
4566
  text,
4647
4567
  width,
4648
4568
  color,
@@ -4657,7 +4577,8 @@ const Tooltip = ({
4657
4577
  tooltipWidth,
4658
4578
  tooltipRadius,
4659
4579
  backgroundColor,
4660
- tooltipBackgroundColor
4580
+ tooltipBackgroundColor,
4581
+ type = 'top'
4661
4582
  }) => {
4662
4583
  const tooltipRef = /*#__PURE__*/React.createRef(null);
4663
4584
  const classProps = classnames__default["default"](styles$4['tooltip-block'], className ?? merge.TOOLTIP.className);
@@ -4734,9 +4655,6 @@ Tooltip.propTypes = {
4734
4655
  backgroundColor: PropTypes__default["default"].string,
4735
4656
  tooltipBackgroundColor: PropTypes__default["default"].string
4736
4657
  };
4737
- Tooltip.defaultProps = {
4738
- type: 'top'
4739
- };
4740
4658
 
4741
4659
  const SvgCaptchaArrowUp = ({
4742
4660
  title,
@@ -4947,13 +4865,13 @@ const Checkbox = ({
4947
4865
  getData,
4948
4866
  keyNames,
4949
4867
  className,
4950
- direction,
4951
4868
  checkedColor,
4952
4869
  unCheckedColor,
4953
4870
  checkedIcon,
4954
4871
  unCheckedIcon,
4955
4872
  labelMarginLeft,
4956
- checkBoxMarginBottom
4873
+ checkBoxMarginBottom,
4874
+ direction = 'vertical'
4957
4875
  }) => {
4958
4876
  const classProps = classnames__default["default"](className ?? merge.CHECKBOX.className);
4959
4877
  const [innerData, setInnerData] = React.useState([]);
@@ -5038,9 +4956,6 @@ Checkbox.propTypes = {
5038
4956
  direction: PropTypes__default["default"].oneOf(Object.values(DirectionMode)),
5039
4957
  data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].object), PropTypes__default["default"].object])
5040
4958
  };
5041
- Checkbox.defaultProps = {
5042
- direction: 'vertical'
5043
- };
5044
4959
 
5045
4960
  var css_248z$2 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
5046
4961
  styleInject(css_248z$2);
@@ -5090,7 +5005,7 @@ const Textarea = ({
5090
5005
  borderHoverColor,
5091
5006
  labelMarginBottom,
5092
5007
  showCharacterCount,
5093
- characterCountPosition
5008
+ characterCountPosition = 'top'
5094
5009
  }) => {
5095
5010
  const classProps = classnames__default["default"](className ?? merge.TEXTAREA.className);
5096
5011
  const [error, setError] = React.useState('');
@@ -5262,9 +5177,6 @@ Textarea.propTypes = {
5262
5177
  onChange: PropTypes__default["default"].func.isRequired,
5263
5178
  characterCountPosition: PropTypes__default["default"].oneOf(Object.values(PositionSide))
5264
5179
  };
5265
- Textarea.defaultProps = {
5266
- characterCountPosition: 'top'
5267
- };
5268
5180
 
5269
5181
  const TypographyType = {
5270
5182
  p: 'p',
@@ -5283,7 +5195,6 @@ const Typography = ({
5283
5195
  radius,
5284
5196
  border,
5285
5197
  cursor,
5286
- variant,
5287
5198
  onClick,
5288
5199
  children,
5289
5200
  textAlign,
@@ -5296,6 +5207,7 @@ const Typography = ({
5296
5207
  textTransform,
5297
5208
  textDecoration,
5298
5209
  backgroundColor,
5210
+ variant = 'p',
5299
5211
  ...props
5300
5212
  }) => {
5301
5213
  const classProps = classnames__default["default"](className ?? merge.TYPOGRAPHY.className);
@@ -5357,9 +5269,6 @@ Typography.propTypes = {
5357
5269
  variant: PropTypes__default["default"].oneOf(Object.values(TypographyType)),
5358
5270
  size: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number])
5359
5271
  };
5360
- Typography.defaultProps = {
5361
- variant: 'p'
5362
- };
5363
5272
 
5364
5273
  var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT>ul{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}";
5365
5274
  var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
@@ -5446,7 +5355,7 @@ const SvgNextarrow = ({
5446
5355
 
5447
5356
  const Pagination = ({
5448
5357
  goTo,
5449
- offset,
5358
+ offset = 2,
5450
5359
  onChange,
5451
5360
  className,
5452
5361
  totalCount,
@@ -5605,9 +5514,6 @@ Pagination.propTypes = {
5605
5514
  className: PropTypes__default["default"].string,
5606
5515
  currentPage: PropTypes__default["default"].number
5607
5516
  };
5608
- Pagination.defaultProps = {
5609
- offset: 2
5610
- };
5611
5517
 
5612
5518
  var css_248z = ".autocomplete-module_auto-complete__oUOv9{appearance:none!important;-webkit-appearance:none!important}";
5613
5519
  var styles = {"auto-complete":"autocomplete-module_auto-complete__oUOv9"};
@@ -5618,9 +5524,7 @@ const Autocomplete = ({
5618
5524
  change,
5619
5525
  options,
5620
5526
  getItem,
5621
- keyNames,
5622
5527
  required,
5623
- disabled,
5624
5528
  selected,
5625
5529
  className,
5626
5530
  errorSize,
@@ -5633,7 +5537,6 @@ const Autocomplete = ({
5633
5537
  errorColor,
5634
5538
  labelColor,
5635
5539
  labelWeight,
5636
- searchCount,
5637
5540
  placeHolder,
5638
5541
  errorMessage,
5639
5542
  autoComplete,
@@ -5695,6 +5598,12 @@ const Autocomplete = ({
5695
5598
  contentBottomRowBackgroundColor,
5696
5599
  contentBottomRowHoverBackgroundColor,
5697
5600
  backgroundDisableColor,
5601
+ searchCount = 3,
5602
+ disabled = false,
5603
+ keyNames = {
5604
+ name: 'name',
5605
+ id: 'id'
5606
+ },
5698
5607
  ...props
5699
5608
  }) => {
5700
5609
  const [id, setId] = React.useState('');
@@ -5998,14 +5907,6 @@ Autocomplete.propTypes = {
5998
5907
  contentBottomRowHoverBackgroundColor: PropTypes__default["default"].string,
5999
5908
  backgroundDisableColor: PropTypes__default["default"].string
6000
5909
  };
6001
- Autocomplete.defaultProps = {
6002
- searchCount: 3,
6003
- disabled: false,
6004
- keyNames: {
6005
- name: 'name',
6006
- id: 'id'
6007
- }
6008
- };
6009
5910
 
6010
5911
  exports.Autocomplete = Autocomplete;
6011
5912
  exports.Button = Button;