mytek-components 1.0.2 → 1.0.3

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.
@@ -542,10 +542,10 @@ var DefaultContext = {
542
542
  attr: void 0
543
543
  };
544
544
  var IconContext = React__default.createContext && /* @__PURE__ */ React__default.createContext(DefaultContext);
545
- var _excluded$4 = ["attr", "size", "title"];
545
+ var _excluded$3 = ["attr", "size", "title"];
546
546
  function _objectWithoutProperties(source, excluded) {
547
547
  if (source == null) return {};
548
- var target = _objectWithoutPropertiesLoose$5(source, excluded);
548
+ var target = _objectWithoutPropertiesLoose$4(source, excluded);
549
549
  var key, i;
550
550
  if (Object.getOwnPropertySymbols) {
551
551
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -558,7 +558,7 @@ function _objectWithoutProperties(source, excluded) {
558
558
  }
559
559
  return target;
560
560
  }
561
- function _objectWithoutPropertiesLoose$5(source, excluded) {
561
+ function _objectWithoutPropertiesLoose$4(source, excluded) {
562
562
  if (source == null) return {};
563
563
  var target = {};
564
564
  for (var key in source) {
@@ -643,7 +643,7 @@ function IconBase(props) {
643
643
  attr,
644
644
  size,
645
645
  title
646
- } = props, svgProps = _objectWithoutProperties(props, _excluded$4);
646
+ } = props, svgProps = _objectWithoutProperties(props, _excluded$3);
647
647
  var computedSize = size || conf.size || "1em";
648
648
  var className;
649
649
  if (conf.className) className = conf.className;
@@ -6145,7 +6145,7 @@ function _extends() {
6145
6145
  return n;
6146
6146
  }, _extends.apply(null, arguments);
6147
6147
  }
6148
- function _objectWithoutPropertiesLoose$4(r2, e) {
6148
+ function _objectWithoutPropertiesLoose$3(r2, e) {
6149
6149
  if (null == r2) return {};
6150
6150
  var t = {};
6151
6151
  for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
@@ -6410,7 +6410,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
6410
6410
  _this$props.onExiting;
6411
6411
  _this$props.onExited;
6412
6412
  _this$props.nodeRef;
6413
- var childProps = _objectWithoutPropertiesLoose$4(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
6413
+ var childProps = _objectWithoutPropertiesLoose$3(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
6414
6414
  return (
6415
6415
  // allows for nested Transitions
6416
6416
  /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
@@ -6770,7 +6770,7 @@ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
6770
6770
  }
6771
6771
  };
6772
6772
  _proto.render = function render() {
6773
- var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$4(_this$props, ["component", "childFactory"]);
6773
+ var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$3(_this$props, ["component", "childFactory"]);
6774
6774
  var contextValue = this.state.contextValue;
6775
6775
  var children = values(this.state.children).map(childFactory2);
6776
6776
  delete props.appear;
@@ -11105,6 +11105,9 @@ const Form$1 = Object.assign(Form, {
11105
11105
  Select: FormSelect,
11106
11106
  FloatingLabel
11107
11107
  });
11108
+ function FaCheck(props) {
11109
+ return GenIcon({ "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" }, "child": [] }] })(props);
11110
+ }
11108
11111
  function FaChevronDown(props) {
11109
11112
  return GenIcon({ "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z" }, "child": [] }] })(props);
11110
11113
  }
@@ -11622,98 +11625,6 @@ global.navigator && // @ts-ignore
11622
11625
  global.navigator.product === "ReactNative";
11623
11626
  const isDOM$1 = typeof document !== "undefined";
11624
11627
  const useIsomorphicEffect$1 = isDOM$1 || isReactNative$1 ? useLayoutEffect : useEffect;
11625
- const _excluded$3 = ["as", "disabled"];
11626
- function _objectWithoutPropertiesLoose$3(r2, e) {
11627
- if (null == r2) return {};
11628
- var t = {};
11629
- for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
11630
- if (e.indexOf(n) >= 0) continue;
11631
- t[n] = r2[n];
11632
- }
11633
- return t;
11634
- }
11635
- function isTrivialHref(href) {
11636
- return !href || href.trim() === "#";
11637
- }
11638
- function useButtonProps({
11639
- tagName,
11640
- disabled,
11641
- href,
11642
- target,
11643
- rel,
11644
- role,
11645
- onClick,
11646
- tabIndex = 0,
11647
- type
11648
- }) {
11649
- if (!tagName) {
11650
- if (href != null || target != null || rel != null) {
11651
- tagName = "a";
11652
- } else {
11653
- tagName = "button";
11654
- }
11655
- }
11656
- const meta = {
11657
- tagName
11658
- };
11659
- if (tagName === "button") {
11660
- return [{
11661
- type: type || "button",
11662
- disabled
11663
- }, meta];
11664
- }
11665
- const handleClick = (event) => {
11666
- if (disabled || tagName === "a" && isTrivialHref(href)) {
11667
- event.preventDefault();
11668
- }
11669
- if (disabled) {
11670
- event.stopPropagation();
11671
- return;
11672
- }
11673
- onClick == null ? void 0 : onClick(event);
11674
- };
11675
- const handleKeyDown = (event) => {
11676
- if (event.key === " ") {
11677
- event.preventDefault();
11678
- handleClick(event);
11679
- }
11680
- };
11681
- if (tagName === "a") {
11682
- href || (href = "#");
11683
- if (disabled) {
11684
- href = void 0;
11685
- }
11686
- }
11687
- return [{
11688
- role: role != null ? role : "button",
11689
- // explicitly undefined so that it overrides the props disabled in a spread
11690
- // e.g. <Tag {...props} {...hookProps} />
11691
- disabled: void 0,
11692
- tabIndex: disabled ? void 0 : tabIndex,
11693
- href,
11694
- target: tagName === "a" ? target : void 0,
11695
- "aria-disabled": !disabled ? void 0 : disabled,
11696
- rel: tagName === "a" ? rel : void 0,
11697
- onClick: handleClick,
11698
- onKeyDown: handleKeyDown
11699
- }, meta];
11700
- }
11701
- const Button$1 = /* @__PURE__ */ React.forwardRef((_ref, ref) => {
11702
- let {
11703
- as: asProp,
11704
- disabled
11705
- } = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$3);
11706
- const [buttonProps, {
11707
- tagName: Component
11708
- }] = useButtonProps(Object.assign({
11709
- tagName: asProp,
11710
- disabled
11711
- }, props));
11712
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, Object.assign({}, props, buttonProps, {
11713
- ref
11714
- }));
11715
- });
11716
- Button$1.displayName = "Button";
11717
11628
  const fadeStyles = {
11718
11629
  [ENTERING]: "show",
11719
11630
  [ENTERED]: "show"
@@ -11750,34 +11661,6 @@ const Fade = /* @__PURE__ */ React.forwardRef(({
11750
11661
  });
11751
11662
  });
11752
11663
  Fade.displayName = "Fade";
