4.3.0 (2024-05-18)
- country-data: add Dominican Republic formatting mask and area codes (79f7cf2)
- country-data: add Puerto Rico formatting mask (4b8721a)
- format number for The Netherlands (2e612cd)
4.2.9 (2024-04-29)
- undo: fix undo/redo keys for macOS (544151e)
4.2.8 (2024-04-20)
- country-data: add support for Cayman Islands and Greenland (df90c60)
4.2.7 (2024-04-15)
- country-data: update German phone format (dab8f12)
4.2.6 (2024-02-22)
- some CSS variables (62f901f)
4.2.5 (2024-02-12)
- types: export missing types (59181de)
4.2.4 (2024-02-04)
- build: change build folder to dist, fix repo link (7d495c9)
4.2.3 (2024-02-03)
- remove unreachable d.ts references (01c084b)
4.2.2 (2024-01-29)
- CountrySelectorDropdown: fix preferred countries ordering (9ba9082)
4.2.1 (2024-01-24)
- export ref type (13fd47d)
4.2.0 (2024-01-15)
- CountrySelector: render preferred country list divider as hr element (d1df651)
- CountrySelector: update countries ordering logic (bcb8b89)
4.1.0 (2024-01-11)
- add disableFocusAfterCountrySelect prop (f2750e0)
- usePhoneInput: add ability to skip focus on input after country change in country setter (8277809)
4.0.4 (2023-11-11)
- country-data: add additional Australia formats (9453169)
4.0.3 (2023-11-02)
- countryData: add country codes for Puerto Rico (411a441)
4.0.2 (2023-10-31)
- safari autofocus bug (b7acf49)
4.0.1 (2023-10-27)
- update Sweden format mask (1500e0b)
4.0.0 (2023-10-22)
-
allow type prefix if input is empty (08e5811)
-
CountrySelector: add library prefix to country selector list-item id (b45af25)
-
CountrySelector: fix country name overflow (09e7097)
-
fix dynamic format mask with disableDialCodeAndPrefix (5cb1e11)
-
forceDialCode: fix e164Phone value update when input is cleared (0c353e0)
-
getCursorPosition: reuse isNumeric utility function (65d8618)
-
getCursorPosition: update cursor position logic, fix cursor jump on disabled dial code values (5256439)
-
guess initial country when dial code is disabled (c79adc3)
-
handlePhoneChange: return current country on partial dial code match (dbbf20d)
-
history: ignore history events on empty input (9c781c1)
-
ignore input handling if user typed non digit character (b175b4e)
-
PhoneInput: make ref inherit inner input-ref (819b48d)
-
PhoneInput: rename formattedValue to displayValue in onChange metadata arg (3479ae5)
-
PhoneInput: support ref forwarding (f2d3de8)
-
rename displayValue to inputValue in onChange callback (e78a13e)
-
rename getCountryCurrentFormat to getCountryMaskFormat, add it to export (fca84d4)
-
rename getCountryMaskFormat helper function to getActiveFormattingMask (aec5e9e)
-
return country object instead of iso2 code from usePhoneInput and onChange (17c1365)
-
usePhoneInput: fix e164Phone value on setCountry (cec0700)
-
usePhoneInput: log error if an invalid country code is passed to setNewCountry (6098a99)
-
fix!: rename flag image component to FlagImage (c4b0abd)
-
fix(usePhoneInput)!: rename return property names (42e4ef2)
-
fix!: return E164 phone in onChange callback (939275a)
-
feat!: add support for multiple masks per country (f758bb3)
- add disableFormatting prop (e6ada39)
- add inputRef prop (386f396)
- add state property to the forwarded ref (e008c90)
- disableFormatting: move disableFormatting prop to getCountryMaskFormat util function (935d6ff)
- PhoneInput: add most used input props as top level props for easy integration (7a29744)
- FlagEmoji component is no longer exported, use FlagImage instead
- "phone" is renamed to "inputValue", "e164Phone" is renamed to "phone"
- phone value is unified to E164 format
- the value of the country format can be of type object
3.1.2 (2023-08-23)
- export guessCountryByPartialPhoneNumber, removeDialCode and getCountry helper functions (04d46aa)
- remove country guess from initial value when disableDialCodeAndPrefix is true (d26b977)
- set default value for country prop in guessCountryByPartialNumber and getCountry helpers (c539617)
3.1.1 (2023-08-22)
- FlagEmoji: add empty alt attribute to flag image, fix types for FlagEmojiProps (17b2bb6)
3.1.0 (2023-08-18)
- add flags prop for passing custom flag urls (2a1a010)
3.0.2 (2023-08-17)
- CountrySelectorDropdown: prevent form submit on select country (2e3b817)
3.0.1 (2023-08-16)
- build: fit d.ts file extension for esm import (e3a4f07)
3.0.0 (2023-08-15)
- country-data: remove area-codes for countries that have priority 0 (28809d0)
- remove areaCodeMatch from guessCountryByPartialNumber util function (a4008ad)
2.3.2 (2023-07-24)
- data: Update Ivory Coast Phone Number Format to Support 10 Digits After Area Code (45565e9)
2.3.1 (2023-07-06)
- change CountryIso2 type to string (98b63f2)
- set "us" if the wrong default country value was provided (83e08e0)
2.3.0 (2023-07-04)
- country-selector: add search to country-selector dropdown (ebe6cca)
2.2.3 (2023-06-30)
- data: add some missing US area-codes (3f7b77e)
2.2.2 (2023-05-05)
- usePhoneInput: move onChange call from the useHistoryState state setter to value update effect (6ab8da7)
2.2.1 (2023-04-23)
- update Australia format mask (2506e7f)
2.2.0 (2023-04-21)
- validation: add formatMatch return value, make areaCodesMatch not affect isValid (48715ef)
- add country value to onChange callback (39fcf48)
- validation: add country prop to validation function, add dialCodeMatch return property (97f19e7)
2.1.0 (2023-03-16)
- make defaultCountry not required, set us as defaultCountry (41e96e3)
2.0.4 (2023-03-15)
- add onChange callback to usePhoneInput, remove useEffect from PhoneInput (423bef9)
2.0.3 (2023-03-11)
- infinite loop when passing empty string value on react v18 (c593432)
2.0.2 (2023-03-11)
- usePhoneInput: fix value change handle after initial render (c00caa1)
2.0.1 (2023-03-10)
- buildCountryData: fix countryData filter, add validation of passed country values (a62ea19)
2.0.0 (2023-03-10)
-
cursor: fix cursor position on autofocus (a7805fb)
-
cursor: set cursor position on initialization (4176553)
-
history: add history initial value function setter, fix state comparing (5893db6)
-
PhoneInput: fix call onChange callback after redo/undo and country change (e8f5ffc)
-
store country in history, update country flag on undo/redo (8259173)
-
usePhoneInput: fix dial code population on phone removal after the first render (2b14c61)
-
usePhoneInput: remove double rendering on initialization (241e3e1)
-
refactor!: remove usePhone hook, change hideSpaceAfterDialCode with charAfterDialCode (69731ae)
usePhone
hook has been removedhideSpaceAfterDialCode
prop was changed withcharAfterDialCode
1.8.8 (2023-03-04)
- update Chinese format mask (bf264a6)
1.8.7 (2023-02-28)
- correctly set an initial-country flag when value is provided (26c97d7)
- handle dial code change using selector when forceDialCode is set (541e26d)
- prevent country change when dial code or area-code is not changed (9d68653)
- use default mask for countries with empty mask (b08a70c)
1.8.6 (2023-02-22)
- remove node version from package.json (c9c4057)
1.8.5 (2023-02-12)
1.8.4 (2023-02-11)
- add initial value formatting, fix flash on mount (e67c694)
- set cursor to the end on autofocus (017b0de)
1.8.3 (2023-02-05)
- CountrySelectorDropdown: re-implement scrolling using the native scrollIntoView function (df3da41)
1.8.2 (2023-02-03)
- CountrySelector: fix dropdown closing by clicking on the selector button (b149f6d)
1.8.1 (2023-01-29)
- build: switch back to webpack builder (934090c)
1.8.0 (2023-01-29)
- CountrySelector: omit onClick event type (28e4e48)
- CountrySelectorDropdown: add css variables for top and left properties (13660bb)
1.7.0 (2023-01-21)
- improve auto-scrolling of the dropdown (b17f2fa)
- add accessibility for country-selector dropdown (08e414f)
- CountrySelector: change onEscapePress callback with onClose, call it on dropdown blur (bda69a2)
- CountrySelector: pass rootProps to renderButtonWrapper callback (2fabc58)
1.6.5 (2023-01-14)
- forceDialCode: allow dial code change if a new phone has been pasted (367f872)
1.6.4 (2023-01-12)
- docs: update url to ua flag emoji (cab3db9)
- PhoneInput: remove console error on phone autofill (2b483cf)
- prevent change of dial code when forcedDialCode is true (7bd87f4)
1.6.3 (2023-01-10)
- add type="button" in CountrySelector (7c7040c)
v1.6.2 (2023-01-09)
- Country flags lazy loading, update Twemoji cdn url
#17
- fix(flag): add lazy loading, update cdn url
667a1aa
- chore(release): 1.6.2 [skip ci]
5ffee3a
v1.6.1 (2023-01-04)
- Add scrolling of the dropdown to the selected country
#16
- imp(country-selector): scroll dropdown to guessed country
9a808a3
- fix(country-selector): fix scroll to guessed country
dd24afe
- imp(country-selector): scroll dropdown to selected country on mount
872b7d0
v1.6.0 (2022-12-30)
- Phone validation
#15
- feat(validation): add phone validation
1f112ff
- imp(validation): add validation stories
05a8c29
- feat(country-guess): add areaCodeMatch to country guess result
3e0e162
v1.5.2 (2022-12-22)
- Cursor position fixes
#14
- imp(tests): add tests for cursor position
d502cfb
- imp(cursor): improve cursor position on backspace and delete key removal
974d6f8
- fix(cursor): improve position cursor on paste
c6716eb
v1.5.1 (2022-12-11)
- Fix dropdown closing, update docs
#11
- Update issue templates
#10
- imp(docs): add code of conduct
d149bb5
- fix(country-selector): close dropdown on click while dropdown is open
16c49eb
- imp(docs): add contributing doc
4484cda
v1.5.0 (2022-12-09)
- Add renderButtonWrapper prop to CountrySelector, remove css injecting
#9
- fix: remove lockfile from docs package
209922a
- feat(storybook): add example of usage with mui, chakra and antd
c2ee11e
- imp(docs): add docs for usage with UI libraries
e22e2d9
v1.4.0 (2022-11-18)
- Make PhoneInput component controlled, small fixes
#8
- feat: add value prop to the PhoneInput, allow component be controlled
96eed12
- fix(format): improve formatting with disabled dial code
7df2461
- feat(utils): add buildCountryData util
7ad3ab2
v1.3.0 (2022-11-10)
- Add docs, fix box-sizing
#6
- feat(docs): add docs subpackage, init docusaurus project
06c27c3
- imp(docs): update features list on docs website
eafe3d4
- imp(docs): add usage examples to component apis
25a26c7
v1.2.0 (2022-11-02)
- Add countries property
#4
- feat: add countries property, add ability to filter country-list
0dc4984
- fix: rename availableCountries prop to countries
46cd020
- imp(storybook): add OnlyBalticCountries story
0c2b773
v1.1.0 (2022-10-30)
- Add CSS variables
#3
- imp(styles): add css variables
a27b9a7
- imp(docs): add css-variables to readme
0470536
- fix: update stylelint-config-standard-scss dependency
748c4bc
v1.0.1 (2022-10-28)
- Release v1.0.0
#1