@bigbinary/neeto-molecules 1.0.17 → 1.0.19
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/README.md +1 -0
- package/dist/NeetoWidget.cjs.js +1520 -1335
- package/dist/NeetoWidget.cjs.js.map +1 -1
- package/dist/NeetoWidget.js +1520 -1335
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/PhoneNumber.cjs.js +8560 -0
- package/dist/PhoneNumber.cjs.js.map +1 -0
- package/dist/PhoneNumber.js +8528 -0
- package/dist/PhoneNumber.js.map +1 -0
- package/dist/Sidebar.cjs.js +1 -1
- package/dist/Sidebar.js +1 -1
- package/package.json +3 -1
- package/src/translations/en.json +6 -0
- package/types/PhoneNumber.d.ts +110 -0
package/dist/Sidebar.cjs.js
CHANGED
|
@@ -31511,7 +31511,7 @@ SwitchTransition.defaultProps = {
|
|
|
31511
31511
|
|
|
31512
31512
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
31513
31513
|
|
|
31514
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:var(--neeto-ui-sidebar-width);overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;width:calc(100vw - var(--neeto-ui-sidebar-width))}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__close-btn{position:absolute;right:24px;top:24px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31514
|
+
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:var(--neeto-ui-sidebar-width);overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;position:relative;width:calc(100vw - var(--neeto-ui-sidebar-width))}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__close-btn{position:absolute;right:24px;top:24px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31515
31515
|
n(css$1,{});
|
|
31516
31516
|
|
|
31517
31517
|
function _extends() {
|
package/dist/Sidebar.js
CHANGED
|
@@ -31485,7 +31485,7 @@ SwitchTransition.defaultProps = {
|
|
|
31485
31485
|
|
|
31486
31486
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
31487
31487
|
|
|
31488
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:var(--neeto-ui-sidebar-width);overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;width:calc(100vw - var(--neeto-ui-sidebar-width))}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__close-btn{position:absolute;right:24px;top:24px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31488
|
+
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:var(--neeto-ui-sidebar-width);overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:72px;position:relative;width:calc(100vw - var(--neeto-ui-sidebar-width))}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__close-btn{position:absolute;right:24px;top:24px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31489
31489
|
n(css$1,{});
|
|
31490
31490
|
|
|
31491
31491
|
function _extends() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
|
85
85
|
"babel-preset-react": "6.24.1",
|
|
86
86
|
"babel-preset-typescript": "^7.0.0-alpha.19",
|
|
87
|
+
"countries-list": "^2.6.1",
|
|
87
88
|
"css-loader": "4.3.0",
|
|
88
89
|
"cypress": "11.2.0",
|
|
89
90
|
"dayjs": "1.11.1",
|
|
@@ -105,6 +106,7 @@
|
|
|
105
106
|
"jest": "27.5.1",
|
|
106
107
|
"js-logger": "^1.6.1",
|
|
107
108
|
"json-server": "0.17.1",
|
|
109
|
+
"libphonenumber-js": "^1.10.26",
|
|
108
110
|
"lint-staged": "^12.3.7",
|
|
109
111
|
"mixpanel-browser": "^2.45.0",
|
|
110
112
|
"mousetrap": "^1.6.5",
|
package/src/translations/en.json
CHANGED
|
@@ -329,6 +329,12 @@
|
|
|
329
329
|
"emailAddress": "Please enter at least one email address"
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
+
},
|
|
333
|
+
"phoneNumberInput": {
|
|
334
|
+
"placeholder": "{{prefix}} type phone number",
|
|
335
|
+
"validations": {
|
|
336
|
+
"invalid": "Phone number is invalid"
|
|
337
|
+
}
|
|
332
338
|
}
|
|
333
339
|
}
|
|
334
340
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputProps, SelectProps, TypographyProps } from "@bigbinary/neetoui";
|
|
3
|
+
import { CountryCode } from "libphonenumber-js";
|
|
4
|
+
import { StringSchema } from "yup";
|
|
5
|
+
export interface PhoneNumberInputProps extends InputProps {
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value: string) => any;
|
|
8
|
+
className?: string;
|
|
9
|
+
selectProps?: SelectProps;
|
|
10
|
+
error?: string;
|
|
11
|
+
defaultCountry?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface FormikPhoneNumberInputProps extends PhoneNumberInputProps {
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PhoneNumberProps extends TypographyProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
defaultCountry?: string;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
showEmoji?: boolean;
|
|
21
|
+
value?: string;
|
|
22
|
+
}
|
|
23
|
+
export const PhoneNumberInput: React.ForwardRefExoticComponent<PhoneNumberInputProps>;
|
|
24
|
+
export const FormikPhoneNumberInput: React.ForwardRefExoticComponent<FormikPhoneNumberInputProps>;
|
|
25
|
+
export
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* An input component to input and validate phone numbers with a country code
|
|
29
|
+
*
|
|
30
|
+
* picker.
|
|
31
|
+
*
|
|
32
|
+
* 
|
|
33
|
+
*
|
|
34
|
+
* Props:
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
*
|
|
38
|
+
* import React, { useState } from "react";
|
|
39
|
+
*
|
|
40
|
+
* import { PhoneNumberInput } from "@bigbinary/neeto-molecules/PhoneNumber";
|
|
41
|
+
*
|
|
42
|
+
* const App = () => {
|
|
43
|
+
* const [phoneNumber, setPhoneNumber] = useState("");
|
|
44
|
+
*
|
|
45
|
+
* return <PhoneNumberInput value={phoneNumber} onChange={setPhoneNumber} />;
|
|
46
|
+
* };
|
|
47
|
+
* @endexample
|
|
48
|
+
* A typography component to display phone numbers along with the flag of the
|
|
49
|
+
*
|
|
50
|
+
* country associated with it.
|
|
51
|
+
*
|
|
52
|
+
* 
|
|
53
|
+
*
|
|
54
|
+
* Props:
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
*
|
|
58
|
+
* import { PhoneNumber } from "@bigbinary/neeto-molecules/PhoneNumber";
|
|
59
|
+
*
|
|
60
|
+
* const App = () => <PhoneNumber showEmoji value="+919988776655" />;
|
|
61
|
+
* @endexample
|
|
62
|
+
* The PhoneNumberInput component wrapped in Formik.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
*
|
|
66
|
+
* import { FormikPhoneNumberInput, validation } from "@bigbinary/neeto-molecules/PhoneNumber";
|
|
67
|
+
* import { Form } from "@bigbinary/neetoui/formik";
|
|
68
|
+
*
|
|
69
|
+
* const App = () => (
|
|
70
|
+
* return (
|
|
71
|
+
* <Form
|
|
72
|
+
* formikProps={{
|
|
73
|
+
* initialValues: { phoneNumber: "+919988776655" },
|
|
74
|
+
* validationSchema: yup.object({ phoneNumber: validation().required() }),
|
|
75
|
+
* onSubmit: ({ phoneNumber }) => alert(phoneNumber),
|
|
76
|
+
* }}
|
|
77
|
+
* >
|
|
78
|
+
* <FormikPhoneNumberInput name="phoneNumber" />
|
|
79
|
+
* </Form>
|
|
80
|
+
* );
|
|
81
|
+
* );
|
|
82
|
+
* @endexample
|
|
83
|
+
* A utility function that exports a Yup validation schema to be used in Formik. It
|
|
84
|
+
*
|
|
85
|
+
* accepts a string as an optional argument to override the default validation
|
|
86
|
+
*
|
|
87
|
+
* message.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
*
|
|
91
|
+
* import { validation } from "@bigbinary/neeto-molecules/PhoneNumber";
|
|
92
|
+
* import * as yup from "yup";
|
|
93
|
+
*
|
|
94
|
+
* const VALIDATION_SCHEMA = yup.object({
|
|
95
|
+
* phoneNumber: validation("Phone number is invalid"),
|
|
96
|
+
* });
|
|
97
|
+
* @endexample
|
|
98
|
+
* A utility function to check whether a phone number is valid. It accepts a phone
|
|
99
|
+
*
|
|
100
|
+
* number and a default country as argument and returns a boolean value specifying
|
|
101
|
+
*
|
|
102
|
+
* whether the phone number is valid or not.
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
const PhoneNumber: React.FC<PhoneNumberProps>;
|
|
106
|
+
export const isPhoneNumberValid: (phoneNumber: string, defaultCountry?: CountryCode | {
|
|
107
|
+
defaultCountry?: CountryCode;
|
|
108
|
+
defaultCallingCode?: string;
|
|
109
|
+
}) => boolean;
|
|
110
|
+
export const validation: (message?: string) => StringSchema<any, any, any>;
|