11753
- const Button = /* @__PURE__ */ React.forwardRef(({
11754
- as,
11755
- bsPrefix,
11756
- variant = "primary",
11757
- size,
11758
- active = false,
11759
- disabled = false,
11760
- className,
11761
- ...props
11762
- }, ref) => {
11763
- const prefix = useBootstrapPrefix(bsPrefix, "btn");
11764
- const [buttonProps, {
11765
- tagName
11766
- }] = useButtonProps({
11767
- tagName: as,
11768
- disabled,
11769
- ...props
11770
- });
11771
- const Component = tagName;
11772
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, {
11773
- ...buttonProps,
11774
- ...props,
11775
- ref,
11776
- disabled,
11777
- className: classNames(className, prefix, active && "active", variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && disabled && "disabled")
11778
- });
11779
- });
11780
- Button.displayName = "Button";
11781
11664
  function useMounted() {
11782
11665
  const mounted = useRef(true);
11783
11666
  const isMounted = useRef(() => mounted.current);
@@ -16329,368 +16212,6 @@ function requireLib() {
16329
16212
  }
16330
16213
  var libExports = requireLib();
16331
16214
  const PhoneInput = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
16332
- const countryPhoneRules = {
16333
- "+93": { length: 9, startsWith: /^[7]/ },
16334
- // Afghanistan: mobile starts with 7
16335
- "+355": { length: 9, startsWith: /^[6]/ },
16336
- // Albania: mobile starts with 6
16337
- "+213": { length: 9, startsWith: /^[5-7]/ },
16338
- // Algeria: mobile starts with 5,6,7
16339
- "+376": { length: 6, startsWith: /^[3,6]/ },
16340
- // Andorra: mobile starts with 3,6
16341
- "+244": { length: 9, startsWith: /^[9]/ },
16342
- // Angola: mobile starts with 9
16343
- "+1264": { length: 7, startsWith: /^[2-9]/ },
16344
- // Anguilla: follows NANP
16345
- "+1268": { length: 7, startsWith: /^[2-9]/ },
16346
- // Antigua and Barbuda: follows NANP
16347
- "+54": { length: 10, startsWith: /^[9]/ },
16348
- // Argentina: mobile starts with 9
16349
- "+374": { length: 8, startsWith: /^[4,7,9]/ },
16350
- // Armenia: mobile starts with 4,7,9
16351
- "+297": { length: 7, startsWith: /^[5,6,7]/ },
16352
- // Aruba: mobile starts with 5,6,7
16353
- "+61": { length: 9, startsWith: /^[4]/ },
16354
- // Australia: mobile starts with 4
16355
- "+43": { length: 10, startsWith: /^[6]/ },
16356
- // Austria: mobile starts with 6
16357
- "+994": { length: 9, startsWith: /^[4,5,7]/ },
16358
- // Azerbaijan: mobile starts with 4,5,7
16359
- "+1242": { length: 7, startsWith: /^[2-9]/ },
16360
- // Bahamas: follows NANP
16361
- "+973": { length: 8, startsWith: /^[3]/ },
16362
- // Bahrain: mobile starts with 3
16363
- "+880": { length: 10, startsWith: /^[1]/ },
16364
- // Bangladesh: mobile starts with 1
16365
- "+1246": { length: 7, startsWith: /^[2-9]/ },
16366
- // Barbados: follows NANP
16367
- "+375": { length: 9, startsWith: /^[2,3]/ },
16368
- // Belarus: mobile starts with 2,3
16369
- "+32": { length: 9, startsWith: /^[4]/ },
16370
- // Belgium: mobile starts with 4
16371
- "+501": { length: 7, startsWith: /^[6]/ },
16372
- // Belize: mobile starts with 6
16373
- "+229": { length: 8, startsWith: /^[9]/ },
16374
- // Benin: mobile starts with 9
16375
- "+1441": { length: 7, startsWith: /^[2-9]/ },
16376
- // Bermuda: follows NANP
16377
- "+975": { length: 8, startsWith: /^[1,7]/ },
16378
- // Bhutan: mobile starts with 1,7
16379
- "+591": { length: 8, startsWith: /^[6-7]/ },
16380
- // Bolivia: mobile starts with 6,7
16381
- "+387": { length: 8, startsWith: /^[6]/ },
16382
- // Bosnia: mobile starts with 6
16383
- "+267": { length: 8, startsWith: /^[7]/ },
16384
- // Botswana: mobile starts with 7
16385
- "+55": { length: 11, startsWith: /^[1-9]/ },
16386
- // Brazil: varies by region
16387
- "+673": { length: 7, startsWith: /^[7-8]/ },
16388
- // Brunei: mobile starts with 7,8
16389
- "+359": { length: 9, startsWith: /^[8-9]/ },
16390
- // Bulgaria: mobile starts with 8,9
16391
- "+226": { length: 8, startsWith: /^[5-7]/ },
16392
- // Burkina Faso: mobile starts with 5,6,7
16393
- "+855": { length: 9, startsWith: /^[1,6-9]/ },
16394
- // Cambodia: mobile starts with 1,6,7,8,9
16395
- "+237": { length: 9, startsWith: /^[6]/ },
16396
- // Cameroon: mobile starts with 6
16397
- "+1": { length: 10, startsWith: /^[2-9]/ },
16398
- // Canada: follows NANP
16399
- "+238": { length: 7, startsWith: /^[5,9]/ },
16400
- // Cape Verde: mobile starts with 5,9
16401
- "+1345": { length: 7, startsWith: /^[2-9]/ },
16402
- // Cayman Islands: follows NANP
16403
- "+236": { length: 8, startsWith: /^[7]/ },
16404
- // Central African Republic: mobile starts with 7
16405
- "+235": { length: 8, startsWith: /^[6]/ },
16406
- // Chad: mobile starts with 6
16407
- "+56": { length: 9, startsWith: /^[9]/ },
16408
- // Chile: mobile starts with 9
16409
- "+86": { length: 11, startsWith: /^[1]/ },
16410
- // China: mobile starts with 1
16411
- "+57": { length: 10, startsWith: /^[3]/ },
16412
- // Colombia: mobile starts with 3
16413
- "+269": { length: 7, startsWith: /^[3]/ },
16414
- // Comoros: mobile starts with 3
16415
- "+506": { length: 8, startsWith: /^[6-8]/ },
16416
- // Costa Rica: mobile starts with 6,7,8
16417
- "+385": { length: 9, startsWith: /^[9]/ },
16418
- // Croatia: mobile starts with 9
16419
- "+53": { length: 8, startsWith: /^[5]/ },
16420
- // Cuba: mobile starts with 5
16421
- "+357": { length: 8, startsWith: /^[9]/ },
16422
- // Cyprus: mobile starts with 9
16423
- "+420": { length: 9, startsWith: /^[6,7]/ },
16424
- // Czech Republic: mobile starts with 6,7
16425
- "+45": { length: 8, startsWith: /^[2-3,5-9]/ },
16426
- // Denmark: mobile starts with 2,3,5-9
16427
- "+253": { length: 8, startsWith: /^[7]/ },
16428
- // Djibouti: mobile starts with 7
16429
- "+1767": { length: 7, startsWith: /^[2-9]/ },
16430
- // Dominica: follows NANP
16431
- "+1809": { length: 7, startsWith: /^[2-9]/ },
16432
- // Dominican Republic: follows NANP
16433
- "+593": { length: 9, startsWith: /^[9]/ },
16434
- // Ecuador: mobile starts with 9
16435
- "+20": { length: 10, startsWith: /^[1]/ },
16436
- // Egypt: mobile starts with 1
16437
- "+503": { length: 8, startsWith: /^[7]/ },
16438
- // El Salvador: mobile starts with 7
16439
- "+240": { length: 9, startsWith: /^[2]/ },
16440
- // Equatorial Guinea: mobile starts with 2
16441
- "+372": { length: 8, startsWith: /^[5]/ },
16442
- // Estonia: mobile starts with 5
16443
- "+251": { length: 9, startsWith: /^[9]/ },
16444
- // Ethiopia: mobile starts with 9
16445
- "+679": { length: 7, startsWith: /^[7,9]/ },
16446
- // Fiji: mobile starts with 7,9
16447
- "+358": { length: 9, startsWith: /^[4,5]/ },
16448
- // Finland: mobile starts with 4,5
16449
- "+33": { length: 9, startsWith: /^[6,7]/ },
16450
- // France: mobile starts with 6,7
16451
- "+241": { length: 8, startsWith: /^[0,1,2,5-9]/ },
16452
- // Gabon: mobile starts with 0,1,2,5-9
16453
- "+220": { length: 7, startsWith: /^[7,9]/ },
16454
- // Gambia: mobile starts with 7,9
16455
- "+995": { length: 9, startsWith: /^[5]/ },
16456
- // Georgia: mobile starts with 5
16457
- "+49": { length: 11, startsWith: /^[1]/ },
16458
- // Germany: mobile starts with 1
16459
- "+233": { length: 9, startsWith: /^[2]/ },
16460
- // Ghana: mobile starts with 2
16461
- "+30": { length: 10, startsWith: /^[6,7]/ },
16462
- // Greece: mobile starts with 6,7
16463
- "+299": { length: 6, startsWith: /^[4,5]/ },
16464
- // Greenland: mobile starts with 4,5
16465
- "+1473": { length: 7, startsWith: /^[2-9]/ },
16466
- // Grenada: follows NANP
16467
- "+502": { length: 8, startsWith: /^[4,5]/ },
16468
- // Guatemala: mobile starts with 4,5
16469
- "+224": { length: 9, startsWith: /^[6]/ },
16470
- // Guinea: mobile starts with 6
16471
- "+245": { length: 7, startsWith: /^[5,6,7]/ },
16472
- // Guinea-Bissau: mobile starts with 5,6,7
16473
- "+592": { length: 7, startsWith: /^[6]/ },
16474
- // Guyana: mobile starts with 6
16475
- "+509": { length: 8, startsWith: /^[3,4]/ },
16476
- // Haiti: mobile starts with 3,4
16477
- "+504": { length: 8, startsWith: /^[3,7,8,9]/ },
16478
- // Honduras: mobile starts with 3,7,8,9
16479
- "+852": { length: 8, startsWith: /^[5-9]/ },
16480
- // Hong Kong: mobile starts with 5-9
16481
- "+36": { length: 9, startsWith: /^[2,3,7]/ },
16482
- // Hungary: mobile starts with 2,3,7
16483
- "+354": { length: 7, startsWith: /^[6,7,8]/ },
16484
- // Iceland: mobile starts with 6,7,8
16485
- "+91": { length: 10, startsWith: /^[6-9]/ },
16486
- // India: mobile starts with 6,7,8,9
16487
- "+62": { length: 10, startsWith: /^[8]/ },
16488
- // Indonesia: mobile starts with 8
16489
- "+98": { length: 10, startsWith: /^[9]/ },
16490
- // Iran: mobile starts with 9
16491
- "+964": { length: 10, startsWith: /^[7]/ },
16492
- // Iraq: mobile starts with 7
16493
- "+353": { length: 9, startsWith: /^[8]/ },
16494
- // Ireland: mobile starts with 8
16495
- "+972": { length: 9, startsWith: /^[5]/ },
16496
- // Israel: mobile starts with 5
16497
- "+39": { length: 10, startsWith: /^[3]/ },
16498
- // Italy: mobile starts with 3
16499
- "+225": { length: 8, startsWith: /^[0,4-8]/ },
16500
- // Ivory Coast: mobile starts with 0,4-8
16501
- "+1876": { length: 7, startsWith: /^[2-9]/ },
16502
- // Jamaica: follows NANP
16503
- "+81": { length: 10, startsWith: /^[7-9]/ },
16504
- // Japan: mobile starts with 7,8,9
16505
- "+962": { length: 9, startsWith: /^[7]/ },
16506
- // Jordan: mobile starts with 7
16507
- "+7": { length: 10, startsWith: /^[9]/ },
16508
- // Kazakhstan: mobile starts with 9
16509
- "+254": { length: 9, startsWith: /^[7]/ },
16510
- // Kenya: mobile starts with 7
16511
- "+965": { length: 8, startsWith: /^[5,6,9]/ },
16512
- // Kuwait: mobile starts with 5,6,9
16513
- "+996": { length: 9, startsWith: /^[5,7]/ },
16514
- // Kyrgyzstan: mobile starts with 5,7
16515
- "+856": { length: 10, startsWith: /^[2]/ },
16516
- // Laos: mobile starts with 2
16517
- "+371": { length: 8, startsWith: /^[2]/ },
16518
- // Latvia: mobile starts with 2
16519
- "+961": { length: 8, startsWith: /^[3,7]/ },
16520
- // Lebanon: mobile starts with 3,7
16521
- "+266": { length: 8, startsWith: /^[5,6]/ },
16522
- // Lesotho: mobile starts with 5,6
16523
- "+231": { length: 8, startsWith: /^[4,5,6,7]/ },
16524
- // Liberia: mobile starts with 4,5,6,7
16525
- "+218": { length: 9, startsWith: /^[9]/ },
16526
- // Libya: mobile starts with 9
16527
- "+423": { length: 7, startsWith: /^[7]/ },
16528
- // Liechtenstein: mobile starts with 7
16529
- "+370": { length: 8, startsWith: /^[6]/ },
16530
- // Lithuania: mobile starts with 6
16531
- "+352": { length: 9, startsWith: /^[6]/ },
16532
- // Luxembourg: mobile starts with 6
16533
- "+853": { length: 8, startsWith: /^[6]/ },
16534
- // Macau: mobile starts with 6
16535
- "+261": { length: 9, startsWith: /^[3]/ },
16536
- // Madagascar: mobile starts with 3
16537
- "+265": { length: 9, startsWith: /^[8,9]/ },
16538
- // Malawi: mobile starts with 8,9
16539
- "+60": { length: 9, startsWith: /^[1]/ },
16540
- // Malaysia: mobile starts with 1
16541
- "+960": { length: 7, startsWith: /^[7,9]/ },
16542
- // Maldives: mobile starts with 7,9
16543
- "+223": { length: 8, startsWith: /^[6,7]/ },
16544
- // Mali: mobile starts with 6,7
16545
- "+356": { length: 8, startsWith: /^[7,9]/ },
16546
- // Malta: mobile starts with 7,9
16547
- "+692": { length: 7, startsWith: /^[4]/ },
16548
- // Marshall Islands: mobile starts with 4
16549
- "+222": { length: 8, startsWith: /^[2,3,4]/ },
16550
- // Mauritania: mobile starts with 2,3,4
16551
- "+230": { length: 8, startsWith: /^[5]/ },
16552
- // Mauritius: mobile starts with 5
16553
- "+52": { length: 10, startsWith: /^[1-9]/ },
16554
- // Mexico: varies by region
16555
- "+373": { length: 8, startsWith: /^[6,7]/ },
16556
- // Moldova: mobile starts with 6,7
16557
- "+377": { length: 8, startsWith: /^[4,6]/ },
16558
- // Monaco: mobile starts with 4,6
16559
- "+976": { length: 8, startsWith: /^[8,9]/ },
16560
- // Mongolia: mobile starts with 8,9
16561
- "+382": { length: 8, startsWith: /^[6]/ },
16562
- // Montenegro: mobile starts with 6
16563
- "+212": { length: 9, startsWith: /^[6]/ },
16564
- // Morocco: mobile starts with 6
16565
- "+258": { length: 9, startsWith: /^[8]/ },
16566
- // Mozambique: mobile starts with 8
16567
- "+95": { length: 9, startsWith: /^[9]/ },
16568
- // Myanmar: mobile starts with 9
16569
- "+264": { length: 9, startsWith: /^[8]/ },
16570
- // Namibia: mobile starts with 8
16571
- "+977": { length: 10, startsWith: /^[9]/ },
16572
- // Nepal: mobile starts with 9
16573
- "+31": { length: 9, startsWith: /^[6]/ },
16574
- // Netherlands: mobile starts with 6
16575
- "+64": { length: 9, startsWith: /^[2]/ },
16576
- // New Zealand: mobile starts with 2
16577
- "+505": { length: 8, startsWith: /^[8]/ },
16578
- // Nicaragua: mobile starts with 8
16579
- "+227": { length: 8, startsWith: /^[9]/ },
16580
- // Niger: mobile starts with 9
16581
- "+234": { length: 10, startsWith: /^[7,8,9]/ },
16582
- // Nigeria: mobile starts with 7,8,9
16583
- "+850": { length: 9, startsWith: /^[1]/ },
16584
- // North Korea: mobile starts with 1
16585
- "+47": { length: 8, startsWith: /^[4,9]/ },
16586
- // Norway: mobile starts with 4,9
16587
- "+968": { length: 8, startsWith: /^[9]/ },
16588
- // Oman: mobile starts with 9
16589
- "+92": { length: 10, startsWith: /^[3]/ },
16590
- // Pakistan: mobile starts with 3
16591
- "+970": { length: 9, startsWith: /^[5]/ },
16592
- // Palestine: mobile starts with 5
16593
- "+507": { length: 8, startsWith: /^[6]/ },
16594
- // Panama: mobile starts with 6
16595
- "+675": { length: 8, startsWith: /^[7]/ },
16596
- // Papua New Guinea: mobile starts with 7
16597
- "+595": { length: 9, startsWith: /^[9]/ },
16598
- // Paraguay: mobile starts with 9
16599
- "+51": { length: 9, startsWith: /^[9]/ },
16600
- // Peru: mobile starts with 9
16601
- "+63": { length: 10, startsWith: /^[9]/ },
16602
- // Philippines: mobile starts with 9
16603
- "+48": { length: 9, startsWith: /^[5,6,7,8]/ },
16604
- // Poland: mobile starts with 5,6,7,8
16605
- "+351": { length: 9, startsWith: /^[9]/ },
16606
- // Portugal: mobile starts with 9
16607
- "+974": { length: 8, startsWith: /^[3,5,6,7]/ },
16608
- // Qatar: mobile starts with 3,5,6,7
16609
- "+40": { length: 9, startsWith: /^[7]/ },
16610
- // Romania: mobile starts with 7
16611
- "+07": { length: 10, startsWith: /^[9]/ },
16612
- // Russia: mobile starts with 9
16613
- "+250": { length: 9, startsWith: /^[7]/ },
16614
- // Rwanda: mobile starts with 7
16615
- "+966": { length: 9, startsWith: /^[5]/ },
16616
- // Saudi Arabia: mobile starts with 5
16617
- "+221": { length: 9, startsWith: /^[7]/ },
16618
- // Senegal: mobile starts with 7
16619
- "+381": { length: 9, startsWith: /^[6]/ },
16620
- // Serbia: mobile starts with 6
16621
- "+248": { length: 7, startsWith: /^[2]/ },
16622
- // Seychelles: mobile starts with 2
16623
- "+232": { length: 8, startsWith: /^[7,9]/ },
16624
- // Sierra Leone: mobile starts with 7,9
16625
- "+65": { length: 8, startsWith: /^[8,9]/ },
16626
- // Singapore: mobile starts with 8,9
16627
- "+421": { length: 9, startsWith: /^[9]/ },
16628
- // Slovakia: mobile starts with 9
16629
- "+386": { length: 8, startsWith: /^[3,4]/ },
16630
- // Slovenia: mobile starts with 3,4
16631
- "+252": { length: 8, startsWith: /^[6,7]/ },
16632
- // Somalia: mobile starts with 6,7
16633
- "+27": { length: 9, startsWith: /^[6,7,8]/ },
16634
- // South Africa: mobile starts with 6,7,8
16635
- "+82": { length: 10, startsWith: /^[1]/ },
16636
- // South Korea: mobile starts with 1
16637
- "+211": { length: 9, startsWith: /^[9]/ },
16638
- // South Sudan: mobile starts with 9
16639
- "+34": { length: 9, startsWith: /^[6,7]/ },
16640
- // Spain: mobile starts with 6,7
16641
- "+94": { length: 9, startsWith: /^[7]/ },
16642
- // Sri Lanka: mobile starts with 7
16643
- "+249": { length: 9, startsWith: /^[9]/ },
16644
- // Sudan: mobile starts with 9
16645
- "+597": { length: 7, startsWith: /^[6,7,8]/ },
16646
- // Suriname: mobile starts with 6,7,8
16647
- "+46": { length: 9, startsWith: /^[7]/ },
16648
- // Sweden: mobile starts with 7
16649
- "+41": { length: 9, startsWith: /^[7]/ },
16650
- // Switzerland: mobile starts with 7
16651
- "+963": { length: 9, startsWith: /^[9]/ },
16652
- // Syria: mobile starts with 9
16653
- "+886": { length: 9, startsWith: /^[9]/ },
16654
- // Taiwan: mobile starts with 9
16655
- "+992": { length: 9, startsWith: /^[9]/ },
16656
- // Tajikistan: mobile starts with 9
16657
- "+255": { length: 9, startsWith: /^[6,7]/ },
16658
- // Tanzania: mobile starts with 6,7
16659
- "+66": { length: 9, startsWith: /^[6,8,9]/ },
16660
- // Thailand: mobile starts with 6,8,9
16661
- "+228": { length: 8, startsWith: /^[9]/ },
16662
- // Togo: mobile starts with 9
16663
- "+216": { length: 8, startsWith: /^[2,4,5,9]/ },
16664
- // Tunisia: mobile starts with 2,4,5,9
16665
- "+90": { length: 10, startsWith: /^[5]/ },
16666
- // Turkey: mobile starts with 5
16667
- "+993": { length: 8, startsWith: /^[6]/ },
16668
- // Turkmenistan: mobile starts with 6
16669
- "+256": { length: 9, startsWith: /^[7]/ },
16670
- // Uganda: mobile starts with 7
16671
- "+380": { length: 9, startsWith: /^[5,6,7,9]/ },
16672
- // Ukraine: mobile starts with 5,6,7,9
16673
- "+971": { length: 9, startsWith: /^[5]/ },
16674
- // UAE: mobile starts with 5
16675
- "+44": { length: 10, startsWith: /^[7]/ },
16676
- // UK: mobile starts with 7
16677
- "+01": { length: 10, startsWith: /^[2-9]/ },
16678
- // USA: follows NANP
16679
- "+598": { length: 8, startsWith: /^[9]/ },
16680
- // Uruguay: mobile starts with 9
16681
- "+998": { length: 9, startsWith: /^[9]/ },
16682
- // Uzbekistan: mobile starts with 9
16683
- "+58": { length: 10, startsWith: /^[4]/ },
16684
- // Venezuela: mobile starts with 4
16685
- "+84": { length: 9, startsWith: /^[3,5,7,8,9]/ },
16686
- // Vietnam: mobile starts with 3,5,7,8,9
16687
- "+967": { length: 9, startsWith: /^[7]/ },
16688
- // Yemen: mobile starts with 7
16689
- "+260": { length: 9, startsWith: /^[9]/ },
16690
- // Zambia: mobile starts with 9
16691
- "+263": { length: 9, startsWith: /^[7]/ }
16692
- // Zimbabwe: mobile starts with 7
16693
- };
16694
16215
  const formatNumberIndian = (num) => {
16695
16216
  const [integer, decimal] = num.toString().split(".");
16696
16217
  const lastThree = integer.slice(-3);
@@ -16773,6 +16294,7 @@ const CustomInput = ({
16773
16294
  name,
16774
16295
  type = "text",
16775
16296
  category,
16297
+ subCategory,
16776
16298
  label,
16777
16299
  placeholder,
16778
16300
  height: height2,
@@ -16788,20 +16310,29 @@ const CustomInput = ({
16788
16310
  maxLength,
16789
16311
  isRequired = false,
16790
16312
  currency,
16791
- // loader = false,
16313
+ // loader = false,
16792
16314
  backgroundColor: backgroundColor2,
16793
- color: color2
16315
+ validationStatus,
16316
+ originalValue,
16317
+ onValidationChange,
16318
+ // color,
16319
+ showTimer,
16320
+ timer
16794
16321
  }) => {
16795
16322
  const [countryCode, setCountryCode] = useState("IN");
16796
16323
  const [nationalNumber, setNationalNumber] = useState("");
16797
16324
  const [error, setError] = useState("");
16798
16325
  const [showPassword, setShowPassword] = useState(false);
16799
16326
  const [amountInWords, setAmountInWords] = useState("");
16800
- const [enable, setEnable] = useState(button == null ? void 0 : button.disabled);
16327
+ const [enable, setEnable] = useState(true);
16328
+ console.log(enable);
16801
16329
  const validate = (val) => {
16802
16330
  const raw = category === "amount" ? removeCommas(val) : val;
16803
16331
  if (!isRequired && !val) {
16804
16332
  setError("");
16333
+ if (onValidationChange) {
16334
+ onValidationChange(name, true);
16335
+ }
16805
16336
  return true;
16806
16337
  }
16807
16338
  switch (category) {
@@ -16819,15 +16350,20 @@ const CustomInput = ({
16819
16350
  break;
16820
16351
  case "email": {
16821
16352
  if (!val) {
16353
+ setEnable(true);
16822
16354
  return setError("Email is required");
16823
16355
  } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val)) {
16356
+ setEnable(true);
16824
16357
  return setError("Invalid email");
16825
16358
  } else {
16826
- return setError("");
16359
+ setError("");
16360
+ setEnable(false);
16827
16361
  }
16362
+ break;
16828
16363
  }
16829
16364
  case "mobile":
16830
16365
  if (val.length !== 10) return setError("Invalid mobile number");
16366
+ if (val.length == 10) setEnable(true);
16831
16367
  break;
16832
16368
  case "aadhaar":
16833
16369
  setEnable(true);
@@ -16838,7 +16374,13 @@ const CustomInput = ({
16838
16374
  }
16839
16375
  break;
16840
16376
  case "pincode":
16841
- if (val.length !== 6) return setError("Invalid pincode");
16377
+ setEnable(true);
16378
+ if (val.length !== 6) {
16379
+ setError("Invalid pincode");
16380
+ } else {
16381
+ setError("");
16382
+ setEnable(false);
16383
+ }
16842
16384
  break;
16843
16385
  case "gst":
16844
16386
  var gstin = val.toUpperCase();
@@ -16884,7 +16426,15 @@ const CustomInput = ({
16884
16426
  setEnable(true);
16885
16427
  if (panLength === 0) {
16886
16428
  setError("");
16887
- } else if (panLength >= 1 && panLength <= 5) {
16429
+ } else if (subCategory === "P" && panLength >= 4 && pan[3] !== "P") {
16430
+ return setError("Please enter a valid Individual PAN");
16431
+ } else if (subCategory === "O" && panLength >= 4) {
16432
+ const validOrgTypes = ["C", "F", "A", "T", "B", "L", "J", "G"];
16433
+ if (!validOrgTypes.includes(pan[3])) {
16434
+ return setError(`Please enter a valid Organization PAN`);
16435
+ }
16436
+ }
16437
+ if (panLength >= 1 && panLength <= 5) {
16888
16438
  if (!/^[A-Z]{1,5}$/.test(pan)) {
16889
16439
  return setError("PAN should follow the format: ABCDE1234F");
16890
16440
  }
@@ -16897,30 +16447,111 @@ const CustomInput = ({
16897
16447
  return setError("PAN should follow the format: ABCDE1234F");
16898
16448
  }
16899
16449
  setEnable(false);
16900
- } else {
16450
+ } else if (panLength > 10) {
16901
16451
  return setError("PAN should follow the format: ABCDE1234F");
16902
16452
  }
16903
16453
  break;
16454
+ case "cin":
16455
+ var cin = val.toUpperCase();
16456
+ var cinLength = cin.length;
16457
+ setEnable(true);
16458
+ if (cinLength === 0) {
16459
+ setError("");
16460
+ } else if (cinLength === 1) {
16461
+ if (!/^[UL]$/.test(cin)) {
16462
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16463
+ }
16464
+ } else if (cinLength >= 2 && cinLength <= 6) {
16465
+ if (!/^[UL][0-9]{1,5}$/.test(cin)) {
16466
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16467
+ }
16468
+ } else if (cinLength >= 7 && cinLength <= 8) {
16469
+ if (!/^[UL][0-9]{5}[A-Z]{1,2}$/.test(cin)) {
16470
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16471
+ }
16472
+ } else if (cinLength >= 9 && cinLength <= 12) {
16473
+ if (!/^[UL][0-9]{5}[A-Z]{2}[0-9]{1,4}$/.test(cin)) {
16474
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16475
+ }
16476
+ } else if (cinLength >= 13 && cinLength <= 15) {
16477
+ if (!/^[UL][0-9]{5}[A-Z]{2}[0-9]{4}[A-Z]{1,3}$/.test(cin)) {
16478
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16479
+ }
16480
+ } else if (cinLength >= 16 && cinLength <= 20) {
16481
+ if (!/^[UL][0-9]{5}[A-Z]{2}[0-9]{4}[A-Z]{3}[0-9]{1,5}$/.test(cin)) {
16482
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16483
+ }
16484
+ } else if (cinLength === 21) {
16485
+ if (!/^[UL][0-9]{5}[A-Z]{2}[0-9]{4}[A-Z]{3}[0-9]{6}$/.test(cin)) {
16486
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16487
+ }
16488
+ setEnable(false);
16489
+ } else {
16490
+ return setError("CIN should follow the format: U12345AB1234PTC123456");
16491
+ }
16492
+ break;
16904
16493
  case "password": {
16905
16494
  if (!val) {
16906
- return setError("Password is required");
16495
+ setError("Password is required");
16496
+ if (onValidationChange) {
16497
+ onValidationChange(name, false);
16498
+ }
16499
+ return false;
16907
16500
  } else if (!/^(?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9])(?=.{8,})/.test(val)) {
16908
- return setError(
16501
+ setError(
16909
16502
  "Password must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, and one special character."
16910
16503
  );
16504
+ if (onValidationChange) {
16505
+ onValidationChange(name, false);
16506
+ }
16507
+ return false;
16911
16508
  } else {
16912
- return setError("");
16509
+ setError("");
16510
+ if (onValidationChange) {
16511
+ onValidationChange(name, true);
16512
+ }
16513
+ return true;
16913
16514
  }
16914
16515
  }
16516
+ case "confirmPassword":
16517
+ if (!val) {
16518
+ setError("Confirm Password is required");
16519
+ if (onValidationChange) {
16520
+ onValidationChange(name, false);
16521
+ }
16522
+ return false;
16523
+ } else if (val !== originalValue) {
16524
+ setError("Passwords do not match");
16525
+ if (onValidationChange) {
16526
+ onValidationChange(name, false);
16527
+ }
16528
+ return false;
16529
+ } else {
16530
+ setError("");
16531
+ if (onValidationChange) {
16532
+ onValidationChange(name, true);
16533
+ }
16534
+ return true;
16535
+ }
16915
16536
  }
16916
16537
  setError("");
16538
+ if (onValidationChange) {
16539
+ onValidationChange(name, true);
16540
+ }
16917
16541
  return true;
16918
16542
  };
16543
+ useEffect(() => {
16544
+ if (category === "confirmPassword" && value && originalValue) {
16545
+ validate(value);
16546
+ }
16547
+ }, [originalValue]);
16919
16548
  const handleChange = (e) => {
16920
16549
  let val;
16921
16550
  if (category == "mobile") {
16551
+ alert(val.length);
16922
16552
  console.log(e);
16923
16553
  val = e;
16554
+ validate(val);
16924
16555
  } else {
16925
16556
  val = e.target.value;
16926
16557
  }
@@ -16954,6 +16585,7 @@ const CustomInput = ({
16954
16585
  case "email":
16955
16586
  val = val.toLowerCase();
16956
16587
  onChange(name, val);
16588
+ validate(val);
16957
16589
  break;
16958
16590
  case "aadhaar":
16959
16591
  val = val.replace(/\D/g, "").slice(0, 12);
@@ -16963,6 +16595,7 @@ const CustomInput = ({
16963
16595
  case "pincode":
16964
16596
  val = val.replace(/\D/g, "").slice(0, 6);
16965
16597
  onChange(name, val);
16598
+ validate(val);
16966
16599
  break;
16967
16600
  case "gst":
16968
16601
  val = val.toUpperCase().slice(0, 15);
@@ -16974,9 +16607,20 @@ const CustomInput = ({
16974
16607
  onChange(name, val);
16975
16608
  validate(val);
16976
16609
  break;
16610
+ case "cin":
16611
+ val = val.toUpperCase().slice(0, 21);
16612
+ onChange(name, val);
16613
+ validate(val);
16614
+ break;
16977
16615
  case "password":
16978
16616
  val = val.slice(0, maxLength || 20);
16979
16617
  onChange(name, val);
16618
+ validate(val);
16619
+ break;
16620
+ case "confirmPassword":
16621
+ val = val.slice(0, maxLength || 20);
16622
+ onChange(name, val);
16623
+ validate(val);
16980
16624
  break;
16981
16625
  default:
16982
16626
  onChange(name, val);
@@ -17000,18 +16644,27 @@ const CustomInput = ({
17000
16644
  const { length, startsWith } = rules;
17001
16645
  const callingCodeLength = country.dialCode.length;
17002
16646
  const maxTotalLength = callingCodeLength + length;
17003
- console.log(value2, value2.length, maxTotalLength, "len");
16647
+ console.log(
16648
+ value2,
16649
+ value2.length,
16650
+ maxTotalLength,
16651
+ length,
16652
+ nationalNumber.length,
16653
+ startsWith,
16654
+ startsWith.test(nationalNumber),
16655
+ "len"
16656
+ );
17004
16657
  if (value2.length > maxTotalLength) {
17005
16658
  setError("Invalid phone number for selected country");
17006
16659
  setEnable(true);
17007
16660
  }
17008
- if (nationalNumber.length === length && startsWith.test(nationalNumber)) {
16661
+ if (value2.length === maxTotalLength && startsWith.test(nationalNumber)) {
17009
16662
  setError("");
17010
16663
  setEnable(false);
17011
16664
  }
17012
16665
  onChange(name, value2);
17013
16666
  };
17014
- const isPassword = category === "password";
16667
+ const isPassword = category === "password" || category === "confirmPassword" || category === "loginPassword";
17015
16668
  const isAmount = category === "amount" && (format === "us" || format === "indian");
17016
16669
  const isPercentage = category === "percentage";
17017
16670
  const prefix = isAmount ? currency : null;
@@ -17023,11 +16676,26 @@ const CustomInput = ({
17023
16676
  className: "mb-2",
17024
16677
  style: { width: width2 || "100%" },
17025
16678
  children: [
17026
- label && /* @__PURE__ */ jsxRuntimeExports.jsxs(Form$1.Label, { style: { textAlign: "left", display: "flex", fontWeight: "500", fontSize: "14px", lineHeight: "20px", color: "#212529", textTransform: "capitalize", marginBottom: "0.5rem" }, children: [
17027
- label,
17028
- " ",
17029
- isRequired && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "red" }, children: "*" })
17030
- ] }),
16679
+ label && /* @__PURE__ */ jsxRuntimeExports.jsxs(
16680
+ Form$1.Label,
16681
+ {
16682
+ style: {
16683
+ textAlign: "left",
16684
+ display: "flex",
16685
+ fontWeight: "500",
16686
+ fontSize: "14px",
16687
+ lineHeight: "20px",
16688
+ color: "#212529",
16689
+ textTransform: "capitalize",
16690
+ marginBottom: "0.5rem"
16691
+ },
16692
+ children: [
16693
+ label,
16694
+ " ",
16695
+ isRequired && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "red" }, children: "*" })
16696
+ ]
16697
+ }
16698
+ ),
17031
16699
  /* @__PURE__ */ jsxRuntimeExports.jsxs(InputGroup$1, { children: [
17032
16700
  prefix && /* @__PURE__ */ jsxRuntimeExports.jsx(
17033
16701
  InputGroup$1.Text,
@@ -17040,164 +16708,124 @@ const CustomInput = ({
17040
16708
  OverlayTrigger,
17041
16709
  {
17042
16710
  placement: "top",
17043
- overlay: isAmount && amountInWords && (currency === "₹" || currency === "$") ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { id: `${name}-tooltip`, children: amountInWords }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}),
17044
- children: category === "mobile" ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flexGrow: 1, display: "flex" }, children: [
16711
+ overlay: isAmount && amountInWords && (currency === "₹" || currency === "$") ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { id: `${name}-tooltip`, children: amountInWords }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}),
16712
+ children: category === "mobile" ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border border-[#12AB5B] rounded-md w-full", children: [
17045
16713
  /* @__PURE__ */ jsxRuntimeExports.jsx(
17046
16714
  PhoneInput,
17047
16715
  {
17048
16716
  value,
17049
16717
  onChange: (value2, country) => handlePhoneChange(value2, country),
17050
16718
  country: countryCode.toLowerCase(),
17051
- disableCountryCode: false,
17052
16719
  enableLongNumbers: true,
16720
+ disableDropdown: false,
17053
16721
  countryCodeEditable: false,
17054
- inputProps: {
17055
- name: "phone",
17056
- required: true
17057
- },
17058
- containerStyle: {
16722
+ inputProps: { autoComplete: "off" },
16723
+ containerStyle: { width: "100%" },
16724
+ disabled,
16725
+ inputStyle: {
17059
16726
  width: "100%",
17060
- display: "flex",
17061
- flexGrow: 1
16727
+ height: "40px",
16728
+ fontSize: "14px",
16729
+ paddingLeft: "48px",
16730
+ // leave space for flag
16731
+ border: "none",
16732
+ backgroundColor: disabled ? "#f1f1f1" : "#fff",
16733
+ // ✅ gray when disabled
16734
+ color: disabled ? "#6c757d" : "#000",
16735
+ // ✅ muted text when disabled
16736
+ cursor: disabled ? "not-allowed" : "text"
16737
+ // ✅ show disabled cursor
17062
16738
  },
17063
- inputStyle: {
17064
- borderColor: "#12AB5B",
17065
- height: height2 || "40px",
17066
- borderTopRightRadius: !isPassword && !(button == null ? void 0 : button.label) && !suffix ? "0.375rem" : 0,
17067
- borderBottomRightRadius: !isPassword && !(button == null ? void 0 : button.label) && !suffix ? "0.375rem" : 0,
17068
- borderTopLeftRadius: prefix ? 0 : "0.375rem",
17069
- borderBottomLeftRadius: prefix ? 0 : "0.375rem",
17070
- width: "100%"
17071
- // paddingLeft: '48px', // make space for the flag
17072
- // fontSize: '14px',
17073
- // boxShadow: 'none',
16739
+ buttonStyle: {
16740
+ borderRight: "1px solid #12AB5B",
16741
+ backgroundColor: disabled ? "#f1f1f1" : "#fff",
16742
+ // gray when disabled
16743
+ borderRadius: "0.375rem 0 0 0.375rem",
16744
+ cursor: disabled ? "not-allowed" : "pointer"
17074
16745
  },
17075
- dropdownStyle: {
17076
- fontSize: "13px"
16746
+ dropdownClass: "z-50 mt-1 bg-white border border-gray-300 rounded-md text-sm max-h-60 overflow-y-auto shadow-lg"
16747
+ }
16748
+ ),
16749
+ (button == null ? void 0 : button.label) && /* @__PURE__ */ jsxRuntimeExports.jsx(
16750
+ "button",
16751
+ {
16752
+ type: "button",
16753
+ onClick: button.onClick,
16754
+ disabled: button.disabled || enable,
16755
+ className: `px-4 py-2 text-white ${backgroundColor2 || "bg-[#3B5AA1]"} border-l border-[#12AB5B] rounded-r-md ${button.disabled || enable ? "opacity-50 cursor-not-allowed" : ""}`,
16756
+ style: { height: height2 },
16757
+ children: button.loader ? /* @__PURE__ */ jsxRuntimeExports.jsx(MytekLoader, { inline: true }) : button.label
16758
+ }
16759
+ )
16760
+ ] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border border-[#12AB5B] overflow-hidden rounded-md", children: [
16761
+ prefix && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-2 bg-white text-gray-700 border-r border-[#12AB5B]", children: prefix }),
16762
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16763
+ "input",
16764
+ {
16765
+ type: isPassword ? showPassword ? "text" : "password" : type,
16766
+ name,
16767
+ value,
16768
+ onChange: handleChange,
16769
+ disabled,
16770
+ placeholder,
16771
+ className: `flex-1 px-2 py-2 focus:outline-none ${disabled ? "bg-gray-100 cursor-not-allowed text-gray-500" : ""}`,
16772
+ style: {
16773
+ height: height2,
16774
+ backgroundColor: disabled ? "#f1f1f1" : void 0,
16775
+ color: disabled ? "#6c757d" : void 0
17077
16776
  }
17078
16777
  }
17079
16778
  ),
16779
+ suffix && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-2 bg-white text-gray-700 border-l border-[#12AB5B]", children: suffix }),
16780
+ !error && showTimer && /* @__PURE__ */ jsxRuntimeExports.jsxs(
16781
+ "span",
16782
+ {
16783
+ className: `flex items-center gap-1 justify-center h-[40px] min-w-[60px] px-2 ml-1 rounded text-sm
16784
+ ${validationStatus === "valid" ? "text-green-600 bg-gray-100" : validationStatus === "invalid" ? "text-red-600" : "text-gray-600 bg-gray-100"}`,
16785
+ title: validationStatus === "valid" ? "Correct OTP" : validationStatus === "invalid" ? "Incorrect OTP" : "OTP Timer",
16786
+ children: [
16787
+ validationStatus === "valid" && /* @__PURE__ */ jsxRuntimeExports.jsx(FaCheck, { size: 18 }),
16788
+ validationStatus === "invalid" && /* @__PURE__ */ jsxRuntimeExports.jsx(IoMdClose, { size: 18 }),
16789
+ typeof timer === "number" && validationStatus !== "valid" && `${timer}s`
16790
+ ]
16791
+ }
16792
+ ),
16793
+ isPassword && /* @__PURE__ */ jsxRuntimeExports.jsx(
16794
+ "button",
16795
+ {
16796
+ type: "button",
16797
+ onClick: () => setShowPassword(!showPassword),
16798
+ className: "px-2 bg-white text-gray-500 border-l border-[#12AB5B]",
16799
+ children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(FiEye, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(FiEyeOff, {})
16800
+ }
16801
+ ),
17080
16802
  (button == null ? void 0 : button.label) && /* @__PURE__ */ jsxRuntimeExports.jsx(
17081
- Button,
16803
+ "button",
17082
16804
  {
17083
- variant: "primary",
17084
16805
  onClick: button == null ? void 0 : button.onClick,
17085
- disabled: enable,
17086
- style: {
17087
- backgroundColor: backgroundColor2 ? backgroundColor2 : "#3B5AA1",
17088
- borderColor: "#12AB5B",
17089
- color: color2 ? color2 : "white",
17090
- width: "80px",
17091
- height: height2 || "40px",
17092
- borderTopLeftRadius: 0,
17093
- borderBottomLeftRadius: 0
17094
- },
16806
+ disabled: disabled || enable,
16807
+ className: `px-2 py-2 text-white ${backgroundColor2 || "bg-[#3B5AA1]"} border-l border-[#12AB5B] rounded-r-md ${disabled || enable ? "opacity-50 cursor-not-allowed" : ""}`,
16808
+ style: { height: height2 },
17095
16809
  children: button.loader ? /* @__PURE__ */ jsxRuntimeExports.jsx(MytekLoader, { inline: true }) : button.label
17096
16810
  }
17097
16811
  )
17098
- ] }) }) : (
17099
- // <>
17100
- // <FormControl
17101
- // type={isPassword ? (showPassword ? "text" : "password") : type}
17102
- // placeholder={placeholder}
17103
- // style={{
17104
- // borderColor: "#12AB5B",
17105
- // height: height || "40px",
17106
- // borderTopRightRadius:
17107
- // !isPassword && !button?.label && !suffix ? "0.375rem" : 0,
17108
- // borderBottomRightRadius:
17109
- // !isPassword && !button?.label && !suffix ? "0.375rem" : 0,
17110
- // borderTopLeftRadius: prefix ? 0 : "0.375rem",
17111
- // borderBottomLeftRadius: prefix ? 0 : "0.375rem",
17112
- // }}
17113
- // name={name}
17114
- // value={value}
17115
- // onChange={handleChange}
17116
- // onBlur={handleBlur}
17117
- // isInvalid={!!error}
17118
- // disabled={disabled}
17119
- // />
17120
- // {suffix && (
17121
- // <InputGroup.Text
17122
- // style={{ backgroundColor: "#fff", borderColor: "#12AB5B" }}
17123
- // >
17124
- // {suffix}
17125
- // </InputGroup.Text>
17126
- // )}
17127
- // {isPassword && (
17128
- // <InputGroup.Text
17129
- // onClick={() => setShowPassword(!showPassword)}
17130
- // style={{
17131
- // backgroundColor: "#fff",
17132
- // borderColor: "#12AB5B",
17133
- // cursor: "pointer",
17134
- // userSelect: "none",
17135
- // }}
17136
- // disabled={disabled}
17137
- // >
17138
- // {showPassword ? <FiEye /> : <FiEyeOff />}
17139
- // </InputGroup.Text>
17140
- // )}
17141
- // {button?.label && (
17142
- // <Button
17143
- // variant="primary"
17144
- // onClick={button?.onClick}
17145
- // disabled={enable}
17146
- // style={{
17147
- // backgroundColor: "#3B5AA1",
17148
- // borderColor: "#12AB5B",
17149
- // color: "white",
17150
- // width: "80px",
17151
- // }}
17152
- // >
17153
- // button.label
17154
- // {/* {button.loader ?
17155
- // <MytekLoader inline={true} />
17156
- // : button.label} */}
17157
- // </Button>
17158
- // )}
17159
- // </>
17160
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border border-[#12AB5B] overflow-hidden rounded-md", children: [
17161
- prefix && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-2 bg-white text-gray-700 border-r border-[#12AB5B]", children: prefix }),
17162
- /* @__PURE__ */ jsxRuntimeExports.jsx(
17163
- "input",
17164
- {
17165
- type: isPassword ? showPassword ? "text" : "password" : type,
17166
- name,
17167
- value,
17168
- onChange: handleChange,
17169
- disabled,
17170
- placeholder,
17171
- className: "flex-1 px-3 py-2 focus:outline-none",
17172
- style: { height: height2 }
17173
- }
17174
- ),
17175
- suffix && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-2 bg-white text-gray-700 border-l border-[#12AB5B]", children: suffix }),
17176
- isPassword && /* @__PURE__ */ jsxRuntimeExports.jsx(
17177
- "button",
17178
- {
17179
- type: "button",
17180
- onClick: () => setShowPassword(!showPassword),
17181
- className: "px-2 bg-white text-gray-500 border-l border-[#12AB5B]",
17182
- children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(FiEye, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(FiEyeOff, {})
17183
- }
17184
- ),
17185
- (button == null ? void 0 : button.label) && /* @__PURE__ */ jsxRuntimeExports.jsx(
17186
- "button",
17187
- {
17188
- onClick: button == null ? void 0 : button.onClick,
17189
- disabled: enable,
17190
- className: `px-4 py-2 text-white ${backgroundColor2 || "bg-blue-600"} border-l border-[#12AB5B] rounded-r-md`,
17191
- style: { height: height2 },
17192
- children: button.loader ? "..." : button.label
17193
- }
17194
- )
17195
- ] })
17196
- )
16812
+ ] })
17197
16813
  }
17198
16814
  )
17199
16815
  ] }),
17200
- error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "red", display: "flex", justifyContent: "left", fontSize: "12px", marginTop: "5px" }, children: error })
16816
+ error && /* @__PURE__ */ jsxRuntimeExports.jsx(
16817
+ "div",
16818
+ {
16819
+ style: {
16820
+ color: "red",
16821
+ display: "flex",
16822
+ justifyContent: "left",
16823
+ fontSize: "12px",
16824
+ marginTop: "5px"
16825
+ },
16826
+ children: error
16827
+ }
16828
+ )
17201
16829
  ]
17202
16830
  }
17203
16831
  );
@@ -17210,4 +16838,4 @@ export {
17210
16838
  RadioButton as MytekRadioButton,
17211
16839
  Mytekbutton
17212
16840
  };
17213
- //# sourceMappingURL=index.js.map
16841
+ //# sourceMappingURL=main.js.map