@rpcbase/ui 0.229.0 → 0.231.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/dist/components/PhoneNumberInput/index.d.ts.map +1 -1
- package/dist/index100.js +4 -11
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +8 -68
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +6 -38
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +5 -14
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +4 -23
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +6 -110
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +146 -13
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +39 -4
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +5 -4
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +8 -5
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +13 -11
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +13 -19
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +8 -13
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +31 -261
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +10 -4
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +11 -28
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +8 -126
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +13 -5
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +101 -78
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +20 -67
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +53 -8
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +73 -16
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +9 -92
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +17 -62
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +15 -44
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +24 -52
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +6 -4
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +5 -4
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +23 -15
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +35 -6
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +16 -8
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +6 -16
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +4 -4
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +4 -4
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +4 -5
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +4 -5
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +3 -4
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +6 -4
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +24 -7
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +7 -24
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +6 -6
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +5 -4
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +3 -6
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +3 -5
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +4 -4
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +3 -5
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +4 -4
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +3 -8
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +3 -5
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +3 -4
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +5 -4
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +68 -6
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +2 -146
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +362 -38
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +261 -4
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +60 -7
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +46 -13
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +169 -13
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +109 -7
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +24 -31
- package/dist/index159.js.map +1 -1
- package/dist/index160.js +8 -11
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +4 -10
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +5 -8
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +4 -13
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +465 -100
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +186 -20
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +107 -53
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +261 -71
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +9 -9
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +42 -20
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +4 -16
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +11 -23
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +68 -6
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +38 -6
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +14 -24
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +21 -32
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +111 -16
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +13 -7
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +4 -4
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +4 -5
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +247 -240
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +5 -5
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +11 -4
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +19 -3
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +13 -7
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +262 -24
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +4 -7
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +28 -7
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +126 -5
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +5 -3
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +78 -3
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +66 -4
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +8 -3
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +16 -5
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +92 -3
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +65 -3
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +45 -3
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +58 -13
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +8 -154
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +64 -28
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +19 -9
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +14 -46
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +5 -11
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +4 -43
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +6 -95
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +4 -86
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +6 -105
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +16 -52
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +4 -11
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +4 -37
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +12 -8
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +9 -3
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +13 -9
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +13 -116
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +4 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -15
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +6 -36
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +5 -20
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +54 -8
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +8 -19
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +4 -28
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +4 -16
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +9 -20
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +4 -66
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +4 -6
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +3 -11
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +10 -50
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +10 -4
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +9 -29
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +10 -16
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +10 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +9 -21
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +6 -51
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +5 -25
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +4 -41
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +5 -39
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +7 -45
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +5 -20
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +13 -67
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +7 -17
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +10 -11
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +10 -27
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +21 -13
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +10 -18
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +9 -36
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +9 -262
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +4 -278
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +5 -68
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +15 -98
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +9 -83
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +18 -3
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +14 -28
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +12 -16
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +29 -34
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +12 -16
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +25 -3
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +5 -26
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +20 -29
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +67 -4
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +6 -78
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +10 -268
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +50 -11
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +4 -11
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +28 -24
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +15 -15
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +5 -125
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +21 -5
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +51 -40
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +25 -65
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +42 -14
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +39 -7
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +45 -6
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +20 -3
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +70 -10
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +17 -7
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +11 -133
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +24 -396
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +13 -52
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +18 -11
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +36 -11
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +262 -8
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +276 -9
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +68 -8
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +97 -11
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +83 -3
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +3 -3
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +28 -16
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +16 -51
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +35 -6
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +15 -121
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +3 -32
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +26 -73
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +26 -140
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +4 -62
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +78 -49
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +270 -15
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +11 -8
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +10 -4
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +25 -11
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +16 -21
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +124 -57
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +5 -8
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +38 -64
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +63 -17
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +13 -16
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +7 -5
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +5 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -6
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +10 -4
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +7 -6
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +132 -15
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +24 -24
- package/dist/index310.js +399 -4
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +52 -4
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +11 -12
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +11 -9
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +13 -13
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +154 -13
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +30 -4
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +9 -5
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +48 -6
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +11 -5
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +3 -3
- package/dist/index320.js +43 -53
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +95 -8
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +86 -4
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +105 -4
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +52 -8
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +11 -4
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +37 -4
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +8 -3
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +3 -10
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +9 -9
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +116 -9
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +17 -10
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +15 -10
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +36 -9
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +20 -6
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +8 -5
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +19 -4
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +28 -5
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +16 -6
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +8 -5
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +4 -4
- package/dist/index340.js +11 -16
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +8 -7
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +12 -9
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +3 -10
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +3 -21
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +17 -10
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +51 -9
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +5 -9
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +122 -4
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +32 -5
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +5 -5
- package/dist/index350.js +73 -16
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +142 -9
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +61 -18
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +47 -13
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +15 -13
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +7 -28
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +5 -13
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +11 -25
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +21 -5
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +4 -20
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +10 -10
- package/dist/index360.js +18 -4
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +12 -11
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +4 -17
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +11 -5
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +15 -19
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +6 -45
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +20 -17
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +45 -5
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +15 -198
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +5 -78
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +3 -3
- package/dist/index370.js +199 -7
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +78 -26
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +19 -25
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +8 -137
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +26 -13
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +21 -221
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +137 -3
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +12 -19
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +221 -72
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +4 -12
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +4 -4
- package/dist/index380.js +19 -3
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +74 -68
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +12 -9
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +3 -15
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +71 -4
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +9 -18
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +15 -12
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +5 -3
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +5 -3
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +4 -15
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +5 -5
- package/dist/index390.js +15 -491
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +8 -4
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +5 -4
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +5 -4
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +545 -15
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +47 -9
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +17 -5
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +5 -4
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +7 -545
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +7 -47
- package/dist/index399.js.map +1 -1
- package/dist/index40.js +3 -3
- package/dist/index400.js +7 -17
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +11 -5
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +8 -7
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +12 -6
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +3 -8
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +3 -12
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +14 -8
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +491 -12
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +4 -7
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +56 -2
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +10 -10
- package/dist/index410.js +67 -43
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +31 -56
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +9 -8
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +153 -2
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +107 -54
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +7 -55
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +2 -5
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +42 -54
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +56 -68
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +8 -31
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +2 -9
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +54 -152
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +56 -108
- package/dist/index422.js.map +1 -1
- package/dist/index423.js +2 -2
- package/dist/index425.js +2 -2
- package/dist/index44.js +1 -1
- package/dist/index45.js +2 -2
- package/dist/index48.js +2 -2
- package/dist/index49.js +34 -34
- package/dist/index50.js +29 -29
- package/dist/index51.js +2 -2
- package/dist/index52.js +12 -12
- package/dist/index53.js +4 -4
- package/dist/index54.js +1 -1
- package/dist/index55.js +22 -22
- package/dist/index56.js +5 -5
- package/dist/index57.js +5 -5
- package/dist/index58.js +8 -8
- package/dist/index59.js +5 -5
- package/dist/index60.js +17 -17
- package/dist/index61.js +5 -5
- package/dist/index62.js +3 -3
- package/dist/index66.js +1 -1
- package/dist/index67.js +1 -1
- package/dist/index72.js +2 -6
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +2 -8
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +5 -5
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +8 -2
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +6 -2
- package/dist/index76.js.map +1 -1
- package/dist/index79.js +52 -6
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +4 -68
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +5 -2
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +15 -363
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +5 -261
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +7 -60
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +16 -46
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +4 -169
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +4 -109
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +5 -24
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +6 -8
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +4 -4
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +4 -5
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +6 -4
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +24 -466
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +6 -185
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +4 -107
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +6 -262
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +5 -9
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +4 -42
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +5 -4
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index18.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index18.js","sources":["../src/components/PhoneNumberInput/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\nimport Select, {\n type Props as SelectProps,\n type SingleValue,\n type StylesConfig,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputProps,\n PhoneNumberSelectedCountry,\n} from \"./types\"\nimport { resolveMessages } from \"./messages\"\nimport {\n COMMON_IDD_PREFIXES,\n DEFAULT_COUNTRY,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n formatWithAsYouType,\n getLengthIssue,\n sanitizeDigits,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\ntype ParsedInput = Omit<PhoneNumberChangeDetails, \"selectedCountry\"> & {\n displayValue: string\n lengthIssue: LengthIssue | null\n}\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nfunction normalizeImplicitInternationalInput(digits: string) {\n const candidate = `+${digits}`\n const { phoneNumber, detectedCountry } = formatWithAsYouType(candidate)\n\n if (phoneNumber?.isValid() && detectedCountry) {\n return candidate\n }\n\n return null\n}\n\nfunction normalizeExplicitInternationalInput(value: string) {\n const cleaned = stripInvisibleFormatting(value).trim()\n if (!cleaned) {\n return null\n }\n\n if (cleaned.startsWith(\"+\")) {\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return \"+\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n return null\n}\n\nfunction normalizeInternationalInput(value: string) {\n const explicitInternational = normalizeExplicitInternationalInput(value)\n if (explicitInternational != null) {\n return explicitInternational\n }\n\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n return normalizeImplicitInternationalInput(digits)\n}\n\nfunction getDialCode(country: CountryCode | null, parsedDialCode: string | undefined) {\n if (parsedDialCode) {\n return parsedDialCode\n }\n return country ? getCountryCallingCode(country) : null\n}\n\nfunction getInputValueForSelectedCountry(\n value: string,\n option: Pick<CountryOption, \"dialCode\" | \"value\">,\n options?: { allowImplicitInternational?: boolean }\n) {\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n\n if (!digits) {\n return `+${option.dialCode}`\n }\n\n const normalizedInternational =\n options?.allowImplicitInternational === false\n ? normalizeExplicitInternationalInput(cleaned)\n : normalizeInternationalInput(cleaned)\n if (normalizedInternational) {\n const normalizedDigits = sanitizeDigits(normalizedInternational)\n if (normalizedDigits.startsWith(option.dialCode)) {\n return normalizedInternational\n }\n\n const { phoneNumber } = formatWithAsYouType(normalizedInternational)\n const currentDialCode = phoneNumber?.countryCallingCode\n const nationalDigits =\n currentDialCode && normalizedDigits.startsWith(currentDialCode)\n ? normalizedDigits.slice(currentDialCode.length)\n : phoneNumber?.nationalNumber ?? normalizedDigits\n\n return `+${option.dialCode}${nationalDigits}`\n }\n\n const { phoneNumber } = formatWithAsYouType(cleaned, option.value)\n return `+${option.dialCode}${phoneNumber?.nationalNumber ?? digits}`\n}\n\nfunction preferSelectedCountry(\n parsed: ParsedInput,\n option: Pick<CountryOption, \"dialCode\" | \"value\">\n): ParsedInput {\n return {\n ...parsed,\n country: option.value,\n countryCallingCode: option.dialCode,\n lengthIssue: getLengthIssue(parsed.rawInput, option.value),\n }\n}\n\nfunction parsePhoneInput(rawValue: string | undefined, baseCountry?: CountryCode): ParsedInput {\n const cleaned = stripInvisibleFormatting(rawValue ?? \"\").trim()\n\n if (!cleaned) {\n const country = baseCountry ?? null\n const countryCallingCode = country ? getCountryCallingCode(country) : null\n\n return {\n displayValue: \"\",\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country,\n countryCallingCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalizedInternational = normalizeInternationalInput(cleaned)\n const shouldFormat = normalizedInternational != null || baseCountry != null\n\n if (!shouldFormat) {\n return {\n displayValue: cleaned,\n formattedInternational: cleaned,\n formattedNational: cleaned,\n e164: null,\n country: null,\n countryCallingCode: null,\n nationalNumber: sanitizeDigits(cleaned),\n rawInput: cleaned,\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalized = normalizedInternational ?? cleaned\n const {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n } = formatWithAsYouType(normalized, baseCountry)\n const hasInternationalPrefix = normalizedInternational != null\n const country = hasInternationalPrefix\n ? detectedCountry ?? baseCountry ?? null\n : baseCountry ?? detectedCountry ?? null\n const countryCallingCode = getDialCode(country, phoneNumber?.countryCallingCode)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalNumber =\n phoneNumber?.nationalNumber ??\n (countryCallingCode && normalized.startsWith(\"+\")\n ? stripPrefix(normalizedDigits, countryCallingCode)\n : sanitizeDigits(cleaned))\n const displayValue = hasInternationalPrefix ? international : formatted\n\n return {\n displayValue,\n formattedInternational: phoneNumber?.formatInternational() ?? international,\n formattedNational: phoneNumber?.formatNational() ?? national,\n e164: phoneNumber?.number ?? null,\n country,\n countryCallingCode,\n nationalNumber,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n lengthIssue: country ? getLengthIssue(normalized, country) : null,\n }\n}\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const controlledCountry = typeof countryProp === \"string\" ? countryProp : null\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const menuPriorityCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const initialStateRef = React.useRef<ParsedInput | null>(null)\n\n if (!initialStateRef.current) {\n const initialState = parsePhoneInput(value, controlledCountry ?? undefined)\n initialStateRef.current = initialState\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState<CountryCode | null>(\n controlledCountry ? null : initialState.country\n )\n const [inputValueState, setInputValueState] = React.useState(initialState.displayValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(\n initialState.lengthIssue\n )\n\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const hasNotifiedCountryRef = React.useRef(false)\n const lastNotifiedCountryRef = React.useRef<CountryCode | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const activeCountry = controlledCountry ?? uncontrolledCountry\n const explicitFormattingCountry = controlledCountry ?? manualSelectionCountryRef.current ?? undefined\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n menuPortalTarget: userMenuPortalTarget,\n menuPosition: userMenuPosition,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n const [defaultMenuPortalTarget, setDefaultMenuPortalTarget] =\n React.useState<HTMLElement | null>(null)\n const hasUserMenuPortalTarget = \"menuPortalTarget\" in selectOverrides\n const menuPortalTarget = hasUserMenuPortalTarget\n ? userMenuPortalTarget\n : defaultMenuPortalTarget\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => {\n const userMenuPortal = userSelectStyles?.menuPortal\n\n return {\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n menuPortal: (provided, state) => {\n const base = {\n ...provided,\n zIndex: 1300,\n }\n\n return userMenuPortal ? userMenuPortal(base, state) : base\n },\n }\n },\n [userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (hasUserMenuPortalTarget || typeof document === \"undefined\") {\n return\n }\n\n const portalTarget =\n inputRef.current?.closest<HTMLElement>(\n \"[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']\"\n ) ?? document.body\n setDefaultMenuPortalTarget(portalTarget)\n }, [hasUserMenuPortalTarget])\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const parsed = parsePhoneInput(value, explicitFormattingCountry)\n keyboardBufferRef.current = \"\"\n\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n }, [controlledCountry, explicitFormattingCountry, uncontrolledCountry, value])\n\n React.useEffect(() => {\n const country = activeCountry ?? null\n if (!hasNotifiedCountryRef.current && country == null) {\n return\n }\n\n if (hasNotifiedCountryRef.current && lastNotifiedCountryRef.current === country) {\n return\n }\n\n hasNotifiedCountryRef.current = true\n lastNotifiedCountryRef.current = country\n onCountryChange?.(country, country ? resolveSelectedCountry(country) : null)\n }, [activeCountry, onCountryChange, resolveSelectedCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n onChange?.({\n ...details,\n selectedCountry: details.country ? resolveSelectedCountry(details.country) : null,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const applyParsedInput = React.useCallback(\n (parsed: ParsedInput, snapshot: ReturnType<typeof captureSelectionSnapshot> | null) => {\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n\n if (snapshot) {\n pendingSelectionRef.current = resolveSelection(snapshot, parsed.displayValue)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n },\n [controlledCountry, emitChange, uncontrolledCountry]\n )\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const normalizedExplicitInternational = normalizeExplicitInternationalInput(raw)\n const manualCountry = manualSelectionCountryRef.current\n if (normalizedExplicitInternational != null && manualCountry) {\n const manualDialCode = getCountryCallingCode(manualCountry)\n if (!sanitizeDigits(normalizedExplicitInternational).startsWith(manualDialCode)) {\n manualSelectionCountryRef.current = null\n }\n } else if (normalizedExplicitInternational != null) {\n manualSelectionCountryRef.current = null\n }\n\n const activeManualCountry = manualSelectionCountryRef.current\n const rawDigits = sanitizeDigits(raw)\n if (\n !controlledCountry &&\n activeManualCountry &&\n normalizedExplicitInternational == null &&\n rawDigits\n ) {\n const manualOption = {\n value: activeManualCountry,\n dialCode: getCountryCallingCode(activeManualCountry),\n }\n const parsed = preferSelectedCountry(\n parsePhoneInput(\n getInputValueForSelectedCountry(\n raw,\n {\n value: manualOption.value,\n dialCode: manualOption.dialCode,\n },\n { allowImplicitInternational: false }\n ),\n activeManualCountry\n ),\n manualOption\n )\n applyParsedInput(parsed, snapshot)\n return\n }\n\n const baseCountry = controlledCountry ?? activeManualCountry ?? undefined\n const parsed = parsePhoneInput(raw, baseCountry)\n applyParsedInput(parsed, snapshot)\n },\n [applyParsedInput, controlledCountry]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n manualSelectionCountryRef.current = option.value\n const nextInputValue = getInputValueForSelectedCountry(inputValueState, option)\n const parsed = preferSelectedCountry(\n parsePhoneInput(nextInputValue, option.value),\n option\n )\n\n setInputValueState(parsed.displayValue)\n pendingSelectionRef.current = {\n start: parsed.displayValue.length,\n end: parsed.displayValue.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry) {\n setUncontrolledCountry(option.value)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [controlledCountry, emitChange, inputValueState]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption | undefined) => {\n if (option && !results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const priorityOption = countryOptions.find((option) => option.value === menuPriorityCountry)\n const currentOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n pushUnique(currentOption)\n pushUnique(priorityOption)\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n pushUnique(currentOption)\n pushUnique(priorityOption)\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, menuPriorityCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = activeCountry\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = Boolean(activeCountry && activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const targetOption = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(targetOption)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n menuPortalTarget={menuPortalTarget}\n menuPosition={userMenuPosition ?? (menuPortalTarget ? \"fixed\" : \"absolute\")}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"names":["INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","value","replace","stripIddPrefix","digits","prefix","COMMON_IDD_PREFIXES","startsWith","slice","length","normalizeImplicitInternationalInput","candidate","phoneNumber","detectedCountry","formatWithAsYouType","isValid","normalizeExplicitInternationalInput","cleaned","trim","sanitizeDigits","digitsWithoutIdd","normalizeInternationalInput","explicitInternational","getDialCode","country","parsedDialCode","getCountryCallingCode","getInputValueForSelectedCountry","option","options","dialCode","normalizedInternational","allowImplicitInternational","normalizedDigits","currentDialCode","countryCallingCode","nationalDigits","nationalNumber","preferSelectedCountry","parsed","lengthIssue","getLengthIssue","rawInput","parsePhoneInput","rawValue","baseCountry","displayValue","formattedInternational","formattedNational","e164","normalized","international","national","formatted","hasInternationalPrefix","stripPrefix","formatInternational","formatNational","number","PhoneNumberInput","React","forwardRef","props","forwardedRef","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messages","messagesProp","renderValidationMessage","restProps","onFocus","onInputFocus","onBlur","onInputBlur","onKeyDown","onInputKeyDown","name","inputName","autoComplete","inputAutoComplete","restInputProps","controlledCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","useMemo","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","useCallback","match","find","toSelectedCountry","buildFallbackSelectedCountry","menuPriorityCountry","getValidCountry","DEFAULT_COUNTRY","some","initialStateRef","useRef","current","initialState","undefined","uncontrolledCountry","setUncontrolledCountry","useState","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","setLengthIssue","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","hasNotifiedCountryRef","lastNotifiedCountryRef","inputRef","activeCountry","explicitFormattingCountry","useImperativeHandle","useLayoutEffect","selection","input","start","end","setSelectionRange","selectOverrides","styles","userSelectStyles","components","userSelectComponents","classNamePrefix","userClassNamePrefix","formatOptionLabel","userFormatOptionLabel","menuPortalTarget","userMenuPortalTarget","menuPosition","userMenuPosition","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","defaultMenuPortalTarget","setDefaultMenuPortalTarget","hasUserMenuPortalTarget","mergedSelectStyles","userMenuPortal","menuPortal","suggestionSelectStyles","provided","state","base","zIndex","document","portalTarget","closest","body","mergedSelectComponents","baseComponents","Control","HiddenControl","IndicatorsContainer","NullComponent","DropdownIndicator","IndicatorSeparator","ValueContainer","overrides","Option","SuggestionOption","useEffect","window","clearTimeout","emitChange","details","selectedCountry","scheduleBufferReset","setTimeout","applyParsedInput","snapshot","resolveSelection","handleInputChange","event","target","captureSelectionSnapshot","raw","normalizedExplicitInternational","manualCountry","manualDialCode","activeManualCountry","rawDigits","manualOption","handleCountrySelect","nextInputValue","requestAnimationFrame","focus","filteredOptions","results","pushUnique","existing","push","priorityOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","forEach","filter","sort","a","b","aExact","bExact","normalizedSearchableTokens","token","includes","aIndex","optionMatchIndex","bIndex","localeCompare","suggestionMenuIsOpen","highlightedOption","consumeScrollBehavior","behavior","updateHighlightedOption","index","findIndex","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","context","inputValue","selectValue","highlightContextValue","highlightedValue","setHighlightedOption","renderOptionLabel","activeOption","activeFlag","flag","inlineFlagLabel","selectedCountryLabel","selectCountryLabel","hasInlineFlag","Boolean","lengthHint","lengthTooLong","countryName","validationNode","rendered","message","code","jsx","appendToBuffer","char","popBuffer","handleKeyDown","defaultPrevented","key","metaKey","ctrlKey","altKey","currentTarget","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","preventDefault","skipFormattingCharactersRight","repeat","test","toLowerCase","targetOption","handleFocus","handleBlur","openCountryMenu","shimName","cn","jsxs","pointerEvents","width","SuggestionContext","Select","noMatches","displayName"],"mappings":";;;;;;;;;;AA+DA,MAAMA,KACJ;AAOF,SAASC,GAAyBC,GAAe;AAC/C,SAAOA,EAAMC,QAAQH,IAAiC,EAAE;AAC1D;AAEA,SAASI,GAAeC,GAAgB;AACtC,aAAWC,KAAUC;AACnB,QAAIF,EAAOG,WAAWF,CAAM;AAC1B,aAAOD,EAAOI,MAAMH,EAAOI,MAAM;AAGrC,SAAOL;AACT;AAEA,SAASM,GAAoCN,GAAgB;AAC3D,QAAMO,IAAY,IAAIP,CAAM,IACtB;AAAA,IAAEQ,aAAAA;AAAAA,IAAaC,iBAAAA;AAAAA,EAAAA,IAAoBC,GAAoBH,CAAS;AAEtE,SAAIC,GAAaG,QAAAA,KAAaF,IACrBF,IAGF;AACT;AAEA,SAASK,GAAoCf,GAAe;AAC1D,QAAMgB,IAAUjB,GAAyBC,CAAK,EAAEiB,KAAAA;AAChD,MAAI,CAACD;AACH,WAAO;AAGT,MAAIA,EAAQV,WAAW,GAAG,GAAG;AAC3B,UAAMH,IAASe,EAAeF,CAAO;AACrC,QAAI,CAACb;AACH,aAAO;AAGT,UAAMgB,IAAmBjB,GAAeC,CAAM;AAC9C,WAAOgB,IAAmB,IAAIA,CAAgB,KAAK;A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kB,UAAlB,EAA2B,OAAOjD,IACjC,UAAAmB,gBAAAA,EAAAA,IAAC+B,MACC,GAAI/I,IACJ,YAAY+E,GACZ,SAASzB,GACT,OAAO,MACP,YAAYtC,IACZ,QAAQZ,IACR,aAAa,IACb,cAAc,IACd,uBAAuB,IACvB,iBAAiB,IACjB,0BAA0B,IAC1B,kBAAAV,IACA,cAAcG,OAAqBH,KAAmB,UAAU,aAChE,UAAUwD,IACV,iBAAiB3D,MAAuB,4BACxC,aAAY,IACZ,mBAAmB+F,IACnB,kBACEvF,OAAqB,MAAMhE,EAAiBiN,WAAAA,CAC7C,EAAA,CAEL,EAAA,CACF;AAAA,IAECpC;AAAAA,EAAAA,GACH;AAEJ,CACF;AAEAlN,GAAiBuP,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index18.js","sources":["../src/components/PhoneNumberInput/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\nimport Select, {\n type Props as SelectProps,\n type SingleValue,\n type StylesConfig,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputProps,\n PhoneNumberSelectedCountry,\n} from \"./types\"\nimport { resolveMessages } from \"./messages\"\nimport {\n COMMON_IDD_PREFIXES,\n DEFAULT_COUNTRY,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n formatWithAsYouType,\n getLengthIssue,\n sanitizeDigits,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\ntype ParsedInput = Omit<PhoneNumberChangeDetails, \"selectedCountry\"> & {\n displayValue: string\n lengthIssue: LengthIssue | null\n}\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nfunction normalizeImplicitInternationalInput(digits: string) {\n const candidate = `+${digits}`\n const { phoneNumber, detectedCountry } = formatWithAsYouType(candidate)\n\n if (phoneNumber?.isValid() && detectedCountry) {\n return candidate\n }\n\n return null\n}\n\nfunction normalizeExplicitInternationalInput(value: string) {\n const cleaned = stripInvisibleFormatting(value).trim()\n if (!cleaned) {\n return null\n }\n\n if (cleaned.startsWith(\"+\")) {\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return \"+\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n return null\n}\n\nfunction normalizeInternationalInput(value: string) {\n const explicitInternational = normalizeExplicitInternationalInput(value)\n if (explicitInternational != null) {\n return explicitInternational\n }\n\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n return normalizeImplicitInternationalInput(digits)\n}\n\nfunction getDialCode(country: CountryCode | null, parsedDialCode: string | undefined) {\n if (parsedDialCode) {\n return parsedDialCode\n }\n return country ? getCountryCallingCode(country) : null\n}\n\nfunction getInputValueForSelectedCountry(\n value: string,\n option: Pick<CountryOption, \"dialCode\" | \"value\">,\n options?: { allowImplicitInternational?: boolean }\n) {\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n\n if (!digits) {\n return `+${option.dialCode}`\n }\n\n const normalizedInternational =\n options?.allowImplicitInternational === false\n ? normalizeExplicitInternationalInput(cleaned)\n : normalizeInternationalInput(cleaned)\n if (normalizedInternational) {\n const normalizedDigits = sanitizeDigits(normalizedInternational)\n if (normalizedDigits.startsWith(option.dialCode)) {\n return normalizedInternational\n }\n\n const { phoneNumber } = formatWithAsYouType(normalizedInternational)\n const currentDialCode = phoneNumber?.countryCallingCode\n const nationalDigits =\n currentDialCode && normalizedDigits.startsWith(currentDialCode)\n ? normalizedDigits.slice(currentDialCode.length)\n : phoneNumber?.nationalNumber ?? normalizedDigits\n\n return `+${option.dialCode}${nationalDigits}`\n }\n\n const { phoneNumber } = formatWithAsYouType(cleaned, option.value)\n return `+${option.dialCode}${phoneNumber?.nationalNumber ?? digits}`\n}\n\nfunction preferSelectedCountry(\n parsed: ParsedInput,\n option: Pick<CountryOption, \"dialCode\" | \"value\">\n): ParsedInput {\n return {\n ...parsed,\n country: option.value,\n countryCallingCode: option.dialCode,\n lengthIssue: getLengthIssue(parsed.rawInput, option.value),\n }\n}\n\nfunction parsePhoneInput(rawValue: string | undefined, baseCountry?: CountryCode): ParsedInput {\n const cleaned = stripInvisibleFormatting(rawValue ?? \"\").trim()\n\n if (!cleaned) {\n const country = baseCountry ?? null\n const countryCallingCode = country ? getCountryCallingCode(country) : null\n\n return {\n displayValue: \"\",\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country,\n countryCallingCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalizedInternational = normalizeInternationalInput(cleaned)\n const shouldFormat = normalizedInternational != null || baseCountry != null\n\n if (!shouldFormat) {\n return {\n displayValue: cleaned,\n formattedInternational: cleaned,\n formattedNational: cleaned,\n e164: null,\n country: null,\n countryCallingCode: null,\n nationalNumber: sanitizeDigits(cleaned),\n rawInput: cleaned,\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalized = normalizedInternational ?? cleaned\n const {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n } = formatWithAsYouType(normalized, baseCountry)\n const hasInternationalPrefix = normalizedInternational != null\n const country = hasInternationalPrefix\n ? detectedCountry ?? baseCountry ?? null\n : baseCountry ?? detectedCountry ?? null\n const countryCallingCode = getDialCode(country, phoneNumber?.countryCallingCode)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalNumber =\n phoneNumber?.nationalNumber ??\n (countryCallingCode && normalized.startsWith(\"+\")\n ? stripPrefix(normalizedDigits, countryCallingCode)\n : sanitizeDigits(cleaned))\n const displayValue = hasInternationalPrefix ? international : formatted\n\n return {\n displayValue,\n formattedInternational: phoneNumber?.formatInternational() ?? international,\n formattedNational: phoneNumber?.formatNational() ?? national,\n e164: phoneNumber?.number ?? null,\n country,\n countryCallingCode,\n nationalNumber,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n lengthIssue: country ? getLengthIssue(normalized, country) : null,\n }\n}\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const controlledCountry = typeof countryProp === \"string\" ? countryProp : null\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const menuPriorityCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const initialStateRef = React.useRef<ParsedInput | null>(null)\n\n if (!initialStateRef.current) {\n const initialState = parsePhoneInput(value, controlledCountry ?? undefined)\n initialStateRef.current = initialState\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState<CountryCode | null>(\n controlledCountry ? null : initialState.country\n )\n const [inputValueState, setInputValueState] = React.useState(initialState.displayValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(\n initialState.lengthIssue\n )\n\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const hasNotifiedCountryRef = React.useRef(false)\n const lastNotifiedCountryRef = React.useRef<CountryCode | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const activeCountry = controlledCountry ?? uncontrolledCountry\n const explicitFormattingCountry = controlledCountry ?? manualSelectionCountryRef.current ?? undefined\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n menuPortalTarget: userMenuPortalTarget,\n menuPosition: userMenuPosition,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n const [defaultMenuPortalTarget, setDefaultMenuPortalTarget] =\n React.useState<HTMLElement | null>(null)\n const hasUserMenuPortalTarget = \"menuPortalTarget\" in selectOverrides\n const menuPortalTarget = hasUserMenuPortalTarget\n ? userMenuPortalTarget\n : defaultMenuPortalTarget\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => {\n const userMenuPortal = userSelectStyles?.menuPortal\n\n return {\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n menuPortal: (provided, state) => {\n const baseWithZIndex = {\n ...provided,\n zIndex: 1300,\n }\n const base = userMenuPortal ? userMenuPortal(baseWithZIndex, state) : baseWithZIndex\n\n if (typeof document === \"undefined\" || !menuPortalTarget || menuPortalTarget === document.body) {\n return base\n }\n\n const portalRect = menuPortalTarget.getBoundingClientRect()\n return {\n ...base,\n left: typeof base.left === \"number\" ? base.left - portalRect.left : base.left,\n top: typeof base.top === \"number\" ? base.top - portalRect.top : base.top,\n }\n },\n }\n },\n [menuPortalTarget, userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (hasUserMenuPortalTarget || typeof document === \"undefined\") {\n return\n }\n\n const portalTarget =\n inputRef.current?.closest<HTMLElement>(\n \"[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']\"\n ) ?? document.body\n setDefaultMenuPortalTarget(portalTarget)\n }, [hasUserMenuPortalTarget])\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const parsed = parsePhoneInput(value, explicitFormattingCountry)\n keyboardBufferRef.current = \"\"\n\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n }, [controlledCountry, explicitFormattingCountry, uncontrolledCountry, value])\n\n React.useEffect(() => {\n const country = activeCountry ?? null\n if (!hasNotifiedCountryRef.current && country == null) {\n return\n }\n\n if (hasNotifiedCountryRef.current && lastNotifiedCountryRef.current === country) {\n return\n }\n\n hasNotifiedCountryRef.current = true\n lastNotifiedCountryRef.current = country\n onCountryChange?.(country, country ? resolveSelectedCountry(country) : null)\n }, [activeCountry, onCountryChange, resolveSelectedCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n onChange?.({\n ...details,\n selectedCountry: details.country ? resolveSelectedCountry(details.country) : null,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const applyParsedInput = React.useCallback(\n (parsed: ParsedInput, snapshot: ReturnType<typeof captureSelectionSnapshot> | null) => {\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n\n if (snapshot) {\n pendingSelectionRef.current = resolveSelection(snapshot, parsed.displayValue)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n },\n [controlledCountry, emitChange, uncontrolledCountry]\n )\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const normalizedExplicitInternational = normalizeExplicitInternationalInput(raw)\n const manualCountry = manualSelectionCountryRef.current\n if (normalizedExplicitInternational != null && manualCountry) {\n const manualDialCode = getCountryCallingCode(manualCountry)\n if (!sanitizeDigits(normalizedExplicitInternational).startsWith(manualDialCode)) {\n manualSelectionCountryRef.current = null\n }\n } else if (normalizedExplicitInternational != null) {\n manualSelectionCountryRef.current = null\n }\n\n const activeManualCountry = manualSelectionCountryRef.current\n const rawDigits = sanitizeDigits(raw)\n if (\n !controlledCountry &&\n activeManualCountry &&\n normalizedExplicitInternational == null &&\n rawDigits\n ) {\n const manualOption = {\n value: activeManualCountry,\n dialCode: getCountryCallingCode(activeManualCountry),\n }\n const parsed = preferSelectedCountry(\n parsePhoneInput(\n getInputValueForSelectedCountry(\n raw,\n {\n value: manualOption.value,\n dialCode: manualOption.dialCode,\n },\n { allowImplicitInternational: false }\n ),\n activeManualCountry\n ),\n manualOption\n )\n applyParsedInput(parsed, snapshot)\n return\n }\n\n const baseCountry = controlledCountry ?? activeManualCountry ?? undefined\n const parsed = parsePhoneInput(raw, baseCountry)\n applyParsedInput(parsed, snapshot)\n },\n [applyParsedInput, controlledCountry]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n manualSelectionCountryRef.current = option.value\n const nextInputValue = getInputValueForSelectedCountry(inputValueState, option)\n const parsed = preferSelectedCountry(\n parsePhoneInput(nextInputValue, option.value),\n option\n )\n\n setInputValueState(parsed.displayValue)\n pendingSelectionRef.current = {\n start: parsed.displayValue.length,\n end: parsed.displayValue.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry) {\n setUncontrolledCountry(option.value)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [controlledCountry, emitChange, inputValueState]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption | undefined) => {\n if (option && !results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const priorityOption = countryOptions.find((option) => option.value === menuPriorityCountry)\n const currentOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n pushUnique(currentOption)\n pushUnique(priorityOption)\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n pushUnique(currentOption)\n pushUnique(priorityOption)\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, menuPriorityCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = activeCountry\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = Boolean(activeCountry && activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const targetOption = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(targetOption)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n menuPortalTarget={menuPortalTarget}\n menuPosition={userMenuPosition ?? (menuPortalTarget ? \"fixed\" : \"absolute\")}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"names":["INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","value","replace","stripIddPrefix","digits","prefix","COMMON_IDD_PREFIXES","startsWith","slice","length","normalizeImplicitInternationalInput","candidate","phoneNumber","detectedCountry","formatWithAsYouType","isValid","normalizeExplicitInternationalInput","cleaned","trim","sanitizeDigits","digitsWithoutIdd","normalizeInternationalInput","explicitInternational","getDialCode","country","parsedDialCode","getCountryCallingCode","getInputValueForSelectedCountry","option","options","dialCode","normalizedInternational","allowImplicitInternational","normalizedDigits","currentDialCode","countryCallingCode","nationalDigits","nationalNumber","preferSelectedCountry","parsed","lengthIssue","getLengthIssue","rawInput","parsePhoneInput","rawValue","baseCountry","displayValue","formattedInternational","formattedNational","e164","normalized","international","national","formatted","hasInternationalPrefix","stripPrefix","formatInternational","formatNational","number","PhoneNumberInput","React","forwardRef","props","forwardedRef","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messages","messagesProp","renderValidationMessage","restProps","onFocus","onInputFocus","onBlur","onInputBlur","onKeyDown","onInputKeyDown","name","inputName","autoComplete","inputAutoComplete","restInputProps","controlledCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","useMemo","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","useCallback","match","find","toSelectedCountry","buildFallbackSelectedCountry","menuPriorityCountry","getValidCountry","DEFAULT_COUNTRY","some","initialStateRef","useRef","current","initialState","undefined","uncontrolledCountry","setUncontrolledCountry","useState","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","setLengthIssue","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","hasNotifiedCountryRef","lastNotifiedCountryRef","inputRef","activeCountry","explicitFormattingCountry","useImperativeHandle","useLayoutEffect","selection","input","start","end","setSelectionRange","selectOverrides","styles","userSelectStyles","components","userSelectComponents","classNamePrefix","userClassNamePrefix","formatOptionLabel","userFormatOptionLabel","menuPortalTarget","userMenuPortalTarget","menuPosition","userMenuPosition","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","defaultMenuPortalTarget","setDefaultMenuPortalTarget","hasUserMenuPortalTarget","mergedSelectStyles","userMenuPortal","menuPortal","suggestionSelectStyles","provided","state","baseWithZIndex","zIndex","base","document","body","portalRect","getBoundingClientRect","left","top","portalTarget","closest","mergedSelectComponents","baseComponents","Control","HiddenControl","IndicatorsContainer","NullComponent","DropdownIndicator","IndicatorSeparator","ValueContainer","overrides","Option","SuggestionOption","useEffect","window","clearTimeout","emitChange","details","selectedCountry","scheduleBufferReset","setTimeout","applyParsedInput","snapshot","resolveSelection","handleInputChange","event","target","captureSelectionSnapshot","raw","normalizedExplicitInternational","manualCountry","manualDialCode","activeManualCountry","rawDigits","manualOption","handleCountrySelect","nextInputValue","requestAnimationFrame","focus","filteredOptions","results","pushUnique","existing","push","priorityOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","forEach","filter","sort","a","b","aExact","bExact","normalizedSearchableTokens","token","includes","aIndex","optionMatchIndex","bIndex","localeCompare","suggestionMenuIsOpen","highlightedOption","consumeScrollBehavior","behavior","updateHighlightedOption","index","findIndex","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","context","inputValue","selectValue","highlightContextValue","highlightedValue","setHighlightedOption","renderOptionLabel","activeOption","activeFlag","flag","inlineFlagLabel","selectedCountryLabel","selectCountryLabel","hasInlineFlag","Boolean","lengthHint","lengthTooLong","countryName","validationNode","rendered","message","code","jsx","appendToBuffer","char","popBuffer","handleKeyDown","defaultPrevented","key","metaKey","ctrlKey","altKey","currentTarget","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","preventDefault","skipFormattingCharactersRight","repeat","test","toLowerCase","targetOption","handleFocus","handleBlur","openCountryMenu","shimName","cn","jsxs","pointerEvents","width","SuggestionContext","Select","noMatches","displayName"],"mappings":";;;;;;;;;;AA+DA,MAAMA,KACJ;AAOF,SAASC,GAAyBC,GAAe;AAC/C,SAAOA,EAAMC,QAAQH,IAAiC,EAAE;AAC1D;AAEA,SAASI,GAAeC,GAAgB;AACtC,aAAWC,KAAUC;AACnB,QAAIF,EAAOG,WAAWF,CAAM;AAC1B,aAAOD,EAAOI,MAAMH,EAAOI,MAAM;AAGrC,SAAOL;AACT;AAEA,SAASM,GAAoCN,GAAgB;AAC3D,QAAMO,IAAY,IAAIP,CAAM,IACtB;AAAA,IAAEQ,aAAAA;AAAAA,I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.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
return
|
|
4
|
-
}
|
|
1
|
+
import { CommonPopupDataAttributes as e } from "./index173.js";
|
|
2
|
+
let y = (function(n) {
|
|
3
|
+
return n[n.open = e.open] = "open", n[n.closed = e.closed] = "closed", n[n.startingStyle = e.startingStyle] = "startingStyle", n[n.endingStyle = e.endingStyle] = "endingStyle", n.nested = "data-nested", n.nestedDialogOpen = "data-nested-dialog-open", n;
|
|
4
|
+
})({});
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
y as DialogPopupDataAttributes
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index180.js.map
|
package/dist/index180.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index180.js","sources":["../../../node_modules/react
|
|
1
|
+
{"version":3,"file":"index180.js","sources":["../../../node_modules/@base-ui/react/esm/dialog/popup/DialogPopupDataAttributes.js"],"sourcesContent":["import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.js\";\nexport let DialogPopupDataAttributes = function (DialogPopupDataAttributes) {\n /**\n * Present when the dialog is open.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"open\"] = CommonPopupDataAttributes.open] = \"open\";\n /**\n * Present when the dialog is closed.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"closed\"] = CommonPopupDataAttributes.closed] = \"closed\";\n /**\n * Present when the dialog is animating in.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"startingStyle\"] = CommonPopupDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the dialog is animating out.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"endingStyle\"] = CommonPopupDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the dialog is nested within another dialog.\n */\n DialogPopupDataAttributes[\"nested\"] = \"data-nested\";\n /**\n * Present when the dialog has other open dialogs nested within it.\n */\n DialogPopupDataAttributes[\"nestedDialogOpen\"] = \"data-nested-dialog-open\";\n return DialogPopupDataAttributes;\n}({});"],"names":["DialogPopupDataAttributes","CommonPopupDataAttributes"],"mappings":";AACU,IAACA,KAA4B,SAAUA,GAA2B;AAI1E,SAAAA,EAA0BA,EAA0B,OAAUC,EAA0B,IAAI,IAAI,QAIhGD,EAA0BA,EAA0B,SAAYC,EAA0B,MAAM,IAAI,UAIpGD,EAA0BA,EAA0B,gBAAmBC,EAA0B,aAAa,IAAI,iBAIlHD,EAA0BA,EAA0B,cAAiBC,EAA0B,WAAW,IAAI,eAI9GD,EAA0B,SAAY,eAItCA,EAA0B,mBAAsB,2BACzCA;AACT,GAAE,CAAA,CAAE;","x_google_ignoreList":[0]}
|
package/dist/index181.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import r from "./index191.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
const e = /* @__PURE__ */ t.createContext(void 0);
|
|
4
|
+
process.env.NODE_ENV !== "production" && (e.displayName = "DialogPortalContext");
|
|
5
|
+
function a() {
|
|
6
|
+
const o = t.useContext(e);
|
|
7
|
+
if (o === void 0)
|
|
8
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Dialog.Portal> is missing." : r(26));
|
|
9
|
+
return o;
|
|
4
10
|
}
|
|
5
11
|
export {
|
|
6
|
-
|
|
12
|
+
e as DialogPortalContext,
|
|
13
|
+
a as useDialogPortalContext
|
|
7
14
|
};
|
|
8
15
|
//# sourceMappingURL=index181.js.map
|
package/dist/index181.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index181.js","sources":["../../../node_modules/react
|
|
1
|
+
{"version":3,"file":"index181.js","sources":["../../../node_modules/@base-ui/react/esm/dialog/portal/DialogPortalContext.js"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogPortalContext.displayName = \"DialogPortalContext\";\nexport function useDialogPortalContext() {\n const value = React.useContext(DialogPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Portal> is missing.' : _formatErrorMessage(26));\n }\n return value;\n}"],"names":["DialogPortalContext","React","useDialogPortalContext","value","_formatErrorMessage"],"mappings":";;AAIY,MAACA,IAAmC,gBAAAC,EAAM,cAAc,MAAS;AACzE,QAAQ,IAAI,aAAa,iBAAcD,EAAoB,cAAc;AACtE,SAASE,IAAyB;AACvC,QAAMC,IAAQF,EAAM,WAAWD,CAAmB;AAClD,MAAIG,MAAU;AACZ,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,yCAAyCC,EAAoB,EAAE,CAAC;AAE1H,SAAOD;AACT;","x_google_ignoreList":[0]}
|
package/dist/index182.js
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { useStableCallback as m } from "./index262.js";
|
|
3
|
+
import { useAnimationsFinished as f } from "./index346.js";
|
|
4
|
+
function c(a) {
|
|
5
|
+
const {
|
|
6
|
+
enabled: e = !0,
|
|
7
|
+
open: n,
|
|
8
|
+
ref: i,
|
|
9
|
+
onComplete: s
|
|
10
|
+
} = a, o = m(s), t = f(i, n, !1);
|
|
11
|
+
l.useEffect(() => {
|
|
12
|
+
if (!e)
|
|
13
|
+
return;
|
|
14
|
+
const r = new AbortController();
|
|
15
|
+
return t(o, r.signal), () => {
|
|
16
|
+
r.abort();
|
|
17
|
+
};
|
|
18
|
+
}, [e, n, o, t]);
|
|
3
19
|
}
|
|
4
20
|
export {
|
|
5
|
-
|
|
21
|
+
c as useOpenChangeComplete
|
|
6
22
|
};
|
|
7
23
|
//# sourceMappingURL=index182.js.map
|
package/dist/index182.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index182.js","sources":["../../../node_modules/react
|
|
1
|
+
{"version":3,"file":"index182.js","sources":["../../../node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useAnimationsFinished } from \"./useAnimationsFinished.js\";\n\n/**\n * Calls the provided function when the CSS open/close animation or transition completes.\n */\nexport function useOpenChangeComplete(parameters) {\n const {\n enabled = true,\n open,\n ref,\n onComplete: onCompleteParam\n } = parameters;\n const onComplete = useStableCallback(onCompleteParam);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n const abortController = new AbortController();\n runOnceAnimationsFinish(onComplete, abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [enabled, open, onComplete, runOnceAnimationsFinish]);\n}"],"names":["useOpenChangeComplete","parameters","enabled","open","ref","onCompleteParam","onComplete","useStableCallback","runOnceAnimationsFinish","useAnimationsFinished","React","abortController"],"mappings":";;;AASO,SAASA,EAAsBC,GAAY;AAChD,QAAM;AAAA,IACJ,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,KAAAC;AAAA,IACA,YAAYC;AAAA,EAChB,IAAMJ,GACEK,IAAaC,EAAkBF,CAAe,GAC9CG,IAA0BC,EAAsBL,GAAKD,GAAM,EAAK;AACtE,EAAAO,EAAM,UAAU,MAAM;AACpB,QAAI,CAACR;AACH;AAEF,UAAMS,IAAkB,IAAI,gBAAe;AAC3C,WAAAH,EAAwBF,GAAYK,EAAgB,MAAM,GACnD,MAAM;AACX,MAAAA,EAAgB,MAAK;AAAA,IACvB;AAAA,EACF,GAAG,CAACT,GAASC,GAAMG,GAAYE,CAAuB,CAAC;AACzD;","x_google_ignoreList":[0]}
|
package/dist/index183.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
const f = a;
|
|
1
|
+
const t = "ArrowUp", n = "ArrowDown", o = "ArrowLeft", R = "ArrowRight", e = "Home", c = "End", E = /* @__PURE__ */ new Set([o, R]), A = /* @__PURE__ */ new Set([t, n]), O = /* @__PURE__ */ new Set([...E, ...A]);
|
|
2
|
+
[...O];
|
|
3
|
+
const s = /* @__PURE__ */ new Set([t, n, o, R, e, "End"]);
|
|
6
4
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
n as ARROW_DOWN,
|
|
6
|
+
O as ARROW_KEYS,
|
|
7
|
+
o as ARROW_LEFT,
|
|
8
|
+
R as ARROW_RIGHT,
|
|
9
|
+
t as ARROW_UP,
|
|
10
|
+
s as COMPOSITE_KEYS,
|
|
11
|
+
c as END,
|
|
12
|
+
e as HOME,
|
|
13
|
+
E as HORIZONTAL_KEYS,
|
|
14
|
+
A as VERTICAL_KEYS
|
|
9
15
|
};
|
|
10
16
|
//# sourceMappingURL=index183.js.map
|
package/dist/index183.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index183.js","sources":["../../../node_modules/react
|
|
1
|
+
{"version":3,"file":"index183.js","sources":["../../../node_modules/@base-ui/react/esm/internals/composite/composite.js"],"sourcesContent":["import { isHTMLElement } from '@floating-ui/utils/dom';\nexport { stopEvent, isIndexOutOfListBounds, isListIndexDisabled, createGridCellMap, findNonDisabledListIndex, getGridCellIndexOfCorner, getGridCellIndices, getGridNavigatedIndex, getMaxListIndex, getMinListIndex } from \"../../floating-ui-react/utils.js\";\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const HOME = 'Home';\nexport const END = 'End';\nexport const PAGE_UP = 'PageUp';\nexport const PAGE_DOWN = 'PageDown';\nexport const HORIZONTAL_KEYS = new Set([ARROW_LEFT, ARROW_RIGHT]);\nexport const HORIZONTAL_KEYS_WITH_EXTRA_KEYS = new Set([ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const VERTICAL_KEYS = new Set([ARROW_UP, ARROW_DOWN]);\nexport const VERTICAL_KEYS_WITH_EXTRA_KEYS = new Set([ARROW_UP, ARROW_DOWN, HOME, END]);\nexport const ARROW_KEYS = new Set([...HORIZONTAL_KEYS, ...VERTICAL_KEYS]);\nexport const ALL_KEYS = new Set([...ARROW_KEYS, HOME, END]);\nexport const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const SHIFT = 'Shift';\nexport const CONTROL = 'Control';\nexport const ALT = 'Alt';\nexport const META = 'Meta';\nexport const MODIFIER_KEYS = new Set([SHIFT, CONTROL, ALT, META]);\nfunction isInputElement(element) {\n return isHTMLElement(element) && element.tagName === 'INPUT';\n}\nexport function isNativeInput(element) {\n if (isInputElement(element) && element.selectionStart != null) {\n return true;\n }\n if (isHTMLElement(element) && element.tagName === 'TEXTAREA') {\n return true;\n }\n return false;\n}\nexport function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {\n if (!scrollContainer || !element || !element.scrollTo) {\n return;\n }\n let targetX = scrollContainer.scrollLeft;\n let targetY = scrollContainer.scrollTop;\n const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;\n const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;\n if (isOverflowingX && orientation !== 'vertical') {\n const elementOffsetLeft = getOffset(scrollContainer, element, 'left');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (direction === 'ltr') {\n if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n }\n }\n if (direction === 'rtl') {\n if (elementOffsetLeft - elementStyles.scrollMarginRight < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n }\n }\n }\n if (isOverflowingY && orientation !== 'horizontal') {\n const elementOffsetTop = getOffset(scrollContainer, element, 'top');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {\n // overflow upwards, align top edges\n targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;\n } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {\n // overflow downwards, align bottom edges\n targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;\n }\n }\n scrollContainer.scrollTo({\n left: targetX,\n top: targetY,\n behavior: 'auto'\n });\n}\nfunction getOffset(ancestor, element, side) {\n const propName = side === 'left' ? 'offsetLeft' : 'offsetTop';\n let result = 0;\n while (element.offsetParent) {\n result += element[propName];\n if (element.offsetParent === ancestor) {\n break;\n }\n element = element.offsetParent;\n }\n return result;\n}\nfunction getStyles(element) {\n const styles = getComputedStyle(element);\n return {\n scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,\n scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,\n scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,\n scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,\n scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,\n scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,\n scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,\n scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0\n };\n}"],"names":["ARROW_UP","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","HOME","END","HORIZONTAL_KEYS","VERTICAL_KEYS","ARROW_KEYS","COMPOSITE_KEYS"],"mappings":"AAEY,MAACA,IAAW,WACXC,IAAa,aACbC,IAAa,aACbC,IAAc,cACdC,IAAO,QACPC,IAAM,OAGNC,IAAkB,oBAAI,IAAI,CAACJ,GAAYC,CAAW,CAAC,GAEnDI,IAAgB,oBAAI,IAAI,CAACP,GAAUC,CAAU,CAAC,GAE9CO,IAAa,oBAAI,IAAI,CAAC,GAAGF,GAAiB,GAAGC,CAAa,CAAC;AACxC,CAAC,GAAGC,CAAqB;AAC7C,MAACC,IAAiB,oBAAI,IAAI,CAACT,GAAUC,GAAYC,GAAYC,GAAaC,GAAM,KAAG,CAAC;","x_google_ignoreList":[0]}
|