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