@rpcbase/ui 0.235.0 → 0.236.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
- package/dist/components/Notifications/types.d.ts +11 -2
- package/dist/components/Notifications/types.d.ts.map +1 -1
- package/dist/index100.js +52 -5
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +3 -7
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +4 -5
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +15 -4
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +5 -4
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +7 -6
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +16 -145
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +4 -39
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +4 -4
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +5 -7
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +5 -13
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +4 -13
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +4 -7
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +6 -31
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +24 -10
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +6 -10
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +4 -8
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +6 -13
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +5 -101
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +5 -20
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +5 -53
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +4 -72
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +8 -9
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +5 -20
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +4 -16
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +4 -23
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +6 -6
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +145 -5
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +39 -23
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +5 -35
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +8 -16
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +13 -6
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +13 -4
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +7 -4
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +31 -4
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +10 -4
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +10 -3
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +8 -6
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +14 -24
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +101 -7
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +20 -7
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +53 -5
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +72 -3
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +9 -3
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +20 -4
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +16 -3
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +23 -4
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +6 -3
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +5 -3
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +23 -3
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +35 -6
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +16 -69
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +7 -2
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +4 -363
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +4 -261
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +4 -60
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +4 -46
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +3 -169
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +6 -109
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +24 -25
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +152 -144
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +8 -8
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +6 -4
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +5 -5
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +3 -4
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +3 -466
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +4 -185
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +3 -107
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +4 -262
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +3 -9
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +3 -42
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +3 -4
- package/dist/index170.js.map +1 -1
- package/dist/index172.js +9 -9
- package/dist/index175.js +1 -1
- package/dist/index176.js +4 -4
- package/dist/index178.js +1 -1
- package/dist/index182.js +1 -1
- package/dist/index184.js +12 -12
- package/dist/index185.js +1 -1
- package/dist/index187.js +6 -6
- package/dist/index189.js +6 -6
- package/dist/index190.js +5 -5
- package/dist/index193.js +3 -3
- package/dist/index194.js +5 -5
- package/dist/index196.js +20 -59
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +66 -8
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +6 -87
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +11 -19
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +48 -14
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +4 -6
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +29 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +16 -6
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +5 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +21 -6
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +51 -16
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +25 -4
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +41 -4
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +39 -12
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +45 -10
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +20 -13
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +70 -13
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +17 -4
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +11 -5
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +27 -6
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +13 -5
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +17 -53
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +36 -8
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +262 -4
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +278 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +68 -8
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +99 -4
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +83 -4
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +3 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +29 -10
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +16 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +35 -10
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +16 -10
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +3 -10
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +26 -9
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +28 -6
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +4 -6
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +78 -4
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +269 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +11 -6
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +10 -5
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +25 -16
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +16 -7
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +124 -9
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +5 -10
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +40 -21
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +65 -10
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +14 -10
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +7 -9
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +5 -4
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +3 -5
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +10 -16
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +7 -9
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +132 -17
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +397 -13
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +52 -12
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +10 -28
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +11 -12
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +13 -25
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +154 -5
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +31 -20
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +9 -66
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +48 -6
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +11 -11
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +42 -48
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +96 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +84 -27
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +103 -14
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +52 -5
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +11 -21
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +36 -50
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +8 -25
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +113 -38
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +17 -39
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +16 -45
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +3 -20
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +32 -66
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +20 -17
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +9 -11
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +8 -27
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +58 -13
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +8 -18
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +87 -36
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +18 -261
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +15 -277
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +5 -68
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +4 -98
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +6 -83
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +4 -3
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +6 -29
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +16 -16
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +5 -35
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +4 -16
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +12 -3
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +9 -26
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +13 -28
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +14 -4
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -78
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +5 -269
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -11
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +5 -10
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +53 -24
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +8 -16
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +4 -125
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +4 -5
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +8 -40
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +4 -65
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +5 -14
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +3 -7
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +10 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +9 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +9 -10
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +10 -7
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +10 -133
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +24 -24
- package/dist/index310.js +9 -399
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +6 -52
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +5 -11
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +4 -11
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +5 -13
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +6 -154
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +5 -30
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +19 -9
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +25 -45
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +16 -11
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +3 -3
- package/dist/index320.js +14 -42
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +7 -95
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +9 -85
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +9 -104
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +21 -52
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +10 -11
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +9 -37
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +8 -7
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +4 -116
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +5 -17
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +15 -14
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +9 -3
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +16 -34
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +15 -20
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +12 -9
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +29 -8
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +12 -8
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +25 -11
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +5 -8
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +8 -13
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +11 -3
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +8 -3
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +12 -16
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +3 -19
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +3 -28
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +16 -15
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +2 -2
- package/dist/index347.js +5 -122
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +121 -31
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +31 -72
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +70 -139
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +116 -35
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +56 -44
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +49 -14
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +15 -6
- package/dist/index354.js.map +1 -1
- package/dist/index359.js +4 -5
- package/dist/index359.js.map +1 -1
- package/dist/index360.js +11 -17
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +16 -12
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +5 -11
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +19 -15
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +45 -6
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +18 -4
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +5 -21
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +200 -44
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +77 -17
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +21 -5
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +4 -200
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +18 -78
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +12 -20
- package/dist/index372.js.map +1 -1
- package/dist/index374.js +3 -3
- package/dist/index375.js +1 -1
- package/dist/index376.js +3 -3
- package/dist/index378.js +2 -2
- package/dist/index380.js +1 -1
- package/dist/index381.js +2 -2
- package/dist/index384.js +2 -2
- package/dist/index386.js +1 -1
- package/dist/index387.js +3 -5
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +3 -5
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +5 -4
- package/dist/index389.js.map +1 -1
- package/dist/index390.js +4 -15
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +4 -9
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +15 -5
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +8 -4
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +5 -545
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +5 -47
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +543 -15
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +47 -6
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +17 -7
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +5 -6
- package/dist/index399.js.map +1 -1
- package/dist/index400.js +7 -7
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +6 -11
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +7 -8
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +11 -12
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +9 -3
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +13 -3
- package/dist/index405.js.map +1 -1
- package/dist/index407.js +1 -1
- package/dist/index408.js +7 -4
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +2 -56
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +43 -67
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +56 -31
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +8 -9
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +2 -153
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +54 -107
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +55 -7
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +5 -2
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +54 -42
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +68 -56
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +31 -8
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +9 -2
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +152 -54
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +108 -56
- package/dist/index422.js.map +1 -1
- package/dist/index423.js +2 -16
- package/dist/index423.js.map +1 -1
- package/dist/index424.js +2 -29
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +2 -13
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +2 -7
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +16 -2
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +29 -2
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +13 -2
- package/dist/index429.js.map +1 -1
- package/dist/index430.js +7 -2
- package/dist/index430.js.map +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.js +2 -2
- package/dist/index48.js +2 -2
- package/dist/index49.js +28 -28
- package/dist/index50.js +21 -21
- package/dist/index51.js +1 -1
- package/dist/index52.js +8 -8
- package/dist/index53.js +2 -2
- package/dist/index55.js +17 -17
- package/dist/index56.js +4 -4
- package/dist/index57.js +3 -3
- package/dist/index58.js +7 -7
- package/dist/index59.js +4 -4
- package/dist/index60.js +12 -12
- package/dist/index61.js +2 -2
- package/dist/index62.js +2 -2
- package/dist/index70.js +1 -1
- package/dist/index71.js +1 -1
- package/dist/index74.js +6 -2
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +8 -2
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +5 -5
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +2 -8
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +2 -6
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +6 -52
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +68 -4
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +2 -5
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +363 -15
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +261 -5
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +60 -7
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +46 -16
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +169 -4
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +109 -4
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +24 -5
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +8 -6
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +4 -4
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +5 -4
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +4 -6
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +466 -24
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +185 -6
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +107 -4
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +262 -6
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +9 -5
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +42 -4
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +4 -5
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index219.js
CHANGED
|
@@ -1,8 +1,266 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { isWebKit as Ae, isElement as v, isShadowRoot as Be, isLastTraversableNode as Z, getParentNode as Ne, isHTMLElement as Le, getComputedStyle as Fe } from "./index249.js";
|
|
3
|
+
import { addEventListener as u } from "./index240.js";
|
|
4
|
+
import { mergeCleanups as z } from "./index373.js";
|
|
5
|
+
import { useTimeout as de, Timeout as pe } from "./index225.js";
|
|
6
|
+
import { useStableCallback as y } from "./index202.js";
|
|
7
|
+
import { ownerDocument as me } from "./index224.js";
|
|
8
|
+
import { isEventTargetWithin as f, isRootElement as $e } from "./index230.js";
|
|
9
|
+
import { isReactEvent as qe } from "./index375.js";
|
|
10
|
+
import { getNodeChildren as ee } from "./index377.js";
|
|
11
|
+
import { useFloatingTree as Ve } from "./index382.js";
|
|
12
|
+
import { createChangeEventDetails as A } from "./index175.js";
|
|
13
|
+
import { createAttribute as Ue } from "./index379.js";
|
|
14
|
+
import { getTarget as te, contains as B } from "./index231.js";
|
|
15
|
+
import { triggerPress as he, escapeKey as je, outsidePress as Ge } from "./index177.js";
|
|
16
|
+
const Je = {
|
|
17
|
+
intentional: "onClick",
|
|
18
|
+
sloppy: "onPointerDown"
|
|
19
|
+
};
|
|
20
|
+
function Qe() {
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function Ze(d) {
|
|
24
|
+
return {
|
|
25
|
+
escapeKey: typeof d == "boolean" ? d : d?.escapeKey ?? !1,
|
|
26
|
+
outsidePress: typeof d == "boolean" ? d : d?.outsidePress ?? !0
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function pt(d, Ee = {}) {
|
|
30
|
+
const n = "rootStore" in d ? d.rootStore : d, S = n.useState("open"), ne = n.useState("floatingElement"), {
|
|
31
|
+
dataRef: m
|
|
32
|
+
} = n.context, {
|
|
33
|
+
enabled: h = !0,
|
|
34
|
+
escapeKey: N = !0,
|
|
35
|
+
outsidePress: x = !0,
|
|
36
|
+
outsidePressEvent: ge = "sloppy",
|
|
37
|
+
referencePress: ye = Qe,
|
|
38
|
+
referencePressEvent: L = "sloppy",
|
|
39
|
+
bubbles: Pe,
|
|
40
|
+
externalTree: Re
|
|
41
|
+
} = Ee, P = Ve(Re), Te = y(typeof x == "function" ? x : () => !1), R = typeof x == "function" ? Te : x, re = R !== !1, se = y(() => ge), O = a.useRef(!1), X = a.useRef(!1), b = a.useRef(!1), {
|
|
42
|
+
escapeKey: W,
|
|
43
|
+
outsidePress: oe
|
|
44
|
+
} = Ze(Pe), s = a.useRef(null), D = de(), ce = de(), E = y(() => {
|
|
45
|
+
ce.clear(), m.current.insideReactTree = !1;
|
|
46
|
+
}), F = a.useRef(!1), $ = a.useRef(""), q = y(ye), w = y((r) => {
|
|
47
|
+
if (!S || !h || !N || r.key !== "Escape" || F.current)
|
|
48
|
+
return;
|
|
49
|
+
const g = m.current.floatingContext?.nodeId, Y = P ? ee(P.nodesRef.current, g) : [];
|
|
50
|
+
if (!W && Y.length > 0) {
|
|
51
|
+
let M = !0;
|
|
52
|
+
if (Y.forEach((p) => {
|
|
53
|
+
p.context?.open && !p.context.dataRef.current.__escapeKeyBubbles && (M = !1);
|
|
54
|
+
}), !M)
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const G = qe(r) ? r.nativeEvent : r, I = A(je, G);
|
|
58
|
+
n.setOpen(!1, I), !W && !I.isPropagationAllowed && r.stopPropagation();
|
|
59
|
+
}), T = y(() => {
|
|
60
|
+
m.current.insideReactTree = !0, ce.start(0, E);
|
|
61
|
+
});
|
|
62
|
+
a.useEffect(() => {
|
|
63
|
+
if (!S || !h)
|
|
64
|
+
return;
|
|
65
|
+
m.current.__escapeKeyBubbles = W, m.current.__outsidePressBubbles = oe;
|
|
66
|
+
const r = new pe(), g = new pe();
|
|
67
|
+
function Y() {
|
|
68
|
+
r.clear(), F.current = !0;
|
|
69
|
+
}
|
|
70
|
+
function G() {
|
|
71
|
+
r.start(
|
|
72
|
+
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
73
|
+
// Only apply to WebKit for the test to remain 0ms.
|
|
74
|
+
Ae() ? 5 : 0,
|
|
75
|
+
() => {
|
|
76
|
+
F.current = !1;
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function I() {
|
|
81
|
+
b.current = !0, g.start(0, () => {
|
|
82
|
+
b.current = !1;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function M() {
|
|
86
|
+
O.current = !1, X.current = !1;
|
|
87
|
+
}
|
|
88
|
+
function p() {
|
|
89
|
+
const e = $.current, t = e === "pen" || !e ? "mouse" : e, o = se(), c = typeof o == "function" ? o() : o;
|
|
90
|
+
return typeof c == "string" ? c : c[t];
|
|
91
|
+
}
|
|
92
|
+
function be(e) {
|
|
93
|
+
const t = p();
|
|
94
|
+
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
95
|
+
}
|
|
96
|
+
function ue(e) {
|
|
97
|
+
const t = m.current.floatingContext?.nodeId, o = P && ee(P.nodesRef.current, t).some((c) => f(e, c.context?.elements.floating));
|
|
98
|
+
return f(e, n.select("floatingElement")) || f(e, n.select("domReferenceElement")) || o;
|
|
99
|
+
}
|
|
100
|
+
function _(e) {
|
|
101
|
+
if (be(e)) {
|
|
102
|
+
E();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (m.current.insideReactTree) {
|
|
106
|
+
E();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const t = te(e), o = `[${Ue("inert")}]`, c = v(t) ? t.getRootNode() : null, k = Array.from((Be(c) ? c : me(n.select("floatingElement"))).querySelectorAll(o)), le = n.context.triggerElements;
|
|
110
|
+
if (t && (le.hasElement(t) || le.hasMatchingElement((i) => B(i, t))))
|
|
111
|
+
return;
|
|
112
|
+
let K = v(t) ? t : null;
|
|
113
|
+
for (; K && !Z(K); ) {
|
|
114
|
+
const i = Ne(K);
|
|
115
|
+
if (Z(i) || !v(i))
|
|
116
|
+
break;
|
|
117
|
+
K = i;
|
|
118
|
+
}
|
|
119
|
+
if (k.length && v(t) && !$e(t) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
120
|
+
!B(t, n.select("floatingElement")) && // If the target root element contains none of the markers, then the
|
|
121
|
+
// element was injected after the floating element rendered.
|
|
122
|
+
k.every((i) => !B(K, i)))
|
|
123
|
+
return;
|
|
124
|
+
if (Le(t) && !("touches" in e)) {
|
|
125
|
+
const i = Z(t), C = Fe(t), fe = /auto|scroll/, xe = i || fe.test(C.overflowX), Xe = i || fe.test(C.overflowY), We = xe && t.clientWidth > 0 && t.scrollWidth > t.clientWidth, Ye = Xe && t.clientHeight > 0 && t.scrollHeight > t.clientHeight, _e = C.direction === "rtl", He = Ye && (_e ? e.offsetX <= t.offsetWidth - t.clientWidth : e.offsetX > t.clientWidth), ve = We && e.offsetY > t.clientHeight;
|
|
126
|
+
if (He || ve)
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (ue(e))
|
|
130
|
+
return;
|
|
131
|
+
if (p() === "intentional" && b.current) {
|
|
132
|
+
g.clear(), b.current = !1;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (typeof R == "function" && !R(e))
|
|
136
|
+
return;
|
|
137
|
+
const Ke = m.current.floatingContext?.nodeId, ae = P ? ee(P.nodesRef.current, Ke) : [];
|
|
138
|
+
if (ae.length > 0) {
|
|
139
|
+
let i = !0;
|
|
140
|
+
if (ae.forEach((C) => {
|
|
141
|
+
C.context?.open && !C.context.dataRef.current.__outsidePressBubbles && (i = !1);
|
|
142
|
+
}), !i)
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
n.setOpen(!1, A(Ge, e)), E();
|
|
146
|
+
}
|
|
147
|
+
function we(e) {
|
|
148
|
+
p() !== "sloppy" || e.pointerType === "touch" || !n.select("open") || !h || f(e, n.select("floatingElement")) || f(e, n.select("domReferenceElement")) || _(e);
|
|
149
|
+
}
|
|
150
|
+
function Ce(e) {
|
|
151
|
+
if (p() !== "sloppy" || !n.select("open") || !h || f(e, n.select("floatingElement")) || f(e, n.select("domReferenceElement")))
|
|
152
|
+
return;
|
|
153
|
+
const t = e.touches[0];
|
|
154
|
+
t && (s.current = {
|
|
155
|
+
startTime: Date.now(),
|
|
156
|
+
startX: t.clientX,
|
|
157
|
+
startY: t.clientY,
|
|
158
|
+
dismissOnTouchEnd: !1,
|
|
159
|
+
dismissOnMouseDown: !0
|
|
160
|
+
}, D.start(1e3, () => {
|
|
161
|
+
s.current && (s.current.dismissOnTouchEnd = !1, s.current.dismissOnMouseDown = !1);
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
function H(e, t) {
|
|
165
|
+
const o = te(e);
|
|
166
|
+
if (!o)
|
|
167
|
+
return;
|
|
168
|
+
const c = u(o, e.type, () => {
|
|
169
|
+
t(e), c();
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function Se(e) {
|
|
173
|
+
$.current = "touch", H(e, Ce);
|
|
174
|
+
}
|
|
175
|
+
function J(e) {
|
|
176
|
+
D.clear(), e.type === "pointerdown" && ($.current = e.pointerType), !(e.type === "mousedown" && s.current && !s.current.dismissOnMouseDown) && H(e, (t) => {
|
|
177
|
+
t.type === "pointerdown" ? we(t) : _(t);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function Q(e) {
|
|
181
|
+
if (!O.current)
|
|
182
|
+
return;
|
|
183
|
+
const t = X.current;
|
|
184
|
+
if (M(), p() === "intentional") {
|
|
185
|
+
if (e.type === "pointercancel") {
|
|
186
|
+
t && I();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (!ue(e)) {
|
|
190
|
+
if (t) {
|
|
191
|
+
I();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
typeof R == "function" && !R(e) || (g.clear(), b.current = !0, E());
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function Oe(e) {
|
|
199
|
+
if (p() !== "sloppy" || !s.current || f(e, n.select("floatingElement")) || f(e, n.select("domReferenceElement")))
|
|
200
|
+
return;
|
|
201
|
+
const t = e.touches[0];
|
|
202
|
+
if (!t)
|
|
203
|
+
return;
|
|
204
|
+
const o = Math.abs(t.clientX - s.current.startX), c = Math.abs(t.clientY - s.current.startY), k = Math.sqrt(o * o + c * c);
|
|
205
|
+
k > 5 && (s.current.dismissOnTouchEnd = !0), k > 10 && (_(e), D.clear(), s.current = null);
|
|
206
|
+
}
|
|
207
|
+
function De(e) {
|
|
208
|
+
H(e, Oe);
|
|
209
|
+
}
|
|
210
|
+
function Ie(e) {
|
|
211
|
+
p() !== "sloppy" || !s.current || f(e, n.select("floatingElement")) || f(e, n.select("domReferenceElement")) || (s.current.dismissOnTouchEnd && _(e), D.clear(), s.current = null);
|
|
212
|
+
}
|
|
213
|
+
function Me(e) {
|
|
214
|
+
H(e, Ie);
|
|
215
|
+
}
|
|
216
|
+
const l = me(ne), ke = z(N && z(u(l, "keydown", w), u(l, "compositionstart", Y), u(l, "compositionend", G)), re && z(u(l, "click", J, !0), u(l, "pointerdown", J, !0), u(l, "pointerup", Q, !0), u(l, "pointercancel", Q, !0), u(l, "mousedown", J, !0), u(l, "mouseup", Q, !0), u(l, "touchstart", Se, !0), u(l, "touchmove", De, !0), u(l, "touchend", Me, !0)));
|
|
217
|
+
return () => {
|
|
218
|
+
ke(), r.clear(), g.clear(), M(), b.current = !1;
|
|
219
|
+
};
|
|
220
|
+
}, [m, ne, N, re, R, S, h, W, oe, w, E, se, P, n, D]), a.useEffect(E, [R, E]);
|
|
221
|
+
const V = a.useMemo(() => ({
|
|
222
|
+
onKeyDown: w,
|
|
223
|
+
[Je[L]]: (r) => {
|
|
224
|
+
q() && n.setOpen(!1, A(he, r.nativeEvent));
|
|
225
|
+
},
|
|
226
|
+
...L !== "intentional" && {
|
|
227
|
+
onClick(r) {
|
|
228
|
+
q() && n.setOpen(!1, A(he, r.nativeEvent));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}), [w, n, L, q]), U = y((r) => {
|
|
232
|
+
if (!S || !h || r.button !== 0)
|
|
233
|
+
return;
|
|
234
|
+
const g = te(r.nativeEvent);
|
|
235
|
+
B(n.select("floatingElement"), g) && (O.current || (O.current = !0, X.current = !1));
|
|
236
|
+
}), j = y((r) => {
|
|
237
|
+
!S || !h || (r.defaultPrevented || r.nativeEvent.defaultPrevented) && O.current && (X.current = !0);
|
|
238
|
+
}), ie = a.useMemo(() => ({
|
|
239
|
+
onKeyDown: w,
|
|
240
|
+
// `onMouseDown` may be blocked if `event.preventDefault()` is called in
|
|
241
|
+
// `onPointerDown`, such as with <NumberField.ScrubArea>.
|
|
242
|
+
// See https://github.com/mui/base-ui/pull/3379
|
|
243
|
+
onPointerDown: j,
|
|
244
|
+
onMouseDown: j,
|
|
245
|
+
onClickCapture: T,
|
|
246
|
+
onMouseDownCapture(r) {
|
|
247
|
+
T(), U(r);
|
|
248
|
+
},
|
|
249
|
+
onPointerDownCapture(r) {
|
|
250
|
+
T(), U(r);
|
|
251
|
+
},
|
|
252
|
+
onMouseUpCapture: T,
|
|
253
|
+
onTouchEndCapture: T,
|
|
254
|
+
onTouchMoveCapture: T
|
|
255
|
+
}), [w, T, U, j]);
|
|
256
|
+
return a.useMemo(() => h ? {
|
|
257
|
+
reference: V,
|
|
258
|
+
floating: ie,
|
|
259
|
+
trigger: V
|
|
260
|
+
} : {}, [h, V, ie]);
|
|
4
261
|
}
|
|
5
262
|
export {
|
|
6
|
-
|
|
263
|
+
Ze as normalizeProp,
|
|
264
|
+
pt as useDismiss
|
|
7
265
|
};
|
|
8
266
|
//# sourceMappingURL=index219.js.map
|
package/dist/index219.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index219.js","sources":["../../../node_modules/date-fns/getMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n"],"names":["getMonth","date","options","toDate"],"mappings":";AAwBO,SAASA,EAASC,GAAMC,GAAS;AACtC,SAAOC,EAAOF,GAAMC,GAAS,EAAE,EAAE,SAAQ;AAC3C;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index219.js","sources":["../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode, isShadowRoot, isWebKit } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { Timeout, useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { contains, getTarget, isEventTargetWithin, isRootElement } from \"../utils/element.js\";\nimport { isReactEvent } from \"../utils/event.js\";\nimport { getNodeChildren } from \"../utils/nodes.js\";\n\n/* eslint-disable no-underscore-dangle */\n\nimport { useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../internals/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nconst bubbleHandlerKeys = {\n intentional: 'onClick',\n sloppy: 'onPointerDown'\n};\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 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 {\n enabled = true,\n escapeKey = true,\n outsidePress: outsidePressProp = true,\n outsidePressEvent = 'sloppy',\n referencePress = alwaysFalse,\n referencePressEvent = 'sloppy',\n bubbles,\n externalTree\n } = props;\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 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 {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\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 isComposingRef = React.useRef(false);\n const currentPointerTypeRef = React.useRef('');\n const isReferencePressEnabled = useStableCallback(referencePress);\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 const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n const native = isReactEvent(event) ? event.nativeEvent : event;\n const eventDetails = createChangeEventDetails(REASONS.escapeKey, native);\n store.setOpen(false, eventDetails);\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 React.useEffect(() => {\n if (!open || !enabled) {\n return undefined;\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 isWebKit() ? 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 isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement')) || targetIsInsideChildren;\n }\n function closeOnPressOutside(event) {\n if (shouldIgnoreEvent(event)) {\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 const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\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 || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n closeOnPressOutside(event);\n }\n function handleTouchStart(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !store.select('open') || !enabled || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\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 || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\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 || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\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 };\n }, [dataRef, floatingElement, escapeKey, outsidePressEnabled, outsidePress, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, tree, store, cancelDismissOnEndTimeout]);\n React.useEffect(clearInsideReactTree, [outsidePress, clearInsideReactTree]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n if (!isReferencePressEnabled()) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n },\n ...(referencePressEvent !== 'intentional' && {\n onClick(event) {\n if (!isReferencePressEnabled()) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n }\n })\n }), [closeOnEscapeKeyDown, store, referencePressEvent, isReferencePressEnabled]);\n const markPressStartedInsideReactTree = useStableCallback(event => {\n if (!open || !enabled || event.button !== 0) {\n return;\n }\n const target = getTarget(event.nativeEvent);\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 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}"],"names":["bubbleHandlerKeys","alwaysFalse","normalizeProp","normalizable","useDismiss","context","props","store","open","floatingElement","dataRef","enabled","escapeKey","outsidePressProp","outsidePressEvent","referencePress","referencePressEvent","bubbles","externalTree","tree","useFloatingTree","outsidePressFn","useStableCallback","outsidePress","outsidePressEnabled","getOutsidePressEventProp","pressStartedInsideRef","React","pressStartPreventedRef","suppressNextOutsideClickRef","escapeKeyBubbles","outsidePressBubbles","touchStateRef","cancelDismissOnEndTimeout","useTimeout","clearInsideReactTreeTimeout","clearInsideReactTree","isComposingRef","currentPointerTypeRef","isReferencePressEnabled","closeOnEscapeKeyDown","event","nodeId","children","getNodeChildren","shouldDismiss","child","native","isReactEvent","eventDetails","createChangeEventDetails","REASONS.escapeKey","markInsideReactTree","compositionTimeout","Timeout","preventedPressSuppressionTimeout","handleCompositionStart","handleCompositionEnd","isWebKit","suppressImmediateOutsideClickAfterPreventedStart","resetPressStartState","getOutsidePressEvent","type","computedType","outsidePressEventValue","resolved","shouldIgnoreEvent","computedOutsidePressEvent","isEventWithinFloatingTree","targetIsInsideChildren","node","isEventTargetWithin","closeOnPressOutside","target","getTarget","inertSelector","createAttribute","targetRoot","isElement","markers","isShadowRoot","ownerDocument","triggers","trigger","contains","targetRootAncestor","isLastTraversableNode","nextParent","getParentNode","isRootElement","marker","isHTMLElement","lastTraversableNode","style","getComputedStyle","scrollRe","isScrollableX","isScrollableY","canScrollX","canScrollY","isRTL","pressedVerticalScrollbar","pressedHorizontalScrollbar","REASONS.outsidePress","handlePointerDown","handleTouchStart","touch","addTargetEventListenerOnce","listener","unsubscribe","addEventListener","handleTouchStartCapture","closeOnPressOutsideCapture","targetEvent","handlePressEndCapture","pressStartedInsideDefaultPrevented","handleTouchMove","deltaX","deltaY","distance","handleTouchMoveCapture","handleTouchEnd","handleTouchEndCapture","doc","mergeCleanups","reference","REASONS.triggerPress","markPressStartedInsideReactTree","markInsidePressStartPrevented","floating"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAMA,KAAoB;AAAA,EACxB,aAAa;AAAA,EACb,QAAQ;AACV;AACA,SAASC,KAAc;AACrB,SAAO;AACT;AACO,SAASC,GAAcC,GAAc;AAC1C,SAAO;AAAA,IACL,WAAW,OAAOA,KAAiB,YAAYA,IAAeA,GAAc,aAAa;AAAA,IACzF,cAAc,OAAOA,KAAiB,YAAYA,IAAeA,GAAc,gBAAg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GAAqBuB,CAAuB,CAAC,GACzEwF,IAAkCzG,EAAkB,CAAAmB,MAAS;AACjE,QAAI,CAACjC,KAAQ,CAACG,KAAW8B,EAAM,WAAW;AACxC;AAEF,UAAMgC,IAASC,GAAUjC,EAAM,WAAW;AAG1C,IAAK2C,EAAS7E,EAAM,OAAO,iBAAiB,GAAGkE,CAAM,MAGhD/C,EAAsB,YACzBA,EAAsB,UAAU,IAChCE,EAAuB,UAAU;AAAA,EAErC,CAAC,GACKoG,IAAgC1G,EAAkB,CAAAmB,MAAS;AAC/D,IAAI,CAACjC,KAAQ,CAACG,MAGR8B,EAAM,oBAAoBA,EAAM,YAAY,qBAG9Cf,EAAsB,YACxBE,EAAuB,UAAU;AAAA,EAErC,CAAC,GACKqG,KAAWtG,EAAM,QAAQ,OAAO;AAAA,IACpC,WAAWa;AAAA;AAAA;AAAA;AAAA,IAIX,eAAewF;AAAA,IACf,aAAaA;AAAA,IACb,gBAAgB5E;AAAA,IAChB,mBAAmBX,GAAO;AACxB,MAAAW,EAAmB,GACnB2E,EAAgCtF,CAAK;AAAA,IACvC;AAAA,IACA,qBAAqBA,GAAO;AAC1B,MAAAW,EAAmB,GACnB2E,EAAgCtF,CAAK;AAAA,IACvC;AAAA,IACA,kBAAkBW;AAAA,IAClB,mBAAmBA;AAAA,IACnB,oBAAoBA;AAAA,EACxB,IAAM,CAACZ,GAAsBY,GAAqB2E,GAAiCC,CAA6B,CAAC;AAC/G,SAAOrG,EAAM,QAAQ,MAAMhB,IAAU;AAAA,IACnC,WAAAkH;AAAA,IACA,UAAAI;AAAA,IACA,SAASJ;AAAA,EACb,IAAM,CAAA,GAAI,CAAClH,GAASkH,GAAWI,EAAQ,CAAC;AACxC;","x_google_ignoreList":[0]}
|
package/dist/index220.js
CHANGED
|
@@ -1,8 +1,282 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { isHTMLElement as Ce } from "./index249.js";
|
|
3
|
+
import { useValueAsRef as z } from "./index203.js";
|
|
4
|
+
import { useStableCallback as X } from "./index202.js";
|
|
5
|
+
import { useIsoLayoutEffect as A } from "./index201.js";
|
|
6
|
+
import { ownerDocument as Te } from "./index224.js";
|
|
7
|
+
import { getFloatingFocusElement as Ve, isTypeableCombobox as ze } from "./index230.js";
|
|
8
|
+
import { stopEvent as T, isVirtualClick as Ge, isVirtualPointerEvent as We } from "./index375.js";
|
|
9
|
+
import { isIndexOutOfListBounds as Fe, getMinListIndex as me, getMaxListIndex as Se, createGridCellMap as _e, isListIndexDisabled as pe, getGridNavigatedIndex as qe, getGridCellIndexOfCorner as He, getGridCellIndices as $e, findNonDisabledListIndex as Y } from "./index378.js";
|
|
10
|
+
import { useFloatingParentNodeId as Be, useFloatingTree as Qe } from "./index382.js";
|
|
11
|
+
import { createChangeEventDetails as Z } from "./index175.js";
|
|
12
|
+
import { enqueueFocus as Ue } from "./index380.js";
|
|
13
|
+
import { ARROW_DOWN as re, ARROW_LEFT as G, ARROW_RIGHT as W, ARROW_UP as Ae } from "./index385.js";
|
|
14
|
+
import { activeElement as ge, contains as Re, getTarget as je } from "./index231.js";
|
|
15
|
+
import { listNavigation as he, focusOut as Je } from "./index177.js";
|
|
16
|
+
const Xe = "Escape";
|
|
17
|
+
function te(c, p, u) {
|
|
18
|
+
switch (c) {
|
|
19
|
+
case "vertical":
|
|
20
|
+
return p;
|
|
21
|
+
case "horizontal":
|
|
22
|
+
return u;
|
|
23
|
+
default:
|
|
24
|
+
return p || u;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function ee(c, p) {
|
|
28
|
+
return te(p, c === Ae || c === re, c === G || c === W);
|
|
29
|
+
}
|
|
30
|
+
function Ie(c, p, u) {
|
|
31
|
+
return te(p, c === re, u ? c === G : c === W) || c === "Enter" || c === " " || c === "";
|
|
32
|
+
}
|
|
33
|
+
function Ye(c, p, u) {
|
|
34
|
+
return te(p, u ? c === G : c === W, c === re);
|
|
35
|
+
}
|
|
36
|
+
function Ze(c, p, u, i) {
|
|
37
|
+
const g = u ? c === W : c === G, E = c === Ae;
|
|
38
|
+
return p === "both" || p === "horizontal" && i && i > 1 ? c === Xe : te(p, g, E);
|
|
39
|
+
}
|
|
40
|
+
function pr(c, p) {
|
|
41
|
+
const u = "rootStore" in c ? c.rootStore : c, i = u.useState("open"), g = u.useState("floatingElement"), E = u.useState("domReferenceElement"), Ee = u.context.dataRef, {
|
|
42
|
+
listRef: o,
|
|
43
|
+
activeIndex: O,
|
|
44
|
+
onNavigate: Le = () => {
|
|
45
|
+
},
|
|
46
|
+
enabled: y = !0,
|
|
47
|
+
selectedIndex: L = null,
|
|
48
|
+
allowEscape: ne = !1,
|
|
49
|
+
loopFocus: _ = !1,
|
|
50
|
+
nested: b = !1,
|
|
51
|
+
rtl: x = !1,
|
|
52
|
+
virtual: d = !1,
|
|
53
|
+
focusItemOnOpen: M = "auto",
|
|
54
|
+
focusItemOnHover: oe = !0,
|
|
55
|
+
openOnArrowKeyDown: ce = !0,
|
|
56
|
+
disabledIndices: R = void 0,
|
|
57
|
+
orientation: m = "vertical",
|
|
58
|
+
parentOrientation: xe,
|
|
59
|
+
cols: F = 1,
|
|
60
|
+
id: Oe,
|
|
61
|
+
resetOnPointerLeave: Ne = !0,
|
|
62
|
+
externalTree: ke
|
|
63
|
+
} = p;
|
|
64
|
+
process.env.NODE_ENV !== "production" && (ne && (_ || console.warn("`useListNavigation` looping must be enabled to allow escaping."), d || console.warn("`useListNavigation` must be virtual to allow escaping.")), m === "vertical" && F > 1 && console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
|
|
65
|
+
const De = Ve(g), N = z(De), q = Be(), v = Qe(ke);
|
|
66
|
+
A(() => {
|
|
67
|
+
Ee.current.orientation = m;
|
|
68
|
+
}, [Ee, m]);
|
|
69
|
+
const ue = ze(E), P = f.useRef(M), n = f.useRef(L ?? -1), C = f.useRef(null), S = f.useRef(!0), a = X((e) => {
|
|
70
|
+
Le(n.current === -1 ? null : n.current, e);
|
|
71
|
+
}), ye = f.useRef(a), k = f.useRef(!!g), we = f.useRef(i), h = f.useRef(!1), H = f.useRef(!1), ie = f.useRef(null), se = z(R), $ = z(i), D = z(L), be = z(Ne), le = X(() => {
|
|
72
|
+
function e(l) {
|
|
73
|
+
d ? v?.events.emit("virtualfocus", l) : ie.current = Ue(l, {
|
|
74
|
+
sync: h.current,
|
|
75
|
+
preventScroll: !0
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const r = o.current[n.current], t = H.current;
|
|
79
|
+
r && e(r), (h.current ? (l) => l() : requestAnimationFrame)(() => {
|
|
80
|
+
const l = o.current[n.current] || r;
|
|
81
|
+
if (!l)
|
|
82
|
+
return;
|
|
83
|
+
r || e(l), // eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
84
|
+
fe && (t || !S.current) && l.scrollIntoView?.({
|
|
85
|
+
block: "nearest",
|
|
86
|
+
inline: "nearest"
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
A(() => {
|
|
91
|
+
y && (i && g ? (n.current = L ?? -1, P.current && L != null && (H.current = !0, a())) : k.current && (n.current = -1, ye.current()));
|
|
92
|
+
}, [y, i, g, L, a]), A(() => {
|
|
93
|
+
if (y) {
|
|
94
|
+
if (!i) {
|
|
95
|
+
h.current = !1;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (g)
|
|
99
|
+
if (O == null) {
|
|
100
|
+
if (h.current = !1, D.current != null)
|
|
101
|
+
return;
|
|
102
|
+
if (k.current && (n.current = -1, le()), (!we.current || !k.current) && P.current && (C.current != null || P.current === !0 && C.current == null)) {
|
|
103
|
+
let e = 0;
|
|
104
|
+
const r = () => {
|
|
105
|
+
o.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(r), e += 1) : (n.current = C.current == null || Ie(C.current, m, x) || b ? me(o) : Se(o), C.current = null, a());
|
|
106
|
+
};
|
|
107
|
+
r();
|
|
108
|
+
}
|
|
109
|
+
} else Fe(o.current, O) || (n.current = O, le(), H.current = !1);
|
|
110
|
+
}
|
|
111
|
+
}, [y, i, g, O, D, b, o, m, x, a, le, se]), A(() => {
|
|
112
|
+
if (!y || g || !v || d || !k.current)
|
|
113
|
+
return;
|
|
114
|
+
const e = v.nodesRef.current, r = e.find((l) => l.id === q)?.context?.elements.floating, t = ge(Te(g)), s = e.some((l) => l.context && Re(l.context.elements.floating, t));
|
|
115
|
+
r && !s && S.current && r.focus({
|
|
116
|
+
preventScroll: !0
|
|
117
|
+
});
|
|
118
|
+
}, [y, g, v, q, d]), A(() => {
|
|
119
|
+
ye.current = a, we.current = i, k.current = !!g;
|
|
120
|
+
}), A(() => {
|
|
121
|
+
i || (C.current = null, P.current = M);
|
|
122
|
+
}, [i, M]);
|
|
123
|
+
const Me = O != null, ae = X((e) => {
|
|
124
|
+
if (!$.current)
|
|
125
|
+
return;
|
|
126
|
+
const r = o.current.indexOf(e.currentTarget);
|
|
127
|
+
r !== -1 && (n.current !== r || O !== r) && (n.current = r, a(e));
|
|
128
|
+
}), fe = f.useMemo(() => ({
|
|
129
|
+
onFocus(r) {
|
|
130
|
+
h.current = !0, ae(r);
|
|
131
|
+
},
|
|
132
|
+
onClick: ({
|
|
133
|
+
currentTarget: r
|
|
134
|
+
}) => r.focus({
|
|
135
|
+
preventScroll: !0
|
|
136
|
+
}),
|
|
137
|
+
// Safari
|
|
138
|
+
onMouseMove(r) {
|
|
139
|
+
h.current = !0, H.current = !1, oe && ae(r);
|
|
140
|
+
},
|
|
141
|
+
onPointerLeave(r) {
|
|
142
|
+
if (!$.current || !S.current || r.pointerType === "touch")
|
|
143
|
+
return;
|
|
144
|
+
h.current = !0;
|
|
145
|
+
const t = r.relatedTarget;
|
|
146
|
+
if (!(!oe || o.current.includes(t)) && be.current && (ie.current?.(), ie.current = null, n.current = -1, a(r), !d)) {
|
|
147
|
+
const s = N.current, l = ge(Te(s));
|
|
148
|
+
s && Re(s, l) && s.focus({
|
|
149
|
+
preventScroll: !0
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}), [ae, $, N, oe, o, a, be, d]), B = f.useCallback(() => xe ?? v?.nodesRef.current.find((e) => e.id === q)?.context?.dataRef?.current.orientation, [q, v, xe]), K = X((e) => {
|
|
154
|
+
if (S.current = !1, h.current = !0, e.which === 229 || !$.current && e.currentTarget === N.current)
|
|
155
|
+
return;
|
|
156
|
+
if (b && Ze(e.key, m, x, F)) {
|
|
157
|
+
ee(e.key, B()) || T(e), u.setOpen(!1, Z(he, e.nativeEvent)), Ce(E) && (d ? v?.events.emit("virtualfocus", E) : E.focus());
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const r = n.current, t = me(o, R), s = Se(o, R);
|
|
161
|
+
if (ue || (e.key === "Home" && (T(e), n.current = t, a(e)), e.key === "End" && (T(e), n.current = s, a(e))), F > 1) {
|
|
162
|
+
const l = Array.from({
|
|
163
|
+
length: o.current.length
|
|
164
|
+
}, () => ({
|
|
165
|
+
width: 1,
|
|
166
|
+
height: 1
|
|
167
|
+
})), I = _e(l, F), j = I.findIndex((w) => w != null && !pe(o.current, w, R)), de = I.reduce((w, V, Ke) => V != null && !pe(o.current, V, R) ? Ke : w, -1), J = I[qe(I.map((w) => w != null ? o.current[w] : null), {
|
|
168
|
+
event: e,
|
|
169
|
+
orientation: m,
|
|
170
|
+
loopFocus: _,
|
|
171
|
+
rtl: x,
|
|
172
|
+
cols: F,
|
|
173
|
+
// treat undefined (empty grid spaces) as disabled indices so we
|
|
174
|
+
// don't end up in them
|
|
175
|
+
disabledIndices: $e([...(typeof R != "function" ? R : null) || o.current.map((w, V) => pe(o.current, V, R) ? V : void 0), void 0], I),
|
|
176
|
+
minIndex: j,
|
|
177
|
+
maxIndex: de,
|
|
178
|
+
prevIndex: He(
|
|
179
|
+
n.current > s ? t : n.current,
|
|
180
|
+
l,
|
|
181
|
+
I,
|
|
182
|
+
F,
|
|
183
|
+
// use a corner matching the edge closest to the direction
|
|
184
|
+
// we're moving in so we don't end up in the same item. Prefer
|
|
185
|
+
// top/left over bottom/right.
|
|
186
|
+
// eslint-disable-next-line no-nested-ternary
|
|
187
|
+
e.key === re ? "bl" : e.key === (x ? G : W) ? "tr" : "tl"
|
|
188
|
+
),
|
|
189
|
+
stopEvent: !0
|
|
190
|
+
})];
|
|
191
|
+
if (J != null && (n.current = J, a(e)), m === "both")
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (ee(e.key, m)) {
|
|
195
|
+
if (T(e), i && !d && ge(e.currentTarget.ownerDocument) === e.currentTarget) {
|
|
196
|
+
n.current = Ie(e.key, m, x) ? t : s, a(e);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
Ie(e.key, m, x) ? _ ? r >= s ? ne && r !== o.current.length ? n.current = -1 : (h.current = !1, n.current = t) : n.current = Y(o.current, {
|
|
200
|
+
startingIndex: r,
|
|
201
|
+
disabledIndices: R
|
|
202
|
+
}) : n.current = Math.min(s, Y(o.current, {
|
|
203
|
+
startingIndex: r,
|
|
204
|
+
disabledIndices: R
|
|
205
|
+
})) : _ ? r <= t ? ne && r !== -1 ? n.current = o.current.length : (h.current = !1, n.current = s) : n.current = Y(o.current, {
|
|
206
|
+
startingIndex: r,
|
|
207
|
+
decrement: !0,
|
|
208
|
+
disabledIndices: R
|
|
209
|
+
}) : n.current = Math.max(t, Y(o.current, {
|
|
210
|
+
startingIndex: r,
|
|
211
|
+
decrement: !0,
|
|
212
|
+
disabledIndices: R
|
|
213
|
+
})), Fe(o.current, n.current) && (n.current = -1), a(e);
|
|
214
|
+
}
|
|
215
|
+
}), Q = f.useMemo(() => d && i && Me && {
|
|
216
|
+
"aria-activedescendant": `${Oe}-${O}`
|
|
217
|
+
}, [d, i, Me, Oe, O]), ve = f.useMemo(() => ({
|
|
218
|
+
"aria-orientation": m === "both" ? void 0 : m,
|
|
219
|
+
...ue ? {} : Q,
|
|
220
|
+
onKeyDown(e) {
|
|
221
|
+
if (e.key === "Tab" && e.shiftKey && i && !d) {
|
|
222
|
+
const r = je(e.nativeEvent);
|
|
223
|
+
if (r && !Re(N.current, r))
|
|
224
|
+
return;
|
|
225
|
+
T(e), u.setOpen(!1, Z(Je, e.nativeEvent)), Ce(E) && E.focus();
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
K(e);
|
|
229
|
+
},
|
|
230
|
+
onPointerMove() {
|
|
231
|
+
S.current = !0;
|
|
232
|
+
}
|
|
233
|
+
}), [Q, K, N, m, ue, u, i, d, E]), U = f.useMemo(() => {
|
|
234
|
+
function e(t) {
|
|
235
|
+
M === "auto" && Ge(t.nativeEvent) && (P.current = !d);
|
|
236
|
+
}
|
|
237
|
+
function r(t) {
|
|
238
|
+
P.current = M, M === "auto" && We(t.nativeEvent) && (P.current = !0);
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
onKeyDown(t) {
|
|
242
|
+
const s = u.select("open");
|
|
243
|
+
S.current = !1;
|
|
244
|
+
const l = t.key.startsWith("Arrow"), I = Ye(t.key, B(), x), j = ee(t.key, m), de = (b ? I : j) || t.key === "Enter" || t.key.trim() === "";
|
|
245
|
+
if (d && s)
|
|
246
|
+
return K(t);
|
|
247
|
+
if (!(!s && !ce && l)) {
|
|
248
|
+
if (de) {
|
|
249
|
+
const J = ee(t.key, B());
|
|
250
|
+
C.current = b && J ? null : t.key;
|
|
251
|
+
}
|
|
252
|
+
if (b) {
|
|
253
|
+
I && (T(t), s ? (n.current = me(o, se.current), a(t)) : u.setOpen(!0, Z(he, t.nativeEvent, t.currentTarget)));
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
j && (D.current != null && (n.current = D.current), T(t), !s && ce ? u.setOpen(!0, Z(he, t.nativeEvent, t.currentTarget)) : K(t), s && a(t));
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
onFocus(t) {
|
|
260
|
+
u.select("open") && !d && (n.current = -1, a(t));
|
|
261
|
+
},
|
|
262
|
+
onPointerDown: r,
|
|
263
|
+
onPointerEnter: r,
|
|
264
|
+
onMouseDown: e,
|
|
265
|
+
onClick: e
|
|
266
|
+
};
|
|
267
|
+
}, [K, se, M, o, b, a, u, ce, m, B, x, D, d]), Pe = f.useMemo(() => ({
|
|
268
|
+
...Q,
|
|
269
|
+
...U
|
|
270
|
+
}), [Q, U]);
|
|
271
|
+
return f.useMemo(() => y ? {
|
|
272
|
+
reference: Pe,
|
|
273
|
+
floating: ve,
|
|
274
|
+
item: fe,
|
|
275
|
+
trigger: U
|
|
276
|
+
} : {}, [y, Pe, ve, U, fe]);
|
|
4
277
|
}
|
|
5
278
|
export {
|
|
6
|
-
|
|
279
|
+
Xe as ESCAPE,
|
|
280
|
+
pr as useListNavigation
|
|
7
281
|
};
|
|
8
282
|
//# sourceMappingURL=index220.js.map
|