@rpcbase/ui 0.253.0 → 0.255.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/types.d.ts +1 -0
- package/dist/components/Notifications/types.d.ts.map +1 -1
- package/dist/index105.js +36 -36
- package/dist/index117.js +6 -6
- package/dist/index120.js +10 -10
- package/dist/index122.js +2 -2
- package/dist/index123.js +3 -3
- package/dist/index124.js +1 -1
- package/dist/index126.js +2 -2
- package/dist/index128.js +2 -2
- package/dist/index167.js +3 -3
- package/dist/index171.js +58 -14
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +8 -68
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +87 -37
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +19 -13
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +16 -23
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +5 -111
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +6 -13
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +6 -4
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +5 -4
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +7 -5
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +16 -11
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +4 -19
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +5 -11
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +12 -176
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +9 -279
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +13 -4
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +14 -28
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +4 -126
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +5 -63
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +6 -8
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +6 -16
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +53 -29
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +8 -69
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +5 -20
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +4 -66
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +8 -6
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -5
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +4 -11
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +3 -3
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +10 -50
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +10 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +9 -29
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +10 -16
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +10 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +9 -21
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +6 -53
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +5 -20
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +4 -41
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +5 -39
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +7 -46
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +5 -20
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +13 -67
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +7 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +10 -3
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +10 -11
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +21 -13
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +8 -18
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +9 -36
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +9 -239
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +4 -252
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +5 -68
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +15 -98
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +9 -83
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +18 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +19 -28
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +12 -16
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +29 -34
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +12 -17
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +25 -3
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -26
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +14 -28
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +69 -4
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +38 -79
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +14 -273
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +23 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +111 -10
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +13 -26
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +4 -16
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +4 -126
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +5 -6
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +11 -65
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +20 -14
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +11 -8
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +176 -5
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +279 -3
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +4 -10
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +28 -8
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +124 -131
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +61 -397
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +9 -5
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +16 -53
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +30 -11
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +69 -27
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +20 -12
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +65 -57
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +6 -8
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -87
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +11 -19
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +3 -16
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +49 -4
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +4 -6
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +29 -6
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +16 -4
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +5 -6
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +21 -16
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +53 -4
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +20 -4
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +41 -12
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +39 -9
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +46 -14
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +20 -13
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +70 -4
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +17 -5
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +3 -6
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +11 -5
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -53
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +18 -8
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +36 -4
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +239 -4
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +252 -8
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +68 -4
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +99 -4
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +83 -3
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +3 -10
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +29 -9
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +16 -9
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +35 -11
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +17 -10
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +3 -9
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +26 -6
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +28 -5
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +4 -5
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +78 -5
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +272 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +11 -5
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +10 -16
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +25 -7
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +16 -10
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +124 -9
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +5 -21
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +65 -8
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +14 -10
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -9
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +5 -4
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +3 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +10 -16
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +7 -9
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +132 -17
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +397 -18
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +5 -13
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +52 -29
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +11 -12
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +27 -25
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +11 -5
- package/dist/index314.js.map +1 -1
- package/dist/index317.js +1 -1
- package/dist/index318.js +1 -1
- package/dist/index321.js +2 -2
- package/dist/index322.js +2 -2
- package/dist/index325.js +1 -1
- package/dist/index330.js +135 -3
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +17 -9
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +13 -133
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +3 -17
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +33 -12
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +19 -35
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +8 -20
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +24 -8
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +23 -19
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +14 -26
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +2 -2
- package/dist/index340.js +9 -16
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +4 -8
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +18 -12
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +12 -8
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +8 -13
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +11 -3
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +8 -3
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +12 -16
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +3 -5
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +3 -51
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +5 -5
- package/dist/index350.js +16 -60
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +49 -64
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +5 -8
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +62 -5
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +66 -11
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +8 -21
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +5 -17
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +12 -8
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +21 -144
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +14 -77
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +11 -11
- package/dist/index360.js +8 -62
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +145 -15
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +79 -5
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +62 -4
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +15 -3
- package/dist/index364.js.map +1 -1
- package/dist/index366.js +4 -21
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +6 -45
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +3 -18
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +21 -5
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +3 -3
- package/dist/index370.js +44 -200
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +17 -73
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +5 -124
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +200 -4
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +74 -18
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +123 -12
- package/dist/index375.js.map +1 -1
- package/dist/index378.js +4 -8
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +5 -27
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +4 -4
- package/dist/index380.js +4 -138
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +15 -12
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +8 -46
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +5 -3
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +4 -21
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +542 -72
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +46 -11
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +17 -3
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +5 -71
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +7 -35
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +5 -5
- package/dist/index390.js +7 -7
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +7 -15
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +12 -3
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +9 -3
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +12 -4
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +8 -4
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +27 -4
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +136 -14
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +12 -8
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +46 -5
- package/dist/index399.js.map +1 -1
- package/dist/index40.js +3 -3
- package/dist/index400.js +3 -4
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +20 -544
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +75 -46
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +12 -18
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +3 -5
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +71 -7
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +35 -6
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +7 -8
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +15 -11
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +3 -9
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +10 -10
- package/dist/index410.js +3 -13
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +4 -14
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +56 -3
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +66 -490
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +31 -8
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +9 -2
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +150 -41
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +108 -56
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +3 -8
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +15 -2
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +487 -50
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +7 -55
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +2 -33
- package/dist/index422.js.map +1 -1
- package/dist/index423.js +43 -4
- package/dist/index423.js.map +1 -1
- package/dist/index424.js +55 -55
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +8 -68
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +2 -31
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +55 -9
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +55 -152
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +32 -107
- package/dist/index429.js.map +1 -1
- package/dist/index430.js +16 -2
- package/dist/index430.js.map +1 -1
- package/dist/index431.js +29 -2
- package/dist/index431.js.map +1 -1
- package/dist/index432.js +13 -2
- package/dist/index432.js.map +1 -1
- package/dist/index433.js +7 -2
- package/dist/index433.js.map +1 -1
- package/dist/index434.js +2 -16
- package/dist/index434.js.map +1 -1
- package/dist/index435.js +2 -29
- package/dist/index435.js.map +1 -1
- package/dist/index436.js +2 -13
- package/dist/index436.js.map +1 -1
- package/dist/index437.js +2 -7
- package/dist/index437.js.map +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.js +2 -2
- package/dist/index49.js +36 -36
- package/dist/index50.js +29 -29
- package/dist/index51.js +2 -2
- package/dist/index52.js +12 -12
- package/dist/index53.js +4 -4
- package/dist/index54.js +1 -1
- package/dist/index55.js +21 -21
- package/dist/index56.js +5 -5
- package/dist/index57.js +5 -5
- package/dist/index58.js +8 -8
- package/dist/index59.js +5 -5
- package/dist/index60.js +17 -17
- package/dist/index61.js +5 -5
- package/dist/index62.js +3 -3
- package/dist/index66.js +1 -1
- package/dist/index67.js +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.js +1 -1
- package/dist/index72.js +2 -6
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +2 -8
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +2 -6
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +2 -2
- package/dist/index76.js +6 -2
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +8 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +6 -2
- package/dist/index78.js.map +1 -1
- package/package.json +1 -1
package/dist/index233.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index233.js","sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index233.js","sources":["../../../node_modules/@base-ui/react/utils/popupStateMapping.mjs"],"sourcesContent":["import { TransitionStatusDataAttributes } from \"../internals/stateAttributesMapping.mjs\";\nexport let CommonPopupDataAttributes = function (CommonPopupDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonPopupDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the popup is closed.\n */\n CommonPopupDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the popup is animating in.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the popup is animating out.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the anchor is hidden.\n */\n CommonPopupDataAttributes[\"anchorHidden\"] = \"data-anchor-hidden\";\n /**\n * Indicates which side the popup is positioned relative to the trigger.\n * @type { 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}\n */\n CommonPopupDataAttributes[\"side\"] = \"data-side\";\n /**\n * Indicates how the popup is aligned relative to specified side.\n * @type {'start' | 'center' | 'end'}\n */\n CommonPopupDataAttributes[\"align\"] = \"data-align\";\n return CommonPopupDataAttributes;\n}({});\nexport let CommonTriggerDataAttributes = /*#__PURE__*/function (CommonTriggerDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonTriggerDataAttributes[\"popupOpen\"] = \"data-popup-open\";\n /**\n * Present when a pressable trigger is pressed.\n */\n CommonTriggerDataAttributes[\"pressed\"] = \"data-pressed\";\n return CommonTriggerDataAttributes;\n}({});\nconst TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: ''\n};\nconst PRESSABLE_TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: '',\n [CommonTriggerDataAttributes.pressed]: ''\n};\nconst POPUP_OPEN_HOOK = {\n [CommonPopupDataAttributes.open]: ''\n};\nconst POPUP_CLOSED_HOOK = {\n [CommonPopupDataAttributes.closed]: ''\n};\nconst ANCHOR_HIDDEN_HOOK = {\n [CommonPopupDataAttributes.anchorHidden]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const pressableTriggerOpenStateMapping = {\n open(value) {\n if (value) {\n return PRESSABLE_TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const popupStateMapping = {\n open(value) {\n if (value) {\n return POPUP_OPEN_HOOK;\n }\n return POPUP_CLOSED_HOOK;\n },\n anchorHidden(value) {\n if (value) {\n return ANCHOR_HIDDEN_HOOK;\n }\n return null;\n }\n};"],"names":["CommonPopupDataAttributes","TransitionStatusDataAttributes","CommonTriggerDataAttributes","TRIGGER_HOOK","PRESSABLE_TRIGGER_HOOK","POPUP_OPEN_HOOK","POPUP_CLOSED_HOOK","ANCHOR_HIDDEN_HOOK","triggerOpenStateMapping","value","pressableTriggerOpenStateMapping","popupStateMapping"],"mappings":";AACU,IAACA,KAA4B,SAAUA,GAA2B;AAI1E,SAAAA,EAA0B,OAAU,aAIpCA,EAA0B,SAAY,eAItCA,EAA0BA,EAA0B,gBAAmBC,EAA+B,aAAa,IAAI,iBAIvHD,EAA0BA,EAA0B,cAAiBC,EAA+B,WAAW,IAAI,eAInHD,EAA0B,eAAkB,sBAK5CA,EAA0B,OAAU,aAKpCA,EAA0B,QAAW,cAC9BA;AACT,GAAE,CAAA,CAAE,GACOE,IAA2C,0BAAUA,GAA6B;AAI3F,SAAAA,EAA4B,YAAe,mBAI3CA,EAA4B,UAAa,gBAClCA;AACT,GAAE,CAAA,CAAE;AACJ,MAAMC,IAAe;AAAA,EACnB,CAACD,EAA4B,SAAS,GAAG;AAC3C,GACME,IAAyB;AAAA,EAC7B,CAACF,EAA4B,SAAS,GAAG;AAAA,EACzC,CAACA,EAA4B,OAAO,GAAG;AACzC,GACMG,IAAkB;AAAA,EACtB,CAACL,EAA0B,IAAI,GAAG;AACpC,GACMM,IAAoB;AAAA,EACxB,CAACN,EAA0B,MAAM,GAAG;AACtC,GACMO,IAAqB;AAAA,EACzB,CAACP,EAA0B,YAAY,GAAG;AAC5C,GACaQ,IAA0B;AAAA,EACrC,KAAKC,GAAO;AACV,WAAIA,IACKN,IAEF;AAAA,EACT;AACF,GACaO,IAAmC;AAAA,EAC9C,KAAKD,GAAO;AACV,WAAIA,IACKL,IAEF;AAAA,EACT;AACF,GACaO,IAAoB;AAAA,EAC/B,KAAKF,GAAO;AACV,WAAIA,IACKJ,IAEFC;AAAA,EACT;AAAA,EACA,aAAaG,GAAO;AAClB,WAAIA,IACKF,IAEF;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
|
package/dist/index234.js
CHANGED
|
@@ -1,276 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { autoUpdate as Ce } from "./index249.js";
|
|
14
|
-
import { getWindow as at } from "./index248.js";
|
|
15
|
-
function Te(a, u, h) {
|
|
16
|
-
const n = a === "inline-start" || a === "inline-end";
|
|
17
|
-
return {
|
|
18
|
-
top: "top",
|
|
19
|
-
right: n ? h ? "inline-start" : "inline-end" : "right",
|
|
20
|
-
bottom: "bottom",
|
|
21
|
-
left: n ? h ? "inline-end" : "inline-start" : "left"
|
|
22
|
-
}[u];
|
|
23
|
-
}
|
|
24
|
-
function Fe(a, u, h) {
|
|
25
|
-
const {
|
|
26
|
-
rects: n,
|
|
27
|
-
placement: c
|
|
28
|
-
} = a;
|
|
29
|
-
return {
|
|
30
|
-
side: Te(u, B(c), h),
|
|
31
|
-
align: Le(c) || "center",
|
|
32
|
-
anchor: {
|
|
33
|
-
width: n.reference.width,
|
|
34
|
-
height: n.reference.height
|
|
35
|
-
},
|
|
36
|
-
positioner: {
|
|
37
|
-
width: n.floating.width,
|
|
38
|
-
height: n.floating.height
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function Pt(a) {
|
|
43
|
-
const {
|
|
44
|
-
// Public parameters
|
|
45
|
-
anchor: u,
|
|
46
|
-
positionMethod: h = "absolute",
|
|
47
|
-
side: n = "bottom",
|
|
48
|
-
sideOffset: c = 0,
|
|
49
|
-
align: R = "center",
|
|
50
|
-
alignOffset: V = 0,
|
|
51
|
-
collisionBoundary: Z,
|
|
52
|
-
collisionPadding: ze = 5,
|
|
53
|
-
sticky: W = !1,
|
|
54
|
-
arrowPadding: ee = 5,
|
|
55
|
-
disableAnchorTracking: I = !1,
|
|
56
|
-
inline: te,
|
|
57
|
-
// Private parameters
|
|
58
|
-
keepMounted: D = !1,
|
|
59
|
-
floatingRootContext: k,
|
|
60
|
-
mounted: o,
|
|
61
|
-
collisionAvoidance: U,
|
|
62
|
-
shiftCrossAxis: P = !1,
|
|
63
|
-
nodeId: Be,
|
|
64
|
-
adaptiveOrigin: Y,
|
|
65
|
-
lazyFlip: ne = !1,
|
|
66
|
-
externalTree: Ve
|
|
67
|
-
} = a, [oe, ie] = d.useState(null);
|
|
68
|
-
!o && oe !== null && ie(null);
|
|
69
|
-
const O = U.side || "flip", v = U.align || "flip", We = U.fallbackAxisSide || "end", re = typeof u == "function" ? u : void 0, Ie = Qe(re), se = re ? Ie : u, C = z(u), Ue = z(o), y = Ze() === "rtl", ce = oe || {
|
|
70
|
-
top: "top",
|
|
71
|
-
right: "right",
|
|
72
|
-
bottom: "bottom",
|
|
73
|
-
left: "left",
|
|
74
|
-
"inline-end": y ? "left" : "right",
|
|
75
|
-
"inline-start": y ? "right" : "left"
|
|
76
|
-
}[n], Ye = R === "center" ? ce : `${ce}-${R}`;
|
|
77
|
-
let t = ze;
|
|
78
|
-
const p = 1, le = n === "bottom" ? p : 0, ae = n === "top" ? p : 0, fe = n === "right" ? p : 0, de = n === "left" ? p : 0;
|
|
79
|
-
typeof t == "number" ? t = {
|
|
80
|
-
top: t + le,
|
|
81
|
-
right: t + de,
|
|
82
|
-
bottom: t + ae,
|
|
83
|
-
left: t + fe
|
|
84
|
-
} : t && (t = {
|
|
85
|
-
top: (t.top || 0) + le,
|
|
86
|
-
right: (t.right || 0) + de,
|
|
87
|
-
bottom: (t.bottom || 0) + ae,
|
|
88
|
-
left: (t.left || 0) + fe
|
|
89
|
-
});
|
|
90
|
-
const F = {
|
|
91
|
-
boundary: Z === "clipping-ancestors" ? "clippingAncestors" : Z,
|
|
92
|
-
padding: t
|
|
93
|
-
}, x = d.useRef(null), X = z(c), j = z(V), Xe = typeof c != "function" ? c : 0, je = typeof V != "function" ? V : 0, b = [];
|
|
94
|
-
te && b.push(te), b.push(rt((e) => {
|
|
95
|
-
const i = Fe(e, n, y), l = typeof X.current == "function" ? X.current(i) : X.current, r = typeof j.current == "function" ? j.current(i) : j.current;
|
|
96
|
-
return {
|
|
97
|
-
mainAxis: l,
|
|
98
|
-
crossAxis: r,
|
|
99
|
-
alignmentAxis: r
|
|
100
|
-
};
|
|
101
|
-
}, [Xe, je, y, n]));
|
|
102
|
-
const ue = v === "none" && O !== "shift", pe = !ue && (W || P || O === "shift"), he = O === "none" ? null : ot({
|
|
103
|
-
...F,
|
|
104
|
-
// Ensure the popup flips if it's been limited by its --available-height and it resizes.
|
|
105
|
-
// Since the size() padding is smaller than the flip() padding, flip() will take precedence.
|
|
106
|
-
padding: {
|
|
107
|
-
top: t.top + p,
|
|
108
|
-
right: t.right + p,
|
|
109
|
-
bottom: t.bottom + p,
|
|
110
|
-
left: t.left + p
|
|
111
|
-
},
|
|
112
|
-
mainAxis: !P && O === "flip",
|
|
113
|
-
crossAxis: v === "flip" ? "alignment" : !1,
|
|
114
|
-
fallbackAxisSideDirection: We
|
|
115
|
-
}), me = ue ? null : st((e) => {
|
|
116
|
-
const i = ke(e.elements.floating).documentElement;
|
|
117
|
-
return {
|
|
118
|
-
...F,
|
|
119
|
-
// Use the Layout Viewport to avoid shifting around when pinch-zooming
|
|
120
|
-
// for context menus.
|
|
121
|
-
rootBoundary: P ? {
|
|
122
|
-
x: 0,
|
|
123
|
-
y: 0,
|
|
124
|
-
width: i.clientWidth,
|
|
125
|
-
height: i.clientHeight
|
|
126
|
-
} : void 0,
|
|
127
|
-
mainAxis: v !== "none",
|
|
128
|
-
crossAxis: pe,
|
|
129
|
-
limiter: W || P ? void 0 : ct((l) => {
|
|
130
|
-
if (!x.current)
|
|
131
|
-
return {};
|
|
132
|
-
const {
|
|
133
|
-
width: r,
|
|
134
|
-
height: f
|
|
135
|
-
} = x.current.getBoundingClientRect(), s = De(B(l.placement)), g = s === "y" ? r : f, S = s === "y" ? t.left + t.right : t.top + t.bottom;
|
|
136
|
-
return {
|
|
137
|
-
offset: g / 2 + S / 2
|
|
138
|
-
};
|
|
139
|
-
})
|
|
140
|
-
};
|
|
141
|
-
}, [F, W, P, t, v]);
|
|
142
|
-
O === "shift" || v === "shift" || R === "center" ? b.push(me, he) : b.push(he, me), b.push(it({
|
|
143
|
-
...F,
|
|
144
|
-
apply({
|
|
145
|
-
elements: {
|
|
146
|
-
floating: e
|
|
147
|
-
},
|
|
148
|
-
availableWidth: i,
|
|
149
|
-
availableHeight: l,
|
|
150
|
-
rects: r
|
|
151
|
-
}) {
|
|
152
|
-
if (!Ue.current)
|
|
153
|
-
return;
|
|
154
|
-
const f = e.style;
|
|
155
|
-
f.setProperty("--available-width", `${i}px`), f.setProperty("--available-height", `${l}px`);
|
|
156
|
-
const s = at(e).devicePixelRatio || 1, {
|
|
157
|
-
x: g,
|
|
158
|
-
y: S,
|
|
159
|
-
width: T,
|
|
160
|
-
height: G
|
|
161
|
-
} = r.reference, J = (Math.round((g + T) * s) - Math.round(g * s)) / s, K = (Math.round((S + G) * s) - Math.round(S * s)) / s;
|
|
162
|
-
f.setProperty("--anchor-width", `${J}px`), f.setProperty("--anchor-height", `${K}px`);
|
|
163
|
-
}
|
|
164
|
-
}), et((e) => ({
|
|
165
|
-
// `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
|
|
166
|
-
// we'll create a fake element.
|
|
167
|
-
element: x.current || ke(e.elements.floating).createElement("div"),
|
|
168
|
-
padding: ee,
|
|
169
|
-
offsetParent: "floating"
|
|
170
|
-
}), [ee]), {
|
|
171
|
-
name: "transformOrigin",
|
|
172
|
-
fn(e) {
|
|
173
|
-
const {
|
|
174
|
-
elements: i,
|
|
175
|
-
middlewareData: l,
|
|
176
|
-
placement: r,
|
|
177
|
-
rects: f,
|
|
178
|
-
y: s
|
|
179
|
-
} = e, g = B(r), S = De(g), T = x.current, G = l.arrow?.x || 0, J = l.arrow?.y || 0, K = T?.clientWidth || 0, _e = T?.clientHeight || 0, N = G + K / 2, Ee = J + _e / 2, qe = Math.abs(l.shift?.y || 0), Ge = f.reference.height / 2, E = typeof c == "function" ? c(Fe(e, n, y)) : c, Je = qe > E, Ke = {
|
|
180
|
-
top: `${N}px calc(100% + ${E}px)`,
|
|
181
|
-
bottom: `${N}px ${-E}px`,
|
|
182
|
-
left: `calc(100% + ${E}px) ${Ee}px`,
|
|
183
|
-
right: `${-E}px ${Ee}px`
|
|
184
|
-
}[g], Ne = `${N}px ${f.reference.y + Ge - s}px`;
|
|
185
|
-
return i.floating.style.setProperty("--transform-origin", pe && S === "y" && Je ? Ne : Ke), {};
|
|
186
|
-
}
|
|
187
|
-
}, tt, Y), Q(() => {
|
|
188
|
-
!o && k && k.update({
|
|
189
|
-
referenceElement: null,
|
|
190
|
-
floatingElement: null,
|
|
191
|
-
domReferenceElement: null,
|
|
192
|
-
positionReference: null
|
|
193
|
-
});
|
|
194
|
-
}, [o, k]);
|
|
195
|
-
const _ = d.useMemo(() => ({
|
|
196
|
-
elementResize: !I && typeof ResizeObserver < "u",
|
|
197
|
-
layoutShift: !I && typeof IntersectionObserver < "u"
|
|
198
|
-
}), [I]), {
|
|
199
|
-
refs: w,
|
|
200
|
-
elements: M,
|
|
201
|
-
x: ge,
|
|
202
|
-
y: ye,
|
|
203
|
-
middlewareData: A,
|
|
204
|
-
update: H,
|
|
205
|
-
placement: xe,
|
|
206
|
-
context: be,
|
|
207
|
-
isPositioned: m,
|
|
208
|
-
floatingStyles: we
|
|
209
|
-
} = lt({
|
|
210
|
-
rootContext: k,
|
|
211
|
-
open: D ? o : void 0,
|
|
212
|
-
placement: Ye,
|
|
213
|
-
middleware: b,
|
|
214
|
-
strategy: h,
|
|
215
|
-
whileElementsMounted: D ? void 0 : (...e) => Ce(...e, _),
|
|
216
|
-
nodeId: Be,
|
|
217
|
-
externalTree: Ve
|
|
218
|
-
}), {
|
|
219
|
-
sideX: Ae,
|
|
220
|
-
sideY: Se
|
|
221
|
-
} = A.adaptiveOrigin || nt, q = m ? h : "fixed", Re = d.useMemo(() => {
|
|
222
|
-
const e = Y ? {
|
|
223
|
-
position: q,
|
|
224
|
-
[Ae]: ge,
|
|
225
|
-
[Se]: ye
|
|
226
|
-
} : {
|
|
227
|
-
position: q,
|
|
228
|
-
...we
|
|
229
|
-
};
|
|
230
|
-
return m || (e.opacity = 0), e;
|
|
231
|
-
}, [Y, q, Ae, ge, Se, ye, we, m]), L = d.useRef(null);
|
|
232
|
-
Q(() => {
|
|
233
|
-
if (!o)
|
|
234
|
-
return;
|
|
235
|
-
const e = C.current, i = typeof e == "function" ? e() : e, r = (He(i) ? i.current : i) || null || null;
|
|
236
|
-
r !== L.current && (w.setPositionReference(r), L.current = r);
|
|
237
|
-
}, [o, w, se, C]), d.useEffect(() => {
|
|
238
|
-
if (!o)
|
|
239
|
-
return;
|
|
240
|
-
const e = C.current;
|
|
241
|
-
typeof e != "function" && He(e) && e.current !== L.current && (w.setPositionReference(e.current), L.current = e.current);
|
|
242
|
-
}, [o, w, se, C]), d.useEffect(() => {
|
|
243
|
-
if (D && o && M.reference && M.floating)
|
|
244
|
-
return Ce(M.reference, M.floating, H, _);
|
|
245
|
-
}, [D, o, M, H, _]);
|
|
246
|
-
const $ = B(xe), Pe = Te(n, $, y), Oe = Le(xe) || "center", ve = !!A.hide?.referenceHidden;
|
|
247
|
-
Q(() => {
|
|
248
|
-
ne && o && m && ie($);
|
|
249
|
-
}, [ne, o, m, $]);
|
|
250
|
-
const Me = d.useMemo(() => ({
|
|
251
|
-
position: "absolute",
|
|
252
|
-
top: A.arrow?.y,
|
|
253
|
-
left: A.arrow?.x
|
|
254
|
-
}), [A.arrow]), $e = A.arrow?.centerOffset !== 0;
|
|
255
|
-
return d.useMemo(() => ({
|
|
256
|
-
positionerStyles: Re,
|
|
257
|
-
arrowStyles: Me,
|
|
258
|
-
arrowRef: x,
|
|
259
|
-
arrowUncentered: $e,
|
|
260
|
-
side: Pe,
|
|
261
|
-
align: Oe,
|
|
262
|
-
physicalSide: $,
|
|
263
|
-
anchorHidden: ve,
|
|
264
|
-
refs: w,
|
|
265
|
-
context: be,
|
|
266
|
-
isPositioned: m,
|
|
267
|
-
update: H
|
|
268
|
-
}), [Re, Me, x, $e, Pe, Oe, $, ve, w, be, m, H]);
|
|
269
|
-
}
|
|
270
|
-
function He(a) {
|
|
271
|
-
return a != null && "current" in a;
|
|
272
|
-
}
|
|
1
|
+
let n = /* @__PURE__ */ (function(t) {
|
|
2
|
+
return t.startingStyle = "data-starting-style", t.endingStyle = "data-ending-style", t;
|
|
3
|
+
})({});
|
|
4
|
+
const e = {
|
|
5
|
+
[n.startingStyle]: ""
|
|
6
|
+
}, i = {
|
|
7
|
+
[n.endingStyle]: ""
|
|
8
|
+
}, r = {
|
|
9
|
+
transitionStatus(t) {
|
|
10
|
+
return t === "starting" ? e : t === "ending" ? i : null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
273
13
|
export {
|
|
274
|
-
|
|
14
|
+
n as TransitionStatusDataAttributes,
|
|
15
|
+
r as transitionStatusMapping
|
|
275
16
|
};
|
|
276
17
|
//# sourceMappingURL=index234.js.map
|
package/dist/index234.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index234.js","sources":["../../../node_modules/@base-ui/react/utils/useAnchorPositioning.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getSide, getAlignment, getSideAxis } from '@floating-ui/utils';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { autoUpdate, flip, limitShift, offset, shift, useFloating, size } from \"../floating-ui-react/index.mjs\";\nimport { useDirection } from \"../internals/direction-context/DirectionContext.mjs\";\nimport { arrow } from \"../floating-ui-react/middleware/arrow.mjs\";\nimport { hide } from \"./hideMiddleware.mjs\";\nimport { DEFAULT_SIDES } from \"./adaptiveOriginMiddleware.mjs\";\nfunction getLogicalSide(sideParam, renderedSide, isRtl) {\n const isLogicalSideParam = sideParam === 'inline-start' || sideParam === 'inline-end';\n const logicalRight = isRtl ? 'inline-start' : 'inline-end';\n const logicalLeft = isRtl ? 'inline-end' : 'inline-start';\n return {\n top: 'top',\n right: isLogicalSideParam ? logicalRight : 'right',\n bottom: 'bottom',\n left: isLogicalSideParam ? logicalLeft : 'left'\n }[renderedSide];\n}\nfunction getOffsetData(state, sideParam, isRtl) {\n const {\n rects,\n placement\n } = state;\n const data = {\n side: getLogicalSide(sideParam, getSide(placement), isRtl),\n align: getAlignment(placement) || 'center',\n anchor: {\n width: rects.reference.width,\n height: rects.reference.height\n },\n positioner: {\n width: rects.floating.width,\n height: rects.floating.height\n }\n };\n return data;\n}\n/**\n * Provides standardized anchor positioning behavior for floating elements. Wraps Floating UI's\n * `useFloating` hook.\n */\nexport function useAnchorPositioning(params) {\n const {\n // Public parameters\n anchor,\n positionMethod = 'absolute',\n side: sideParam = 'bottom',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n collisionBoundary,\n collisionPadding: collisionPaddingParam = 5,\n sticky = false,\n arrowPadding = 5,\n disableAnchorTracking = false,\n inline: inlineMiddleware,\n // Private parameters\n keepMounted = false,\n floatingRootContext,\n mounted,\n collisionAvoidance,\n shiftCrossAxis = false,\n nodeId,\n adaptiveOrigin,\n lazyFlip = false,\n externalTree\n } = params;\n const [mountSide, setMountSide] = React.useState(null);\n if (!mounted && mountSide !== null) {\n setMountSide(null);\n }\n const collisionAvoidanceSide = collisionAvoidance.side || 'flip';\n const collisionAvoidanceAlign = collisionAvoidance.align || 'flip';\n const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || 'end';\n const anchorFn = typeof anchor === 'function' ? anchor : undefined;\n const anchorFnCallback = useStableCallback(anchorFn);\n const anchorDep = anchorFn ? anchorFnCallback : anchor;\n const anchorValueRef = useValueAsRef(anchor);\n const mountedRef = useValueAsRef(mounted);\n const direction = useDirection();\n const isRtl = direction === 'rtl';\n const side = mountSide || {\n top: 'top',\n right: 'right',\n bottom: 'bottom',\n left: 'left',\n 'inline-end': isRtl ? 'left' : 'right',\n 'inline-start': isRtl ? 'right' : 'left'\n }[sideParam];\n const placement = align === 'center' ? side : `${side}-${align}`;\n let collisionPadding = collisionPaddingParam;\n\n // Create a bias to the preferred side.\n // On iOS, when the mobile software keyboard opens, the input is exactly centered\n // in the viewport, but this can cause it to flip to the top undesirably.\n const bias = 1;\n const biasTop = sideParam === 'bottom' ? bias : 0;\n const biasBottom = sideParam === 'top' ? bias : 0;\n const biasLeft = sideParam === 'right' ? bias : 0;\n const biasRight = sideParam === 'left' ? bias : 0;\n if (typeof collisionPadding === 'number') {\n collisionPadding = {\n top: collisionPadding + biasTop,\n right: collisionPadding + biasRight,\n bottom: collisionPadding + biasBottom,\n left: collisionPadding + biasLeft\n };\n } else if (collisionPadding) {\n collisionPadding = {\n top: (collisionPadding.top || 0) + biasTop,\n right: (collisionPadding.right || 0) + biasRight,\n bottom: (collisionPadding.bottom || 0) + biasBottom,\n left: (collisionPadding.left || 0) + biasLeft\n };\n }\n const commonCollisionProps = {\n boundary: collisionBoundary === 'clipping-ancestors' ? 'clippingAncestors' : collisionBoundary,\n padding: collisionPadding\n };\n\n // Using a ref assumes that the arrow element is always present in the DOM for the lifetime of the\n // popup. If this assumption ends up being false, we can switch to state to manage the arrow's\n // presence.\n const arrowRef = React.useRef(null);\n\n // Keep these reactive if they're not functions\n const sideOffsetRef = useValueAsRef(sideOffset);\n const alignOffsetRef = useValueAsRef(alignOffset);\n const sideOffsetDep = typeof sideOffset !== 'function' ? sideOffset : 0;\n const alignOffsetDep = typeof alignOffset !== 'function' ? alignOffset : 0;\n const middleware = [];\n if (inlineMiddleware) {\n middleware.push(inlineMiddleware);\n }\n middleware.push(offset(state => {\n const data = getOffsetData(state, sideParam, isRtl);\n const sideAxis = typeof sideOffsetRef.current === 'function' ? sideOffsetRef.current(data) : sideOffsetRef.current;\n const alignAxis = typeof alignOffsetRef.current === 'function' ? alignOffsetRef.current(data) : alignOffsetRef.current;\n return {\n mainAxis: sideAxis,\n crossAxis: alignAxis,\n alignmentAxis: alignAxis\n };\n }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));\n const shiftDisabled = collisionAvoidanceAlign === 'none' && collisionAvoidanceSide !== 'shift';\n const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === 'shift');\n const flipMiddleware = collisionAvoidanceSide === 'none' ? null : flip({\n ...commonCollisionProps,\n // Ensure the popup flips if it's been limited by its --available-height and it resizes.\n // Since the size() padding is smaller than the flip() padding, flip() will take precedence.\n padding: {\n top: collisionPadding.top + bias,\n right: collisionPadding.right + bias,\n bottom: collisionPadding.bottom + bias,\n left: collisionPadding.left + bias\n },\n mainAxis: !shiftCrossAxis && collisionAvoidanceSide === 'flip',\n crossAxis: collisionAvoidanceAlign === 'flip' ? 'alignment' : false,\n fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide\n });\n const shiftMiddleware = shiftDisabled ? null : shift(data => {\n const html = ownerDocument(data.elements.floating).documentElement;\n return {\n ...commonCollisionProps,\n // Use the Layout Viewport to avoid shifting around when pinch-zooming\n // for context menus.\n rootBoundary: shiftCrossAxis ? {\n x: 0,\n y: 0,\n width: html.clientWidth,\n height: html.clientHeight\n } : undefined,\n mainAxis: collisionAvoidanceAlign !== 'none',\n crossAxis: crossAxisShiftEnabled,\n limiter: sticky || shiftCrossAxis ? undefined : limitShift(limitData => {\n if (!arrowRef.current) {\n return {};\n }\n const {\n width,\n height\n } = arrowRef.current.getBoundingClientRect();\n const sideAxis = getSideAxis(getSide(limitData.placement));\n const arrowSize = sideAxis === 'y' ? width : height;\n const offsetAmount = sideAxis === 'y' ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;\n return {\n offset: arrowSize / 2 + offsetAmount / 2\n };\n })\n };\n }, [commonCollisionProps, sticky, shiftCrossAxis, collisionPadding, collisionAvoidanceAlign]);\n\n // https://floating-ui.com/docs/flip#combining-with-shift\n if (collisionAvoidanceSide === 'shift' || collisionAvoidanceAlign === 'shift' || align === 'center') {\n middleware.push(shiftMiddleware, flipMiddleware);\n } else {\n middleware.push(flipMiddleware, shiftMiddleware);\n }\n middleware.push(size({\n ...commonCollisionProps,\n apply({\n elements: {\n floating\n },\n availableWidth,\n availableHeight,\n rects\n }) {\n if (!mountedRef.current) {\n return;\n }\n const floatingStyle = floating.style;\n floatingStyle.setProperty('--available-width', `${availableWidth}px`);\n floatingStyle.setProperty('--available-height', `${availableHeight}px`);\n\n // Snap anchor dimensions to device pixels to ensure the popup's visual width matches the anchor's one.\n const dpr = ownerWindow(floating).devicePixelRatio || 1;\n const {\n x,\n y,\n width,\n height\n } = rects.reference;\n const anchorWidth = (Math.round((x + width) * dpr) - Math.round(x * dpr)) / dpr;\n const anchorHeight = (Math.round((y + height) * dpr) - Math.round(y * dpr)) / dpr;\n floatingStyle.setProperty('--anchor-width', `${anchorWidth}px`);\n floatingStyle.setProperty('--anchor-height', `${anchorHeight}px`);\n }\n }), arrow(state => ({\n // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,\n // we'll create a fake element.\n element: arrowRef.current || ownerDocument(state.elements.floating).createElement('div'),\n padding: arrowPadding,\n offsetParent: 'floating'\n }), [arrowPadding]), {\n name: 'transformOrigin',\n fn(state) {\n const {\n elements,\n middlewareData,\n placement: renderedPlacement,\n rects,\n y\n } = state;\n const currentRenderedSide = getSide(renderedPlacement);\n const currentRenderedAxis = getSideAxis(currentRenderedSide);\n const arrowEl = arrowRef.current;\n const arrowX = middlewareData.arrow?.x || 0;\n const arrowY = middlewareData.arrow?.y || 0;\n const arrowWidth = arrowEl?.clientWidth || 0;\n const arrowHeight = arrowEl?.clientHeight || 0;\n const transformX = arrowX + arrowWidth / 2;\n const transformY = arrowY + arrowHeight / 2;\n const shiftY = Math.abs(middlewareData.shift?.y || 0);\n const halfAnchorHeight = rects.reference.height / 2;\n const sideOffsetValue = typeof sideOffset === 'function' ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;\n const isOverlappingAnchor = shiftY > sideOffsetValue;\n const adjacentTransformOrigin = {\n top: `${transformX}px calc(100% + ${sideOffsetValue}px)`,\n bottom: `${transformX}px ${-sideOffsetValue}px`,\n left: `calc(100% + ${sideOffsetValue}px) ${transformY}px`,\n right: `${-sideOffsetValue}px ${transformY}px`\n }[currentRenderedSide];\n const overlapTransformOrigin = `${transformX}px ${rects.reference.y + halfAnchorHeight - y}px`;\n elements.floating.style.setProperty('--transform-origin', crossAxisShiftEnabled && currentRenderedAxis === 'y' && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);\n return {};\n }\n }, hide, adaptiveOrigin);\n useIsoLayoutEffect(() => {\n // Ensure positioning doesn't run initially for `keepMounted` elements that\n // aren't initially open.\n if (!mounted && floatingRootContext) {\n floatingRootContext.update({\n referenceElement: null,\n floatingElement: null,\n domReferenceElement: null,\n positionReference: null\n });\n }\n }, [mounted, floatingRootContext]);\n const autoUpdateOptions = React.useMemo(() => ({\n elementResize: !disableAnchorTracking && typeof ResizeObserver !== 'undefined',\n layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== 'undefined'\n }), [disableAnchorTracking]);\n const {\n refs,\n elements,\n x,\n y,\n middlewareData,\n update,\n placement: renderedPlacement,\n context,\n isPositioned,\n floatingStyles: originalFloatingStyles\n } = useFloating({\n rootContext: floatingRootContext,\n open: keepMounted ? mounted : undefined,\n placement,\n middleware,\n strategy: positionMethod,\n whileElementsMounted: keepMounted ? undefined : (...args) => autoUpdate(...args, autoUpdateOptions),\n nodeId,\n externalTree\n });\n const {\n sideX,\n sideY\n } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;\n\n // Default to `fixed` when not positioned to prevent `autoFocus` scroll jumps.\n // This ensures the popup is inside the viewport initially before it gets positioned.\n const resolvedPosition = isPositioned ? positionMethod : 'fixed';\n const floatingStyles = React.useMemo(() => {\n const base = adaptiveOrigin ? {\n position: resolvedPosition,\n [sideX]: x,\n [sideY]: y\n } : {\n position: resolvedPosition,\n ...originalFloatingStyles\n };\n if (!isPositioned) {\n base.opacity = 0;\n }\n return base;\n }, [adaptiveOrigin, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);\n const registeredPositionReferenceRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n if (!mounted) {\n return;\n }\n const anchorValue = anchorValueRef.current;\n const resolvedAnchor = typeof anchorValue === 'function' ? anchorValue() : anchorValue;\n const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;\n const finalAnchor = unwrappedElement || null;\n if (finalAnchor !== registeredPositionReferenceRef.current) {\n refs.setPositionReference(finalAnchor);\n registeredPositionReferenceRef.current = finalAnchor;\n }\n }, [mounted, refs, anchorDep, anchorValueRef]);\n React.useEffect(() => {\n if (!mounted) {\n return;\n }\n const anchorValue = anchorValueRef.current;\n\n // Refs from parent components are set after useLayoutEffect runs and are available in useEffect.\n // Therefore, if the anchor is a ref, we need to update the position reference in useEffect.\n if (typeof anchorValue === 'function') {\n return;\n }\n if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {\n refs.setPositionReference(anchorValue.current);\n registeredPositionReferenceRef.current = anchorValue.current;\n }\n }, [mounted, refs, anchorDep, anchorValueRef]);\n React.useEffect(() => {\n if (keepMounted && mounted && elements.reference && elements.floating) {\n return autoUpdate(elements.reference, elements.floating, update, autoUpdateOptions);\n }\n return undefined;\n }, [keepMounted, mounted, elements, update, autoUpdateOptions]);\n const renderedSide = getSide(renderedPlacement);\n const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);\n const renderedAlign = getAlignment(renderedPlacement) || 'center';\n const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);\n\n // Locks the flip (makes it \"sticky\") so it doesn't prefer a given placement\n // and flips back lazily, not eagerly. Ideal for filtered lists that change\n // the size of the popup dynamically to avoid unwanted flipping when typing.\n useIsoLayoutEffect(() => {\n if (lazyFlip && mounted && isPositioned) {\n setMountSide(renderedSide);\n }\n }, [lazyFlip, mounted, isPositioned, renderedSide]);\n const arrowStyles = React.useMemo(() => ({\n position: 'absolute',\n top: middlewareData.arrow?.y,\n left: middlewareData.arrow?.x\n }), [middlewareData.arrow]);\n const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;\n return React.useMemo(() => ({\n positionerStyles: floatingStyles,\n arrowStyles,\n arrowRef,\n arrowUncentered,\n side: logicalRenderedSide,\n align: renderedAlign,\n physicalSide: renderedSide,\n anchorHidden,\n refs,\n context,\n isPositioned,\n update\n }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update]);\n}\nfunction isRef(param) {\n return param != null && 'current' in param;\n}"],"names":["getLogicalSide","sideParam","renderedSide","isRtl","isLogicalSideParam","getOffsetData","state","rects","placement","getSide","getAlignment","useAnchorPositioning","params","anchor","positionMethod","sideOffset","align","alignOffset","collisionBoundary","collisionPaddingParam","sticky","arrowPadding","disableAnchorTracking","inlineMiddleware","keepMounted","floatingRootContext","mounted","collisionAvoidance","shiftCrossAxis","nodeId","adaptiveOrigin","lazyFlip","externalTree","mountSide","setMountSide","React","collisionAvoidanceSide","collisionAvoidanceAlign","collisionAvoidanceFallbackAxisSide","anchorFn","anchorFnCallback","useStableCallback","anchorDep","anchorValueRef","useValueAsRef","mountedRef","useDirection","side","collisionPadding","bias","biasTop","biasBottom","biasLeft","biasRight","commonCollisionProps","arrowRef","sideOffsetRef","alignOffsetRef","sideOffsetDep","alignOffsetDep","middleware","offset","data","sideAxis","alignAxis","shiftDisabled","crossAxisShiftEnabled","flipMiddleware","flip","shiftMiddleware","shift","html","ownerDocument","limitShift","limitData","width","height","getSideAxis","arrowSize","offsetAmount","size","floating","availableWidth","availableHeight","floatingStyle","dpr","ownerWindow","x","y","anchorWidth","anchorHeight","arrow","elements","middlewareData","renderedPlacement","currentRenderedSide","currentRenderedAxis","arrowEl","arrowX","arrowY","arrowWidth","arrowHeight","transformX","transformY","shiftY","halfAnchorHeight","sideOffsetValue","isOverlappingAnchor","adjacentTransformOrigin","overlapTransformOrigin","hide","useIsoLayoutEffect","autoUpdateOptions","refs","update","context","isPositioned","originalFloatingStyles","useFloating","args","autoUpdate","sideX","sideY","DEFAULT_SIDES","resolvedPosition","floatingStyles","base","registeredPositionReferenceRef","anchorValue","resolvedAnchor","finalAnchor","isRef","logicalRenderedSide","renderedAlign","anchorHidden","arrowStyles","arrowUncentered","param"],"mappings":";;;;;;;;;;;;;;AAaA,SAASA,GAAeC,GAAWC,GAAcC,GAAO;AACtD,QAAMC,IAAqBH,MAAc,kBAAkBA,MAAc;AAGzE,SAAO;AAAA,IACL,KAAK;AAAA,IACL,OAAOG,IAJYD,IAAQ,iBAAiB,eAID;AAAA,IAC3C,QAAQ;AAAA,IACR,MAAMC,IALYD,IAAQ,eAAe,iBAKA;AAAA,EAC7C,EAAID,CAAY;AAChB;AACA,SAASG,GAAcC,GAAOL,GAAWE,GAAO;AAC9C,QAAM;AAAA,IACJ,OAAAI;AAAA,IACA,WAAAC;AAAA,EACJ,IAAMF;AAaJ,SAZa;AAAA,IACX,MAAMN,GAAeC,GAAWQ,EAAQD,CAAS,GAAGL,CAAK;AAAA,IACzD,OAAOO,GAAaF,CAAS,KAAK;AAAA,IAClC,QAAQ;AAAA,MACN,OAAOD,EAAM,UAAU;AAAA,MACvB,QAAQA,EAAM,UAAU;AAAA,IAC9B;AAAA,IACI,YAAY;AAAA,MACV,OAAOA,EAAM,SAAS;AAAA,MACtB,QAAQA,EAAM,SAAS;AAAA,IAC7B;AAAA,EACA;AAEA;AAKO,SAASI,GAAqBC,GAAQ;AAC3C,QAAM;AAAA;AAAA,IAEJ,QAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,MAAMb,IAAY;AAAA,IAClB,YAAAc,IAAa;AAAA,IACb,OAAAC,IAAQ;AAAA,IACR,aAAAC,IAAc;AAAA,IACd,mBAAAC;AAAA,IACA,kBAAkBC,KAAwB;AAAA,IAC1C,QAAAC,IAAS;AAAA,IACT,cAAAC,KAAe;AAAA,IACf,uBAAAC,IAAwB;AAAA,IACxB,QAAQC;AAAA;AAAA,IAER,aAAAC,IAAc;AAAA,IACd,qBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC,IAAiB;A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CAAM,CAAC;AACnK;AACA,SAASiB,GAAMM,GAAO;AACpB,SAAOA,KAAS,QAAQ,aAAaA;AACvC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index234.js","sources":["../../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs"],"sourcesContent":["export let TransitionStatusDataAttributes = /*#__PURE__*/function (TransitionStatusDataAttributes) {\n /**\n * Present when the component is animating in.\n */\n TransitionStatusDataAttributes[\"startingStyle\"] = \"data-starting-style\";\n /**\n * Present when the component is animating out.\n */\n TransitionStatusDataAttributes[\"endingStyle\"] = \"data-ending-style\";\n return TransitionStatusDataAttributes;\n}({});\nconst STARTING_HOOK = {\n [TransitionStatusDataAttributes.startingStyle]: ''\n};\nconst ENDING_HOOK = {\n [TransitionStatusDataAttributes.endingStyle]: ''\n};\nexport const transitionStatusMapping = {\n transitionStatus(value) {\n if (value === 'starting') {\n return STARTING_HOOK;\n }\n if (value === 'ending') {\n return ENDING_HOOK;\n }\n return null;\n }\n};"],"names":["TransitionStatusDataAttributes","STARTING_HOOK","ENDING_HOOK","transitionStatusMapping","value"],"mappings":"AAAU,IAACA,IAA8C,0BAAUA,GAAgC;AAIjG,SAAAA,EAA+B,gBAAmB,uBAIlDA,EAA+B,cAAiB,qBACzCA;AACT,GAAE,CAAA,CAAE;AACJ,MAAMC,IAAgB;AAAA,EACpB,CAACD,EAA+B,aAAa,GAAG;AAClD,GACME,IAAc;AAAA,EAClB,CAACF,EAA+B,WAAW,GAAG;AAChD,GACaG,IAA0B;AAAA,EACrC,iBAAiBC,GAAO;AACtB,WAAIA,MAAU,aACLH,IAELG,MAAU,WACLF,IAEF;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
|
package/dist/index235.js
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { EMPTY_OBJECT as l } from "./index264.js";
|
|
2
|
+
function u(a, n, o, s) {
|
|
3
|
+
let e = !1, t = !1;
|
|
4
|
+
const r = l;
|
|
5
|
+
return {
|
|
6
|
+
reason: a,
|
|
7
|
+
event: n ?? new Event("base-ui"),
|
|
8
|
+
cancel() {
|
|
9
|
+
e = !0;
|
|
10
|
+
},
|
|
11
|
+
allowPropagation() {
|
|
12
|
+
t = !0;
|
|
13
|
+
},
|
|
14
|
+
get isCanceled() {
|
|
15
|
+
return e;
|
|
16
|
+
},
|
|
17
|
+
get isPropagationAllowed() {
|
|
18
|
+
return t;
|
|
19
|
+
},
|
|
20
|
+
trigger: o,
|
|
21
|
+
...r
|
|
22
|
+
};
|
|
10
23
|
}
|
|
11
24
|
export {
|
|
12
|
-
|
|
13
|
-
i as useSelectPositionerContext
|
|
25
|
+
u as createChangeEventDetails
|
|
14
26
|
};
|
|
15
27
|
//# sourceMappingURL=index235.js.map
|
package/dist/index235.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index235.js","sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index235.js","sources":["../../../node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs"],"sourcesContent":["import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { REASONS } from \"./reasons.mjs\";\n\n/**\n * Maps a change `reason` string to the corresponding native event type.\n */\n\n/**\n * Details of custom change events emitted by Base UI components.\n */\n\n/**\n * Details of custom generic events emitted by Base UI components.\n */\n\n/**\n * Creates a Base UI event details object with the given reason and utilities\n * for preventing Base UI's internal event handling.\n */\nexport function createChangeEventDetails(reason, event, trigger, customProperties) {\n let canceled = false;\n let allowPropagation = false;\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n cancel() {\n canceled = true;\n },\n allowPropagation() {\n allowPropagation = true;\n },\n get isCanceled() {\n return canceled;\n },\n get isPropagationAllowed() {\n return allowPropagation;\n },\n trigger,\n ...custom\n };\n return details;\n}\nexport function createGenericEventDetails(reason, event, customProperties) {\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n ...custom\n };\n return details;\n}"],"names":["createChangeEventDetails","reason","event","trigger","customProperties","canceled","allowPropagation","custom","EMPTY_OBJECT"],"mappings":";AAmBO,SAASA,EAAyBC,GAAQC,GAAOC,GAASC,GAAkB;AACjF,MAAIC,IAAW,IACXC,IAAmB;AACvB,QAAMC,IAA6BC;AAmBnC,SAlBgB;AAAA,IACd,QAAAP;AAAA,IACA,OAAOC,KAAS,IAAI,MAAM,SAAS;AAAA,IACnC,SAAS;AACP,MAAAG,IAAW;AAAA,IACb;AAAA,IACA,mBAAmB;AACjB,MAAAC,IAAmB;AAAA,IACrB;AAAA,IACA,IAAI,aAAa;AACf,aAAOD;AAAA,IACT;AAAA,IACA,IAAI,uBAAuB;AACzB,aAAOC;AAAA,IACT;AAAA,IACA,SAAAH;AAAA,IACA,GAAGI;AAAA,EACP;AAEA;","x_google_ignoreList":[0]}
|
package/dist/index236.js
CHANGED
|
@@ -1,14 +1,115 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { isHTMLElement as M } from "./index308.js";
|
|
3
|
+
import { useStableCallback as H } from "./index262.js";
|
|
4
|
+
import { error as y } from "./index355.js";
|
|
5
|
+
import { SafeReact as B } from "./index356.js";
|
|
6
|
+
import { useIsoLayoutEffect as A } from "./index261.js";
|
|
7
|
+
import { useCompositeRootContext as L } from "./index357.js";
|
|
8
|
+
import { useFocusableWhenDisabled as W } from "./index358.js";
|
|
9
|
+
import { mergeProps as $, makeEventPreventable as x } from "./index282.js";
|
|
10
|
+
function X(a = {}) {
|
|
11
|
+
const {
|
|
12
|
+
disabled: o = !1,
|
|
13
|
+
focusableWhenDisabled: C,
|
|
14
|
+
tabIndex: P = 0,
|
|
15
|
+
native: t = !0,
|
|
16
|
+
composite: T
|
|
17
|
+
} = a, i = l.useRef(null), E = L(!0), s = T ?? E !== void 0, {
|
|
18
|
+
props: u
|
|
19
|
+
} = W({
|
|
20
|
+
focusableWhenDisabled: C,
|
|
21
|
+
disabled: o,
|
|
22
|
+
composite: s,
|
|
23
|
+
tabIndex: P,
|
|
24
|
+
isNativeButton: t
|
|
25
|
+
});
|
|
26
|
+
process.env.NODE_ENV !== "production" && l.useEffect(() => {
|
|
27
|
+
if (!i.current)
|
|
28
|
+
return;
|
|
29
|
+
const n = f(i.current);
|
|
30
|
+
if (t) {
|
|
31
|
+
if (!n) {
|
|
32
|
+
const r = B.captureOwnerStack?.() || "";
|
|
33
|
+
y(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${r}`);
|
|
34
|
+
}
|
|
35
|
+
} else if (n) {
|
|
36
|
+
const r = B.captureOwnerStack?.() || "";
|
|
37
|
+
y(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${r}`);
|
|
38
|
+
}
|
|
39
|
+
}, [t]);
|
|
40
|
+
const p = l.useCallback(() => {
|
|
41
|
+
const n = i.current;
|
|
42
|
+
f(n) && s && o && u.disabled === void 0 && n.disabled && (n.disabled = !1);
|
|
43
|
+
}, [o, u.disabled, s]);
|
|
44
|
+
A(p, [p]);
|
|
45
|
+
const U = l.useCallback((n = {}) => {
|
|
46
|
+
const {
|
|
47
|
+
onClick: r,
|
|
48
|
+
onMouseDown: d,
|
|
49
|
+
onKeyUp: O,
|
|
50
|
+
onKeyDown: I,
|
|
51
|
+
onPointerDown: K,
|
|
52
|
+
...N
|
|
53
|
+
} = n;
|
|
54
|
+
return $({
|
|
55
|
+
onClick(e) {
|
|
56
|
+
if (o) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
r?.(e);
|
|
61
|
+
},
|
|
62
|
+
onMouseDown(e) {
|
|
63
|
+
o || d?.(e);
|
|
64
|
+
},
|
|
65
|
+
onKeyDown(e) {
|
|
66
|
+
if (o || (x(e), I?.(e), e.baseUIHandlerPrevented))
|
|
67
|
+
return;
|
|
68
|
+
const b = e.target === e.currentTarget, c = e.currentTarget, g = f(c), h = !t && V(c), k = b && (t ? g : !h), D = e.key === "Enter", w = e.key === " ", m = c.getAttribute("role"), S = m?.startsWith("menuitem") || m === "option" || m === "gridcell";
|
|
69
|
+
if (b && s && w) {
|
|
70
|
+
if (e.defaultPrevented && S)
|
|
71
|
+
return;
|
|
72
|
+
e.preventDefault(), h || t && g ? (c.click(), e.preventBaseUIHandler()) : k && (r?.(e), e.preventBaseUIHandler());
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
k && (!t && (w || D) && e.preventDefault(), !t && D && r?.(e));
|
|
76
|
+
},
|
|
77
|
+
onKeyUp(e) {
|
|
78
|
+
if (!o) {
|
|
79
|
+
if (x(e), O?.(e), e.target === e.currentTarget && t && s && f(e.currentTarget) && e.key === " ") {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
e.baseUIHandlerPrevented || e.target === e.currentTarget && !t && !s && e.key === " " && r?.(e);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
onPointerDown(e) {
|
|
87
|
+
if (o) {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
K?.(e);
|
|
92
|
+
}
|
|
93
|
+
}, t ? {
|
|
94
|
+
type: "button"
|
|
95
|
+
} : {
|
|
96
|
+
role: "button"
|
|
97
|
+
}, u, N);
|
|
98
|
+
}, [o, u, s, t]), R = H((n) => {
|
|
99
|
+
i.current = n, p();
|
|
100
|
+
});
|
|
101
|
+
return {
|
|
102
|
+
getButtonProps: U,
|
|
103
|
+
buttonRef: R
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function f(a) {
|
|
107
|
+
return M(a) && a.tagName === "BUTTON";
|
|
108
|
+
}
|
|
109
|
+
function V(a) {
|
|
110
|
+
return !!(a?.tagName === "A" && a?.href);
|
|
3
111
|
}
|
|
4
|
-
const i = {
|
|
5
|
-
position: "relative",
|
|
6
|
-
maxHeight: "100%",
|
|
7
|
-
overflowX: "hidden",
|
|
8
|
-
overflowY: "auto"
|
|
9
|
-
};
|
|
10
112
|
export {
|
|
11
|
-
|
|
12
|
-
e as clearStyles
|
|
113
|
+
X as useButton
|
|
13
114
|
};
|
|
14
115
|
//# sourceMappingURL=index236.js.map
|
package/dist/index236.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index236.js","sources":["../../../node_modules/@base-ui/react/select/popup/utils.mjs"],"sourcesContent":["export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};"],"names":["clearStyles","element","originalStyles","LIST_FUNCTIONAL_STYLES"],"mappings":"AAAO,SAASA,EAAYC,GAASC,GAAgB;AACnD,EAAID,KACF,OAAO,OAAOA,EAAQ,OAAOC,CAAc;AAE/C;AACY,MAACC,IAAyB;AAAA,EACpC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AACb;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index236.js","sources":["../../../node_modules/@base-ui/react/internals/use-button/useButton.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { error } from '@base-ui/utils/error';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { makeEventPreventable, mergeProps } from \"../../merge-props/index.mjs\";\nimport { useCompositeRootContext } from \"../composite/root/CompositeRootContext.mjs\";\nimport { useFocusableWhenDisabled } from \"../../utils/useFocusableWhenDisabled.mjs\";\nexport function useButton(parameters = {}) {\n const {\n disabled = false,\n focusableWhenDisabled,\n tabIndex = 0,\n native: isNativeButton = true,\n composite: compositeProp\n } = parameters;\n const elementRef = React.useRef(null);\n const compositeRootContext = useCompositeRootContext(true);\n const isCompositeItem = compositeProp ?? compositeRootContext !== undefined;\n const {\n props: focusableWhenDisabledProps\n } = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n composite: isCompositeItem,\n tabIndex,\n isNativeButton\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!elementRef.current) {\n return;\n }\n const isButtonTag = isButtonElement(elementRef.current);\n if (isNativeButton) {\n if (!isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Use a real <button> in the ' + '`render` prop, or set `nativeButton` to `false`.';\n error(`${message}${ownerStackMessage}`);\n }\n } else if (isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while Base UI applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set ' + '`nativeButton` to `true`.';\n error(`${message}${ownerStackMessage}`);\n }\n }, [isNativeButton]);\n }\n\n // handles a disabled composite button rendering another button, e.g.\n // <Toolbar.Button disabled render={<Menu.Trigger />} />\n // the `disabled` prop needs to pass through 2 `useButton`s then finally\n // delete the `disabled` attribute from DOM\n const updateDisabled = React.useCallback(() => {\n const element = elementRef.current;\n if (!isButtonElement(element)) {\n return;\n }\n if (isCompositeItem && disabled && focusableWhenDisabledProps.disabled === undefined && element.disabled) {\n element.disabled = false;\n }\n }, [disabled, focusableWhenDisabledProps.disabled, isCompositeItem]);\n useIsoLayoutEffect(updateDisabled, [updateDisabled]);\n const getButtonProps = React.useCallback((externalProps = {}) => {\n const {\n onClick: externalOnClick,\n onMouseDown: externalOnMouseDown,\n onKeyUp: externalOnKeyUp,\n onKeyDown: externalOnKeyDown,\n onPointerDown: externalOnPointerDown,\n ...otherExternalProps\n } = externalProps;\n return mergeProps({\n onClick(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n },\n onMouseDown(event) {\n if (!disabled) {\n externalOnMouseDown?.(event);\n }\n },\n onKeyDown(event) {\n if (disabled) {\n return;\n }\n makeEventPreventable(event);\n externalOnKeyDown?.(event);\n if (event.baseUIHandlerPrevented) {\n return;\n }\n const isCurrentTarget = event.target === event.currentTarget;\n const currentTarget = event.currentTarget;\n const isButton = isButtonElement(currentTarget);\n const isLink = !isNativeButton && isValidLinkElement(currentTarget);\n const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);\n const isEnterKey = event.key === 'Enter';\n const isSpaceKey = event.key === ' ';\n const role = currentTarget.getAttribute('role');\n const isTextNavigationRole = role?.startsWith('menuitem') || role === 'option' || role === 'gridcell';\n if (isCurrentTarget && isCompositeItem && isSpaceKey) {\n if (event.defaultPrevented && isTextNavigationRole) {\n return;\n }\n event.preventDefault();\n if (isLink || isNativeButton && isButton) {\n currentTarget.click();\n event.preventBaseUIHandler();\n } else if (shouldClick) {\n externalOnClick?.(event);\n event.preventBaseUIHandler();\n }\n return;\n }\n\n // Keyboard accessibility for native and non-native elements.\n if (shouldClick) {\n if (!isNativeButton && (isSpaceKey || isEnterKey)) {\n event.preventDefault();\n }\n if (!isNativeButton && isEnterKey) {\n externalOnClick?.(event);\n }\n }\n },\n onKeyUp(event) {\n if (disabled) {\n return;\n }\n\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n makeEventPreventable(event);\n externalOnKeyUp?.(event);\n if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === ' ') {\n event.preventDefault();\n return;\n }\n if (event.baseUIHandlerPrevented) {\n return;\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && event.key === ' ') {\n externalOnClick?.(event);\n }\n },\n onPointerDown(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnPointerDown?.(event);\n }\n }, isNativeButton ? {\n type: 'button'\n } : {\n role: 'button'\n }, focusableWhenDisabledProps, otherExternalProps);\n }, [disabled, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);\n const buttonRef = useStableCallback(element => {\n elementRef.current = element;\n updateDisabled();\n });\n return {\n getButtonProps,\n buttonRef\n };\n}\nfunction isButtonElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'BUTTON';\n}\nfunction isValidLinkElement(elem) {\n return Boolean(elem?.tagName === 'A' && elem?.href);\n}"],"names":["useButton","parameters","disabled","focusableWhenDisabled","tabIndex","isNativeButton","compositeProp","elementRef","React","compositeRootContext","useCompositeRootContext","isCompositeItem","focusableWhenDisabledProps","useFocusableWhenDisabled","isButtonTag","isButtonElement","ownerStackMessage","SafeReact","error","updateDisabled","element","useIsoLayoutEffect","getButtonProps","externalProps","externalOnClick","externalOnMouseDown","externalOnKeyUp","externalOnKeyDown","externalOnPointerDown","otherExternalProps","mergeProps","event","makeEventPreventable","isCurrentTarget","currentTarget","isButton","isLink","isValidLinkElement","shouldClick","isEnterKey","isSpaceKey","role","isTextNavigationRole","buttonRef","useStableCallback","elem","isHTMLElement"],"mappings":";;;;;;;;;AAWO,SAASA,EAAUC,IAAa,IAAI;AACzC,QAAM;AAAA,IAC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