@rpcbase/ui 0.287.0 → 0.289.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/assets/sha256.worker-DNtOSCbM.js.map +1 -0
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js.map +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js.map +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +96 -17
- package/dist/index11.js.map +1 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js.map +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js.map +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js.map +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js.map +1 -1
- package/dist/index128.js.map +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index130.js.map +1 -1
- package/dist/index131.js.map +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js.map +1 -1
- package/dist/index136.js.map +1 -1
- package/dist/index137.js.map +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index14.js.map +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js.map +1 -1
- package/dist/index147.js.map +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +4 -4
- package/dist/index154.js.map +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js.map +1 -1
- package/dist/index16.js.map +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +18 -12
- package/dist/index170.js.map +1 -1
- package/dist/index171.js.map +1 -1
- 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.map +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index18.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 +3 -3
- package/dist/index182.js.map +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js.map +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js.map +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +9 -7
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +4 -4
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +4 -15
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +13 -3
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +2 -2
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +4 -85
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +79 -54
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +68 -7
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +3 -23
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +6 -28
- package/dist/index199.js.map +1 -1
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +4 -97
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +3 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +23 -24
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +28 -10
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +97 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -12
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +22 -19
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +4 -6
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +4 -15
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +10 -102
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +21 -3
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +5 -23
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +15 -28
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +101 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +3 -7
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +24 -15
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +27 -7
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +17 -24
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +6 -22
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +15 -6
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +8 -5
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +27 -4
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +23 -4
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +6 -24
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +5 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +4 -24
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +4 -23
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +23 -6
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +22 -8
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +3 -19
- package/dist/index229.js.map +1 -1
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +22 -50
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +7 -20
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +9 -27
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +17 -97
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +50 -33
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +20 -119
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +28 -13
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +98 -4
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +33 -15
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +116 -62
- package/dist/index239.js.map +1 -1
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +13 -10
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +4 -109
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +14 -14
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +64 -12
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +10 -5
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +104 -318
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +14 -66
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +12 -232
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +4 -270
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +313 -309
- package/dist/index249.js.map +1 -1
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +60 -171
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +252 -8
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +268 -41
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +316 -47
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +179 -9
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +6 -50
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +41 -51
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +50 -7
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +9 -10
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +51 -61
- package/dist/index259.js.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +53 -42
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +9 -97
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +31 -47
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +61 -36
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +43 -47
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +92 -46
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +48 -20
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +33 -176
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +49 -48
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +68 -15
- package/dist/index269.js.map +1 -1
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +20 -65
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +202 -9
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +48 -40
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +60 -91
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +9 -278
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +38 -55
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +91 -10
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +278 -12
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +58 -11
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +11 -64
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +5 -5
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +12 -6
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +3 -25
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +3 -25
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +12 -126
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +63 -51
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +5 -60
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +24 -48
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +24 -6
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +125 -14
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +51 -16
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +5 -7
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +56 -11
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +47 -24
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +7 -51
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +15 -6
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +18 -148
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +12 -59
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +25 -120
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +54 -15
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +5 -866
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +148 -28
- package/dist/index299.js.map +1 -1
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +6 -8
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +55 -512
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +111 -794
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +14 -7436
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +862 -6
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +28 -12
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +515 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +803 -5
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +7426 -468
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +6 -37
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +12 -19
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +5 -11
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +5 -30
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +5 -4
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +461 -51
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +36 -10
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +19 -5
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +29 -8
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +4 -12
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +60 -3
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +10 -15
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +5 -25
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +5 -5
- package/dist/index32.js.map +1 -1
- package/dist/index320.js +9 -41
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +11 -4
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +3 -26
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +15 -18
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +22 -31
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +41 -5
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +4 -8
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +25 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +19 -9
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +34 -10
- package/dist/index329.js.map +1 -1
- package/dist/index33.js +9 -6
- package/dist/index33.js.map +1 -1
- package/dist/index330.js +5 -7
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +9 -75
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +8 -162
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +9 -114
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +10 -14
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +7 -80
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +68 -39
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +160 -11
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +113 -15
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +13 -100
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +6 -6
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +73 -49
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +34 -96
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +12 -70
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +14 -111
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +94 -48
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +50 -37
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +89 -125
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +52 -123
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +54 -197
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +44 -229
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +9 -9
- package/dist/index35.js.map +1 -1
- package/dist/index350.js +42 -308
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +144 -5
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +142 -6
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +257 -7
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +241 -6
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +309 -6
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +5 -21
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +6 -10
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +7 -128
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +6 -42
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +12 -7
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +6 -68
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +20 -116
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +10 -490
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +128 -7
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +42 -13
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +67 -3
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +115 -45
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +490 -11
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +8 -26
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +12 -41
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +13 -5
- package/dist/index37.js.map +1 -1
- package/dist/index370.js +4 -36
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +45 -15
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +24 -41
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +3 -12
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +27 -11
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +40 -50
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +37 -40
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +12 -10
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +40 -4
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +7 -4
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +5 -5
- package/dist/index38.js.map +1 -1
- package/dist/index380.js +29 -8
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +9 -303
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +57 -4
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +40 -22
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +15 -105
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +5 -22
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +10 -22
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +289 -16
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +4 -12
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +20 -112
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +6 -10
- package/dist/index39.js.map +1 -1
- package/dist/index390.js +3 -9
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +104 -27
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +20 -9
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +20 -6
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +14 -253
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +12 -10
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +117 -11
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +8 -6
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +32 -22
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +9 -23
- package/dist/index399.js.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +8 -11
- package/dist/index40.js.map +1 -1
- package/dist/index400.js +6 -105
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +3 -15
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +251 -10
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +9 -7
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +11 -239
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +7 -28
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +21 -37
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +21 -10
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +97 -117
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +15 -40
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +6 -7
- package/dist/index41.js.map +1 -1
- package/dist/index410.js +11 -25
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +7 -9
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +3 -24
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +226 -15
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +24 -11
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +38 -4
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +11 -324
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +119 -62
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +42 -4
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +25 -28
- package/dist/index419.js.map +1 -1
- package/dist/index42.js +6 -4
- package/dist/index42.js.map +1 -1
- package/dist/index420.js +11 -470
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +23 -268
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +24 -0
- package/dist/index422.js.map +1 -0
- package/dist/index423.js +17 -0
- package/dist/index423.js.map +1 -0
- package/dist/index424.js +8 -0
- package/dist/index424.js.map +1 -0
- package/dist/index425.js +328 -0
- package/dist/index425.js.map +1 -0
- package/dist/index426.js +66 -0
- package/dist/index426.js.map +1 -0
- package/dist/index427.js +7 -0
- package/dist/index427.js.map +1 -0
- package/dist/index428.js +31 -0
- package/dist/index428.js.map +1 -0
- package/dist/index429.js +474 -0
- package/dist/index429.js.map +1 -0
- package/dist/index43.js +68 -7
- package/dist/index43.js.map +1 -1
- package/dist/index430.js +272 -0
- package/dist/index430.js.map +1 -0
- package/dist/index44.js +7 -6
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +31 -7
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +10 -10
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +15 -13
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +201 -7
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +20 -6
- package/dist/index49.js.map +1 -1
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +16 -6
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +123 -14
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +19 -8
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +5 -7
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +9 -68
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +7 -7
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +9 -31
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +13 -10
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +8 -15
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +10 -201
- package/dist/index59.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +13 -20
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +9 -16
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +10 -123
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +5 -19
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +42 -9
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +387 -9
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +37 -14
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +21 -9
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +4 -9
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +6 -4
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +3 -3
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +57 -41
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +5 -387
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +6 -37
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +5 -21
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +4 -56
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +7 -7
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +6 -5
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +6 -5
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +11 -5
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +11 -5
- package/dist/index79.js.map +1 -1
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +7 -6
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +10 -6
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +5 -8
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +6 -7
- package/dist/index83.js.map +1 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +2 -2
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +31 -31
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js.map +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +13 -13
- package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
package/dist/index245.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index245.js","names":["ownerWindow","React","REASONS.focusOut","platform.engine.webkit"],"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 // A typeable combobox reference (e.g. input/textarea) with `initialFocus={false}`\n // has different focus semantics: focus is not trapped inside the floating element,\n // so in the modal case the guards are not rendered, but `aria-hidden` is still\n // applied to the outside nodes.\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)) || 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 previously focused tabbable element 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 focused element is removed on pointerdown, the browser\n // tries to move focus to it right after the `.focus()` call above,\n // but because it's removed in the same tick, focus is lost instead.\n // Re-focusing asynchronously (next frame) wins that race.\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 closeTypeRef.current = '';\n lastInteractionTypeRef.current = '';\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\n // enqueueFocus returns a rAF-cancel function; we intentionally don't cancel this focus.\n void 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 an explicit `null` interaction type represents a programmatic open.\n // `undefined` is normalized to `''` by the prop default, so it never reaches\n // here as nullish and is intentionally not treated as programmatic.\n const preferPreviousFocus = openInteractionTypeRef.current == null;\n addPreviouslyFocusedElement(elementFocusedBeforeOpen);\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 // On outside press, only return focus to the reference when the browser supports the\n // `focus({ preventScroll })` option; without it, restoring focus scrolls the page.\n // Chrome on Android and Samsung Internet still don't support `preventScroll`\n // (https://issues.chromium.org/issues/41453122), so the runtime check keeps return\n // focus disabled there to avoid the scroll jump.\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(closeType) {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeType) : 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 closeType = closeTypeRef.current;\n const returnElement = getReturnElement(closeType);\n queueMicrotask(() => {\n // `returnElement` if it is tabbable, otherwise its first tabbable child,\n // otherwise `returnElement` itself (which may not be tabbable at all).\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 const focusOptions = {\n preventScroll: true\n };\n if (closeType === 'keyboard') {\n focusOptions.focusVisible = true;\n }\n tabbableReturnElement.focus(focusOptions);\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 focus manager state (modal, closeOnFocusOut, open, etc.) to the\n // FloatingPortal context, which uses it to decide whether 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 returns a rAF-cancel function we don't need here.\n void 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 returns a rAF-cancel function we don't need here.\n void 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}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,GAAa,GAAO,GAAqB;CAChD,IAAM,IAAMA,EAAY,EAAU,CAAK,CAAC;CAmBxC,OAlBI,aAAiB,EAAI,gBAChB,aAEL,aAAiB,EAAI,aAGhB,KAAuB,aAE5B,iBAAiB,IACZ,EAAM,eAAe,aAE1B,aAAa,IACR,UAEL,aAAiB,EAAI,aAEhB,MAAwB,EAAM,WAAW,IAAI,aAAa,WAE5D;AACT;AACA,IAAM,KAAa,IACf,IAA4B,CAAC;AACjC,SAAS,IAA6C;CACpD,IAA4B,EAA0B,QAAO,MACpD,EAAM,MAAM,CAAC,EAAE,WACvB;AACH;AACA,SAAS,GAA4B,GAAS;CAE5C,AADA,EAA2C,GACvC,KAAW,EAAY,CAAO,MAAM,WACtC,EAA0B,KAAK,IAAI,QAAQ,CAAO,CAAC,GAC/C,EAA0B,SAAS,OACrC,IAA4B,EAA0B,MAAM,GAAW;AAG7E;AACA,SAAS,KAA8B;CAErC,OADA,EAA2C,GACpC,EAA0B,EAA0B,SAAS,EAAE,EAAE,MAAM;AAChF;AACA,SAAS,GAAwB,GAAW;CAO1C,OANK,IAGD,EAAW,CAAS,IACf,IAEF,GAAS,CAAS,CAAC,CAAC,MAAM,IAL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;CACF,GAAG,CAAC,GAAU,CAAoB,CAAC;CACnC,IAAM,KAAqB,CAAC,MAAa,MAAQ,CAAC,OAAwC,MAAkB;CAC5G,OAAoB,iBAAMF,EAAM,UAAU,EACxC,UAAU;EAAC,MAAmC,iBAAK,IAAY;GAC7D,aAAa;GACb,KAAK;GACL,UAAS,MAAS;IAChB,IAAI,GAAO;KACT,IAAM,IAAM,EAAmB;KAE/B,EAAkB,EAAI,EAAI,SAAS,EAAE;IACvC,OAAO,AAAI,GAAe,eACxB,EAAsB,UAAU,IAC5B,GAAe,GAAO,EAAc,UAAU,IAEhD,GADqC,CAC1B,CAAC,EAAE,MAAM,IAEpB,EAAW,KAA4B,EAAc,gBAAgB,CAAC,EAAE,MAAM;GAGpF;EACF,CAAC;EAAG;EAAU,MAAmC,iBAAK,IAAY;GAChE,aAAa;GACb,KAAK;GACL,UAAS,MAAS;IAChB,AAAI,IAEF,EAAkB,EAAmB,CAAC,CAAC,EAAE,IAChC,GAAe,eACpB,MACF,EAAsB,UAAU,KAE9B,GAAe,GAAO,EAAc,UAAU,IAEhD,GADyC,CAC9B,CAAC,EAAE,MAAM,IAEpB,EAAW,KAAwB,EAAc,eAAe,CAAC,EAAE,MAAM;GAG/E;EACF,CAAC;CAAC,EACJ,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"index245.js","names":["React","React$1","ReactDOM","PortalContext","usePortalContext","attr","createAttribute","useFloatingPortalNode","containerProp","EMPTY_OBJECT","props","uniqueId","useId","parentPortalNode","containerElement","setContainerElement","portalNode","setPortalNode","setPortalNodeRef","useStableCallback","node","containerRef","resolvedContainer","isNode","portalElement","useRenderElement","componentProps","ref","elementProps","portalSubtree","FloatingPortal","portalNodeId","forwardedRef","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","focusManagerState","setFocusManagerState","focusInsideDisabledRef","modal","open","shouldRenderGuards","onFocus","event","isOutsideEvent","enableFocusInside","disableFocusInside","mergeCleanups","addEventListener","useIsoLayoutEffect","portalContextValue","FocusGuard","domReference","portalOwnerRole","ownerVisuallyHidden","children","getNextTabbable","createChangeEventDetails"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isNode } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { enableFocusInside, disableFocusInside, getPreviousTabbable, getNextTabbable, isOutsideEvent } from \"../utils/tabbable.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { ownerVisuallyHidden } from \"../../internals/constants.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PortalContext.displayName = \"PortalContext\";\nexport const usePortalContext = () => React.useContext(PortalContext);\nconst attr = createAttribute('portal');\nexport function useFloatingPortalNode(props = {}) {\n const {\n ref,\n container: containerProp,\n componentProps = EMPTY_OBJECT,\n elementProps\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const parentPortalNode = portalContext?.portalNode;\n const [containerElement, setContainerElement] = React.useState(null);\n const [portalNode, setPortalNode] = React.useState(null);\n const setPortalNodeRef = useStableCallback(node => {\n if (node !== null) {\n // the useIsoLayoutEffect below watching containerProp / parentPortalNode\n // sets setPortalNode(null) when the container becomes null or changes.\n // So even though the ref callback now ignores null, the portal node still gets cleared.\n setPortalNode(node);\n }\n });\n const containerRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n // Wait for the container to be resolved if explicitly `null`.\n if (containerProp === null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;\n if (resolvedContainer == null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n if (containerRef.current !== resolvedContainer) {\n containerRef.current = resolvedContainer;\n setPortalNode(null);\n setContainerElement(resolvedContainer);\n }\n }, [containerProp, parentPortalNode]);\n const portalElement = useRenderElement('div', componentProps, {\n ref: [ref, setPortalNodeRef],\n props: [{\n id: uniqueId,\n [attr]: ''\n }, elementProps]\n });\n\n // This `createPortal` call injects `portalElement` into the `container`.\n // Another call inside `FloatingPortal`/`FloatingPortalLite` then injects the children into `portalElement`.\n const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ReactDOM.createPortal(portalElement, containerElement) : null;\n return {\n node: portalNode,\n // `id` and `render` props can override or remove the generated ID. Use the exact\n // rendered value so `aria-owns` never points at an ID absent from the DOM.\n nodeId: /*#__PURE__*/React.isValidElement(portalElement) ? portalElement.props.id : undefined,\n subtree: portalSubtree\n };\n}\n\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n * @internal\n */\nexport const FloatingPortal = /*#__PURE__*/React.forwardRef(function FloatingPortal(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n container,\n portalOwnerRole,\n ...elementProps\n } = componentProps;\n const {\n node: portalNode,\n nodeId: portalNodeId,\n subtree: portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const focusInsideDisabledRef = React.useRef(false);\n const modal = focusManagerState?.modal;\n const open = focusManagerState?.open;\n const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || modal) {\n return undefined;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && event.relatedTarget && isOutsideEvent(event)) {\n if (event.type === 'focusin') {\n if (focusInsideDisabledRef.current) {\n enableFocusInside(portalNode);\n focusInsideDisabledRef.current = false;\n }\n } else {\n disableFocusInside(portalNode);\n focusInsideDisabledRef.current = true;\n }\n }\n }\n\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n return mergeCleanups(addEventListener(portalNode, 'focusin', onFocus, true), addEventListener(portalNode, 'focusout', onFocus, true));\n }, [portalNode, modal]);\n useIsoLayoutEffect(() => {\n if (!portalNode || open !== true || !focusInsideDisabledRef.current) {\n return;\n }\n\n // Restore tabbability before the focus manager's queued focus-on-open step runs.\n enableFocusInside(portalNode);\n focusInsideDisabledRef.current = false;\n }, [open, portalNode]);\n const portalContextValue = React.useMemo(() => ({\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [portalNode]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, /*#__PURE__*/_jsxs(PortalContext.Provider, {\n value: portalContextValue,\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n beforeInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(\"span\", {\n role: portalOwnerRole,\n \"aria-owns\": portalNodeId,\n style: ownerVisuallyHidden\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n afterInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n if (focusManagerState?.closeOnFocusOut) {\n focusManagerState?.onOpenChange(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n }\n }\n })]\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortal.displayName = \"FloatingPortal\";"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,IAAMG,IAA6B,gBAAM,cAAc,IAAI;AAC3D,QAAA,IAAA,aAA6B,iBAAc,EAAc,cAAc;AACvE,IAAaC,UAAyBJ,EAAM,WAAWG,CAAa,GAC9DE,IAAOC,EAAgB,QAAQ;AACrC,SAAgBC,EAAsB,IAAQ,CAAC,GAAG;CAChD,IAAM,EACJ,QACA,WAAWC,GACX,oBAAiBC,GACjB,oBACEC,GACEC,IAAWC,EAAM,GAEjBC,IADgBT,EACe,CAAC,EAAE,YAClC,CAACU,GAAkBC,KAAuBf,EAAM,SAAS,IAAI,GAC7D,CAACgB,GAAYC,KAAiBjB,EAAM,SAAS,IAAI,GACjDkB,IAAmBC,GAAkB,MAAQ;EACjD,AAAIC,MAAS,QAIXH,EAAcG,CAAI;CAEtB,CAAC,GACKC,IAA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wB;GACT,CAAC;GAAGvC,KAA2B,gBAAS,aAAawC,GAAUxC,CAAU;GAAG0B,KAAsB1B,KAA2B,gBAAKoC,GAAY;IAC5I,aAAa;IACb,KAAKlB;IACL,UAAS,MAAS;KAChB,IAAIW,EAAeD,GAAO5B,CAAU,GAClC,EAAe,SAAS,MAAM;UACzB;MACL,IAAMqC,IAAehB,IAAoBA,EAAkB,eAAe;MAG1E,AADAoB,EADqCJ,CAC1B,CAAC,EAAE,MAAM,GAChBhB,GAAmB,mBACrBA,GAAmB,aAAa,IAAOqB,EAAyB,aAAkBd,EAAM,WAAW,CAAC;KAExG;IACF;GACF,CAAC;EAAC;CACJ,CAAC,CAAC,EACJ,CAAC;AACH,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAe,cAAc"}
|
package/dist/index246.js
CHANGED
|
@@ -1,71 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let { enabled: f = !0, event: p = "click", toggle: m = !0, ignoreMouse: h = !1, stickIfOpen: g = !0, touchOpenDelay: _ = 0, reason: v = t } = d, y = "rootStore" in u ? u.rootStore : u, b = y.context.dataRef, x = l.useRef(void 0), S = c(), C = r(), w = l.useMemo(() => {
|
|
14
|
-
function e(e, t, r, i) {
|
|
15
|
-
let a = n(v, t, r);
|
|
16
|
-
e && i === "touch" && _ > 0 ? C.start(_, () => {
|
|
17
|
-
y.setOpen(!0, a);
|
|
18
|
-
}) : y.setOpen(e, a);
|
|
1
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
|
|
2
|
+
function e() {
|
|
3
|
+
let e = /* @__PURE__ */ new Map();
|
|
4
|
+
return {
|
|
5
|
+
emit(t, n) {
|
|
6
|
+
e.get(t)?.forEach((e) => e(n));
|
|
7
|
+
},
|
|
8
|
+
on(t, n) {
|
|
9
|
+
e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
|
|
10
|
+
},
|
|
11
|
+
off(t, n) {
|
|
12
|
+
e.get(t)?.delete(n);
|
|
19
13
|
}
|
|
20
|
-
|
|
21
|
-
let r = b.current.openEvent, i = y.select("domReferenceElement") !== t;
|
|
22
|
-
return e && i || !e || !m ? !0 : r && g ? !n(r.type) : !1;
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
onPointerDown(e) {
|
|
26
|
-
x.current = i(e.pointerType, !0) && a(e.nativeEvent) ? "virtual" : e.pointerType;
|
|
27
|
-
},
|
|
28
|
-
onMouseDown(n) {
|
|
29
|
-
let r = x.current, a = n.nativeEvent, c = y.select("open");
|
|
30
|
-
if (n.button !== 0 || p === "click" || i(r, !0) && h) return;
|
|
31
|
-
let l = t(c, n.currentTarget, (e) => e === "click" || e === "mousedown"), u = o(a);
|
|
32
|
-
if (s(u)) {
|
|
33
|
-
e(l, a, u, r);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
let d = n.currentTarget;
|
|
37
|
-
S.request(() => {
|
|
38
|
-
e(l, a, d, r);
|
|
39
|
-
});
|
|
40
|
-
},
|
|
41
|
-
onClick(n) {
|
|
42
|
-
if (p === "mousedown-only") return;
|
|
43
|
-
let r = x.current;
|
|
44
|
-
if (p === "mousedown" && r) {
|
|
45
|
-
x.current = void 0;
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
i(r, !0) && h || e(t(y.select("open"), n.currentTarget, (e) => e === "click" || e === "mousedown" || e === "keydown" || e === "keyup"), n.nativeEvent, n.currentTarget, r);
|
|
49
|
-
},
|
|
50
|
-
onKeyDown() {
|
|
51
|
-
x.current = void 0;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}, [
|
|
55
|
-
b,
|
|
56
|
-
p,
|
|
57
|
-
h,
|
|
58
|
-
v,
|
|
59
|
-
y,
|
|
60
|
-
g,
|
|
61
|
-
m,
|
|
62
|
-
S,
|
|
63
|
-
C,
|
|
64
|
-
_
|
|
65
|
-
]);
|
|
66
|
-
return l.useMemo(() => f ? { reference: w } : e, [f, w]);
|
|
14
|
+
};
|
|
67
15
|
}
|
|
68
16
|
//#endregion
|
|
69
|
-
export {
|
|
17
|
+
export { e as createEventEmitter };
|
|
70
18
|
|
|
71
19
|
//# sourceMappingURL=index246.js.map
|
package/dist/index246.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index246.js","names":["
|
|
1
|
+
{"version":3,"file":"index246.js","names":["createEventEmitter","map","event","listener","data"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs"],"sourcesContent":["export function createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n map.get(event)?.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n map.get(event)?.delete(listener);\n }\n };\n}"],"ignoreList":[0],"mappings":";AAAA,SAAgBA,IAAqB;CACnC,IAAMC,oBAAM,IAAI,IAAI;CACpB,OAAO;EACL,KAAK,GAAO,GAAM;GAChB,EAAI,IAAIC,CAAK,CAAC,EAAE,SAAQ,MAAYC,EAASC,CAAI,CAAC;EACpD;EACA,GAAG,GAAO,GAAU;GAIlB,AAHKH,EAAI,IAAIC,CAAK,KAChBD,EAAI,IAAIC,mBAAO,IAAI,IAAI,CAAC,GAE1BD,EAAI,IAAIC,CAAK,CAAC,CAAC,IAAIC,CAAQ;EAC7B;EACA,IAAI,GAAO,GAAU;GACnB,EAAI,IAAID,CAAK,CAAC,EAAE,OAAOC,CAAQ;EACjC;CACF;AACF"}
|
package/dist/index247.js
CHANGED
|
@@ -1,236 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { mergeCleanups as y } from "./index228.js";
|
|
14
|
-
import { getNodeChildren as ne } from "./index236.js";
|
|
15
|
-
import { createAttribute as re } from "./index237.js";
|
|
16
|
-
import { useFloatingTree as b } from "./index243.js";
|
|
17
|
-
import * as x from "react";
|
|
18
|
-
//#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
|
|
19
|
-
function ie() {
|
|
20
|
-
return !1;
|
|
21
|
-
}
|
|
22
|
-
function S(e) {
|
|
23
|
-
return {
|
|
24
|
-
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
25
|
-
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function C(C, ae = {}) {
|
|
29
|
-
let { enabled: w = !0, escapeKey: T = !0, outsidePress: E = !0, outsidePressEvent: D = "sloppy", referencePress: oe = ie, bubbles: O, externalTree: k } = ae, A = "rootStore" in C ? C.rootStore : C, j = A.useState("open"), se = A.useState("floatingElement"), { dataRef: M } = A.context, N = b(k), P = o(typeof E == "function" ? E : () => !1), F = typeof E == "function" ? P : E, ce = F !== !1, le = o(() => D), { escapeKey: I, outsidePress: ue } = S(O), L = x.useRef(!1), R = x.useRef(!1), z = x.useRef(!1), B = x.useRef(!1), V = x.useRef(""), H = x.useRef(null), U = f(), W = f(), G = o(() => {
|
|
30
|
-
W.clear(), M.current.insideReactTree = !1;
|
|
31
|
-
}), K = o((e) => {
|
|
32
|
-
let t = M.current.floatingContext?.nodeId;
|
|
33
|
-
return (N ? ne(N.nodesRef.current, t) : []).some((t) => t.context?.open && !t.context.dataRef.current[e]);
|
|
34
|
-
}), q = o((e) => _(e, A.select("floatingElement")) || _(e, A.select("domReferenceElement"))), J = o((e) => {
|
|
35
|
-
oe() && A.setOpen(!1, u(l, e.nativeEvent));
|
|
36
|
-
}), Y = o((e) => {
|
|
37
|
-
if (!j || !w || !T || e.key !== "Escape" || B.current || !I && K("__escapeKeyBubbles")) return;
|
|
38
|
-
let t = m(e) ? e.nativeEvent : e, n = u(c, t);
|
|
39
|
-
A.setOpen(!1, n), n.isCanceled || e.preventDefault(), !I && !n.isPropagationAllowed && e.stopPropagation();
|
|
40
|
-
}), X = o(() => {
|
|
41
|
-
M.current.insideReactTree = !0, W.start(0, G);
|
|
42
|
-
}), Z = o((e) => {
|
|
43
|
-
if (!j || !w || e.button !== 0) return;
|
|
44
|
-
let t = g(e.nativeEvent);
|
|
45
|
-
h(A.select("floatingElement"), t) && (L.current || (L.current = !0, R.current = !1));
|
|
46
|
-
}), Q = o((e) => {
|
|
47
|
-
!j || !w || (e.defaultPrevented || e.nativeEvent.defaultPrevented) && L.current && (R.current = !0);
|
|
48
|
-
});
|
|
49
|
-
x.useEffect(() => {
|
|
50
|
-
if (!j || !w) return G;
|
|
51
|
-
M.current.__escapeKeyBubbles = I, M.current.__outsidePressBubbles = ue;
|
|
52
|
-
let o = new d(), c = new d();
|
|
53
|
-
function l() {
|
|
54
|
-
o.clear(), B.current = !0;
|
|
55
|
-
}
|
|
56
|
-
function f() {
|
|
57
|
-
o.start(p ? 5 : 0, () => {
|
|
58
|
-
B.current = !1;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function m() {
|
|
62
|
-
z.current = !0, c.start(0, () => {
|
|
63
|
-
z.current = !1;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function b() {
|
|
67
|
-
L.current = !1, R.current = !1;
|
|
68
|
-
}
|
|
69
|
-
function x() {
|
|
70
|
-
let e = V.current, t = e === "pen" || !e ? "mouse" : e, n = le(), r = typeof n == "function" ? n() : n;
|
|
71
|
-
return typeof r == "string" ? r : r[t];
|
|
72
|
-
}
|
|
73
|
-
function ie(e) {
|
|
74
|
-
let t = x();
|
|
75
|
-
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
76
|
-
}
|
|
77
|
-
function S(e) {
|
|
78
|
-
let t = M.current.floatingContext?.nodeId, n = N && ne(N.nodesRef.current, t).some((t) => _(e, t.context?.elements.floating));
|
|
79
|
-
return q(e) || n;
|
|
80
|
-
}
|
|
81
|
-
function C(o) {
|
|
82
|
-
if (ie(o)) {
|
|
83
|
-
o.type !== "click" && !q(o) && (c.clear(), z.current = !1), G();
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (M.current.insideReactTree) {
|
|
87
|
-
G();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
let l = g(o), d = `[${re("inert")}]`, f = n(l) ? l.getRootNode() : null, p = Array.from((a(f) ? f : s(A.select("floatingElement"))).querySelectorAll(d)), m = A.context.triggerElements;
|
|
91
|
-
if (l && (m.hasElement(l) || m.hasMatchingElement((e) => h(e, l)))) return;
|
|
92
|
-
let _ = n(l) ? l : null;
|
|
93
|
-
for (; _ && !i(_);) {
|
|
94
|
-
let e = t(_);
|
|
95
|
-
if (i(e) || !n(e)) break;
|
|
96
|
-
_ = e;
|
|
97
|
-
}
|
|
98
|
-
if (!(p.length && n(l) && !te(l) && !h(l, A.select("floatingElement")) && p.every((e) => !h(_, e)))) {
|
|
99
|
-
if (r(l) && !("touches" in o)) {
|
|
100
|
-
let t = i(l), n = e(l), r = /auto|scroll/, a = t || r.test(n.overflowX), s = t || r.test(n.overflowY), c = a && l.clientWidth > 0 && l.scrollWidth > l.clientWidth, ee = s && l.clientHeight > 0 && l.scrollHeight > l.clientHeight, u = n.direction === "rtl", d = ee && (u ? o.offsetX <= l.offsetWidth - l.clientWidth : o.offsetX > l.clientWidth), f = c && o.offsetY > l.clientHeight;
|
|
101
|
-
if (d || f) return;
|
|
102
|
-
}
|
|
103
|
-
if (!S(o)) {
|
|
104
|
-
if (x() === "intentional" && z.current) {
|
|
105
|
-
c.clear(), z.current = !1;
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
typeof F == "function" && !F(o) || K("__outsidePressBubbles") || (A.setOpen(!1, u(ee, o)), G());
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function ae(e) {
|
|
113
|
-
x() !== "sloppy" || e.pointerType === "touch" || !A.select("open") || !w || q(e) || C(e);
|
|
114
|
-
}
|
|
115
|
-
function E(e) {
|
|
116
|
-
if (x() !== "sloppy" || !A.select("open") || !w || q(e)) return;
|
|
117
|
-
let t = e.touches[0];
|
|
118
|
-
t && (H.current = {
|
|
119
|
-
startTime: Date.now(),
|
|
120
|
-
startX: t.clientX,
|
|
121
|
-
startY: t.clientY,
|
|
122
|
-
dismissOnTouchEnd: !1,
|
|
123
|
-
dismissOnMouseDown: !0
|
|
124
|
-
}, U.start(1e3, () => {
|
|
125
|
-
H.current && (H.current.dismissOnTouchEnd = !1, H.current.dismissOnMouseDown = !1);
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
function D(e, t) {
|
|
129
|
-
let n = g(e);
|
|
130
|
-
if (!n) return;
|
|
131
|
-
let r = v(n, e.type, () => {
|
|
132
|
-
t(e), r();
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function oe(e) {
|
|
136
|
-
V.current = "touch", D(e, E);
|
|
137
|
-
}
|
|
138
|
-
function O(e) {
|
|
139
|
-
U.clear(), e.type === "pointerdown" && (V.current = e.pointerType), !(e.type === "mousedown" && H.current && !H.current.dismissOnMouseDown) && D(e, (e) => {
|
|
140
|
-
e.type === "pointerdown" ? ae(e) : C(e);
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
function k(e) {
|
|
144
|
-
if (!L.current) return;
|
|
145
|
-
let t = R.current;
|
|
146
|
-
if (b(), x() === "intentional") {
|
|
147
|
-
if (e.type === "pointercancel") {
|
|
148
|
-
t && m();
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
if (!S(e)) {
|
|
152
|
-
if (t) {
|
|
153
|
-
m();
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
typeof F == "function" && !F(e) || (c.clear(), z.current = !0, G());
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function P(e) {
|
|
161
|
-
if (x() !== "sloppy" || !H.current || q(e)) return;
|
|
162
|
-
let t = e.touches[0];
|
|
163
|
-
if (!t) return;
|
|
164
|
-
let n = Math.abs(t.clientX - H.current.startX), r = Math.abs(t.clientY - H.current.startY), i = Math.sqrt(n * n + r * r);
|
|
165
|
-
i > 5 && (H.current.dismissOnTouchEnd = !0), i > 10 && (C(e), U.clear(), H.current = null);
|
|
166
|
-
}
|
|
167
|
-
function W(e) {
|
|
168
|
-
D(e, P);
|
|
169
|
-
}
|
|
170
|
-
function J(e) {
|
|
171
|
-
x() !== "sloppy" || !H.current || q(e) || (H.current.dismissOnTouchEnd && C(e), U.clear(), H.current = null);
|
|
172
|
-
}
|
|
173
|
-
function X(e) {
|
|
174
|
-
D(e, J);
|
|
175
|
-
}
|
|
176
|
-
let Z = s(se), Q = y(T && y(v(Z, "keydown", Y), v(Z, "compositionstart", l), v(Z, "compositionend", f)), ce && y(v(Z, "click", O, !0), v(Z, "pointerdown", O, !0), v(Z, "pointerup", k, !0), v(Z, "pointercancel", k, !0), v(Z, "mousedown", O, !0), v(Z, "mouseup", k, !0), v(Z, "touchstart", oe, !0), v(Z, "touchmove", W, !0), v(Z, "touchend", X, !0)));
|
|
177
|
-
return () => {
|
|
178
|
-
Q(), o.clear(), c.clear(), b(), z.current = !1, G();
|
|
179
|
-
};
|
|
180
|
-
}, [
|
|
181
|
-
M,
|
|
182
|
-
se,
|
|
183
|
-
T,
|
|
184
|
-
ce,
|
|
185
|
-
F,
|
|
186
|
-
j,
|
|
187
|
-
w,
|
|
188
|
-
I,
|
|
189
|
-
ue,
|
|
190
|
-
Y,
|
|
191
|
-
G,
|
|
192
|
-
le,
|
|
193
|
-
K,
|
|
194
|
-
q,
|
|
195
|
-
N,
|
|
196
|
-
A,
|
|
197
|
-
U
|
|
198
|
-
]);
|
|
199
|
-
let $ = x.useMemo(() => ({
|
|
200
|
-
onKeyDown: Y,
|
|
201
|
-
onPointerDown: J,
|
|
202
|
-
onClick: J
|
|
203
|
-
}), [Y, J]), de = x.useMemo(() => ({
|
|
204
|
-
onKeyDown: Y,
|
|
205
|
-
onPointerDown: Q,
|
|
206
|
-
onMouseDown: Q,
|
|
207
|
-
onClickCapture: X,
|
|
208
|
-
onMouseDownCapture(e) {
|
|
209
|
-
X(), Z(e);
|
|
210
|
-
},
|
|
211
|
-
onPointerDownCapture(e) {
|
|
212
|
-
X(), Z(e);
|
|
213
|
-
},
|
|
214
|
-
onMouseUpCapture: X,
|
|
215
|
-
onTouchEndCapture: X,
|
|
216
|
-
onTouchMoveCapture: X
|
|
217
|
-
}), [
|
|
218
|
-
Y,
|
|
219
|
-
X,
|
|
220
|
-
Z,
|
|
221
|
-
Q
|
|
222
|
-
]);
|
|
223
|
-
return x.useMemo(() => w ? {
|
|
224
|
-
reference: $,
|
|
225
|
-
floating: de,
|
|
226
|
-
trigger: $
|
|
227
|
-
} : {}, [
|
|
228
|
-
w,
|
|
229
|
-
$,
|
|
230
|
-
de
|
|
231
|
-
]);
|
|
232
|
-
}
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
|
|
5
|
+
var t = /*#__PURE__*/ e.createContext(null);
|
|
6
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "FloatingNodeContext");
|
|
7
|
+
var n = /*#__PURE__*/ e.createContext(null);
|
|
8
|
+
process.env.NODE_ENV !== "production" && (n.displayName = "FloatingTreeContext");
|
|
9
|
+
var r = () => e.useContext(t)?.id || null, i = (t) => {
|
|
10
|
+
let r = e.useContext(n);
|
|
11
|
+
return t ?? r;
|
|
12
|
+
};
|
|
233
13
|
//#endregion
|
|
234
|
-
export {
|
|
14
|
+
export { r as useFloatingParentNodeId, i as useFloatingTree };
|
|
235
15
|
|
|
236
16
|
//# sourceMappingURL=index247.js.map
|
package/dist/index247.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index247.js","names":["outsidePress","React","REASONS.triggerPress","escapeKey","REASONS.escapeKey","platform.engine.webkit","REASONS.outsidePress"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs"],"sourcesContent":["'use client';\n\n/* eslint-disable no-underscore-dangle */\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { Timeout, useTimeout } from '@base-ui/utils/useTimeout';\nimport { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode, isShadowRoot } from '@floating-ui/utils/dom';\nimport { platform } from '@base-ui/utils/platform';\nimport { useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { contains, getTarget, isEventTargetWithin, isRootElement } from \"../utils/element.mjs\";\nimport { isReactEvent } from \"../utils/event.mjs\";\nimport { getNodeChildren } from \"../utils/nodes.mjs\";\nfunction alwaysFalse() {\n return false;\n}\nexport function normalizeProp(normalizable) {\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : normalizable?.escapeKey ?? false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : normalizable?.outsidePress ?? true\n };\n}\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nexport function useDismiss(context, props = {}) {\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: outsidePressProp = true,\n outsidePressEvent = 'sloppy',\n referencePress = alwaysFalse,\n bubbles,\n externalTree\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const {\n dataRef\n } = store.context;\n const tree = useFloatingTree(externalTree);\n const outsidePressFn = useStableCallback(typeof outsidePressProp === 'function' ? outsidePressProp : () => false);\n const outsidePress = typeof outsidePressProp === 'function' ? outsidePressFn : outsidePressProp;\n const outsidePressEnabled = outsidePress !== false;\n const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const pressStartedInsideRef = React.useRef(false);\n const pressStartPreventedRef = React.useRef(false);\n // Ignore only the very next outside click after dragging from inside to outside.\n const suppressNextOutsideClickRef = React.useRef(false);\n const isComposingRef = React.useRef(false);\n const currentPointerTypeRef = React.useRef('');\n const touchStateRef = React.useRef(null);\n const cancelDismissOnEndTimeout = useTimeout();\n const clearInsideReactTreeTimeout = useTimeout();\n const clearInsideReactTree = useStableCallback(() => {\n clearInsideReactTreeTimeout.clear();\n dataRef.current.insideReactTree = false;\n });\n const hasBlockingChild = useStableCallback(bubbleKey => {\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n return children.some(child => child.context?.open && !child.context.dataRef.current[bubbleKey]);\n });\n const isEventWithinOwnElements = useStableCallback(event => {\n return isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'));\n });\n const closeOnReferencePress = useStableCallback(event => {\n if (!referencePress()) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n });\n const closeOnEscapeKeyDown = useStableCallback(event => {\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n if (!escapeKeyBubbles && hasBlockingChild('__escapeKeyBubbles')) {\n return;\n }\n const native = isReactEvent(event) ? event.nativeEvent : event;\n const eventDetails = createChangeEventDetails(REASONS.escapeKey, native);\n store.setOpen(false, eventDetails);\n if (!eventDetails.isCanceled) {\n event.preventDefault();\n }\n if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {\n event.stopPropagation();\n }\n });\n const markInsideReactTree = useStableCallback(() => {\n dataRef.current.insideReactTree = true;\n clearInsideReactTreeTimeout.start(0, clearInsideReactTree);\n });\n const markPressStartedInsideReactTree = useStableCallback(event => {\n if (!open || !enabled || event.button !== 0) {\n return;\n }\n const target = getTarget(event.nativeEvent);\n\n // Only treat presses that start within the floating DOM subtree as inside.\n // This avoids suppressing parent dismissal when interacting with nested portals.\n if (!contains(store.select('floatingElement'), target)) {\n return;\n }\n if (!pressStartedInsideRef.current) {\n pressStartedInsideRef.current = true;\n pressStartPreventedRef.current = false;\n }\n });\n const markInsidePressStartPrevented = useStableCallback(event => {\n if (!open || !enabled) {\n return;\n }\n if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {\n return;\n }\n if (pressStartedInsideRef.current) {\n pressStartPreventedRef.current = true;\n }\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return clearInsideReactTree;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n const compositionTimeout = new Timeout();\n const preventedPressSuppressionTimeout = new Timeout();\n function handleCompositionStart() {\n compositionTimeout.clear();\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout.start(\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n platform.engine.webkit ? 5 : 0, () => {\n isComposingRef.current = false;\n });\n }\n function suppressImmediateOutsideClickAfterPreventedStart() {\n suppressNextOutsideClickRef.current = true;\n // Firefox can emit the synthetic outside click in a later task after\n // pointer lock exit, so microtask clearing is too early here.\n preventedPressSuppressionTimeout.start(0, () => {\n suppressNextOutsideClickRef.current = false;\n });\n }\n function resetPressStartState() {\n pressStartedInsideRef.current = false;\n pressStartPreventedRef.current = false;\n }\n function getOutsidePressEvent() {\n const type = currentPointerTypeRef.current;\n const computedType = type === 'pen' || !type ? 'mouse' : type;\n const outsidePressEventValue = getOutsidePressEventProp();\n const resolved = typeof outsidePressEventValue === 'function' ? outsidePressEventValue() : outsidePressEventValue;\n if (typeof resolved === 'string') {\n return resolved;\n }\n return resolved[computedType];\n }\n function shouldIgnoreEvent(event) {\n const computedOutsidePressEvent = getOutsidePressEvent();\n return computedOutsidePressEvent === 'intentional' && event.type !== 'click' || computedOutsidePressEvent === 'sloppy' && event.type === 'click';\n }\n function isEventWithinFloatingTree(event) {\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some(node => isEventTargetWithin(event, node.context?.elements.floating));\n return isEventWithinOwnElements(event) || targetIsInsideChildren;\n }\n function closeOnPressOutside(event) {\n if (shouldIgnoreEvent(event)) {\n // A new press began outside the floating element and its trigger. Clear any\n // leftover drag-out suppression so this press's eventual click can dismiss.\n if (event.type !== 'click' && !isEventWithinOwnElements(event)) {\n preventedPressSuppressionTimeout.clear();\n suppressNextOutsideClickRef.current = false;\n }\n clearInsideReactTree();\n return;\n }\n if (dataRef.current.insideReactTree) {\n clearInsideReactTree();\n return;\n }\n const target = getTarget(event);\n const inertSelector = `[${createAttribute('inert')}]`;\n const targetRoot = isElement(target) ? target.getRootNode() : null;\n const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select('floatingElement'))).querySelectorAll(inertSelector));\n const triggers = store.context.triggerElements;\n\n // If another trigger is clicked, don't close the floating element.\n if (target && (triggers.hasElement(target) || triggers.hasMatchingElement(trigger => contains(trigger, target)))) {\n return;\n }\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, store.select('floatingElement')) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n markers.every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n // Skip for touch events: scrollbars don't receive touch events on most platforms\n if (isHTMLElement(target) && !('touches' in event)) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n if (isEventWithinFloatingTree(event)) {\n return;\n }\n\n // In intentional mode, a press that starts inside and ends outside gets\n // one suppressed outside click. Run this after inside-target checks so\n // inside clicks don't consume the one-shot suppression.\n if (getOutsidePressEvent() === 'intentional' && suppressNextOutsideClickRef.current) {\n preventedPressSuppressionTimeout.clear();\n suppressNextOutsideClickRef.current = false;\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n if (hasBlockingChild('__outsidePressBubbles')) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.outsidePress, event));\n clearInsideReactTree();\n }\n function handlePointerDown(event) {\n if (getOutsidePressEvent() !== 'sloppy' || event.pointerType === 'touch' || !store.select('open') || !enabled || isEventWithinOwnElements(event)) {\n return;\n }\n closeOnPressOutside(event);\n }\n function handleTouchStart(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !store.select('open') || !enabled || isEventWithinOwnElements(event)) {\n return;\n }\n const touch = event.touches[0];\n if (touch) {\n touchStateRef.current = {\n startTime: Date.now(),\n startX: touch.clientX,\n startY: touch.clientY,\n dismissOnTouchEnd: false,\n dismissOnMouseDown: true\n };\n cancelDismissOnEndTimeout.start(1000, () => {\n if (touchStateRef.current) {\n touchStateRef.current.dismissOnTouchEnd = false;\n touchStateRef.current.dismissOnMouseDown = false;\n }\n });\n }\n }\n function addTargetEventListenerOnce(event, listener) {\n const target = getTarget(event);\n if (!target) {\n return;\n }\n const unsubscribe = addEventListener(target, event.type, () => {\n listener(event);\n unsubscribe();\n });\n }\n function handleTouchStartCapture(event) {\n currentPointerTypeRef.current = 'touch';\n addTargetEventListenerOnce(event, handleTouchStart);\n }\n function closeOnPressOutsideCapture(event) {\n cancelDismissOnEndTimeout.clear();\n if (event.type === 'pointerdown') {\n currentPointerTypeRef.current = event.pointerType;\n }\n if (event.type === 'mousedown' && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {\n return;\n }\n addTargetEventListenerOnce(event, targetEvent => {\n if (targetEvent.type === 'pointerdown') {\n handlePointerDown(targetEvent);\n } else {\n closeOnPressOutside(targetEvent);\n }\n });\n }\n function handlePressEndCapture(event) {\n if (!pressStartedInsideRef.current) {\n return;\n }\n const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;\n resetPressStartState();\n if (getOutsidePressEvent() !== 'intentional') {\n return;\n }\n if (event.type === 'pointercancel') {\n if (pressStartedInsideDefaultPrevented) {\n suppressImmediateOutsideClickAfterPreventedStart();\n }\n return;\n }\n if (isEventWithinFloatingTree(event)) {\n return;\n }\n\n // If pointerdown was prevented, no click may be generated for that\n // interaction. However, Firefox may still emit an immediate click after\n // pointerup (e.g. NumberField scrub with pointer lock), so suppress for\n // one tick to absorb that synthetic click only.\n if (pressStartedInsideDefaultPrevented) {\n suppressImmediateOutsideClickAfterPreventedStart();\n return;\n }\n\n // Avoid suppressing when outsidePress explicitly ignores this target.\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n preventedPressSuppressionTimeout.clear();\n suppressNextOutsideClickRef.current = true;\n clearInsideReactTree();\n }\n function handleTouchMove(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventWithinOwnElements(event)) {\n return;\n }\n const touch = event.touches[0];\n if (!touch) {\n return;\n }\n const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);\n const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (distance > 5) {\n touchStateRef.current.dismissOnTouchEnd = true;\n }\n if (distance > 10) {\n closeOnPressOutside(event);\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n }\n function handleTouchMoveCapture(event) {\n addTargetEventListenerOnce(event, handleTouchMove);\n }\n function handleTouchEnd(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventWithinOwnElements(event)) {\n return;\n }\n if (touchStateRef.current.dismissOnTouchEnd) {\n closeOnPressOutside(event);\n }\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n function handleTouchEndCapture(event) {\n addTargetEventListenerOnce(event, handleTouchEnd);\n }\n const doc = ownerDocument(floatingElement);\n const unsubscribe = mergeCleanups(escapeKey && mergeCleanups(addEventListener(doc, 'keydown', closeOnEscapeKeyDown), addEventListener(doc, 'compositionstart', handleCompositionStart), addEventListener(doc, 'compositionend', handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, 'click', closeOnPressOutsideCapture, true), addEventListener(doc, 'pointerdown', closeOnPressOutsideCapture, true), addEventListener(doc, 'pointerup', handlePressEndCapture, true), addEventListener(doc, 'pointercancel', handlePressEndCapture, true), addEventListener(doc, 'mousedown', closeOnPressOutsideCapture, true), addEventListener(doc, 'mouseup', handlePressEndCapture, true), addEventListener(doc, 'touchstart', handleTouchStartCapture, true), addEventListener(doc, 'touchmove', handleTouchMoveCapture, true), addEventListener(doc, 'touchend', handleTouchEndCapture, true)));\n return () => {\n unsubscribe();\n compositionTimeout.clear();\n preventedPressSuppressionTimeout.clear();\n resetPressStartState();\n suppressNextOutsideClickRef.current = false;\n clearInsideReactTree();\n };\n }, [dataRef, floatingElement, escapeKey, outsidePressEnabled, outsidePress, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n onPointerDown: closeOnReferencePress,\n onClick: closeOnReferencePress\n }), [closeOnEscapeKeyDown, closeOnReferencePress]);\n const floating = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n // `onMouseDown` may be blocked if `event.preventDefault()` is called in\n // `onPointerDown`, such as with <NumberField.ScrubArea>.\n // See https://github.com/mui/base-ui/pull/3379\n onPointerDown: markInsidePressStartPrevented,\n onMouseDown: markInsidePressStartPrevented,\n onClickCapture: markInsideReactTree,\n onMouseDownCapture(event) {\n markInsideReactTree();\n markPressStartedInsideReactTree(event);\n },\n onPointerDownCapture(event) {\n markInsideReactTree();\n markPressStartedInsideReactTree(event);\n },\n onMouseUpCapture: markInsideReactTree,\n onTouchEndCapture: markInsideReactTree,\n onTouchMoveCapture: markInsideReactTree\n }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n trigger: reference\n } : {}, [enabled, reference, floating]);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAS,KAAc;CACrB,OAAO;AACT;AACA,SAAgB,EAAc,GAAc;CAC1C,OAAO;EACL,WAAW,OAAO,KAAiB,YAAY,IAAe,GAAc,aAAa;EACzF,cAAc,OAAO,KAAiB,YAAY,IAAe,GAAc,gBAAgB;CACjG;AACF;AAMA,SAAgB,EAAW,GAAS,KAAQ,CAAC,GAAG;CAC9C,IAAM,EACJ,aAAU,IACV,WAAA,IAAY,IACZ,cAAc,IAAmB,IACjC,uBAAoB,UACpB,qBAAiB,IACjB,YACA,oBACE,IACE,IAAQ,eAAe,IAAU,EAAQ,YAAY,GACrD,IAAO,EAAM,SAAS,MAAM,GAC5B,KAAkB,EAAM,SAAS,iBAAiB,GAClD,EACJ,eACE,EAAM,SACJ,IAAO,EAAgB,CAAY,GACnC,IAAiB,EAAkB,OAAO,KAAqB,aAAa,UAAyB,EAAK,GAC1GA,IAAe,OAAO,KAAqB,aAAa,IAAiB,GACzE,KAAsBA,MAAiB,IACvC,KAA2B,QAAwB,CAAiB,GACpE,EACJ,WAAW,GACX,cAAc,OACZ,EAAc,CAAO,GACnB,IAAwBC,EAAM,OAAO,EAAK,GAC1C,IAAyBA,EAAM,OAAO,EAAK,GAE3C,IAA8BA,EAAM,OAAO,EAAK,GAChD,IAAiBA,EAAM,OAAO,EAAK,GACnC,IAAwBA,EAAM,OAAO,EAAE,GACvC,IAAgBA,EAAM,OAAO,IAAI,GACjC,IAA4B,EAAW,GACvC,IAA8B,EAAW,GACzC,IAAuB,QAAwB;EAEnD,AADA,EAA4B,MAAM,GAClC,EAAQ,QAAQ,kBAAkB;CACpC,CAAC,GACK,IAAmB,GAAkB,MAAa;EACtD,IAAM,IAAS,EAAQ,QAAQ,iBAAiB;EAEhD,Q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CACX,IAAI,CAAC,GAAG;EAAC;EAAS;EAAW;CAAQ,CAAC;AACxC"}
|
|
1
|
+
{"version":3,"file":"index247.js","names":["React","React$1","FloatingNodeContext","FloatingTreeContext","useFloatingParentNodeId","useFloatingTree","contextTree","externalTree"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { FloatingTreeStore } from \"./FloatingTreeStore.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") FloatingNodeContext.displayName = \"FloatingNodeContext\";\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nif (process.env.NODE_ENV !== \"production\") FloatingTreeContext.displayName = \"FloatingTreeContext\";\nexport const useFloatingParentNodeId = () => React.useContext(FloatingNodeContext)?.id || null;\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nexport const useFloatingTree = externalTree => {\n const contextTree = React.useContext(FloatingTreeContext);\n return externalTree ?? contextTree;\n};\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nexport function useFloatingNodeId(externalTree) {\n const id = useId();\n const tree = useFloatingTree(externalTree);\n const parentId = useFloatingParentNodeId();\n useIsoLayoutEffect(() => {\n if (!id) {\n return undefined;\n }\n const node = {\n id,\n parentId\n };\n tree?.addNode(node);\n return () => {\n tree?.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/_jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingTree(props) {\n const {\n children,\n externalTree\n } = props;\n const tree = useRefWithInit(() => externalTree ?? new FloatingTreeStore()).current;\n return /*#__PURE__*/_jsx(FloatingTreeContext.Provider, {\n value: tree,\n children: children\n });\n}"],"ignoreList":[0],"mappings":";;;;AAQA,IAAME,IAAmC,gBAAM,cAAc,IAAI;AACjE,QAAA,IAAA,aAA6B,iBAAc,EAAoB,cAAc;AAC7E,IAAMC,IAAmC,gBAAM,cAAc,IAAI;AAMjE,QAAA,IAAA,aAA6B,iBAAc,EAAoB,cAAc;AAC7E,IAAaC,UAAgCJ,EAAM,WAAWE,CAAmB,CAAC,EAAE,MAAM,MAK7EG,KAAkB,MAAgB;CAC7C,IAAMC,IAAcN,EAAM,WAAWG,CAAmB;CACxD,OAAOI,KAAgBD;AACzB"}
|