react-simple-phone-input 5.1.8 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2022] [react-simple-phone-input]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -33,7 +33,7 @@ import "react-simple-phone-input/dist/style.css";
33
33
  onChange={(data: PhoneInputResponseType) => console.log(data)}
34
34
  />
35
35
  ```
36
- #### [See Demo](https://react-simple-phone-input.vercel.app/)
36
+ #### [See Demo](https://react-phone-input.siamahnaf.com/)
37
37
 
38
38
  ## Options
39
39
  <table width="100%">
@@ -0,0 +1,2 @@
1
+ "use strict";var o=require("react/jsx-runtime"),n=require("react");const e=[{country:"Afghanistan",countryCode:"AF",callingCode:"+93"},{country:"Albania",countryCode:"AL",callingCode:"+355"},{country:"Algeria",countryCode:"DZ",callingCode:"+213"},{country:"American Samoa",countryCode:"AS",callingCode:"+1684"},{country:"Andorra",countryCode:"AD",callingCode:"+376"},{country:"Angola",countryCode:"AO",callingCode:"+244"},{country:"Anguilla",countryCode:"AI",callingCode:"+1264"},{country:"Antarctica",countryCode:"AQ",callingCode:"+672"},{country:"Antigua and Barbuda",countryCode:"AG",callingCode:"+1268"},{country:"Argentina",countryCode:"AR",callingCode:"+54"},{country:"Armenia",countryCode:"AM",callingCode:"+374"},{country:"Aruba",countryCode:"AW",callingCode:"+297"},{country:"Australia",countryCode:"AU",callingCode:"+61"},{country:"Austria",countryCode:"AT",callingCode:"+43"},{country:"Azerbaijan",countryCode:"AZ",callingCode:"+994"},{country:"Bahamas",countryCode:"BS",callingCode:"+1242"},{country:"Bahrain",countryCode:"BH",callingCode:"+973"},{country:"Bangladesh",countryCode:"BD",callingCode:"+880"},{country:"Barbados",countryCode:"BB",callingCode:"+1246"},{country:"Belarus",countryCode:"BY",callingCode:"+375"},{country:"Belgium",countryCode:"BE",callingCode:"+32"},{country:"Belize",countryCode:"BZ",callingCode:"+501"},{country:"Benin",countryCode:"BJ",callingCode:"+229"},{country:"Bermuda",countryCode:"BM",callingCode:"+1441"},{country:"Bhutan",countryCode:"BT",callingCode:"+975"},{country:"Bolivia",countryCode:"BO",callingCode:"+591"},{country:"Bosnia and Herzegovina",countryCode:"BA",callingCode:"+387"},{country:"Botswana",countryCode:"BW",callingCode:"+267"},{country:"Bouvet Island",countryCode:"BV",callingCode:"+47"},{country:"Brazil",countryCode:"BR",callingCode:"+55"},{country:"British Indian Ocean Territory",countryCode:"IO",callingCode:"+246"},{country:"British Virgin Islands",countryCode:"VG",callingCode:"+1284"},{country:"Brunei",countryCode:"BN",callingCode:"+673"},{country:"Bulgaria",countryCode:"BG",callingCode:"+359"},{country:"Burkina Faso",countryCode:"BF",callingCode:"+226"},{country:"Burundi",countryCode:"BI",callingCode:"+257"},{country:"Cambodia",countryCode:"KH",callingCode:"+855"},{country:"Cameroon",countryCode:"CM",callingCode:"+237"},{country:"Canada",countryCode:"CA",callingCode:"+1"},{country:"Cape Verde",countryCode:"CV",callingCode:"+238"},{country:"Cayman Islands",countryCode:"KY",callingCode:"+1345"},{country:"Central African Republic",countryCode:"CF",callingCode:"+236"},{country:"Chad",countryCode:"TD",callingCode:"+235"},{country:"Chile",countryCode:"CL",callingCode:"+56"},{country:"China",countryCode:"CN",callingCode:"+86"},{country:"Christmas Island",countryCode:"CX",callingCode:"+61"},{country:"Cocos Islands",countryCode:"CC",callingCode:"+61"},{country:"Colombia",countryCode:"CO",callingCode:"+57"},{country:"Comoros",countryCode:"KM",callingCode:"+269"},{country:"Cook Islands",countryCode:"CK",callingCode:"+682"},{country:"Costa Rica",countryCode:"CR",callingCode:"+506"},{country:"Croatia",countryCode:"HR",callingCode:"+385"},{country:"Cuba",countryCode:"CU",callingCode:"+53"},{country:"Cyprus",countryCode:"CY",callingCode:"+357"},{country:"Czech Republic",countryCode:"CZ",callingCode:"+420"},{country:"Democratic Republic of the Congo",countryCode:"CD",callingCode:"+243"},{country:"Denmark",countryCode:"DK",callingCode:"+45"},{country:"Djibouti",countryCode:"DJ",callingCode:"+253"},{country:"Dominica",countryCode:"DM",callingCode:"+1767"},{country:"Dominican Republic",countryCode:"DO",callingCode:"+1"},{country:"East Timor",countryCode:"TL",callingCode:"+670"},{country:"Ecuador",countryCode:"EC",callingCode:"+593"},{country:"Egypt",countryCode:"EG",callingCode:"+20"},{country:"El Salvador",countryCode:"SV",callingCode:"+503"},{country:"Equatorial Guinea",countryCode:"GQ",callingCode:"+240"},{country:"Eritrea",countryCode:"ER",callingCode:"+291"},{country:"Estonia",countryCode:"EE",callingCode:"+372"},{country:"Ethiopia",countryCode:"ET",callingCode:"+251"},{country:"Falkland Islands",countryCode:"FK",callingCode:"+500"},{country:"Faroe Islands",countryCode:"FO",callingCode:"+298"},{country:"Fiji",countryCode:"FJ",callingCode:"+679"},{country:"Finland",countryCode:"FI",callingCode:"+358"},{country:"France",countryCode:"FR",callingCode:"+33"},{country:"French Guiana",countryCode:"GF",callingCode:"+594"},{country:"French Polynesia",countryCode:"PF",callingCode:"+689"},{country:"French Southern Territories",countryCode:"TF",callingCode:"+262"},{country:"Gabon",countryCode:"GA",callingCode:"+241"},{country:"Gambia",countryCode:"GM",callingCode:"+220"},{country:"Georgia",countryCode:"GE",callingCode:"+995"},{country:"Germany",countryCode:"DE",callingCode:"+49"},{country:"Ghana",countryCode:"GH",callingCode:"+233"},{country:"Gibraltar",countryCode:"GI",callingCode:"+350"},{country:"Greece",countryCode:"GR",callingCode:"+30"},{country:"Greenland",countryCode:"GL",callingCode:"+299"},{country:"Grenada",countryCode:"GD",callingCode:"+473"},{country:"Guadeloupe",countryCode:"GP",callingCode:"+590"},{country:"Guam",countryCode:"GU",callingCode:"+1671"},{country:"Guatemala",countryCode:"GT",callingCode:"+502"},{country:"Guinea",countryCode:"GN",callingCode:"+224"},{country:"Guinea-Bissau",countryCode:"GW",callingCode:"+245"},{country:"Guyana",countryCode:"GY",callingCode:"+592"},{country:"Haiti",countryCode:"HT",callingCode:"+509"},{country:"Honduras",countryCode:"HN",callingCode:"+504"},{country:"Hong Kong",countryCode:"HK",callingCode:"+852"},{country:"Hungary",countryCode:"HU",callingCode:"+36"},{country:"Iceland",countryCode:"IS",callingCode:"+354"},{country:"India",countryCode:"IN",callingCode:"+91"},{country:"Indonesia",countryCode:"ID",callingCode:"+62"},{country:"Iran",countryCode:"IR",callingCode:"+98"},{country:"Iraq",countryCode:"IQ",callingCode:"+964"},{country:"Ireland",countryCode:"IE",callingCode:"+353"},{country:"Israel",countryCode:"IL",callingCode:"+972"},{country:"Italy",countryCode:"IT",callingCode:"+39"},{country:"Ivory Coast",countryCode:"CI",callingCode:"+225"},{country:"Jamaica",countryCode:"JM",callingCode:"+1876"},{country:"Japan",countryCode:"JP",callingCode:"+81"},{country:"Jordan",countryCode:"JO",callingCode:"+962"},{country:"Kazakhstan",countryCode:"KZ",callingCode:"+7"},{country:"Kenya",countryCode:"KE",callingCode:"+254"},{country:"Kiribati",countryCode:"KI",callingCode:"+686"},{country:"Kuwait",countryCode:"KW",callingCode:"+965"},{country:"Kyrgyzstan",countryCode:"KG",callingCode:"+996"},{country:"Laos",countryCode:"LA",callingCode:"+856"},{country:"Latvia",countryCode:"LV",callingCode:"+371"},{country:"Lebanon",countryCode:"LB",callingCode:"+961"},{country:"Lesotho",countryCode:"LS",callingCode:"+266"},{country:"Liberia",countryCode:"LR",callingCode:"+231"},{country:"Libya",countryCode:"LY",callingCode:"+218"},{country:"Liechtenstein",countryCode:"LI",callingCode:"+423"},{country:"Lithuania",countryCode:"LT",callingCode:"+370"},{country:"Luxembourg",countryCode:"LU",callingCode:"+352"},{country:"Macao",countryCode:"MO",callingCode:"+853"},{country:"Macedonia",countryCode:"MK",callingCode:"+389"},{country:"Madagascar",countryCode:"MG",callingCode:"+261"},{country:"Malawi",countryCode:"MW",callingCode:"+265"},{country:"Malaysia",countryCode:"MY",callingCode:"+60"},{country:"Maldives",countryCode:"MV",callingCode:"+960"},{country:"Mali",countryCode:"ML",callingCode:"+223"},{country:"Malta",countryCode:"MT",callingCode:"+356"},{country:"Marshall Islands",countryCode:"MH",callingCode:"+692"},{country:"Martinique",countryCode:"MQ",callingCode:"+596"},{country:"Mauritania",countryCode:"MR",callingCode:"+222"},{country:"Mauritius",countryCode:"MU",callingCode:"+230"},{country:"Mayotte",countryCode:"YT",callingCode:"+262"},{country:"Mexico",countryCode:"MX",callingCode:"+52"},{country:"Micronesia",countryCode:"FM",callingCode:"+691"},{country:"Moldova",countryCode:"MD",callingCode:"+373"},{country:"Monaco",countryCode:"MC",callingCode:"+377"},{country:"Mongolia",countryCode:"MN",callingCode:"+976"},{country:"Montserrat",countryCode:"MS",callingCode:"+1664"},{country:"Morocco",countryCode:"MA",callingCode:"+212"},{country:"Mozambique",countryCode:"MZ",callingCode:"+258"},{country:"Myanmar",countryCode:"MM",callingCode:"+95"},{country:"Namibia",countryCode:"NA",callingCode:"+264"},{country:"Nauru",countryCode:"NR",callingCode:"+674"},{country:"Nepal",countryCode:"NP",callingCode:"+977"},{country:"Netherlands",countryCode:"NL",callingCode:"+31"},{country:"New Caledonia",countryCode:"NC",callingCode:"+687"},{country:"New Zealand",countryCode:"NZ",callingCode:"+64"},{country:"Nicaragua",countryCode:"NI",callingCode:"+505"},{country:"Niger",countryCode:"NE",callingCode:"+227"},{country:"Nigeria",countryCode:"NG",callingCode:"+234"},{country:"Niue",countryCode:"NU",callingCode:"+683"},{country:"Norfolk Island",countryCode:"NF",callingCode:"+672"},{country:"North Korea",countryCode:"KP",callingCode:"+850"},{country:"Northern Mariana Islands",countryCode:"MP",callingCode:"+1670"},{country:"Norway",countryCode:"NO",callingCode:"+47"},{country:"Oman",countryCode:"OM",callingCode:"+968"},{country:"Pakistan",countryCode:"PK",callingCode:"+92"},{country:"Palau",countryCode:"PW",callingCode:"+680"},{country:"Palestinian Territory",countryCode:"PS",callingCode:"+970"},{country:"Panama",countryCode:"PA",callingCode:"+507"},{country:"Papua New Guinea",countryCode:"PG",callingCode:"+675"},{country:"Paraguay",countryCode:"PY",callingCode:"+595"},{country:"Peru",countryCode:"PE",callingCode:"+51"},{country:"Philippines",countryCode:"PH",callingCode:"+63"},{country:"Pitcairn",countryCode:"PN",callingCode:"+872"},{country:"Poland",countryCode:"PL",callingCode:"+48"},{country:"Portugal",countryCode:"PT",callingCode:"+351"},{country:"Puerto Rico",countryCode:"PR",callingCode:"+1"},{country:"Qatar",countryCode:"QA",callingCode:"+974"},{country:"Republic of the Congo",countryCode:"CG",callingCode:"+242"},{country:"Reunion",countryCode:"RE",callingCode:"+262"},{country:"Romania",countryCode:"RO",callingCode:"+40"},{country:"Russia",countryCode:"RU",callingCode:"+7"},{country:"Rwanda",countryCode:"RW",callingCode:"+250"},{country:"Saint Helena",countryCode:"SH",callingCode:"+290"},{country:"Saint Kitts and Nevis",countryCode:"KN",callingCode:"+1869"},{country:"Saint Lucia",countryCode:"LC",callingCode:"+1758"},{country:"Saint Pierre and Miquelon",countryCode:"PM",callingCode:"+508"},{country:"Saint Vincent and the Grenadines",countryCode:"VC",callingCode:"+1784"},{country:"Samoa",countryCode:"WS",callingCode:"+685"},{country:"San Marino",countryCode:"SM",callingCode:"+378"},{country:"Sao Tome and Principe",countryCode:"ST",callingCode:"+239"},{country:"Saudi Arabia",countryCode:"SA",callingCode:"+966"},{country:"Senegal",countryCode:"SN",callingCode:"+221"},{country:"Seychelles",countryCode:"SC",callingCode:"+248"},{country:"Sierra Leone",countryCode:"SL",callingCode:"+232"},{country:"Singapore",countryCode:"SG",callingCode:"+65"},{country:"Slovakia",countryCode:"SK",callingCode:"+421"},{country:"Slovenia",countryCode:"SI",callingCode:"+386"},{country:"Solomon Islands",countryCode:"SB",callingCode:"+677"},{country:"Somalia",countryCode:"SO",callingCode:"+252"},{country:"South Africa",countryCode:"ZA",callingCode:"+27"},{country:"South Georgia and the South Sandwich Islands",countryCode:"GS",callingCode:"+500"},{country:"South Korea",countryCode:"KR",callingCode:"+82"},{country:"Spain",countryCode:"ES",callingCode:"+34"},{country:"Sri Lanka",countryCode:"LK",callingCode:"+94"},{country:"Sudan",countryCode:"SD",callingCode:"+249"},{country:"Suriname",countryCode:"SR",callingCode:"+597"},{country:"Svalbard and Jan Mayen",countryCode:"SJ",callingCode:"+47"},{country:"Swaziland",countryCode:"SZ",callingCode:"+268"},{country:"Sweden",countryCode:"SE",callingCode:"+46"},{country:"Switzerland",countryCode:"CH",callingCode:"+41"},{country:"Syria",countryCode:"SY",callingCode:"+963"},{country:"Taiwan",countryCode:"TW",callingCode:"+886"},{country:"Tajikistan",countryCode:"TJ",callingCode:"+992"},{country:"Tanzania",countryCode:"TZ",callingCode:"+255"},{country:"Thailand",countryCode:"TH",callingCode:"+66"},{country:"Togo",countryCode:"TG",callingCode:"+228"},{country:"Tokelau",countryCode:"TK",callingCode:"+690"},{country:"Tonga",countryCode:"TO",callingCode:"+676"},{country:"Trinidad and Tobago",countryCode:"TT",callingCode:"+1868"},{country:"Tunisia",countryCode:"TN",callingCode:"+216"},{country:"Turkey",countryCode:"TR",callingCode:"+90"},{country:"Turkmenistan",countryCode:"TM",callingCode:"+993"},{country:"Turks and Caicos Islands",countryCode:"TC",callingCode:"+1649"},{country:"Tuvalu",countryCode:"TV",callingCode:"+688"},{country:"U.S. Virgin Islands",countryCode:"VI",callingCode:"+1340"},{country:"Uganda",countryCode:"UG",callingCode:"+256"},{country:"Ukraine",countryCode:"UA",callingCode:"+380"},{country:"United Arab Emirates",countryCode:"AE",callingCode:"+971"},{country:"United Kingdom",countryCode:"GB",callingCode:"+44"},{country:"United States",countryCode:"US",callingCode:"+1"},{country:"United States Minor Outlying Islands",countryCode:"UM",callingCode:"+1"},{country:"Uruguay",countryCode:"UY",callingCode:"+598"},{country:"Uzbekistan",countryCode:"UZ",callingCode:"+998"},{country:"Vanuatu",countryCode:"VU",callingCode:"+678"},{country:"Vatican",countryCode:"VA",callingCode:"+379"},{country:"Venezuela",countryCode:"VE",callingCode:"+58"},{country:"Vietnam",countryCode:"VN",callingCode:"+84"},{country:"Wallis and Futuna",countryCode:"WF",callingCode:"+681"},{country:"Western Sahara",countryCode:"EH",callingCode:"+212"},{country:"Yemen",countryCode:"YE",callingCode:"+967"},{country:"Zambia",countryCode:"ZM",callingCode:"+260"},{country:"Zimbabwe",countryCode:"ZW",callingCode:"+263"}],c=o=>e.find((n=>n.countryCode===o));exports.PhoneInput=({placeholder:t,country:r,onChange:l,value:a,iconComponent:d,inputProps:u,onlyCountries:i,excludeCountries:C,preferredCountries:y,showDropdownIcon:g=!0,dialCodeInputField:s=!1,search:h=!0,disableDropdownOnly:p=!1,disableInput:m=!1,searchPlaceholder:S="Search country",showSearchIcon:M=!0,searchIconComponent:v,searchProps:I,searchNotFound:N="Not found",containerClass:w,buttonClass:B,dropdownClass:A,dropdownListClass:G,dropdownIconClass:T,searchContainerClass:x,searchInputClass:f,searchIconClass:b,inputClass:P,containerStyle:E,buttonStyle:L,dropdownStyle:R,dropdownListStyle:j,dropdownIconStyle:K,searchContainerStyle:F,searchInputStyle:D,searchIconStyle:U,inputStyle:k})=>{const[V,H]=n.useState({}),[O,W]=n.useState(!1),[z,Z]=n.useState(a||""),[Y,J]=n.useState(e),[q,Q]=n.useState(0),X=n.useRef(null),$=n.useRef(null);var _,oo;_=X,oo=()=>W(!1),n.useEffect((()=>{const o=o=>{_.current&&!_.current.contains(o.target)&&oo(o)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}),[_,oo]);const no=o=>{O&&("ArrowDown"===o.key&&(o.preventDefault(),Q((o=>o<Y.length-1?o+1:o))),"ArrowUp"===o.key&&(o.preventDefault(),Q((o=>o>0?o-1:0))),"Escape"===o.key&&W(!1),"Enter"===o.key&&q>=0&&(H(Y[q]),W(!1)))};return n.useEffect((()=>{if(q<0||q>Y.length||!$)return()=>{};if(O&&$&&Y.length>0){let n=Array.from($.current?.children);n[q]&&(o=n[q].offsetTop-65,h&&Y.length>0&&$.current?.scrollTo({top:o,behavior:"smooth"}))}var o}),[q]),n.useMemo((()=>{if(s){const o=z?.replace(V.callingCode,c(r).callingCode);console.log(o),Z(o.length>0?o:c(r).callingCode)}H(c(r))}),[r,s]),n.useMemo((()=>{J(((o,n,c)=>{let t=[];return t=n&&n.length>0?e.filter((o=>!n?.includes(o.countryCode))):o&&o?.length>0?e.filter((n=>o?.includes(n.countryCode))):e,t.sort(((o,n)=>Number(c?.includes(n.countryCode))-Number(c?.includes(o.countryCode))||c?.indexOf(o.countryCode)-c?.indexOf(n.countryCode)))})(i,C,y))}),[i,C,y]),o.jsx("div",{className:"simple-phone-input-sri198-container"+(w?" "+w:""),onKeyDown:o=>no(o),tabIndex:-1,style:E,children:o.jsxs("div",{className:"simple-phone-input-sri198-main",children:[o.jsxs("div",{className:"simple-phone-input-sri198-dropdown-container",ref:X,children:[o.jsxs("div",{onClick:()=>{p||W(!O)},className:s?"simple-phone-input-sri198-dropdown-container-button dial"+(B?" "+B:""):"simple-phone-input-sri198-dropdown-container-button"+(B?" "+B:""),style:L,children:[o.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+V.countryCode+".svg",alt:V.country,width:"20px"}),!s&&o.jsx("span",{className:"simple-phone-input-sri198-selected-code",children:V.callingCode}),g&&!p&&o.jsx("div",{className:O?"simple-phone-input-sri198-dropdown-icon"+(T?" "+T:""):"simple-phone-input-sri198-dropdown-icon active"+(T?" "+T:""),style:K,children:d||o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:o.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})})]}),o.jsxs("ul",{className:O?"simple-phone-input-sri198-dropdown active"+(A?" "+A:""):"simple-phone-input-sri198-dropdown"+(A?" "+A:""),ref:$,style:R,children:[h&&o.jsxs("div",{className:"simple-phone-input-sri198-search-container"+(x?" "+x:""),style:F,children:[o.jsx("input",{placeholder:S,...I,onChange:o=>{const n=o.target.value;J(((o,n,c)=>{let t=[];return t=c&&c.length>0?e.filter((o=>!c?.includes(o.countryCode))):n&&n?.length>0?e.filter((o=>n?.includes(o.countryCode))):e,t.filter((n=>{const e=new RegExp(o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"gi");return n.country.match(e)}))})(n,i,C))},className:f??"",style:D}),M&&o.jsx("div",{className:"simple-phone-input-sri198-search-icon"+(b?" "+b:""),style:U,children:v??o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 48 48",children:[o.jsxs("g",{fill:"#616161",children:[o.jsx("path",{d:"m29.175 31.99l2.828-2.827l12.019 12.019l-2.828 2.827z"}),o.jsx("circle",{cx:"20",cy:"20",r:"16"})]}),o.jsx("path",{fill:"#37474F",d:"m32.45 35.34l2.827-2.828l8.696 8.696l-2.828 2.828z"}),o.jsx("circle",{cx:"20",cy:"20",r:"13",fill:"#64B5F6"}),o.jsx("path",{fill:"#BBDEFB",d:"M26.9 14.2c-1.7-2-4.2-3.2-6.9-3.2s-5.2 1.2-6.9 3.2c-.4.4-.3 1.1.1 1.4c.4.4 1.1.3 1.4-.1C16 13.9 17.9 13 20 13s4 .9 5.4 2.5c.2.2.5.4.8.4c.2 0 .5-.1.6-.2c.4-.4.4-1.1.1-1.5z"})]})})]}),0===Y.length&&o.jsx("div",{className:"simple-phone-input-sri198-not-found",children:N}),Y.map(((n,e)=>o.jsxs("li",{onClick:()=>((o,n)=>{if(s){const n=z?.replace(V.callingCode,o.callingCode);Z(n.length>0?n:o.callingCode),l({country:o.country,code:o.countryCode,dialCode:o.callingCode,value:n.length>0?n:o.callingCode,valueWithoutPlus:n.length>0?n.replace("+",""):o.callingCode.replace("+","")})}else l({country:o.country,code:o.countryCode,dialCode:o.callingCode,value:o.callingCode+z,valueWithoutPlus:o.callingCode.replace("+","")+z});H(o),W(!1),Q(n)})(n,e),className:e===q?"active"+(G?" "+G:""):""+(G?" "+G:""),style:j,children:[o.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+n.countryCode+".svg",alt:n.country,width:"20px"}),o.jsx("span",{className:"simple-phone-input-sri198-dropdown-text",children:n.country}),o.jsx("span",{className:"simple-phone-input-sri198-dropdown-country-code",children:n.callingCode})]},e)))]})]}),o.jsx("input",{className:"simple-phone-input-sri198-input "+(P?" "+P:""),placeholder:t,onChange:o=>{const n=o.target.value.replace(/\D/g,"");s?(l({country:V.country,code:V.countryCode,dialCode:V.callingCode,value:"+"+n,valueWithoutPlus:n}),Z("+"+n)):(Z(n),l({country:V.country,code:V.countryCode,dialCode:V.callingCode,value:V.callingCode+n,valueWithoutPlus:V.callingCode.replace("+","")+n}))},type:"tel",onInput:o=>{if(s){const n=z.slice(V.callingCode.length);o.target.value.startsWith(V.callingCode)?o.target.value=o.target.value:o.target.value=V.callingCode+n}},onKeyDown:o=>no(o),value:z,...u,style:k,disabled:m})]})})};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/Data/country-data.ts","../../src/Helpers/country-helper.ts","../../src/components/PhoneInput/PhoneInput.tsx","../../src/Helpers/hook.ts"],"sourcesContent":[null,null,null,null],"names":["countryData","country","countryCode","callingCode","getDefaultCountry","code","find","item","placeholder","onChange","value","iconComponent","inputProps","onlyCountries","excludeCountries","preferredCountries","showDropdownIcon","dialCodeInputField","search","disableDropdownOnly","disableInput","searchPlaceholder","showSearchIcon","searchIconComponent","searchProps","searchNotFound","containerClass","buttonClass","dropdownClass","dropdownListClass","dropdownIconClass","searchContainerClass","searchInputClass","searchIconClass","inputClass","containerStyle","buttonStyle","dropdownStyle","dropdownListStyle","dropdownIconStyle","searchContainerStyle","searchInputStyle","searchIconStyle","inputStyle","selected","setSelected","React","useState","isDropdown","setDropdown","inputValue","setInputValue","countryDataInfo","setCountryData","cursor","setCursor","dropdownRef","useRef","listRef","ref","handler","useEffect","listener","event","current","contains","target","document","addEventListener","removeEventListener","keyBoardNav","e","key","preventDefault","c","length","listItems","Array","from","children","position","offsetTop","scrollTo","top","behavior","useMemo","result","replace","console","log","onlyCountry","excludeCountry","preferredCountry","countries","filter","includes","sort","a","b","Number","indexOf","getCountryByFilter","_jsx","className","onKeyDown","tabIndex","style","_jsxs","jsxs","onClick","jsx","src","alt","width","xmlns","height","preserveAspectRatio","viewBox","fill","d","regex","RegExp","match","getBySearch","cx","cy","r","map","i","dialCode","valueWithoutPlus","handleSelected","onlyNumber","type","onInput","oldVal","slice","startsWith","disabled"],"mappings":"mEAAO,MAAMA,EAAc,CACvB,CACIC,QAAS,cACTC,YAAa,KACbC,YAAa,OAEjB,CACIF,QAAS,UACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,UACTC,YAAa,KACbC,YAAa,QAE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AAAuB,EAAAA,IAAA,MAAA,CAAKS,IAAK,mEAAqExG,EAAKL,YAAc,OAAQ8G,IAAKzG,EAAKN,QAASgH,MAAM,SACnIX,EAAAA,IAAM,OAAA,CAAAC,UAAU,mDAA2ChG,EAAKN,UAChEqG,EAAMQ,IAAA,OAAA,CAAAP,UAAU,2DAAmDhG,EAAKJ,gBAHnE6H,WAQrB1B,EACIQ,IAAA,QAAA,CAAAP,UAAW,oCAAmCrE,EAAa,IAAMA,EAAa,IAC9E1B,YAAaA,EACbC,SA1KM8D,IAClB,MAAM6D,EAAa7D,EAAEL,OAAOxD,MAAM6E,QAAQ,MAAO,IAC7CtE,GACAR,EAAS,CACLR,QAAS2C,EAAS3C,QAClBI,KAAMuC,EAAS1C,YACf+H,SAAUrF,EAASzC,YACnBO,MAAO,IAAM0H,EACbF,iBAAkBE,IAEtBjF,EAAc,IAAMiF,KAEpBjF,EAAciF,GACd3H,EAAS,CACLR,QAAS2C,EAAS3C,QAClBI,KAAMuC,EAAS1C,YACf+H,SAAUrF,EAASzC,YACnBO,MAAOkC,EAASzC,YAAciI,EAC9BF,iBAAkBtF,EAASzC,YAAYoF,QAAQ,IAAK,IAAM6C,IAEjE,EAuJWC,KAAK,MACLC,QAAU/D,IACN,GAAItD,EAAoB,CACpB,MAAMsH,EAASrF,EAAWsF,MAAM5F,EAASzC,YAAYwE,QACjDJ,EAAEL,OAAOxD,MAAM+H,WAAW7F,EAASzC,aACnCoE,EAAEL,OAAOxD,MAAQ6D,EAAEL,OAAOxD,MAE1B6D,EAAEL,OAAOxD,MAAQkC,EAASzC,YAAcoI,CAE/C,GAEL/B,UAAYjC,GAAMD,GAAYC,GAC9B7D,MAAOwC,KACHtC,EACJ8F,MAAO/D,EACP+F,SAAUtH,QAIxB"}
@@ -0,0 +1,5 @@
1
+ export declare const countryData: {
2
+ country: string;
3
+ countryCode: string;
4
+ callingCode: string;
5
+ }[];
@@ -0,0 +1,20 @@
1
+ export interface CountryDataTypes {
2
+ country: string;
3
+ countryCode: string;
4
+ callingCode: string;
5
+ }
6
+ export declare const getDefaultCountry: (code: string) => {
7
+ country: string;
8
+ countryCode: string;
9
+ callingCode: string;
10
+ } | undefined;
11
+ export declare const getBySearch: (search: string, onlyCountry?: string[], excludeCountry?: string[]) => {
12
+ country: string;
13
+ countryCode: string;
14
+ callingCode: string;
15
+ }[];
16
+ export declare const getCountryByFilter: (onlyCountry: string[], excludeCountry: string[], preferredCountry: string[]) => {
17
+ country: string;
18
+ countryCode: string;
19
+ callingCode: string;
20
+ }[];
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function useOnClickOutside(ref: React.RefObject<HTMLDivElement>, handler: (e: MouseEvent | TouchEvent) => void): void;
@@ -0,0 +1,50 @@
1
+ import React from "react";
2
+ import "./PhoneInput.css";
3
+ export interface PhoneInputResponseType {
4
+ country: string;
5
+ code: string;
6
+ dialCode: string;
7
+ value: string;
8
+ valueWithoutPlus: string;
9
+ }
10
+ interface Props {
11
+ placeholder: string;
12
+ country: string;
13
+ onChange: (e: PhoneInputResponseType) => void;
14
+ value?: string;
15
+ iconComponent?: React.ReactNode;
16
+ inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
17
+ onlyCountries?: string[];
18
+ excludeCountries?: string[];
19
+ preferredCountries?: string[];
20
+ showDropdownIcon?: boolean;
21
+ dialCodeInputField?: boolean;
22
+ disableDropdownOnly?: boolean;
23
+ disableInput?: boolean;
24
+ search?: boolean;
25
+ searchPlaceholder?: string;
26
+ showSearchIcon?: boolean;
27
+ searchIconComponent?: React.ReactNode;
28
+ searchProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
29
+ searchNotFound?: string;
30
+ containerClass?: string;
31
+ buttonClass?: string;
32
+ dropdownClass?: string;
33
+ dropdownListClass?: string;
34
+ dropdownIconClass?: string;
35
+ searchContainerClass?: string;
36
+ searchInputClass?: string;
37
+ searchIconClass?: string;
38
+ inputClass?: string;
39
+ containerStyle?: React.CSSProperties;
40
+ buttonStyle?: React.CSSProperties;
41
+ dropdownStyle?: React.CSSProperties;
42
+ dropdownListStyle?: React.CSSProperties;
43
+ dropdownIconStyle?: React.CSSProperties;
44
+ searchContainerStyle?: React.CSSProperties;
45
+ searchInputStyle?: React.CSSProperties;
46
+ searchIconStyle?: React.CSSProperties;
47
+ inputStyle?: React.CSSProperties;
48
+ }
49
+ declare const PhoneInput: ({ placeholder, country, onChange, value, iconComponent, inputProps, onlyCountries, excludeCountries, preferredCountries, showDropdownIcon, dialCodeInputField, search, disableDropdownOnly, disableInput, searchPlaceholder, showSearchIcon, searchIconComponent, searchProps, searchNotFound, containerClass, buttonClass, dropdownClass, dropdownListClass, dropdownIconClass, searchContainerClass, searchInputClass, searchIconClass, inputClass, containerStyle, buttonStyle, dropdownStyle, dropdownListStyle, dropdownIconStyle, searchContainerStyle, searchInputStyle, searchIconStyle, inputStyle }: Props) => JSX.Element;
50
+ export default PhoneInput;
@@ -0,0 +1 @@
1
+ export { default, PhoneInputResponseType } from "./PhoneInput";
@@ -0,0 +1 @@
1
+ export { default as PhoneInput, PhoneInputResponseType } from "./PhoneInput";
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,2 @@
1
+ import{jsx as o,jsxs as n}from"react/jsx-runtime";import e from"react";const c=[{country:"Afghanistan",countryCode:"AF",callingCode:"+93"},{country:"Albania",countryCode:"AL",callingCode:"+355"},{country:"Algeria",countryCode:"DZ",callingCode:"+213"},{country:"American Samoa",countryCode:"AS",callingCode:"+1684"},{country:"Andorra",countryCode:"AD",callingCode:"+376"},{country:"Angola",countryCode:"AO",callingCode:"+244"},{country:"Anguilla",countryCode:"AI",callingCode:"+1264"},{country:"Antarctica",countryCode:"AQ",callingCode:"+672"},{country:"Antigua and Barbuda",countryCode:"AG",callingCode:"+1268"},{country:"Argentina",countryCode:"AR",callingCode:"+54"},{country:"Armenia",countryCode:"AM",callingCode:"+374"},{country:"Aruba",countryCode:"AW",callingCode:"+297"},{country:"Australia",countryCode:"AU",callingCode:"+61"},{country:"Austria",countryCode:"AT",callingCode:"+43"},{country:"Azerbaijan",countryCode:"AZ",callingCode:"+994"},{country:"Bahamas",countryCode:"BS",callingCode:"+1242"},{country:"Bahrain",countryCode:"BH",callingCode:"+973"},{country:"Bangladesh",countryCode:"BD",callingCode:"+880"},{country:"Barbados",countryCode:"BB",callingCode:"+1246"},{country:"Belarus",countryCode:"BY",callingCode:"+375"},{country:"Belgium",countryCode:"BE",callingCode:"+32"},{country:"Belize",countryCode:"BZ",callingCode:"+501"},{country:"Benin",countryCode:"BJ",callingCode:"+229"},{country:"Bermuda",countryCode:"BM",callingCode:"+1441"},{country:"Bhutan",countryCode:"BT",callingCode:"+975"},{country:"Bolivia",countryCode:"BO",callingCode:"+591"},{country:"Bosnia and Herzegovina",countryCode:"BA",callingCode:"+387"},{country:"Botswana",countryCode:"BW",callingCode:"+267"},{country:"Bouvet Island",countryCode:"BV",callingCode:"+47"},{country:"Brazil",countryCode:"BR",callingCode:"+55"},{country:"British Indian Ocean Territory",countryCode:"IO",callingCode:"+246"},{country:"British Virgin Islands",countryCode:"VG",callingCode:"+1284"},{country:"Brunei",countryCode:"BN",callingCode:"+673"},{country:"Bulgaria",countryCode:"BG",callingCode:"+359"},{country:"Burkina Faso",countryCode:"BF",callingCode:"+226"},{country:"Burundi",countryCode:"BI",callingCode:"+257"},{country:"Cambodia",countryCode:"KH",callingCode:"+855"},{country:"Cameroon",countryCode:"CM",callingCode:"+237"},{country:"Canada",countryCode:"CA",callingCode:"+1"},{country:"Cape Verde",countryCode:"CV",callingCode:"+238"},{country:"Cayman Islands",countryCode:"KY",callingCode:"+1345"},{country:"Central African Republic",countryCode:"CF",callingCode:"+236"},{country:"Chad",countryCode:"TD",callingCode:"+235"},{country:"Chile",countryCode:"CL",callingCode:"+56"},{country:"China",countryCode:"CN",callingCode:"+86"},{country:"Christmas Island",countryCode:"CX",callingCode:"+61"},{country:"Cocos Islands",countryCode:"CC",callingCode:"+61"},{country:"Colombia",countryCode:"CO",callingCode:"+57"},{country:"Comoros",countryCode:"KM",callingCode:"+269"},{country:"Cook Islands",countryCode:"CK",callingCode:"+682"},{country:"Costa Rica",countryCode:"CR",callingCode:"+506"},{country:"Croatia",countryCode:"HR",callingCode:"+385"},{country:"Cuba",countryCode:"CU",callingCode:"+53"},{country:"Cyprus",countryCode:"CY",callingCode:"+357"},{country:"Czech Republic",countryCode:"CZ",callingCode:"+420"},{country:"Democratic Republic of the Congo",countryCode:"CD",callingCode:"+243"},{country:"Denmark",countryCode:"DK",callingCode:"+45"},{country:"Djibouti",countryCode:"DJ",callingCode:"+253"},{country:"Dominica",countryCode:"DM",callingCode:"+1767"},{country:"Dominican Republic",countryCode:"DO",callingCode:"+1"},{country:"East Timor",countryCode:"TL",callingCode:"+670"},{country:"Ecuador",countryCode:"EC",callingCode:"+593"},{country:"Egypt",countryCode:"EG",callingCode:"+20"},{country:"El Salvador",countryCode:"SV",callingCode:"+503"},{country:"Equatorial Guinea",countryCode:"GQ",callingCode:"+240"},{country:"Eritrea",countryCode:"ER",callingCode:"+291"},{country:"Estonia",countryCode:"EE",callingCode:"+372"},{country:"Ethiopia",countryCode:"ET",callingCode:"+251"},{country:"Falkland Islands",countryCode:"FK",callingCode:"+500"},{country:"Faroe Islands",countryCode:"FO",callingCode:"+298"},{country:"Fiji",countryCode:"FJ",callingCode:"+679"},{country:"Finland",countryCode:"FI",callingCode:"+358"},{country:"France",countryCode:"FR",callingCode:"+33"},{country:"French Guiana",countryCode:"GF",callingCode:"+594"},{country:"French Polynesia",countryCode:"PF",callingCode:"+689"},{country:"French Southern Territories",countryCode:"TF",callingCode:"+262"},{country:"Gabon",countryCode:"GA",callingCode:"+241"},{country:"Gambia",countryCode:"GM",callingCode:"+220"},{country:"Georgia",countryCode:"GE",callingCode:"+995"},{country:"Germany",countryCode:"DE",callingCode:"+49"},{country:"Ghana",countryCode:"GH",callingCode:"+233"},{country:"Gibraltar",countryCode:"GI",callingCode:"+350"},{country:"Greece",countryCode:"GR",callingCode:"+30"},{country:"Greenland",countryCode:"GL",callingCode:"+299"},{country:"Grenada",countryCode:"GD",callingCode:"+473"},{country:"Guadeloupe",countryCode:"GP",callingCode:"+590"},{country:"Guam",countryCode:"GU",callingCode:"+1671"},{country:"Guatemala",countryCode:"GT",callingCode:"+502"},{country:"Guinea",countryCode:"GN",callingCode:"+224"},{country:"Guinea-Bissau",countryCode:"GW",callingCode:"+245"},{country:"Guyana",countryCode:"GY",callingCode:"+592"},{country:"Haiti",countryCode:"HT",callingCode:"+509"},{country:"Honduras",countryCode:"HN",callingCode:"+504"},{country:"Hong Kong",countryCode:"HK",callingCode:"+852"},{country:"Hungary",countryCode:"HU",callingCode:"+36"},{country:"Iceland",countryCode:"IS",callingCode:"+354"},{country:"India",countryCode:"IN",callingCode:"+91"},{country:"Indonesia",countryCode:"ID",callingCode:"+62"},{country:"Iran",countryCode:"IR",callingCode:"+98"},{country:"Iraq",countryCode:"IQ",callingCode:"+964"},{country:"Ireland",countryCode:"IE",callingCode:"+353"},{country:"Israel",countryCode:"IL",callingCode:"+972"},{country:"Italy",countryCode:"IT",callingCode:"+39"},{country:"Ivory Coast",countryCode:"CI",callingCode:"+225"},{country:"Jamaica",countryCode:"JM",callingCode:"+1876"},{country:"Japan",countryCode:"JP",callingCode:"+81"},{country:"Jordan",countryCode:"JO",callingCode:"+962"},{country:"Kazakhstan",countryCode:"KZ",callingCode:"+7"},{country:"Kenya",countryCode:"KE",callingCode:"+254"},{country:"Kiribati",countryCode:"KI",callingCode:"+686"},{country:"Kuwait",countryCode:"KW",callingCode:"+965"},{country:"Kyrgyzstan",countryCode:"KG",callingCode:"+996"},{country:"Laos",countryCode:"LA",callingCode:"+856"},{country:"Latvia",countryCode:"LV",callingCode:"+371"},{country:"Lebanon",countryCode:"LB",callingCode:"+961"},{country:"Lesotho",countryCode:"LS",callingCode:"+266"},{country:"Liberia",countryCode:"LR",callingCode:"+231"},{country:"Libya",countryCode:"LY",callingCode:"+218"},{country:"Liechtenstein",countryCode:"LI",callingCode:"+423"},{country:"Lithuania",countryCode:"LT",callingCode:"+370"},{country:"Luxembourg",countryCode:"LU",callingCode:"+352"},{country:"Macao",countryCode:"MO",callingCode:"+853"},{country:"Macedonia",countryCode:"MK",callingCode:"+389"},{country:"Madagascar",countryCode:"MG",callingCode:"+261"},{country:"Malawi",countryCode:"MW",callingCode:"+265"},{country:"Malaysia",countryCode:"MY",callingCode:"+60"},{country:"Maldives",countryCode:"MV",callingCode:"+960"},{country:"Mali",countryCode:"ML",callingCode:"+223"},{country:"Malta",countryCode:"MT",callingCode:"+356"},{country:"Marshall Islands",countryCode:"MH",callingCode:"+692"},{country:"Martinique",countryCode:"MQ",callingCode:"+596"},{country:"Mauritania",countryCode:"MR",callingCode:"+222"},{country:"Mauritius",countryCode:"MU",callingCode:"+230"},{country:"Mayotte",countryCode:"YT",callingCode:"+262"},{country:"Mexico",countryCode:"MX",callingCode:"+52"},{country:"Micronesia",countryCode:"FM",callingCode:"+691"},{country:"Moldova",countryCode:"MD",callingCode:"+373"},{country:"Monaco",countryCode:"MC",callingCode:"+377"},{country:"Mongolia",countryCode:"MN",callingCode:"+976"},{country:"Montserrat",countryCode:"MS",callingCode:"+1664"},{country:"Morocco",countryCode:"MA",callingCode:"+212"},{country:"Mozambique",countryCode:"MZ",callingCode:"+258"},{country:"Myanmar",countryCode:"MM",callingCode:"+95"},{country:"Namibia",countryCode:"NA",callingCode:"+264"},{country:"Nauru",countryCode:"NR",callingCode:"+674"},{country:"Nepal",countryCode:"NP",callingCode:"+977"},{country:"Netherlands",countryCode:"NL",callingCode:"+31"},{country:"New Caledonia",countryCode:"NC",callingCode:"+687"},{country:"New Zealand",countryCode:"NZ",callingCode:"+64"},{country:"Nicaragua",countryCode:"NI",callingCode:"+505"},{country:"Niger",countryCode:"NE",callingCode:"+227"},{country:"Nigeria",countryCode:"NG",callingCode:"+234"},{country:"Niue",countryCode:"NU",callingCode:"+683"},{country:"Norfolk Island",countryCode:"NF",callingCode:"+672"},{country:"North Korea",countryCode:"KP",callingCode:"+850"},{country:"Northern Mariana Islands",countryCode:"MP",callingCode:"+1670"},{country:"Norway",countryCode:"NO",callingCode:"+47"},{country:"Oman",countryCode:"OM",callingCode:"+968"},{country:"Pakistan",countryCode:"PK",callingCode:"+92"},{country:"Palau",countryCode:"PW",callingCode:"+680"},{country:"Palestinian Territory",countryCode:"PS",callingCode:"+970"},{country:"Panama",countryCode:"PA",callingCode:"+507"},{country:"Papua New Guinea",countryCode:"PG",callingCode:"+675"},{country:"Paraguay",countryCode:"PY",callingCode:"+595"},{country:"Peru",countryCode:"PE",callingCode:"+51"},{country:"Philippines",countryCode:"PH",callingCode:"+63"},{country:"Pitcairn",countryCode:"PN",callingCode:"+872"},{country:"Poland",countryCode:"PL",callingCode:"+48"},{country:"Portugal",countryCode:"PT",callingCode:"+351"},{country:"Puerto Rico",countryCode:"PR",callingCode:"+1"},{country:"Qatar",countryCode:"QA",callingCode:"+974"},{country:"Republic of the Congo",countryCode:"CG",callingCode:"+242"},{country:"Reunion",countryCode:"RE",callingCode:"+262"},{country:"Romania",countryCode:"RO",callingCode:"+40"},{country:"Russia",countryCode:"RU",callingCode:"+7"},{country:"Rwanda",countryCode:"RW",callingCode:"+250"},{country:"Saint Helena",countryCode:"SH",callingCode:"+290"},{country:"Saint Kitts and Nevis",countryCode:"KN",callingCode:"+1869"},{country:"Saint Lucia",countryCode:"LC",callingCode:"+1758"},{country:"Saint Pierre and Miquelon",countryCode:"PM",callingCode:"+508"},{country:"Saint Vincent and the Grenadines",countryCode:"VC",callingCode:"+1784"},{country:"Samoa",countryCode:"WS",callingCode:"+685"},{country:"San Marino",countryCode:"SM",callingCode:"+378"},{country:"Sao Tome and Principe",countryCode:"ST",callingCode:"+239"},{country:"Saudi Arabia",countryCode:"SA",callingCode:"+966"},{country:"Senegal",countryCode:"SN",callingCode:"+221"},{country:"Seychelles",countryCode:"SC",callingCode:"+248"},{country:"Sierra Leone",countryCode:"SL",callingCode:"+232"},{country:"Singapore",countryCode:"SG",callingCode:"+65"},{country:"Slovakia",countryCode:"SK",callingCode:"+421"},{country:"Slovenia",countryCode:"SI",callingCode:"+386"},{country:"Solomon Islands",countryCode:"SB",callingCode:"+677"},{country:"Somalia",countryCode:"SO",callingCode:"+252"},{country:"South Africa",countryCode:"ZA",callingCode:"+27"},{country:"South Georgia and the South Sandwich Islands",countryCode:"GS",callingCode:"+500"},{country:"South Korea",countryCode:"KR",callingCode:"+82"},{country:"Spain",countryCode:"ES",callingCode:"+34"},{country:"Sri Lanka",countryCode:"LK",callingCode:"+94"},{country:"Sudan",countryCode:"SD",callingCode:"+249"},{country:"Suriname",countryCode:"SR",callingCode:"+597"},{country:"Svalbard and Jan Mayen",countryCode:"SJ",callingCode:"+47"},{country:"Swaziland",countryCode:"SZ",callingCode:"+268"},{country:"Sweden",countryCode:"SE",callingCode:"+46"},{country:"Switzerland",countryCode:"CH",callingCode:"+41"},{country:"Syria",countryCode:"SY",callingCode:"+963"},{country:"Taiwan",countryCode:"TW",callingCode:"+886"},{country:"Tajikistan",countryCode:"TJ",callingCode:"+992"},{country:"Tanzania",countryCode:"TZ",callingCode:"+255"},{country:"Thailand",countryCode:"TH",callingCode:"+66"},{country:"Togo",countryCode:"TG",callingCode:"+228"},{country:"Tokelau",countryCode:"TK",callingCode:"+690"},{country:"Tonga",countryCode:"TO",callingCode:"+676"},{country:"Trinidad and Tobago",countryCode:"TT",callingCode:"+1868"},{country:"Tunisia",countryCode:"TN",callingCode:"+216"},{country:"Turkey",countryCode:"TR",callingCode:"+90"},{country:"Turkmenistan",countryCode:"TM",callingCode:"+993"},{country:"Turks and Caicos Islands",countryCode:"TC",callingCode:"+1649"},{country:"Tuvalu",countryCode:"TV",callingCode:"+688"},{country:"U.S. Virgin Islands",countryCode:"VI",callingCode:"+1340"},{country:"Uganda",countryCode:"UG",callingCode:"+256"},{country:"Ukraine",countryCode:"UA",callingCode:"+380"},{country:"United Arab Emirates",countryCode:"AE",callingCode:"+971"},{country:"United Kingdom",countryCode:"GB",callingCode:"+44"},{country:"United States",countryCode:"US",callingCode:"+1"},{country:"United States Minor Outlying Islands",countryCode:"UM",callingCode:"+1"},{country:"Uruguay",countryCode:"UY",callingCode:"+598"},{country:"Uzbekistan",countryCode:"UZ",callingCode:"+998"},{country:"Vanuatu",countryCode:"VU",callingCode:"+678"},{country:"Vatican",countryCode:"VA",callingCode:"+379"},{country:"Venezuela",countryCode:"VE",callingCode:"+58"},{country:"Vietnam",countryCode:"VN",callingCode:"+84"},{country:"Wallis and Futuna",countryCode:"WF",callingCode:"+681"},{country:"Western Sahara",countryCode:"EH",callingCode:"+212"},{country:"Yemen",countryCode:"YE",callingCode:"+967"},{country:"Zambia",countryCode:"ZM",callingCode:"+260"},{country:"Zimbabwe",countryCode:"ZW",callingCode:"+263"}],t=o=>c.find((n=>n.countryCode===o));const r=({placeholder:r,country:l,onChange:a,value:d,iconComponent:u,inputProps:i,onlyCountries:C,excludeCountries:y,preferredCountries:g,showDropdownIcon:s=!0,dialCodeInputField:h=!1,search:p=!0,disableDropdownOnly:m=!1,disableInput:S=!1,searchPlaceholder:M="Search country",showSearchIcon:v=!0,searchIconComponent:I,searchProps:N,searchNotFound:w="Not found",containerClass:B,buttonClass:A,dropdownClass:G,dropdownListClass:T,dropdownIconClass:f,searchContainerClass:b,searchInputClass:P,searchIconClass:E,inputClass:L,containerStyle:R,buttonStyle:K,dropdownStyle:F,dropdownListStyle:D,dropdownIconStyle:U,searchContainerStyle:k,searchInputStyle:V,searchIconStyle:x,inputStyle:H})=>{const[O,W]=e.useState({}),[z,Z]=e.useState(!1),[Y,J]=e.useState(d||""),[j,Q]=e.useState(c),[q,X]=e.useState(0),$=e.useRef(null),_=e.useRef(null);var oo,no;oo=$,no=()=>Z(!1),e.useEffect((()=>{const o=o=>{oo.current&&!oo.current.contains(o.target)&&no(o)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}),[oo,no]);const eo=o=>{z&&("ArrowDown"===o.key&&(o.preventDefault(),X((o=>o<j.length-1?o+1:o))),"ArrowUp"===o.key&&(o.preventDefault(),X((o=>o>0?o-1:0))),"Escape"===o.key&&Z(!1),"Enter"===o.key&&q>=0&&(W(j[q]),Z(!1)))};return e.useEffect((()=>{if(q<0||q>j.length||!_)return()=>{};if(z&&_&&j.length>0){let n=Array.from(_.current?.children);n[q]&&(o=n[q].offsetTop-65,p&&j.length>0&&_.current?.scrollTo({top:o,behavior:"smooth"}))}var o}),[q]),e.useMemo((()=>{if(h){const o=Y?.replace(O.callingCode,t(l).callingCode);console.log(o),J(o.length>0?o:t(l).callingCode)}W(t(l))}),[l,h]),e.useMemo((()=>{Q(((o,n,e)=>{let t=[];return t=n&&n.length>0?c.filter((o=>!n?.includes(o.countryCode))):o&&o?.length>0?c.filter((n=>o?.includes(n.countryCode))):c,t.sort(((o,n)=>Number(e?.includes(n.countryCode))-Number(e?.includes(o.countryCode))||e?.indexOf(o.countryCode)-e?.indexOf(n.countryCode)))})(C,y,g))}),[C,y,g]),o("div",{className:"simple-phone-input-sri198-container"+(B?" "+B:""),onKeyDown:o=>eo(o),tabIndex:-1,style:R,children:n("div",{className:"simple-phone-input-sri198-main",children:[n("div",{className:"simple-phone-input-sri198-dropdown-container",ref:$,children:[n("div",{onClick:()=>{m||Z(!z)},className:h?"simple-phone-input-sri198-dropdown-container-button dial"+(A?" "+A:""):"simple-phone-input-sri198-dropdown-container-button"+(A?" "+A:""),style:K,children:[o("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+O.countryCode+".svg",alt:O.country,width:"20px"}),!h&&o("span",{className:"simple-phone-input-sri198-selected-code",children:O.callingCode}),s&&!m&&o("div",{className:z?"simple-phone-input-sri198-dropdown-icon"+(f?" "+f:""):"simple-phone-input-sri198-dropdown-icon active"+(f?" "+f:""),style:U,children:u||o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:o("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})})]}),n("ul",{className:z?"simple-phone-input-sri198-dropdown active"+(G?" "+G:""):"simple-phone-input-sri198-dropdown"+(G?" "+G:""),ref:_,style:F,children:[p&&n("div",{className:"simple-phone-input-sri198-search-container"+(b?" "+b:""),style:k,children:[o("input",{placeholder:M,...N,onChange:o=>{const n=o.target.value;Q(((o,n,e)=>{let t=[];return t=e&&e.length>0?c.filter((o=>!e?.includes(o.countryCode))):n&&n?.length>0?c.filter((o=>n?.includes(o.countryCode))):c,t.filter((n=>{const e=new RegExp(o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"gi");return n.country.match(e)}))})(n,C,y))},className:P??"",style:V}),v&&o("div",{className:"simple-phone-input-sri198-search-icon"+(E?" "+E:""),style:x,children:I??n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 48 48",children:[n("g",{fill:"#616161",children:[o("path",{d:"m29.175 31.99l2.828-2.827l12.019 12.019l-2.828 2.827z"}),o("circle",{cx:"20",cy:"20",r:"16"})]}),o("path",{fill:"#37474F",d:"m32.45 35.34l2.827-2.828l8.696 8.696l-2.828 2.828z"}),o("circle",{cx:"20",cy:"20",r:"13",fill:"#64B5F6"}),o("path",{fill:"#BBDEFB",d:"M26.9 14.2c-1.7-2-4.2-3.2-6.9-3.2s-5.2 1.2-6.9 3.2c-.4.4-.3 1.1.1 1.4c.4.4 1.1.3 1.4-.1C16 13.9 17.9 13 20 13s4 .9 5.4 2.5c.2.2.5.4.8.4c.2 0 .5-.1.6-.2c.4-.4.4-1.1.1-1.5z"})]})})]}),0===j.length&&o("div",{className:"simple-phone-input-sri198-not-found",children:w}),j.map(((e,c)=>n("li",{onClick:()=>((o,n)=>{if(h){const n=Y?.replace(O.callingCode,o.callingCode);J(n.length>0?n:o.callingCode),a({country:o.country,code:o.countryCode,dialCode:o.callingCode,value:n.length>0?n:o.callingCode,valueWithoutPlus:n.length>0?n.replace("+",""):o.callingCode.replace("+","")})}else a({country:o.country,code:o.countryCode,dialCode:o.callingCode,value:o.callingCode+Y,valueWithoutPlus:o.callingCode.replace("+","")+Y});W(o),Z(!1),X(n)})(e,c),className:c===q?"active"+(T?" "+T:""):""+(T?" "+T:""),style:D,children:[o("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+e.countryCode+".svg",alt:e.country,width:"20px"}),o("span",{className:"simple-phone-input-sri198-dropdown-text",children:e.country}),o("span",{className:"simple-phone-input-sri198-dropdown-country-code",children:e.callingCode})]},c)))]})]}),o("input",{className:"simple-phone-input-sri198-input "+(L?" "+L:""),placeholder:r,onChange:o=>{const n=o.target.value.replace(/\D/g,"");h?(a({country:O.country,code:O.countryCode,dialCode:O.callingCode,value:"+"+n,valueWithoutPlus:n}),J("+"+n)):(J(n),a({country:O.country,code:O.countryCode,dialCode:O.callingCode,value:O.callingCode+n,valueWithoutPlus:O.callingCode.replace("+","")+n}))},type:"tel",onInput:o=>{if(h){const n=Y.slice(O.callingCode.length);o.target.value.startsWith(O.callingCode)?o.target.value=o.target.value:o.target.value=O.callingCode+n}},onKeyDown:o=>eo(o),value:Y,...i,style:H,disabled:S})]})})};export{r as PhoneInput};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/Data/country-data.ts","../../src/Helpers/country-helper.ts","../../src/components/PhoneInput/PhoneInput.tsx","../../src/Helpers/hook.ts"],"sourcesContent":[null,null,null,null],"names":["countryData","country","countryCode","callingCode","getDefaultCountry","code","find","item","PhoneInput","placeholder","onChange","value","iconComponent","inputProps","onlyCountries","excludeCountries","preferredCountries","showDropdownIcon","dialCodeInputField","search","disableDropdownOnly","disableInput","searchPlaceholder","showSearchIcon","searchIconComponent","searchProps","searchNotFound","containerClass","buttonClass","dropdownClass","dropdownListClass","dropdownIconClass","searchContainerClass","searchInputClass","searchIconClass","inputClass","containerStyle","buttonStyle","dropdownStyle","dropdownListStyle","dropdownIconStyle","searchContainerStyle","searchInputStyle","searchIconStyle","inputStyle","selected","setSelected","React","useState","isDropdown","setDropdown","inputValue","setInputValue","countryDataInfo","setCountryData","cursor","setCursor","dropdownRef","useRef","listRef","ref","handler","useEffect","listener","event","current","contains","target","document","addEventListener","removeEventListener","keyBoardNav","e","key","preventDefault","c","length","listItems","Array","from","children","position","offsetTop","scrollTo","top","behavior","useMemo","result","replace","console","log","onlyCountry","excludeCountry","preferredCountry","countries","filter","includes","sort","a","b","Number","indexOf","getCountryByFilter","_jsx","className","onKeyDown","tabIndex","style","_jsxs","onClick","src","alt","width","xmlns","height","preserveAspectRatio","viewBox","fill","d","regex","RegExp","match","getBySearch","cx","cy","r","map","i","dialCode","valueWithoutPlus","handleSelected","onlyNumber","type","onInput","oldVal","slice","startsWith","disabled"],"mappings":"uEAAO,MAAMA,EAAc,CACvB,CACIC,QAAS,cACTC,YAAa,KACbC,YAAa,OAEjB,CACIF,QAAS,UACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,UACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,iBACTC,YAAa,KACbC,YAAa,SAEjB,CACIF,QAAS,UACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,SACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,WACTC,YAAa,KACbC,YAAa,SAEjB,CACIF,QAAS,aACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,sBACTC,YAAa,KACbC,YAAa,SAEjB,CACIF,QAAS,YACTC,YAAa,KACbC,YAAa,OAEjB,CACIF,QAAS,UACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,QACTC,YAAa,KACbC,YAAa,QAEjB,CACIF,QAAS,YACTC,YAAa,KACbC,YAAa,OAEjB,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,QAAS4C,EAAS5C,QAClBI,KAAMwC,EAAS3C,YACf8H,SAAUnF,EAAS1C,YACnBQ,MAAOkC,EAAS1C,YAAcgI,EAC9BF,iBAAkBpF,EAAS1C,YAAYqF,QAAQ,IAAK,IAAM2C,IAEjE,EAuJWC,KAAK,MACLC,QAAU7D,IACN,GAAItD,EAAoB,CACpB,MAAMoH,EAASnF,EAAWoF,MAAM1F,EAAS1C,YAAYyE,QACjDJ,EAAEL,OAAOxD,MAAM6H,WAAW3F,EAAS1C,aACnCqE,EAAEL,OAAOxD,MAAQ6D,EAAEL,OAAOxD,MAE1B6D,EAAEL,OAAOxD,MAAQkC,EAAS1C,YAAcmI,CAE/C,GAEL7B,UAAYjC,GAAMD,GAAYC,GAC9B7D,MAAOwC,KACHtC,EACJ8F,MAAO/D,EACP6F,SAAUpH,QAIxB"}
@@ -0,0 +1,5 @@
1
+ export declare const countryData: {
2
+ country: string;
3
+ countryCode: string;
4
+ callingCode: string;
5
+ }[];
@@ -0,0 +1,20 @@
1
+ export interface CountryDataTypes {
2
+ country: string;
3
+ countryCode: string;
4
+ callingCode: string;
5
+ }
6
+ export declare const getDefaultCountry: (code: string) => {
7
+ country: string;
8
+ countryCode: string;
9
+ callingCode: string;
10
+ } | undefined;
11
+ export declare const getBySearch: (search: string, onlyCountry?: string[], excludeCountry?: string[]) => {
12
+ country: string;
13
+ countryCode: string;
14
+ callingCode: string;
15
+ }[];
16
+ export declare const getCountryByFilter: (onlyCountry: string[], excludeCountry: string[], preferredCountry: string[]) => {
17
+ country: string;
18
+ countryCode: string;
19
+ callingCode: string;
20
+ }[];
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function useOnClickOutside(ref: React.RefObject<HTMLDivElement>, handler: (e: MouseEvent | TouchEvent) => void): void;
@@ -0,0 +1,50 @@
1
+ import React from "react";
2
+ import "./PhoneInput.css";
3
+ export interface PhoneInputResponseType {
4
+ country: string;
5
+ code: string;
6
+ dialCode: string;
7
+ value: string;
8
+ valueWithoutPlus: string;
9
+ }
10
+ interface Props {
11
+ placeholder: string;
12
+ country: string;
13
+ onChange: (e: PhoneInputResponseType) => void;
14
+ value?: string;
15
+ iconComponent?: React.ReactNode;
16
+ inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
17
+ onlyCountries?: string[];
18
+ excludeCountries?: string[];
19
+ preferredCountries?: string[];
20
+ showDropdownIcon?: boolean;
21
+ dialCodeInputField?: boolean;
22
+ disableDropdownOnly?: boolean;
23
+ disableInput?: boolean;
24
+ search?: boolean;
25
+ searchPlaceholder?: string;
26
+ showSearchIcon?: boolean;
27
+ searchIconComponent?: React.ReactNode;
28
+ searchProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
29
+ searchNotFound?: string;
30
+ containerClass?: string;
31
+ buttonClass?: string;
32
+ dropdownClass?: string;
33
+ dropdownListClass?: string;
34
+ dropdownIconClass?: string;
35
+ searchContainerClass?: string;
36
+ searchInputClass?: string;
37
+ searchIconClass?: string;
38
+ inputClass?: string;
39
+ containerStyle?: React.CSSProperties;
40
+ buttonStyle?: React.CSSProperties;
41
+ dropdownStyle?: React.CSSProperties;
42
+ dropdownListStyle?: React.CSSProperties;
43
+ dropdownIconStyle?: React.CSSProperties;
44
+ searchContainerStyle?: React.CSSProperties;
45
+ searchInputStyle?: React.CSSProperties;
46
+ searchIconStyle?: React.CSSProperties;
47
+ inputStyle?: React.CSSProperties;
48
+ }
49
+ declare const PhoneInput: ({ placeholder, country, onChange, value, iconComponent, inputProps, onlyCountries, excludeCountries, preferredCountries, showDropdownIcon, dialCodeInputField, search, disableDropdownOnly, disableInput, searchPlaceholder, showSearchIcon, searchIconComponent, searchProps, searchNotFound, containerClass, buttonClass, dropdownClass, dropdownListClass, dropdownIconClass, searchContainerClass, searchInputClass, searchIconClass, inputClass, containerStyle, buttonStyle, dropdownStyle, dropdownListStyle, dropdownIconStyle, searchContainerStyle, searchInputStyle, searchIconStyle, inputStyle }: Props) => JSX.Element;
50
+ export default PhoneInput;
@@ -0,0 +1 @@
1
+ export { default, PhoneInputResponseType } from "./PhoneInput";
@@ -0,0 +1 @@
1
+ export { default as PhoneInput, PhoneInputResponseType } from "./PhoneInput";
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+
3
+ interface PhoneInputResponseType {
4
+ country: string;
5
+ code: string;
6
+ dialCode: string;
7
+ value: string;
8
+ valueWithoutPlus: string;
9
+ }
10
+ interface Props {
11
+ placeholder: string;
12
+ country: string;
13
+ onChange: (e: PhoneInputResponseType) => void;
14
+ value?: string;
15
+ iconComponent?: React.ReactNode;
16
+ inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
17
+ onlyCountries?: string[];
18
+ excludeCountries?: string[];
19
+ preferredCountries?: string[];
20
+ showDropdownIcon?: boolean;
21
+ dialCodeInputField?: boolean;
22
+ disableDropdownOnly?: boolean;
23
+ disableInput?: boolean;
24
+ search?: boolean;
25
+ searchPlaceholder?: string;
26
+ showSearchIcon?: boolean;
27
+ searchIconComponent?: React.ReactNode;
28
+ searchProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
29
+ searchNotFound?: string;
30
+ containerClass?: string;
31
+ buttonClass?: string;
32
+ dropdownClass?: string;
33
+ dropdownListClass?: string;
34
+ dropdownIconClass?: string;
35
+ searchContainerClass?: string;
36
+ searchInputClass?: string;
37
+ searchIconClass?: string;
38
+ inputClass?: string;
39
+ containerStyle?: React.CSSProperties;
40
+ buttonStyle?: React.CSSProperties;
41
+ dropdownStyle?: React.CSSProperties;
42
+ dropdownListStyle?: React.CSSProperties;
43
+ dropdownIconStyle?: React.CSSProperties;
44
+ searchContainerStyle?: React.CSSProperties;
45
+ searchInputStyle?: React.CSSProperties;
46
+ searchIconStyle?: React.CSSProperties;
47
+ inputStyle?: React.CSSProperties;
48
+ }
49
+ declare const PhoneInput: ({ placeholder, country, onChange, value, iconComponent, inputProps, onlyCountries, excludeCountries, preferredCountries, showDropdownIcon, dialCodeInputField, search, disableDropdownOnly, disableInput, searchPlaceholder, showSearchIcon, searchIconComponent, searchProps, searchNotFound, containerClass, buttonClass, dropdownClass, dropdownListClass, dropdownIconClass, searchContainerClass, searchInputClass, searchIconClass, inputClass, containerStyle, buttonStyle, dropdownStyle, dropdownListStyle, dropdownIconStyle, searchContainerStyle, searchInputStyle, searchIconStyle, inputStyle }: Props) => JSX.Element;
50
+
51
+ export { PhoneInput, PhoneInputResponseType };
package/dist/style.css ADDED
@@ -0,0 +1,162 @@
1
+ .simple-phone-input-sri198-container {
2
+ position: relative;
3
+ }
4
+
5
+ .simple-phone-input-sri198-container:focus,
6
+ .simple-phone-input-sri198-container:focus-visible,
7
+ .simple-phone-input-sri198-container:focus-within {
8
+ outline: none;
9
+ }
10
+
11
+ .simple-phone-input-sri198-main {
12
+ display: flex;
13
+ border: 1px solid rgb(203 203 203);
14
+ user-select: none;
15
+ border-radius: 3px;
16
+ }
17
+
18
+ .simple-phone-input-sri198-dropdown-container {
19
+ cursor: pointer;
20
+ display: flex;
21
+ align-items: center;
22
+ background: rgb(231 231 231);
23
+ border-right: 1px solid rgb(203 203 203);
24
+ }
25
+
26
+ .simple-phone-input-sri198-dropdown-container img {
27
+ margin-right: 6px;
28
+ }
29
+
30
+ .simple-phone-input-sri198-dropdown {
31
+ background: white;
32
+ list-style: none;
33
+ padding: 0;
34
+ margin: 0;
35
+ position: absolute;
36
+ top: 110%;
37
+ left: 0;
38
+ right: 0;
39
+ height: 250px;
40
+ overflow-y: auto;
41
+ box-shadow: 0px 4px 15px rgb(163 163 163);
42
+ border-radius: 3px;
43
+ transition: 0.3s ease;
44
+ transform: translateY(-5px);
45
+ opacity: 0;
46
+ visibility: hidden;
47
+ }
48
+
49
+ .simple-phone-input-sri198-dropdown.active {
50
+ transform: translateY(0px);
51
+ opacity: 1;
52
+ visibility: visible;
53
+ }
54
+
55
+ .simple-phone-input-sri198-dropdown li {
56
+ margin: 3px 0;
57
+ padding: 3px 8px;
58
+ display: flex;
59
+ }
60
+
61
+ .simple-phone-input-sri198-dropdown li.active {
62
+ background: rgba(0, 0, 0, 0.116);
63
+ }
64
+
65
+ .simple-phone-input-sri198-dropdown li:hover {
66
+ background: rgba(0, 0, 0, 0.116);
67
+ }
68
+
69
+ .simple-phone-input-sri198-dropdown li img {
70
+ margin-right: 6px;
71
+ }
72
+
73
+ .simple-phone-input-sri198-dropdown-container-button {
74
+ display: flex;
75
+ flex: 1;
76
+ width: 92px;
77
+ padding: 7px 2px 7px 7px;
78
+ align-items: center;
79
+ }
80
+
81
+ .simple-phone-input-sri198-dropdown-container-button.dial {
82
+ width: unset;
83
+ padding: 8px 3px 8px 8px;
84
+ }
85
+
86
+ .simple-phone-input-sri198-dropdown-text {
87
+ font-size: 15px;
88
+ flex: 1;
89
+ margin-top: 3px;
90
+ }
91
+
92
+ .simple-phone-input-sri198-dropdown-country-code {
93
+ opacity: 0.6;
94
+ margin-top: 3px;
95
+ }
96
+
97
+ .simple-phone-input-sri198-dropdown-icon {
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ }
102
+
103
+ .simple-phone-input-sri198-dropdown-icon svg {
104
+ transition: 0.3s ease;
105
+ }
106
+
107
+ .simple-phone-input-sri198-dropdown-icon.active svg {
108
+ transform: rotate(-180deg)
109
+ }
110
+
111
+ .simple-phone-input-sri198-selected-code {
112
+ flex: 1;
113
+ font-size: 14px;
114
+ margin-top: 2px;
115
+ }
116
+
117
+ .simple-phone-input-sri198-input {
118
+ width: 100%;
119
+ border: none;
120
+ padding: 0 10px;
121
+ }
122
+
123
+ .simple-phone-input-sri198-input:focus {
124
+ outline: none;
125
+ }
126
+
127
+ .simple-phone-input-sri198-search-container {
128
+ padding: 5px;
129
+ position: relative;
130
+ }
131
+
132
+ .simple-phone-input-sri198-search-container input {
133
+ border: 1px solid rgba(0, 0, 0, 0.116);
134
+ padding: 8px 10px;
135
+ width: 100%;
136
+ font-size: 15px;
137
+ border-radius: 2px;
138
+ }
139
+
140
+ .simple-phone-input-sri198-search-icon {
141
+ position: absolute;
142
+ right: 10px;
143
+ top: 50%;
144
+ transform: translateY(-50%);
145
+ display: flex;
146
+ pointer-events: none;
147
+ }
148
+
149
+ .simple-phone-input-sri198-search-icon svg {
150
+ font-size: 20px;
151
+ }
152
+
153
+ .simple-phone-input-sri198-not-found {
154
+ text-align: center;
155
+ margin-top: 10px;
156
+ font-size: 15px;
157
+ color: #f73131;
158
+ }
159
+
160
+ .simple-phone-input-sri198-search-container input:focus {
161
+ outline: none;
162
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "react-simple-phone-input",
3
- "version": "5.1.8",
3
+ "version": "5.2.0",
4
4
  "description": "A simple react phone input component with calling code dropdown🤷",
5
- "homepage": "https://react-simple-phone-input.vercel.app",
5
+ "homepage": "https://react-phone-input.siamahnaf.com/",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",
8
8
  "files": [
@@ -57,6 +57,7 @@
57
57
  "rollup-plugin-dts": "^5.0.0",
58
58
  "rollup-plugin-peer-deps-external": "^2.2.4",
59
59
  "rollup-plugin-postcss": "^4.0.2",
60
+ "tslib": "^2.5.0",
60
61
  "typescript": "^4.9.4"
61
62
  }
62
63
  }