@rpcbase/ui 0.240.0 → 0.242.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/DayPickerField/index.d.ts.map +1 -1
- package/dist/components/PhoneNumberInput/country-options.d.ts +1 -1
- package/dist/components/PhoneNumberInput/country-options.d.ts.map +1 -1
- package/dist/index100.js +8 -4
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +5 -8
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +4 -5
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +3 -3
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +6 -4
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +152 -6
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +38 -144
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +4 -39
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +7 -4
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +12 -6
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +13 -13
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +7 -13
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +30 -6
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +10 -31
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +10 -10
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +8 -10
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +13 -8
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +101 -13
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +20 -102
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +54 -20
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +70 -51
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +9 -72
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +20 -9
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +16 -20
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +23 -16
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +6 -23
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +5 -6
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +23 -5
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +35 -24
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +14 -35
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +5 -16
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +4 -6
- 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 -4
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +3 -4
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +4 -3
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +22 -7
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +6 -24
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +4 -7
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +5 -6
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +3 -5
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +3 -3
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +4 -3
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +3 -4
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +4 -3
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +3 -4
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +3 -3
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +3 -3
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +5 -3
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +68 -5
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +2 -69
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +386 -2
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +201 -303
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +46 -247
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +42 -56
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +169 -46
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +96 -156
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +24 -109
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +8 -25
- package/dist/index159.js.map +1 -1
- package/dist/index160.js +5 -8
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +5 -4
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +4 -5
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +487 -4
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +151 -428
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +13 -185
- package/dist/index165.js.map +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +6 -6
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +3 -6
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +14 -16
- package/dist/index169.js.map +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +12 -9
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +8 -8
- package/dist/index172.js.map +1 -1
- package/dist/index173.js.map +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +10 -9
- package/dist/index176.js.map +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +6 -8
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +161 -246
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +279 -4
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +5 -28
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +23 -122
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +126 -5
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +59 -74
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +7 -65
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +16 -9
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +31 -16
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +65 -88
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +20 -66
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +63 -42
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +7 -20
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +5 -66
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +11 -6
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +3 -11
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +1 -1
- package/dist/index200.js.map +1 -1
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +7 -7
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +1 -1
- package/dist/index203.js.map +1 -1
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +1 -1
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +15 -13
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +17 -22
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +1 -1
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +16 -15
- package/dist/index210.js.map +1 -1
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +1 -1
- package/dist/index212.js.map +1 -1
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +3 -11
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +11 -27
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +1 -1
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -3
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +9 -9
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +143 -166
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +177 -203
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +60 -60
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +1 -1
- package/dist/index222.js.map +1 -1
- package/dist/index223.js.map +1 -1
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +2 -2
- package/dist/index225.js.map +1 -1
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +1 -1
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -7
- package/dist/index228.js.map +1 -1
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +2 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +1 -1
- package/dist/index231.js.map +1 -1
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -2
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +128 -125
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +1 -1
- package/dist/index235.js.map +1 -1
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +1 -1
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +1 -1
- package/dist/index238.js.map +1 -1
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +62 -37
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +12 -64
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +8 -14
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +5 -7
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +3 -5
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +10 -3
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +6 -9
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +133 -7
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +381 -115
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +5 -400
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +24 -24
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +1 -1
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +27 -11
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +11 -16
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +57 -4
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +8 -5
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +77 -48
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +17 -85
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +16 -6
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +5 -4
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +5 -6
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +6 -16
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +4 -4
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +6 -4
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +16 -12
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +4 -9
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +4 -13
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +12 -13
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +9 -4
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +421 -350
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +13 -5
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +13 -6
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +4 -5
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +5 -54
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +6 -8
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +5 -4
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +54 -4
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +8 -8
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +4 -4
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +4 -4
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +8 -3
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +4 -10
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +4 -9
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +3 -9
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +10 -10
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +9 -10
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +9 -9
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +10 -6
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +10 -5
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +9 -4
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +48 -29
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +6 -5
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +5 -6
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +4 -5
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +5 -8
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +6 -19
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +5 -16
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +16 -7
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +7 -10
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +9 -9
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +10 -21
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +21 -10
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +8 -9
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +6 -6
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +9 -4
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +4 -5
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +5 -16
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +16 -9
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +9 -18
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +15 -12
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +17 -9
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +194 -184
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +12 -29
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +28 -11
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +10 -23
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +25 -5
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +5 -13
- package/dist/index314.js.map +1 -1
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +12 -10
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +11 -9
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +14 -13
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +9 -11
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +3 -3
- package/dist/index32.js.map +1 -1
- package/dist/index320.js +11 -44
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +40 -92
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +87 -76
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +69 -88
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +92 -39
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +51 -10
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +10 -36
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +4 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +31 -110
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +8 -17
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +133 -13
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +17 -3
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +12 -33
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +3 -20
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +36 -8
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +20 -9
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +9 -19
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +8 -28
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +23 -15
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +28 -8
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +7 -61
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +16 -11
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +8 -8
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +11 -13
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +8 -3
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +13 -3
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +3 -51
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +3 -17
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +17 -5
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +46 -117
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +5 -32
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +29 -30
- package/dist/index35.js.map +1 -1
- package/dist/index350.js +58 -70
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +64 -140
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +7 -60
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +4 -49
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +12 -15
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +21 -8
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +17 -5
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +8 -12
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +144 -21
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +79 -11
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +52 -53
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +61 -16
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +15 -4
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +4 -6
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +5 -20
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +3 -45
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +11 -17
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +21 -5
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +44 -200
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +17 -77
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +5 -5
- package/dist/index369.js.map +1 -1
- package/dist/index37.js.map +1 -1
- package/dist/index370.js +199 -16
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +73 -12
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +122 -19
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +4 -8
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +18 -26
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +12 -26
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +4 -137
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +19 -11
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +7 -225
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +27 -4
- package/dist/index379.js.map +1 -1
- package/dist/index38.js.map +1 -1
- package/dist/index380.js +136 -18
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +10 -75
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +47 -12
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +3 -3
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +19 -69
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +76 -9
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +12 -16
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +4 -3
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +72 -3
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +35 -4
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +3 -3
- package/dist/index39.js.map +1 -1
- package/dist/index390.js +7 -5
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +16 -4
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +3 -16
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +3 -9
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +4 -5
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +4 -4
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +4 -546
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +16 -47
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +8 -17
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +5 -5
- package/dist/index399.js.map +1 -1
- package/dist/index40.js.map +1 -1
- package/dist/index400.js +4 -7
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +545 -6
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +47 -8
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +17 -11
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +5 -8
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +7 -12
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +6 -14
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +7 -491
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +11 -7
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +9 -2
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +45 -40
- package/dist/index41.js.map +1 -1
- package/dist/index410.js +12 -43
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +3 -56
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +14 -7
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +492 -2
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +7 -54
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +2 -56
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +43 -4
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +55 -55
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +8 -68
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +2 -31
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +55 -9
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +55 -152
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +32 -107
- package/dist/index422.js.map +1 -1
- package/dist/index423.js +68 -2
- package/dist/index423.js.map +1 -1
- package/dist/index424.js +31 -2
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +9 -2
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +153 -2
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +108 -16
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +4 -28
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +56 -13
- package/dist/index429.js.map +1 -1
- package/dist/index430.js +2 -7
- package/dist/index430.js.map +1 -1
- package/dist/index431.js +5 -0
- package/dist/index431.js.map +1 -0
- package/dist/index432.js +5 -0
- package/dist/index432.js.map +1 -0
- package/dist/index433.js +5 -0
- package/dist/index433.js.map +1 -0
- package/dist/index434.js +19 -0
- package/dist/index434.js.map +1 -0
- package/dist/index435.js +32 -0
- package/dist/index435.js.map +1 -0
- package/dist/index436.js +16 -0
- package/dist/index436.js.map +1 -0
- package/dist/index437.js +10 -0
- package/dist/index437.js.map +1 -0
- package/dist/index44.js +1 -1
- package/dist/index45.js +2 -2
- package/dist/index48.js +2 -2
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +274 -268
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +182 -184
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +3 -3
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +105 -103
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +4 -4
- package/dist/index53.js.map +1 -1
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +100 -108
- package/dist/index55.js.map +1 -1
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +2 -2
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +3 -3
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +1 -1
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +43 -48
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +84 -80
- package/dist/index60.js.map +1 -1
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +24 -26
- package/dist/index62.js.map +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.js +1 -1
- package/dist/index74.js +2 -6
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +2 -8
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +5 -5
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +8 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +6 -2
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +50 -52
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +4 -4
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +12 -4
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +5 -15
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +7 -5
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +17 -7
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +4 -16
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +5 -4
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +4 -4
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +4 -5
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +2 -2
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +5 -3
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +24 -6
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +4 -24
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +4 -6
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +2 -2
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +5 -6
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +4 -5
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +4 -3
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +4 -5
- package/dist/index99.js.map +1 -1
- package/package.json +14 -12
package/dist/index184.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index184.js","sources":["../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { isWebKit } from '@base-ui/utils/detectBrowser';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { activeElement, contains, getTarget, isTypeableCombobox, getFloatingFocusElement, isTypeableElement } from \"../utils/element.js\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.js\";\nimport { tabbable, focusable, isOutsideEvent, isTabbable, getNextTabbable, getPreviousTabbable } from \"../utils/tabbable.js\";\nimport { getNodeAncestors, getNodeChildren } from \"../utils/nodes.js\";\nimport { isElementVisible } from \"../utils/composite.js\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../internals/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.js\";\nimport { markOthers } from \"../utils/markOthers.js\";\nimport { usePortalContext } from \"./FloatingPortal.js\";\nimport { useFloatingTree } from \"./FloatingTree.js\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.js\";\nimport { resolveRef } from \"../../utils/resolveRef.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(getTarget(event));\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(entry => {\n return entry.deref()?.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref();\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n if (isTabbable(container)) {\n return container;\n }\n return tabbable(container)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement, orderRef) {\n if (floatingFocusElement.hasAttribute('tabindex') && !floatingFocusElement.hasAttribute('data-tabindex')) {\n return;\n }\n if (!orderRef.current.includes('floating') && !floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const focusableElements = focusable(floatingFocusElement);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (orderRef.current.includes('floating') || tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree,\n getInsideElements\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const ignoreInitialFocus = initialFocus === false;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const orderRef = React.useRef(['content']);\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const pointerDownOutsideRef = React.useRef(false);\n const lastFocusedTabbableRef = React.useRef(null);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container) : [];\n });\n const getResolvedInsideElements = useStableCallback(() => getInsideElements?.().filter(element => element != null) ?? []);\n\n // Prevent Tab from escaping the modal when there are no tabbable elements.\n React.useEffect(() => {\n if (disabled || !modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(ownerDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = ownerDocument(floatingFocusElement);\n return addEventListener(doc, 'keydown', onKeyDown);\n }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent]);\n\n // Track pointer/keyboard interactions to disambiguate focus and outside presses.\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n function clearPointerDownOutside() {\n pointerDownOutsideRef.current = false;\n }\n function onPointerDown(event) {\n const target = getTarget(event);\n const insideElements = getResolvedInsideElements();\n const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target) || insideElements.some(element => element === target || contains(element, target));\n pointerDownOutsideRef.current = !pointerTargetInside;\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n }\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n return mergeCleanups(addEventListener(doc, 'pointerdown', onPointerDown, true), addEventListener(doc, 'pointerup', clearPointerDownOutside, true), addEventListener(doc, 'pointercancel', clearPointerDownOutside, true), addEventListener(doc, 'keydown', onKeyDown, true));\n }, [disabled, floating, domReference, floatingFocusElement, open, portalContext, getResolvedInsideElements]);\n\n // Close on focus out and restore focus within the floating tree when needed.\n React.useEffect(() => {\n if (disabled || !closeOnFocusOut) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n if (isTabbable(target)) {\n lastFocusedTabbableRef.current = target;\n }\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const insideElements = getResolvedInsideElements();\n const isRelatedFocusGuard = relatedTarget?.hasAttribute(createAttribute('focus-guard')) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement)].includes(relatedTarget);\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || insideElements.some(element => element === relatedTarget || contains(element, relatedTarget)) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || isRelatedFocusGuard || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement, orderRef);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isElementVisible(target) && activeElement(doc) === doc.body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the element is removed on pointerdown, focus tries to move it,\n // but since it's removed at the same time, focus gets lost as it\n // happens after the .focus() call above.\n // In this case, focus needs to be moved asynchronously.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const tabbableContent = getTabbableContent();\n const prevTabbable = lastFocusedTabbableRef.current;\n const nodeToFocus = (prevTabbable && tabbableContent.includes(prevTabbable) ? prevTabbable : null) || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n if (pointerDownOutsideRef.current) {\n return;\n }\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n return mergeCleanups(domReferenceElement && addEventListener(domReferenceElement, 'focusout', handleFocusOutside), domReferenceElement && addEventListener(domReferenceElement, 'pointerdown', handlePointerDown), floating && addEventListener(floating, 'focusin', handleFocusIn), floating && addEventListener(floating, 'focusout', handleFocusOutside), floating && portalContext && addEventListener(floating, 'focusout', markInsideReactTree, true));\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Hide everything outside the floating tree from assistive tech while open.\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const controlInsideElements = [floating, ...portalNodes, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, ...getResolvedInsideElements()];\n const insideElements = [...controlInsideElements, rootAncestorComboboxDomReference, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const ariaHiddenCleanup = markOthers(insideElements, {\n ariaHidden: modal || isUntrappedTypeableCombobox,\n mark: false\n });\n const markerInsideElements = [floating, ...portalNodes].filter(x => x != null);\n const markerCleanup = markOthers(markerInsideElements);\n return () => {\n markerCleanup();\n ariaHiddenCleanup();\n };\n }, [open, disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Focus the initial element when the floating element opens.\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n const doc = ownerDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n let focusableElements = null;\n const getDefaultFocusElement = () => {\n if (focusableElements == null) {\n focusableElements = getTabbableContent(floatingFocusElement);\n }\n return focusableElements[0] || floatingFocusElement;\n };\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = getDefaultFocusElement();\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || getDefaultFocusElement();\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement\n });\n });\n }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableContent, initialFocusRef, openInteractionTypeRef]);\n\n // Track return focus targets and restore focus on unmount/close.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n ownerDocument(floatingFocusElement).createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n function getReturnElement() {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeTypeRef.current) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n const el = domReference || getPreviouslyFocusedElement();\n return el && el.isConnected ? el : null;\n }\n const fallback = domReference || getPreviouslyFocusedElement();\n return resolveRef(resolvedReturnFocusValue) || fallback || null;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const insideElements = getResolvedInsideElements();\n const isFocusInsideFloatingTree = contains(floating, activeEl) || insideElements.some(element => element === activeEl || contains(element, activeEl)) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const returnFocusValueOrFn = returnFocusRef.current;\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusValueOrFn !== 'boolean';\n if (returnFocusValueOrFn && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n preventReturnFocusRef.current = false;\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, events, tree, domReference, getNodeId, getResolvedInsideElements]);\n\n // Safari may randomly scroll to the bottom of the page if an input inside a popup has focus\n // when the popup unmounts from the DOM.\n // By blurring it before the popup unmounts, we can prevent this behavior.\n useIsoLayoutEffect(() => {\n if (!isWebKit || open || !floating) {\n return;\n }\n const activeEl = activeElement(ownerDocument(floating));\n if (!isHTMLElement(activeEl) || !isTypeableElement(activeEl)) {\n return;\n }\n if (contains(floating, activeEl)) {\n activeEl.blur();\n }\n }, [open, floating]);\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled || !portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n\n // Keep the floating element tabIndex in sync and clear stale focus records.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement, orderRef);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement, orderRef]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableContent();\n enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableContent()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}"],"names":["getEventType","event","lastInteractionType","win","ownerWindow","getTarget","LIST_LIMIT","previouslyFocusedElements","clearDisconnectedPreviouslyFocusedElements","entry","addPreviouslyFocusedElement","element","getNodeName","getPreviouslyFocusedElement","getFirstTabbableElement","container","isTabbable","tabbable","handleTabIndex","floatingFocusElement","orderRef","tabbableContent","focusable","dataTabIndex","tabIndex","FloatingFocusManager","props","context","children","disabled","initialFocus","returnFocus","restoreFocus","modal","closeOnFocusOut","openInteractionType","nextFocusableElement","previousFocusableElement","beforeContentFocusGuardRef","externalTree","getInsideElements","store","open","domReference","floating","events","dataRef","getNodeId","useStableCallback","ignoreInitialFocus","isUntrappedTypeableCombobox","isTypeableCombobox","React","initialFocusRef","useValueAsRef","returnFocusRef","openInteractionTypeRef","tree","useFloatingTree","portalContext","usePortalContext","preventReturnFocusRef","isPointerDownRef","pointerDownOutsideRef","lastFocusedTabbableRef","closeTypeRef","lastInteractionTypeRef","beforeGuardRef","afterGuardRef","mergedBeforeGuardRef","useMergedRefs","mergedAfterGuardRef","blurTimeout","useTimeout","pointerDownTimeout","restoreFocusFrame","useAnimationFrame","isInsidePortal","getFloatingFocusElement","getTabbableContent","getResolvedInsideElements","onKeyDown","contains","activeElement","ownerDocument","stopEvent","doc","addEventListener","clearPointerDownOutside","onPointerDown","target","insideElements","pointerTargetInside","CLICK_TRIGGER_IDENTIFIER","mergeCleanups","handlePointerDown","handleFocusIn","handleFocusOutside","relatedTarget","currentTarget","nodeId","triggers","isRelatedFocusGuard","createAttribute","resolveRef","movedToUnrelatedNode","trigger","getNodeChildren","node","getNodeAncestors","isElementVisible","isHTMLElement","prevTabbable","nodeToFocus","createChangeEventDetails","REASONS.focusOut","markInsideReactTree","domReferenceElement","portalNodes","rootAncestorComboboxDomReference","x","ariaHiddenCleanup","markOthers","markerInsideElements","markerCleanup","useIsoLayoutEffect","previouslyFocusedElement","initialFocusValueOrFn","resolvedInitialFocus","focusableElements","getDefaultFocusElement","elToFocus","enqueueFocus","onOpenChangeLocal","details","REASONS.triggerHover","REASONS.outsidePress","isVirtualClick","isVirtualPointerEvent","isPreventScrollSupported","getReturnElement","returnFocusValueOrFn","resolvedReturnFocusValue","el","fallback","activeEl","isFocusInsideFloatingTree","returnElement","tabbableReturnElement","hasExplicitReturnFocus","isWebKit","isTypeableElement","shouldRenderGuards","_jsxs","_jsx","FocusGuard","els","isOutsideEvent","getNextTabbable","getPreviousTabbable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAASA,GAAaC,GAAOC,GAAqB;AAChD,QAAMC,IAAMC,GAAYC,EAAUJ,CAAK,CAAC;AACxC,SAAIA,aAAiBE,EAAI,gBAChB,aAELF,aAAiBE,EAAI,aAGhBD,KAAuB,aAE5B,iBAAiBD,IACZA,EAAM,eAAe,aAE1B,aAAaA,IACR,UAELA,aAAiBE,EAAI,aAEhBD,MAAwBD,EAAM,WAAW,IAAI,aAAa,WAE5D;AACT;AACA,MAAMK,KAAa;AACnB,IAAIC,IAA4B,CAA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GAAawB,EAAIA,EAAI,SAAS,CAAC,CAAC;AAAA,QAClC,MAAO,CAAIjG,GAAe,eACxBE,EAAsB,UAAU,IAC5BgG,GAAe5J,GAAO0D,EAAc,UAAU,IAC3BmG,GAAgBnH,CAAY,GACnC,MAAK,IAEnB6D,EAAWnE,KAA4BsB,EAAc,gBAAgB,GAAG,MAAK;AAAA,MAGnF;AAAA,IACN,CAAK,GAAG/B,GAAU4H,MAAmCE,gBAAAA,GAAAA,IAAKC,IAAY;AAAA,MAChE,aAAa;AAAA,MACb,KAAKpF;AAAA,MACL,SAAS,CAAAtE,MAAS;AAChB,QAAIgC,IACFmG,GAAarD,IAAqB,CAAC,CAAC,IAC3BpB,GAAe,eACpBzB,MACF2B,EAAsB,UAAU,KAE9BgG,GAAe5J,GAAO0D,EAAc,UAAU,IAC3BoG,GAAoBpH,CAAY,GACvC,MAAK,IAEnB6D,EAAWpE,KAAwBuB,EAAc,eAAe,GAAG,MAAK;AAAA,MAG9E;AAAA,IACN,CAAK,CAAC;AAAA,EACN,CAAG;AACH;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index184.js","sources":["../node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useId } from '@base-ui/utils/useId';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { FOCUSABLE_ATTRIBUTE } from \"../../floating-ui-react/utils/constants.mjs\";\nimport { useFloatingParentNodeId } from \"../../floating-ui-react/components/FloatingTree.mjs\";\nimport { useSyncedFloatingRootContext } from \"../../floating-ui-react/hooks/useSyncedFloatingRootContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nexport const FOCUSABLE_POPUP_PROPS = {\n tabIndex: -1,\n [FOCUSABLE_ATTRIBUTE]: ''\n};\n\n/**\n * Returns the default `initialFocus` resolver for a popup. When opened by touch it focuses the\n * popup element itself to prevent the virtual keyboard from opening (required for Android\n * specifically; iOS handles this automatically). Otherwise it falls back to the default behavior.\n */\nexport function createDefaultInitialFocus(popupRef) {\n return interactionType => interactionType === 'touch' ? popupRef.current : true;\n}\nexport function usePopupStore(externalStore, createStore, treatPopupAsFloatingElement = false) {\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n const internalStoreRef = React.useRef(null);\n if (externalStore === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = createStore(floatingId, nested);\n }\n const store = externalStore ?? internalStoreRef.current;\n useSyncedFloatingRootContext({\n popupStore: store,\n treatPopupAsFloatingElement,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested,\n onOpenChange: store.setOpen\n });\n return {\n store,\n internalStore: internalStoreRef.current\n };\n}\n\n/**\n * Returns a callback ref that registers/unregisters the trigger element in the store.\n *\n * @param store The Store instance where the trigger should be registered.\n */\nexport function useTriggerRegistration(id, store) {\n // Keep track of the currently registered element to unregister it on unmount or id change.\n const registeredElementIdRef = React.useRef(null);\n const registeredElementRef = React.useRef(null);\n return React.useCallback(element => {\n if (id === undefined) {\n return;\n }\n let shouldSyncTriggerCount = false;\n if (registeredElementIdRef.current !== null) {\n const registeredId = registeredElementIdRef.current;\n const registeredElement = registeredElementRef.current;\n const currentElement = store.context.triggerElements.getById(registeredId);\n if (registeredElement && currentElement === registeredElement) {\n store.context.triggerElements.delete(registeredId);\n shouldSyncTriggerCount = true;\n }\n registeredElementIdRef.current = null;\n registeredElementRef.current = null;\n }\n if (element !== null) {\n registeredElementIdRef.current = id;\n registeredElementRef.current = element;\n store.context.triggerElements.add(id, element);\n shouldSyncTriggerCount = true;\n }\n if (shouldSyncTriggerCount) {\n const triggerCount = store.context.triggerElements.size;\n if (store.select('open') && store.state.triggerCount !== triggerCount) {\n store.set('triggerCount', triggerCount);\n }\n }\n }, [store, id]);\n}\nexport function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {\n if (open) {\n // Opening starts a new close cycle, so clear any previous request to keep the popup mounted.\n state.preventUnmountingOnClose = false;\n } else if (preventUnmountOnClose) {\n state.preventUnmountingOnClose = true;\n }\n const triggerId = trigger?.id ?? null;\n\n // If a popup is closing, the `trigger` may be undefined.\n // We want to keep the previous value so that exit animations are played and focus is returned correctly.\n if (triggerId || open) {\n state.activeTriggerId = triggerId;\n state.activeTriggerElement = trigger ?? null;\n }\n}\nexport function attachPreventUnmountOnClose(eventDetails) {\n let preventUnmountOnClose = false;\n eventDetails.preventUnmountOnClose = () => {\n preventUnmountOnClose = true;\n };\n return () => preventUnmountOnClose;\n}\n\n/**\n * Runs the shared open-change sequence for a popup store: notifies `onOpenChange`,\n * honors cancellation, dispatches the floating root change, maps the reason to an\n * `instantType`, and commits the state update (synchronously for hover so\n * `getAnimations()` observes it). Stores supply their own differences via\n * `extraState` (e.g. the last change reason) and `onBeforeDispatch` (e.g. updating\n * inline-rect coordinates).\n */\nexport function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {\n const reason = eventDetails.reason;\n const isHover = reason === REASONS.triggerHover;\n const isFocusOpen = nextOpen && reason === REASONS.triggerFocus;\n const isDismissClose = !nextOpen && (reason === REASONS.triggerPress || reason === REASONS.escapeKey);\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n store.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n options.onBeforeDispatch?.();\n store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const changeState = () => {\n // Spread `extraState` first so `open` always reflects `nextOpen`, keeping it in\n // sync with the value already passed to `dispatchOpenChange`/`setPopupOpenState`.\n const updatedState = {\n ...options.extraState,\n open: nextOpen\n };\n if (isFocusOpen) {\n updatedState.instantType = 'focus';\n } else if (isDismissClose) {\n updatedState.instantType = 'dismiss';\n } else if (isHover) {\n updatedState.instantType = undefined;\n }\n setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n store.update(updatedState);\n };\n if (isHover) {\n // Flush synchronously for hover so `node.getAnimations()` sees the new state.\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n}\nexport function useInitialOpenSync(store, openProp, defaultOpen, defaultTriggerId) {\n useOnFirstRender(() => {\n if (openProp === undefined && store.state.open === false && defaultOpen) {\n // Avoid notifying detached trigger subscribers while the Root is rendering.\n store.state = {\n ...store.state,\n open: true,\n activeTriggerId: defaultTriggerId,\n preventUnmountingOnClose: false\n };\n }\n });\n}\n\n/**\n * Sets up trigger data forwarding to the store.\n *\n * @param triggerId Id of the trigger.\n * @param triggerElementRef Ref for the trigger DOM element.\n * @param store The Store instance managing the popup state.\n * @param stateUpdates An object with state updates to apply when the trigger is active.\n */\nexport function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {\n const isMountedByThisTrigger = store.useState('isMountedByTrigger', triggerId);\n const baseRegisterTrigger = useTriggerRegistration(triggerId, store);\n const registerTrigger = useStableCallback(element => {\n baseRegisterTrigger(element);\n if (!element) {\n return;\n }\n const open = store.select('open');\n const activeTriggerId = store.select('activeTriggerId');\n if (activeTriggerId === triggerId) {\n store.update({\n activeTriggerElement: element,\n ...(open ? stateUpdates : null)\n });\n return;\n }\n if (activeTriggerId == null && open) {\n // If a popup is already open, a detached trigger can mount before any active trigger\n // has been established. Claim the first registered trigger so trigger-owned focus\n // management and ARIA relationships work.\n store.update({\n activeTriggerId: triggerId,\n activeTriggerElement: element,\n ...stateUpdates\n });\n }\n });\n useIsoLayoutEffect(() => {\n if (isMountedByThisTrigger) {\n store.update({\n activeTriggerElement: triggerElementRef.current,\n ...stateUpdates\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);\n return {\n registerTrigger,\n isMountedByThisTrigger\n };\n}\n/**\n * Keeps trigger registration state synchronized while the popup is open.\n *\n * When a popup opens without an explicit trigger id and exactly one trigger is registered, that\n * trigger is claimed as the active trigger. When the active trigger id is still registered but its\n * element changed, the active element is refreshed. When the active trigger unregisters, the\n * default path preserves existing ownership so non-closing popup families do not silently claim a\n * different trigger while staying open.\n *\n * If `closeOnActiveTriggerUnmount` is enabled, unregistering the active trigger requests a close\n * after a microtask so a same-tick replacement trigger with the same id can register first.\n *\n * This should be called on the Root part.\n *\n * @param store The Store instance managing the popup state.\n * @param options Options for active trigger unmount behavior.\n */\nexport function useImplicitActiveTrigger(store, options = {}) {\n const {\n closeOnActiveTriggerUnmount = false\n } = options;\n const open = store.useState('open');\n const reactiveTriggerCount = store.useState('triggerCount');\n useIsoLayoutEffect(() => {\n if (!open) {\n if (store.state.triggerCount !== 0) {\n store.set('triggerCount', 0);\n }\n return;\n }\n const triggerCount = store.context.triggerElements.size;\n const stateUpdates = {};\n if (store.state.triggerCount !== triggerCount) {\n stateUpdates.triggerCount = triggerCount;\n }\n const activeTriggerId = store.select('activeTriggerId');\n let lostActiveTriggerId = null;\n if (activeTriggerId) {\n const activeTriggerElement = store.context.triggerElements.getById(activeTriggerId);\n if (!activeTriggerElement) {\n lostActiveTriggerId = activeTriggerId;\n } else if (activeTriggerElement !== store.state.activeTriggerElement) {\n stateUpdates.activeTriggerElement = activeTriggerElement;\n }\n }\n if (!lostActiveTriggerId && !activeTriggerId && triggerCount === 1) {\n const iteratorResult = store.context.triggerElements.entries().next();\n if (!iteratorResult.done) {\n const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;\n stateUpdates.activeTriggerId = implicitTriggerId;\n stateUpdates.activeTriggerElement = implicitTriggerElement;\n }\n }\n if (stateUpdates.triggerCount !== undefined || stateUpdates.activeTriggerId !== undefined || stateUpdates.activeTriggerElement !== undefined) {\n store.update(stateUpdates);\n }\n if (lostActiveTriggerId) {\n if (closeOnActiveTriggerUnmount) {\n // Defer so a same-tick replacement trigger with the same id can register first.\n queueMicrotask(() => {\n if (store.select('open') && store.select('activeTriggerId') === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {\n const eventDetails = createChangeEventDetails(REASONS.none);\n store.setOpen(false, eventDetails);\n // If closing is canceled, keep the previous active trigger ownership for the\n // still-open popup instead of claiming another trigger implicitly.\n if (!eventDetails.isCanceled) {\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null\n });\n }\n }\n });\n }\n }\n }, [open, store, reactiveTriggerCount, closeOnActiveTriggerUnmount]);\n}\n\n/**\n * Manages the mounted state of the popup.\n * Sets up the transition status listeners and handles unmounting when needed.\n * Updates the `mounted`, `transitionStatus`, and `preventUnmountingOnClose` states in the store.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n * @param onUnmount Optional callback to be called when the popup is unmounted.\n *\n * @returns A function to forcibly unmount the popup.\n */\nexport function useOpenStateTransitions(open, store, onUnmount) {\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const preventUnmountingOnClose = store.useState('preventUnmountingOnClose');\n // Opening starts a new close cycle. Clear during render so the close-completion hook below\n // reads the synchronized value on the same pass.\n const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;\n store.useSyncedValues({\n mounted,\n transitionStatus,\n preventUnmountingOnClose: syncedPreventUnmountingOnClose\n });\n const forceUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null,\n mounted: false,\n preventUnmountingOnClose: false\n });\n onUnmount?.();\n store.context.onOpenChangeComplete?.(false);\n });\n useOpenChangeComplete({\n enabled: mounted && !open && !syncedPreventUnmountingOnClose,\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (!open) {\n forceUnmount();\n }\n }\n });\n return {\n forceUnmount,\n transitionStatus\n };\n}\nexport function usePopupInteractionProps(store, statePart) {\n store.useSyncedValues(statePart);\n useIsoLayoutEffect(() => () => {\n store.update({\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n });\n }, [store]);\n}\nexport function usePopupRootSync(store, open) {\n useIsoLayoutEffect(() => {\n if (!open && store.state.openMethod !== null) {\n store.set('openMethod', null);\n }\n }, [open, store]);\n useIsoLayoutEffect(() => () => {\n if (store.state.openMethod !== null) {\n store.set('openMethod', null);\n }\n }, [store]);\n}"],"names":["FOCUSABLE_POPUP_PROPS","FOCUSABLE_ATTRIBUTE","createDefaultInitialFocus","popupRef","interactionType","usePopupStore","externalStore","createStore","treatPopupAsFloatingElement","floatingId","useId","nested","useFloatingParentNodeId","internalStoreRef","React","store","useSyncedFloatingRootContext","useTriggerRegistration","id","registeredElementIdRef","registeredElementRef","element","shouldSyncTriggerCount","registeredId","registeredElement","currentElement","triggerCount","setPopupOpenState","state","open","trigger","preventUnmountOnClose","triggerId","useTriggerDataForwarding","triggerElementRef","stateUpdates","isMountedByThisTrigger","baseRegisterTrigger","registerTrigger","useStableCallback","activeTriggerId","useIsoLayoutEffect","useImplicitActiveTrigger","options","closeOnActiveTriggerUnmount","reactiveTriggerCount","lostActiveTriggerId","activeTriggerElement","iteratorResult","implicitTriggerId","implicitTriggerElement","eventDetails","createChangeEventDetails","REASONS.none","useOpenStateTransitions","onUnmount","mounted","setMounted","transitionStatus","useTransitionStatus","preventUnmountingOnClose","syncedPreventUnmountingOnClose","forceUnmount","useOpenChangeComplete","usePopupInteractionProps","statePart","EMPTY_OBJECT","usePopupRootSync"],"mappings":";;;;;;;;;;;;;AAgBY,MAACA,IAAwB;AAAA,EACnC,UAAU;AAAA,EACV,CAACC,CAAmB,GAAG;AACzB;AAOO,SAASC,EAA0BC,GAAU;AAClD,SAAO,CAAAC,MAAmBA,MAAoB,UAAUD,EAAS,UAAU;AAC7E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,CAACnD,CAAK,CAAC;AACZ;AACO,SAASoD,EAAiBpD,GAAOc,GAAM;AAC5C,EAAAY,EAAmB,MAAM;AACvB,IAAI,CAACZ,KAAQd,EAAM,MAAM,eAAe,QACtCA,EAAM,IAAI,cAAc,IAAI;AAAA,EAEhC,GAAG,CAACc,GAAMd,CAAK,CAAC,GAChB0B,EAAmB,MAAM,MAAM;AAC7B,IAAI1B,EAAM,MAAM,eAAe,QAC7BA,EAAM,IAAI,cAAc,IAAI;AAAA,EAEhC,GAAG,CAACA,CAAK,CAAC;AACZ;","x_google_ignoreList":[0]}
|
package/dist/index185.js
CHANGED
|
@@ -1,8 +1,283 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as E from "react";
|
|
2
|
+
import { isHTMLElement as q, getNodeName as Se, getWindow as Be } from "./index248.js";
|
|
3
|
+
import { addEventListener as I } from "./index240.js";
|
|
4
|
+
import { mergeCleanups as ge } from "./index378.js";
|
|
5
|
+
import { useMergedRefs as Ee } from "./index195.js";
|
|
6
|
+
import { useValueAsRef as $ } from "./index203.js";
|
|
7
|
+
import { useStableCallback as oe } from "./index202.js";
|
|
8
|
+
import { useIsoLayoutEffect as W } from "./index201.js";
|
|
9
|
+
import { useTimeout as Fe } from "./index225.js";
|
|
10
|
+
import { useAnimationFrame as Ue } from "./index241.js";
|
|
11
|
+
import { ownerDocument as O } from "./index224.js";
|
|
12
|
+
import { FocusGuard as Te } from "./index379.js";
|
|
13
|
+
import { isTypeableCombobox as xe, getFloatingFocusElement as ye, isTypeableElement as $e } from "./index230.js";
|
|
14
|
+
import { isVirtualClick as ze, isVirtualPointerEvent as Je, stopEvent as Qe } from "./index253.js";
|
|
15
|
+
import { isOutsideEvent as Ie, getNextTabbable as Xe, getPreviousTabbable as Ye, tabbable as De, isTabbable as ie, focusable as Ze } from "./index380.js";
|
|
16
|
+
import { getNodeAncestors as ve, getNodeChildren as he } from "./index381.js";
|
|
17
|
+
import { isElementVisible as et } from "./index382.js";
|
|
18
|
+
import { createChangeEventDetails as tt } from "./index175.js";
|
|
19
|
+
import { createAttribute as Ae } from "./index383.js";
|
|
20
|
+
import { enqueueFocus as se } from "./index384.js";
|
|
21
|
+
import { markOthers as Ce } from "./index385.js";
|
|
22
|
+
import { usePortalContext as nt } from "./index188.js";
|
|
23
|
+
import { useFloatingTree as rt } from "./index386.js";
|
|
24
|
+
import { CLICK_TRIGGER_IDENTIFIER as ot } from "./index191.js";
|
|
25
|
+
import { resolveRef as w } from "./index387.js";
|
|
26
|
+
import { j as ue } from "./index30.js";
|
|
27
|
+
import { activeElement as N, contains as c, getTarget as z } from "./index231.js";
|
|
28
|
+
import { triggerHover as st, outsidePress as ut, focusOut as it } from "./index177.js";
|
|
29
|
+
import { webkit as ct } from "./index250.js";
|
|
30
|
+
function ft(n, D) {
|
|
31
|
+
const M = Be(z(n));
|
|
32
|
+
return n instanceof M.KeyboardEvent ? "keyboard" : n instanceof M.FocusEvent ? D || "keyboard" : "pointerType" in n ? n.pointerType || "keyboard" : "touches" in n ? "touch" : n instanceof M.MouseEvent ? D || (n.detail === 0 ? "keyboard" : "mouse") : "";
|
|
33
|
+
}
|
|
34
|
+
const ke = 20;
|
|
35
|
+
let S = [];
|
|
36
|
+
function ce() {
|
|
37
|
+
S = S.filter((n) => n.deref()?.isConnected);
|
|
38
|
+
}
|
|
39
|
+
function Oe(n) {
|
|
40
|
+
ce(), n && Se(n) !== "body" && (S.push(new WeakRef(n)), S.length > ke && (S = S.slice(-ke)));
|
|
41
|
+
}
|
|
42
|
+
function we() {
|
|
43
|
+
return ce(), S[S.length - 1]?.deref();
|
|
44
|
+
}
|
|
45
|
+
function at(n) {
|
|
46
|
+
return n ? ie(n) ? n : De(n)[0] || n : null;
|
|
47
|
+
}
|
|
48
|
+
function Ne(n) {
|
|
49
|
+
if (n.hasAttribute("tabindex") && !n.hasAttribute("data-tabindex") || !n.getAttribute("role")?.includes("dialog"))
|
|
50
|
+
return;
|
|
51
|
+
const M = Ze(n).filter((P) => {
|
|
52
|
+
const J = P.getAttribute("data-tabindex") || "";
|
|
53
|
+
return ie(P) || P.hasAttribute("data-tabindex") && !J.startsWith("-");
|
|
54
|
+
}), f = n.getAttribute("tabindex");
|
|
55
|
+
M.length === 0 ? f !== "0" && (n.setAttribute("tabindex", "0"), n.setAttribute("data-tabindex", "0")) : (f !== "-1" || n.hasAttribute("data-tabindex") && n.getAttribute("data-tabindex") !== "-1") && (n.setAttribute("tabindex", "-1"), n.setAttribute("data-tabindex", "-1"));
|
|
56
|
+
}
|
|
57
|
+
function Lt(n) {
|
|
58
|
+
const {
|
|
59
|
+
context: D,
|
|
60
|
+
children: M,
|
|
61
|
+
disabled: f = !1,
|
|
62
|
+
initialFocus: P = !0,
|
|
63
|
+
returnFocus: J = !0,
|
|
64
|
+
restoreFocus: Q = !1,
|
|
65
|
+
modal: g = !0,
|
|
66
|
+
closeOnFocusOut: L = !0,
|
|
67
|
+
openInteractionType: Me = "",
|
|
68
|
+
nextFocusableElement: j,
|
|
69
|
+
previousFocusableElement: H,
|
|
70
|
+
beforeContentFocusGuardRef: Pe,
|
|
71
|
+
externalTree: Ge,
|
|
72
|
+
getInsideElements: Ve
|
|
73
|
+
} = n, v = "rootStore" in D ? D.rootStore : D, T = v.useState("open"), d = v.useState("domReferenceElement"), i = v.useState("floatingElement"), {
|
|
74
|
+
events: X,
|
|
75
|
+
dataRef: G
|
|
76
|
+
} = v.context, V = oe(() => G.current.floatingContext?.nodeId), qe = P === !1, h = xe(d) && qe, fe = $(P), Y = $(J), _ = $(Me), ae = $(T), x = rt(Ge), s = nt(), y = E.useRef(!1), K = E.useRef(!1), Z = E.useRef(!1), le = E.useRef(null), de = E.useRef(""), ee = E.useRef(""), te = E.useRef(null), ne = E.useRef(null), Le = Ee(te, Pe, s?.beforeInsideRef), je = Ee(ne, s?.afterInsideRef), me = Fe(), B = Fe(), be = Ue(), He = s != null, o = ye(i), C = oe((r = o) => r ? De(r) : []), k = oe(() => Ve?.().filter((r) => r != null) ?? []);
|
|
77
|
+
E.useEffect(() => {
|
|
78
|
+
if (f || !g)
|
|
79
|
+
return;
|
|
80
|
+
function r(b) {
|
|
81
|
+
b.key === "Tab" && c(o, N(O(o))) && C().length === 0 && !h && Qe(b);
|
|
82
|
+
}
|
|
83
|
+
const a = O(o);
|
|
84
|
+
return I(a, "keydown", r);
|
|
85
|
+
}, [f, o, g, h, C]), E.useEffect(() => {
|
|
86
|
+
if (f || !T)
|
|
87
|
+
return;
|
|
88
|
+
const r = O(o);
|
|
89
|
+
function a() {
|
|
90
|
+
Z.current = !1;
|
|
91
|
+
}
|
|
92
|
+
function b(A) {
|
|
93
|
+
const e = z(A), u = k(), t = c(i, e) || c(d, e) || c(s?.portalNode, e) || u.some((l) => l === e || c(l, e));
|
|
94
|
+
Z.current = !t, ee.current = A.pointerType || "keyboard", e?.closest(`[${ot}]`) && (K.current = !0, B.start(0, () => {
|
|
95
|
+
K.current = !1;
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
function p() {
|
|
99
|
+
ee.current = "keyboard";
|
|
100
|
+
}
|
|
101
|
+
return ge(
|
|
102
|
+
I(r, "pointerdown", b, !0),
|
|
103
|
+
I(r, "pointerup", a, !0),
|
|
104
|
+
I(r, "pointercancel", a, !0),
|
|
105
|
+
I(r, "keydown", p, !0),
|
|
106
|
+
// Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups)
|
|
107
|
+
// if the popup dismissed between pointerdown and pointerup.
|
|
108
|
+
a
|
|
109
|
+
);
|
|
110
|
+
}, [f, i, d, o, T, s, B, k]), E.useEffect(() => {
|
|
111
|
+
if (f || !L)
|
|
112
|
+
return;
|
|
113
|
+
const r = O(o);
|
|
114
|
+
function a() {
|
|
115
|
+
K.current = !0, B.start(0, () => {
|
|
116
|
+
K.current = !1;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function b(u) {
|
|
120
|
+
const t = z(u);
|
|
121
|
+
ie(t) && (le.current = t);
|
|
122
|
+
}
|
|
123
|
+
function p(u) {
|
|
124
|
+
const t = u.relatedTarget, l = u.currentTarget, R = z(u);
|
|
125
|
+
g && t == null && R != null && c(i, R) && Oe(R), queueMicrotask(() => {
|
|
126
|
+
const F = V(), U = v.context.triggerElements, Ke = k(), We = t?.hasAttribute(Ae("focus-guard")) && [te.current, ne.current, s?.beforeInsideRef.current, s?.afterInsideRef.current, s?.beforeOutsideRef.current, s?.afterOutsideRef.current, w(H), w(j)].includes(t), _e = !(c(d, t) || c(i, t) || c(t, i) || c(s?.portalNode, t) || Ke.some((m) => m === t || c(m, t)) || t != null && U.hasElement(t) || U.hasMatchingElement((m) => c(m, t)) || We || x && (he(x.nodesRef.current, F).find((m) => c(m.context?.elements.floating, t) || c(m.context?.elements.domReference, t)) || ve(x.nodesRef.current, F).find((m) => [m.context?.elements.floating, ye(m.context?.elements.floating)].includes(t) || m.context?.elements.domReference === t)));
|
|
127
|
+
if (l === d && o && Ne(o), Q && l !== d && !et(R) && N(r) === r.body) {
|
|
128
|
+
if (q(o) && (o.focus(), Q === "popup")) {
|
|
129
|
+
be.request(() => {
|
|
130
|
+
o.focus();
|
|
131
|
+
});
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const m = C(), re = le.current, Re = (re && m.includes(re) ? re : null) || m[m.length - 1] || o;
|
|
135
|
+
q(Re) && Re.focus();
|
|
136
|
+
}
|
|
137
|
+
if (G.current.insideReactTree) {
|
|
138
|
+
G.current.insideReactTree = !1;
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
(h || !g) && t && _e && !K.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
142
|
+
// For an "untrapped" typeable combobox (input role=combobox with
|
|
143
|
+
// initialFocus=false), re-opening the popup and tabbing out should still close it even
|
|
144
|
+
// when the previously focused element (e.g. the next tabbable outside the popup) is
|
|
145
|
+
// focused again. Otherwise, the popup remains open on the second Tab sequence:
|
|
146
|
+
// click input -> Tab (closes) -> click input -> Tab.
|
|
147
|
+
// Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.
|
|
148
|
+
(h || t !== we()) && (y.current = !0, v.setOpen(!1, tt(it, u)));
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function A() {
|
|
152
|
+
Z.current || (G.current.insideReactTree = !0, me.start(0, () => {
|
|
153
|
+
G.current.insideReactTree = !1;
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
const e = q(d) ? d : null;
|
|
157
|
+
if (!(!i && !e))
|
|
158
|
+
return ge(e && I(e, "focusout", p), e && I(e, "pointerdown", a), i && I(i, "focusin", b), i && I(i, "focusout", p), i && s && I(i, "focusout", A, !0));
|
|
159
|
+
}, [f, d, i, o, g, x, s, v, L, Q, C, h, V, G, me, B, be, j, H, k]), E.useEffect(() => {
|
|
160
|
+
if (f || !i || !T)
|
|
161
|
+
return;
|
|
162
|
+
const r = Array.from(s?.portalNode?.querySelectorAll(`[${Ae("portal")}]`) || []), b = (x ? ve(x.nodesRef.current, V()) : []).find((l) => xe(l.context?.elements.domReference || null))?.context?.elements.domReference, A = [...[i, ...r, te.current, ne.current, s?.beforeOutsideRef.current, s?.afterOutsideRef.current, ...k()], b, w(H), w(j), h ? d : null].filter((l) => l != null), e = Ce(A, {
|
|
163
|
+
ariaHidden: g || h,
|
|
164
|
+
mark: !1
|
|
165
|
+
}), u = [i, ...r].filter((l) => l != null), t = Ce(u);
|
|
166
|
+
return () => {
|
|
167
|
+
t(), e();
|
|
168
|
+
};
|
|
169
|
+
}, [T, f, d, i, g, s, h, x, V, j, H, k]), W(() => {
|
|
170
|
+
if (!T || f || !q(o))
|
|
171
|
+
return;
|
|
172
|
+
const r = O(o), a = N(r);
|
|
173
|
+
queueMicrotask(() => {
|
|
174
|
+
const b = fe.current, p = typeof b == "function" ? b(_.current || "") : b;
|
|
175
|
+
if (p === void 0 || p === !1 || c(o, a))
|
|
176
|
+
return;
|
|
177
|
+
let e = null;
|
|
178
|
+
const u = () => (e == null && (e = C(o)), e[0] || o);
|
|
179
|
+
let t;
|
|
180
|
+
p === !0 || p === null ? t = u() : t = w(p), t = t || u();
|
|
181
|
+
const l = c(o, N(r));
|
|
182
|
+
se(t, {
|
|
183
|
+
preventScroll: t === o,
|
|
184
|
+
shouldFocus() {
|
|
185
|
+
if (!ae.current)
|
|
186
|
+
return !1;
|
|
187
|
+
if (l)
|
|
188
|
+
return !0;
|
|
189
|
+
const R = N(r);
|
|
190
|
+
return !(R !== t && c(o, R));
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
}, [f, T, o, C, fe, _, ae]), W(() => {
|
|
195
|
+
if (f || !o)
|
|
196
|
+
return;
|
|
197
|
+
const r = O(o), a = N(r), b = _.current == null;
|
|
198
|
+
Oe(a);
|
|
199
|
+
function p(e) {
|
|
200
|
+
if (e.open || (de.current = ft(e.nativeEvent, ee.current)), e.reason === st && e.nativeEvent.type === "mouseleave" && (y.current = !0), e.reason === ut)
|
|
201
|
+
if (e.nested)
|
|
202
|
+
y.current = !1;
|
|
203
|
+
else if (ze(e.nativeEvent) || Je(e.nativeEvent))
|
|
204
|
+
y.current = !1;
|
|
205
|
+
else {
|
|
206
|
+
let u = !1;
|
|
207
|
+
O(o).createElement("div").focus({
|
|
208
|
+
get preventScroll() {
|
|
209
|
+
return u = !0, !1;
|
|
210
|
+
}
|
|
211
|
+
}), u ? y.current = !1 : y.current = !0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
X.on("openchange", p);
|
|
215
|
+
function A() {
|
|
216
|
+
const e = Y.current;
|
|
217
|
+
let u = typeof e == "function" ? e(de.current) : e;
|
|
218
|
+
if (u === void 0 || u === !1)
|
|
219
|
+
return null;
|
|
220
|
+
u === null && (u = !0);
|
|
221
|
+
const t = d?.isConnected ? d : null, l = a?.isConnected && Se(a) !== "body" ? a : null;
|
|
222
|
+
let R = b ? l || t : t || l;
|
|
223
|
+
return R || (R = we() || null), typeof u == "boolean" ? R : w(u) || R || null;
|
|
224
|
+
}
|
|
225
|
+
return () => {
|
|
226
|
+
X.off("openchange", p);
|
|
227
|
+
const e = N(r), u = k(), t = c(i, e) || u.some((F) => F === e || c(F, e)) || x && he(x.nodesRef.current, V(), !1).some((F) => c(F.context?.elements.floating, e)), l = Y.current, R = A();
|
|
228
|
+
queueMicrotask(() => {
|
|
229
|
+
const F = at(R), U = typeof l != "boolean";
|
|
230
|
+
l && !y.current && q(F) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
231
|
+
// since it likely entered a different element which should be
|
|
232
|
+
// respected: https://github.com/floating-ui/floating-ui/issues/2607
|
|
233
|
+
(!(!U && F !== e && e !== r.body) || t) && F.focus({
|
|
234
|
+
preventScroll: !0
|
|
235
|
+
}), y.current = !1;
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
}, [f, i, o, Y, _, X, x, d, V, k]), W(() => {
|
|
239
|
+
if (!ct || T || !i)
|
|
240
|
+
return;
|
|
241
|
+
const r = N(O(i));
|
|
242
|
+
!q(r) || !$e(r) || c(i, r) && r.blur();
|
|
243
|
+
}, [T, i]), W(() => {
|
|
244
|
+
if (!(f || !s))
|
|
245
|
+
return s.setFocusManagerState({
|
|
246
|
+
modal: g,
|
|
247
|
+
closeOnFocusOut: L,
|
|
248
|
+
open: T,
|
|
249
|
+
onOpenChange: v.setOpen,
|
|
250
|
+
domReference: d
|
|
251
|
+
}), () => {
|
|
252
|
+
s.setFocusManagerState(null);
|
|
253
|
+
};
|
|
254
|
+
}, [f, s, g, T, v, L, d]), W(() => {
|
|
255
|
+
if (!(f || !o))
|
|
256
|
+
return Ne(o), () => {
|
|
257
|
+
queueMicrotask(ce);
|
|
258
|
+
};
|
|
259
|
+
}, [f, o]);
|
|
260
|
+
const pe = !f && (g ? !h : !0) && (He || g);
|
|
261
|
+
return /* @__PURE__ */ ue.jsxs(E.Fragment, {
|
|
262
|
+
children: [pe && /* @__PURE__ */ ue.jsx(Te, {
|
|
263
|
+
"data-type": "inside",
|
|
264
|
+
ref: Le,
|
|
265
|
+
onFocus: (r) => {
|
|
266
|
+
if (g) {
|
|
267
|
+
const a = C();
|
|
268
|
+
se(a[a.length - 1]);
|
|
269
|
+
} else s?.portalNode && (y.current = !1, Ie(r, s.portalNode) ? Xe(d)?.focus() : w(H ?? s.beforeOutsideRef)?.focus());
|
|
270
|
+
}
|
|
271
|
+
}), M, pe && /* @__PURE__ */ ue.jsx(Te, {
|
|
272
|
+
"data-type": "inside",
|
|
273
|
+
ref: je,
|
|
274
|
+
onFocus: (r) => {
|
|
275
|
+
g ? se(C()[0]) : s?.portalNode && (L && (y.current = !0), Ie(r, s.portalNode) ? Ye(d)?.focus() : w(j ?? s.afterOutsideRef)?.focus());
|
|
276
|
+
}
|
|
277
|
+
})]
|
|
278
|
+
});
|
|
4
279
|
}
|
|
5
280
|
export {
|
|
6
|
-
|
|
281
|
+
Lt as FloatingFocusManager
|
|
7
282
|
};
|
|
8
283
|
//# sourceMappingURL=index185.js.map
|
package/dist/index185.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index185.js","sources":["../../../node_modules/@base-ui/utils/esm/inertValue.js"],"sourcesContent":["import { isReactVersionAtLeast } from \"./reactVersion.js\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}"],"names":["inertValue","value","isReactVersionAtLeast"],"mappings":";AACO,SAASA,EAAWC,GAAO;AAChC,SAAIC,EAAsB,EAAE,IACnBD,IAGFA,IAAQ,SAAS;AAC1B;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index185.js","sources":["../node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { platform } from '@base-ui/utils/platform';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { activeElement, contains, getTarget, isTypeableCombobox, getFloatingFocusElement, isTypeableElement } from \"../utils/element.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\nimport { tabbable, focusable, isOutsideEvent, isTabbable, getNextTabbable, getPreviousTabbable } from \"../utils/tabbable.mjs\";\nimport { getNodeAncestors, getNodeChildren } from \"../utils/nodes.mjs\";\nimport { isElementVisible } from \"../utils/composite.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { markOthers } from \"../utils/markOthers.mjs\";\nimport { usePortalContext } from \"./FloatingPortal.mjs\";\nimport { useFloatingTree } from \"./FloatingTree.mjs\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../internals/constants.mjs\";\nimport { resolveRef } from \"../../utils/resolveRef.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(getTarget(event));\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(entry => {\n return entry.deref()?.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref();\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n if (isTabbable(container)) {\n return container;\n }\n return tabbable(container)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement) {\n if (floatingFocusElement.hasAttribute('tabindex') && !floatingFocusElement.hasAttribute('data-tabindex')) {\n return;\n }\n if (!floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const focusableElements = focusable(floatingFocusElement);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n // Mark our own write so the externally-managed early-return above doesn't\n // mistake it for a user-authored `tabindex` and freeze management.\n floatingFocusElement.setAttribute('data-tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree,\n getInsideElements\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const ignoreInitialFocus = initialFocus === false;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const openRef = useValueAsRef(open);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const pointerDownOutsideRef = React.useRef(false);\n const lastFocusedTabbableRef = React.useRef(null);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container) : [];\n });\n const getResolvedInsideElements = useStableCallback(() => getInsideElements?.().filter(element => element != null) ?? []);\n\n // Prevent Tab from escaping the modal when there are no tabbable elements.\n React.useEffect(() => {\n if (disabled || !modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(ownerDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = ownerDocument(floatingFocusElement);\n return addEventListener(doc, 'keydown', onKeyDown);\n }, [disabled, floatingFocusElement, modal, isUntrappedTypeableCombobox, getTabbableContent]);\n\n // Track pointer/keyboard interactions to disambiguate focus and outside presses.\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n function clearPointerDownOutside() {\n pointerDownOutsideRef.current = false;\n }\n function onPointerDown(event) {\n const target = getTarget(event);\n const insideElements = getResolvedInsideElements();\n const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target) || insideElements.some(element => element === target || contains(element, target));\n pointerDownOutsideRef.current = !pointerTargetInside;\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n // Reset on the next tick so a single click on a click-trigger doesn't\n // permanently suppress focus-out closing for the lifetime of the instance.\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n return mergeCleanups(addEventListener(doc, 'pointerdown', onPointerDown, true), addEventListener(doc, 'pointerup', clearPointerDownOutside, true), addEventListener(doc, 'pointercancel', clearPointerDownOutside, true), addEventListener(doc, 'keydown', onKeyDown, true),\n // Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups)\n // if the popup dismissed between pointerdown and pointerup.\n clearPointerDownOutside);\n }, [disabled, floating, domReference, floatingFocusElement, open, portalContext, pointerDownTimeout, getResolvedInsideElements]);\n\n // Close on focus out and restore focus within the floating tree when needed.\n React.useEffect(() => {\n if (disabled || !closeOnFocusOut) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n if (isTabbable(target)) {\n lastFocusedTabbableRef.current = target;\n }\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n\n // When focus is lost to the body (e.g. on a backdrop press), record the element that\n // had focus so a confirmation dialog opened while the body is focused can return focus\n // to it. Scoped to `modal` to avoid non-modal popups polluting the shared stack.\n if (modal && relatedTarget == null && target != null && contains(floating, target)) {\n addPreviouslyFocusedElement(target);\n }\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const insideElements = getResolvedInsideElements();\n const isRelatedFocusGuard = relatedTarget?.hasAttribute(createAttribute('focus-guard')) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement)].includes(relatedTarget);\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || insideElements.some(element => element === relatedTarget || contains(element, relatedTarget)) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || isRelatedFocusGuard || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isElementVisible(target) && activeElement(doc) === doc.body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the element is removed on pointerdown, focus tries to move it,\n // but since it's removed at the same time, focus gets lost as it\n // happens after the .focus() call above.\n // In this case, focus needs to be moved asynchronously.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const tabbableContent = getTabbableContent();\n const prevTabbable = lastFocusedTabbableRef.current;\n const nodeToFocus = (prevTabbable && tabbableContent.includes(prevTabbable) ? prevTabbable : null) || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n if (pointerDownOutsideRef.current) {\n return;\n }\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n return mergeCleanups(domReferenceElement && addEventListener(domReferenceElement, 'focusout', handleFocusOutside), domReferenceElement && addEventListener(domReferenceElement, 'pointerdown', handlePointerDown), floating && addEventListener(floating, 'focusin', handleFocusIn), floating && addEventListener(floating, 'focusout', handleFocusOutside), floating && portalContext && addEventListener(floating, 'focusout', markInsideReactTree, true));\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Hide everything outside the floating tree from assistive tech while open.\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const controlInsideElements = [floating, ...portalNodes, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, ...getResolvedInsideElements()];\n const insideElements = [...controlInsideElements, rootAncestorComboboxDomReference, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const ariaHiddenCleanup = markOthers(insideElements, {\n ariaHidden: modal || isUntrappedTypeableCombobox,\n mark: false\n });\n const markerInsideElements = [floating, ...portalNodes].filter(x => x != null);\n const markerCleanup = markOthers(markerInsideElements);\n return () => {\n markerCleanup();\n ariaHiddenCleanup();\n };\n }, [open, disabled, domReference, floating, modal, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]);\n\n // Focus the initial element when the floating element opens.\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n const doc = ownerDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n let focusableElements = null;\n const getDefaultFocusElement = () => {\n if (focusableElements == null) {\n focusableElements = getTabbableContent(floatingFocusElement);\n }\n return focusableElements[0] || floatingFocusElement;\n };\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = getDefaultFocusElement();\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || getDefaultFocusElement();\n const hadFocusInside = contains(floatingFocusElement, activeElement(doc));\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement,\n shouldFocus() {\n // This focus is queued on the next animation frame. If the floating element has closed\n // before it runs — e.g. tabbing out of a kept-mounted popup — don't pull focus back\n // onto the initial element after it has legitimately moved elsewhere.\n if (!openRef.current) {\n return false;\n }\n if (hadFocusInside) {\n return true;\n }\n const currentActiveElement = activeElement(doc);\n const focusMovedInside = currentActiveElement !== elToFocus && contains(floatingFocusElement, currentActiveElement);\n return !focusMovedInside;\n }\n });\n });\n }, [disabled, open, floatingFocusElement, getTabbableContent, initialFocusRef, openInteractionTypeRef, openRef]);\n\n // Track return focus targets and restore focus on unmount/close.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = ownerDocument(floatingFocusElement);\n const elementFocusedBeforeOpen = activeElement(doc);\n // Only nullish interaction types represent programmatic opens. The empty\n // string default is intentionally not treated as programmatic.\n const preferPreviousFocus = openInteractionTypeRef.current == null;\n addPreviouslyFocusedElement(elementFocusedBeforeOpen);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n ownerDocument(floatingFocusElement).createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n function getReturnElement() {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeTypeRef.current) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n const referenceReturnElement = domReference?.isConnected ? domReference : null;\n const previousReturnElement = elementFocusedBeforeOpen?.isConnected && getNodeName(elementFocusedBeforeOpen) !== 'body' ? elementFocusedBeforeOpen : null;\n let defaultReturnElement = preferPreviousFocus ? previousReturnElement || referenceReturnElement : referenceReturnElement || previousReturnElement;\n if (!defaultReturnElement) {\n defaultReturnElement = getPreviouslyFocusedElement() || null;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n return defaultReturnElement;\n }\n return resolveRef(resolvedReturnFocusValue) || defaultReturnElement || null;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const insideElements = getResolvedInsideElements();\n const isFocusInsideFloatingTree = contains(floating, activeEl) || insideElements.some(element => element === activeEl || contains(element, activeEl)) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const returnFocusValueOrFn = returnFocusRef.current;\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusValueOrFn !== 'boolean';\n if (returnFocusValueOrFn && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n preventReturnFocusRef.current = false;\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, openInteractionTypeRef, events, tree, domReference, getNodeId, getResolvedInsideElements]);\n\n // Safari may randomly scroll to the bottom of the page if an input inside a popup has focus\n // when the popup unmounts from the DOM.\n // By blurring it before the popup unmounts, we can prevent this behavior.\n useIsoLayoutEffect(() => {\n if (!platform.engine.webkit || open || !floating) {\n return;\n }\n const activeEl = activeElement(ownerDocument(floating));\n if (!isHTMLElement(activeEl) || !isTypeableElement(activeEl)) {\n return;\n }\n if (contains(floating, activeEl)) {\n activeEl.blur();\n }\n }, [open, floating]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled || !portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n\n // Keep the floating element tabIndex in sync and clear stale focus records.\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableContent();\n enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableContent()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}"],"names":["getEventType","event","lastInteractionType","win","ownerWindow","getTarget","LIST_LIMIT","previouslyFocusedElements","clearDisconnectedPreviouslyFocusedElements","entry","addPreviouslyFocusedElement","element","getNodeName","getPreviouslyFocusedElement","getFirstTabbableElement","container","isTabbable","tabbable","handleTabIndex","floatingFocusElement","tabbableContent","focusable","dataTabIndex","tabIndex","FloatingFocusManager","props","context","children","disabled","initialFocus","returnFocus","restoreFocus","modal","closeOnFocusOut","openInteractionType","nextFocusableElement","previousFocusableElement","beforeContentFocusGuardRef","externalTree","getInsideElements","store","open","domReference","floating","events","dataRef","getNodeId","useStableCallback","ignoreInitialFocus","isUntrappedTypeableCombobox","isTypeableCombobox","initialFocusRef","useValueAsRef","returnFocusRef","openInteractionTypeRef","openRef","tree","useFloatingTree","portalContext","usePortalContext","preventReturnFocusRef","React","isPointerDownRef","pointerDownOutsideRef","lastFocusedTabbableRef","closeTypeRef","lastInteractionTypeRef","beforeGuardRef","afterGuardRef","mergedBeforeGuardRef","useMergedRefs","mergedAfterGuardRef","blurTimeout","useTimeout","pointerDownTimeout","restoreFocusFrame","useAnimationFrame","isInsidePortal","getFloatingFocusElement","getTabbableContent","getResolvedInsideElements","onKeyDown","contains","activeElement","ownerDocument","stopEvent","doc","addEventListener","clearPointerDownOutside","onPointerDown","target","insideElements","pointerTargetInside","CLICK_TRIGGER_IDENTIFIER","mergeCleanups","handlePointerDown","handleFocusIn","handleFocusOutside","relatedTarget","currentTarget","nodeId","triggers","isRelatedFocusGuard","createAttribute","resolveRef","movedToUnrelatedNode","trigger","getNodeChildren","node","getNodeAncestors","isElementVisible","isHTMLElement","prevTabbable","nodeToFocus","createChangeEventDetails","REASONS.focusOut","markInsideReactTree","domReferenceElement","portalNodes","rootAncestorComboboxDomReference","x","ariaHiddenCleanup","markOthers","markerInsideElements","markerCleanup","useIsoLayoutEffect","previouslyFocusedElement","initialFocusValueOrFn","resolvedInitialFocus","focusableElements","getDefaultFocusElement","elToFocus","hadFocusInside","enqueueFocus","currentActiveElement","elementFocusedBeforeOpen","preferPreviousFocus","onOpenChangeLocal","details","REASONS.triggerHover","REASONS.outsidePress","isVirtualClick","isVirtualPointerEvent","isPreventScrollSupported","getReturnElement","returnFocusValueOrFn","resolvedReturnFocusValue","referenceReturnElement","previousReturnElement","defaultReturnElement","activeEl","isFocusInsideFloatingTree","returnElement","tabbableReturnElement","hasExplicitReturnFocus","platform.engine.webkit","isTypeableElement","shouldRenderGuards","_jsxs","_jsx","FocusGuard","els","isOutsideEvent","getNextTabbable","getPreviousTabbable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAASA,GAAaC,GAAOC,GAAqB;AAChD,QAAMC,IAAMC,GAAYC,EAAUJ,CAAK,CAAC;AACxC,SAAIA,aAAiBE,EAAI,gBAChB,aAELF,aAAiBE,EAAI,aAGhBD,KAAuB,aAE5B,iBAAiBD,IACZA,EAAM,eAAe,aAE1B,aAAaA,IACR,UAELA,aAAiBE,EAAI,aAEhBD,MAAwBD,EAAM,WAAW,IAAI,aAAa,WAE5D;AACT;AACA,MAAMK,KAAa;AACnB,IAAIC,IAA4B,CAAA;AAChC,SAASC,KAA6C;AACpD,EAAAD,IAA4BA,EAA0B,OAAO,CAAAE,MACpDA,EAAM,MAAK,GAAI,WACvB;AACH;AACA,SAASC,GAA4BC,GAAS;AAC5C,EAAAH,GAA0C,GACtCG,KAAWC,GAAYD,CAAO,MAAM,WACtCJ,EAA0B,KAAK,IAAI,QAAQI,CAAO,CAAC,GAC/CJ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B,MAAkB7C;AAC5G,SAAoB8H,gBAAAA,GAAAA,KAAMjG,EAAM,UAAU;AAAA,IACxC,UAAU,CAACgG,MAAmCE,gBAAAA,GAAAA,IAAKC,IAAY;AAAA,MAC7D,aAAa;AAAA,MACb,KAAK3F;AAAA,MACL,SAAS,CAAApE,MAAS;AAChB,YAAI+B,GAAO;AACT,gBAAMiI,IAAMlF,EAAkB;AAC9B,UAAAsD,GAAa4B,EAAIA,EAAI,SAAS,CAAC,CAAC;AAAA,QAClC,MAAO,CAAIvG,GAAe,eACxBE,EAAsB,UAAU,IAC5BsG,GAAejK,GAAOyD,EAAc,UAAU,IAC3ByG,GAAgBzH,CAAY,GACnC,MAAK,IAEnB8D,EAAWpE,KAA4BsB,EAAc,gBAAgB,GAAG,MAAK;AAAA,MAGnF;AAAA,IACN,CAAK,GAAG/B,GAAUkI,MAAmCE,gBAAAA,GAAAA,IAAKC,IAAY;AAAA,MAChE,aAAa;AAAA,MACb,KAAKzF;AAAA,MACL,SAAS,CAAAtE,MAAS;AAChB,QAAI+B,IACFqG,GAAatD,IAAqB,CAAC,CAAC,IAC3BrB,GAAe,eACpBzB,MACF2B,EAAsB,UAAU,KAE9BsG,GAAejK,GAAOyD,EAAc,UAAU,IAC3B0G,GAAoB1H,CAAY,GACvC,MAAK,IAEnB8D,EAAWrE,KAAwBuB,EAAc,eAAe,GAAG,MAAK;AAAA,MAG9E;AAAA,IACN,CAAK,CAAC;AAAA,EACN,CAAG;AACH;","x_google_ignoreList":[0]}
|
package/dist/index186.js
CHANGED
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
cutout: e,
|
|
6
|
-
...p
|
|
7
|
-
} = r;
|
|
8
|
-
let o;
|
|
9
|
-
if (e) {
|
|
10
|
-
const t = e.getBoundingClientRect();
|
|
11
|
-
o = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${t.left}px ${t.top}px,${t.left}px ${t.bottom}px,${t.right}px ${t.bottom}px,${t.right}px ${t.top}px,${t.left}px ${t.top}px)`;
|
|
12
|
-
}
|
|
13
|
-
return /* @__PURE__ */ s.jsx("div", {
|
|
14
|
-
ref: n,
|
|
15
|
-
role: "presentation",
|
|
16
|
-
"data-base-ui-inert": "",
|
|
17
|
-
...p,
|
|
18
|
-
style: {
|
|
19
|
-
position: "fixed",
|
|
20
|
-
inset: 0,
|
|
21
|
-
userSelect: "none",
|
|
22
|
-
WebkitUserSelect: "none",
|
|
23
|
-
clipPath: o
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
process.env.NODE_ENV !== "production" && (a.displayName = "InternalBackdrop");
|
|
1
|
+
import { isReactVersionAtLeast as r } from "./index349.js";
|
|
2
|
+
function n(e) {
|
|
3
|
+
return r(19) ? e : e ? "true" : void 0;
|
|
4
|
+
}
|
|
28
5
|
export {
|
|
29
|
-
|
|
6
|
+
n as inertValue
|
|
30
7
|
};
|
|
31
8
|
//# sourceMappingURL=index186.js.map
|
package/dist/index186.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index186.js","sources":["
|
|
1
|
+
{"version":3,"file":"index186.js","sources":["../node_modules/@base-ui/utils/inertValue.mjs"],"sourcesContent":["import { isReactVersionAtLeast } from \"./reactVersion.mjs\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}"],"names":["inertValue","value","isReactVersionAtLeast"],"mappings":";AACO,SAASA,EAAWC,GAAO;AAChC,SAAIC,EAAsB,EAAE,IACnBD,IAGFA,IAAQ,SAAS;AAC1B;","x_google_ignoreList":[0]}
|