@rpcbase/ui 0.280.0 → 0.281.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/AddressAutocompleteInput/index.d.ts +1 -1
- package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/components/ApplePayButton/index.d.ts +1 -1
- package/dist/components/ApplePayButton/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/DayPickerField/index.d.ts +2 -2
- package/dist/components/DayPickerField/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.d.ts +9 -9
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/FilesUploadField/index.d.ts +1 -1
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/components/HourPickerField/index.d.ts +2 -2
- package/dist/components/HourPickerField/index.d.ts.map +1 -1
- package/dist/components/I18nField/index.d.ts +1 -1
- package/dist/components/I18nField/index.d.ts.map +1 -1
- package/dist/components/Image/index.d.ts +1 -1
- package/dist/components/Image/index.d.ts.map +1 -1
- package/dist/components/ImagesField/index.d.ts +1 -1
- package/dist/components/ImagesField/index.d.ts.map +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
- package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
- package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/header/MenuPopover/index.d.ts +1 -1
- package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js +6 -4
- package/dist/index10.js.map +1 -1
- package/dist/index12.js.map +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index14.js.map +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index154.js +19 -7
- package/dist/index154.js.map +1 -1
- package/dist/index16.js +36 -45
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +3 -3
- package/dist/index160.js.map +1 -1
- package/dist/index166.js +5 -5
- package/dist/index166.js.map +1 -1
- package/dist/index172.js +27 -25
- package/dist/index172.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +145 -162
- package/dist/index182.js.map +1 -1
- package/dist/index184.js +6 -8
- package/dist/index184.js.map +1 -1
- package/dist/index186.js +2 -8
- package/dist/index186.js.map +1 -1
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -15
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +13 -17
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +3 -2
- package/dist/index200.js.map +1 -1
- package/dist/index207.js +5 -90
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +15 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +102 -22
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +3 -28
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +23 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +27 -6
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +19 -14
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +14 -26
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +7 -22
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +27 -6
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +23 -5
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +6 -4
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +5 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +4 -24
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +4 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +21 -21
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +3 -23
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -6
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +22 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -17
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -49
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +18 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +50 -19
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +20 -28
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +27 -104
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +98 -33
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +28 -113
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +117 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +12 -4
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +4 -15
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +13 -62
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +64 -9
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +10 -106
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +107 -13
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +16 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +13 -5
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +4 -316
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +315 -58
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +58 -223
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +215 -318
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +250 -306
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +308 -173
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +178 -7
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +8 -15
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +41 -5
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +46 -38
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +7 -50
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +49 -6
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +48 -46
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +6 -51
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +10 -9
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +60 -8
- package/dist/index259.js.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +41 -60
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +88 -34
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +47 -94
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +36 -49
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +45 -32
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +47 -46
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +18 -48
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +174 -15
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +47 -169
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +17 -34
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +59 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +10 -66
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +4 -4
- package/dist/index273.js +71 -69
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +158 -152
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +7 -13
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -5
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +12 -6
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +11 -12
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +65 -9
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +6 -74
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +25 -6
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +24 -24
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +125 -24
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +52 -115
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +59 -55
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +48 -61
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +5 -48
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +14 -8
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +18 -14
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +10 -17
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +23 -11
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +52 -25
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +6 -52
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +137 -5
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +59 -149
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +90 -49
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +11 -117
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +863 -11
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +21 -865
- package/dist/index299.js.map +1 -1
- package/dist/index3.js.map +1 -1
- package/dist/index300.js +417 -27
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +774 -483
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +7436 -803
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -7429
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +12 -6
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +5 -12
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +469 -5
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +32 -464
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +18 -36
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +28 -17
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +4 -30
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +59 -4
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +11 -59
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +5 -9
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +9 -5
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +12 -9
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +3 -13
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +17 -3
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +23 -14
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +39 -23
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +5 -41
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +25 -5
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +18 -24
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +32 -17
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +5 -34
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +9 -5
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +7 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +9 -8
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +10 -9
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +7 -10
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +75 -7
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +153 -66
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +99 -147
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +13 -113
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +78 -12
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +23 -57
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +12 -45
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +16 -13
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +100 -15
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +50 -95
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +57 -5
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +41 -78
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +100 -58
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +46 -104
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +39 -51
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +143 -42
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +122 -123
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +224 -108
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +158 -174
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +213 -144
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +5 -309
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +6 -5
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +7 -6
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +4 -5
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +4 -4
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +21 -6
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +10 -21
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +128 -10
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +36 -122
- package/dist/index359.js.map +1 -1
- package/dist/index360.js +64 -38
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +115 -66
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +485 -112
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +7 -490
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +1 -1
- package/dist/index364.js.map +1 -1
- package/dist/index367.js +2 -9
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +26 -5
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +43 -27
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +35 -46
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +16 -27
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +41 -16
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +11 -42
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +10 -14
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +51 -9
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +40 -53
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +17 -43
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +4 -15
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +4 -4
- package/dist/index379.js.map +1 -1
- package/dist/index380.js +9 -4
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +304 -9
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +4 -339
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +21 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +106 -16
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +19 -109
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +18 -18
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +14 -19
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +12 -4
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +113 -20
- package/dist/index389.js.map +1 -1
- package/dist/index390.js +5 -11
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +28 -85
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +9 -9
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +6 -29
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +254 -10
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +12 -6
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +11 -252
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +6 -11
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +22 -10
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +22 -6
- package/dist/index399.js.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index400.js +103 -21
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +15 -23
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +11 -108
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +10 -15
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +237 -10
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +27 -9
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +33 -238
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +11 -30
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +118 -48
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +39 -11
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +18 -121
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +11 -39
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +21 -24
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +17 -11
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +10 -20
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +4 -17
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +300 -14
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +61 -323
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +4 -63
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +28 -4
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +468 -25
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +250 -452
- package/dist/index421.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +91 -133
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +2 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +11 -4
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -3
- package/dist/index72.js.map +1 -1
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +16 -19
- package/dist/index9.js.map +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
- package/package.json +15 -15
- package/dist/index422.js +0 -272
- package/dist/index422.js.map +0 -1
package/dist/index391.js
CHANGED
|
@@ -1,89 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}, [_, v]);
|
|
24
|
-
n(() => {
|
|
25
|
-
if (typeof MutationObserver != "function" || C.size === 0) return;
|
|
26
|
-
let e = new MutationObserver((e) => {
|
|
27
|
-
let t = /* @__PURE__ */ new Set(), n = (e) => t.has(e) ? t.delete(e) : t.add(e);
|
|
28
|
-
e.forEach((e) => {
|
|
29
|
-
e.removedNodes.forEach(n), e.addedNodes.forEach(n);
|
|
30
|
-
}), t.size === 0 && (b.current += 1, y(b.current));
|
|
31
|
-
});
|
|
32
|
-
return C.forEach((t, n) => {
|
|
33
|
-
n.parentElement && e.observe(n.parentElement, { childList: !0 });
|
|
34
|
-
}), () => {
|
|
35
|
-
e.disconnect();
|
|
1
|
+
import { clamp as e, evaluate as t, getAlignment as n, getAlignmentAxis as r, getAxisLength as i, getPaddingObject as a } from "./index233.js";
|
|
2
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
|
|
3
|
+
var o = (o) => ({
|
|
4
|
+
name: "arrow",
|
|
5
|
+
options: o,
|
|
6
|
+
async fn(s) {
|
|
7
|
+
let { x: c, y: l, placement: u, rects: d, platform: f, elements: p, middlewareData: m } = s, { element: h, padding: g = 0, offsetParent: _ = "real" } = t(o, s) || {};
|
|
8
|
+
if (h == null) return {};
|
|
9
|
+
let v = a(g), y = {
|
|
10
|
+
x: c,
|
|
11
|
+
y: l
|
|
12
|
+
}, b = r(u), x = i(b), S = await f.getDimensions(h), C = b === "y", w = C ? "top" : "left", T = C ? "bottom" : "right", E = C ? "clientHeight" : "clientWidth", D = d.reference[x] + d.reference[b] - y[b] - d.floating[x], O = y[b] - d.reference[b], k = _ === "real" ? await f.getOffsetParent?.(h) : p.floating, A = p.floating[E] || d.floating[x];
|
|
13
|
+
(!A || !await f.isElement?.(k)) && (A = p.floating[E] || d.floating[x]);
|
|
14
|
+
let j = D / 2 - O / 2, M = A / 2 - S[x] / 2 - 1, N = Math.min(v[w], M), P = Math.min(v[T], M), F = N, I = A - S[x] - P, L = A / 2 - S[x] / 2 + j, R = e(F, L, I), z = !m.arrow && n(u) != null && L !== R && d.reference[x] / 2 - (L < F ? N : P) - S[x] / 2 < 0, B = z ? L < F ? L - F : L - I : 0;
|
|
15
|
+
return {
|
|
16
|
+
[b]: y[b] + B,
|
|
17
|
+
data: {
|
|
18
|
+
[b]: R,
|
|
19
|
+
centerOffset: L - R - B,
|
|
20
|
+
...z && { alignmentOffset: B }
|
|
21
|
+
},
|
|
22
|
+
reset: z
|
|
36
23
|
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
d,
|
|
43
|
-
f,
|
|
44
|
-
v
|
|
45
|
-
]), n(() => () => {
|
|
46
|
-
d.current = [];
|
|
47
|
-
}, [d]), n(() => () => {
|
|
48
|
-
f && (f.current = []);
|
|
49
|
-
}, [f]);
|
|
50
|
-
let w = t((e) => (g.add(e), () => {
|
|
51
|
-
g.delete(e);
|
|
52
|
-
}));
|
|
53
|
-
n(() => {
|
|
54
|
-
g.forEach((e) => e(C));
|
|
55
|
-
}, [g, C]);
|
|
56
|
-
let T = i.useMemo(() => ({
|
|
57
|
-
register: x,
|
|
58
|
-
unregister: S,
|
|
59
|
-
subscribeMapChange: w,
|
|
60
|
-
elementsRef: d,
|
|
61
|
-
labelsRef: f,
|
|
62
|
-
nextIndexRef: h
|
|
63
|
-
}), [
|
|
64
|
-
x,
|
|
65
|
-
S,
|
|
66
|
-
w,
|
|
67
|
-
d,
|
|
68
|
-
f,
|
|
69
|
-
h
|
|
70
|
-
]);
|
|
71
|
-
return /*#__PURE__*/ a(r.Provider, {
|
|
72
|
-
value: T,
|
|
73
|
-
children: u
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function s() {
|
|
77
|
-
return /* @__PURE__ */ new Map();
|
|
78
|
-
}
|
|
79
|
-
function c() {
|
|
80
|
-
return /* @__PURE__ */ new Set();
|
|
81
|
-
}
|
|
82
|
-
function l(e, t) {
|
|
83
|
-
let n = e.compareDocumentPosition(t);
|
|
84
|
-
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
85
|
-
}
|
|
24
|
+
}
|
|
25
|
+
}), s = (e, t) => ({
|
|
26
|
+
...o(e),
|
|
27
|
+
options: [e, t]
|
|
28
|
+
});
|
|
86
29
|
//#endregion
|
|
87
|
-
export { o as
|
|
30
|
+
export { s as arrow, o as baseArrow };
|
|
88
31
|
|
|
89
32
|
//# sourceMappingURL=index391.js.map
|
package/dist/index391.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index391.js","names":[
|
|
1
|
+
{"version":3,"file":"index391.js","names":[],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs"],"sourcesContent":["import { clamp, evaluate, getAlignment, getAlignmentAxis, getAxisLength, getPaddingObject } from '@floating-ui/utils';\n/**\n * Fork of the original `arrow` middleware from Floating UI that allows\n * configuring the offset parent.\n */\nexport const baseArrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0,\n offsetParent = 'real'\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = offsetParent === 'real' ? await platform.getOffsetParent?.(element) : elements.floating;\n let clientSize = elements.floating[clientProp] || rects.floating[length];\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await platform.isElement?.(arrowOffsetParent))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n // eslint-disable-next-line no-nested-ternary\n const alignmentOffset = shouldAddOffset ? center < min ? center - min : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nexport const arrow = (options, deps) => ({\n ...baseArrow(options),\n options: [options, deps]\n});"],"x_google_ignoreList":[0],"mappings":";;AAKA,IAAa,KAAY,OAAY;CACnC,MAAM;CACN;CACA,MAAM,GAAG,GAAO;EACd,IAAM,EACJ,MACA,MACA,cACA,UACA,aACA,aACA,sBACE,GAEE,EACJ,YACA,aAAU,GACV,kBAAe,WACb,EAAS,GAAS,CAAK,KAAK,CAAC;EACjC,IAAI,KAAW,MACb,OAAO,CAAC;EAEV,IAAM,IAAgB,EAAiB,CAAO,GACxC,IAAS;GACb;GACA;EACF,GACM,IAAO,EAAiB,CAAS,GACjC,IAAS,EAAc,CAAI,GAC3B,IAAkB,MAAM,EAAS,cAAc,CAAO,GACtD,IAAU,MAAS,KACnB,IAAU,IAAU,QAAQ,QAC5B,IAAU,IAAU,WAAW,SAC/B,IAAa,IAAU,iBAAiB,eACxC,IAAU,EAAM,UAAU,KAAU,EAAM,UAAU,KAAQ,EAAO,KAAQ,EAAM,SAAS,IAC1F,IAAY,EAAO,KAAQ,EAAM,UAAU,IAC3C,IAAoB,MAAiB,SAAS,MAAM,EAAS,kBAAkB,CAAO,IAAI,EAAS,UACrG,IAAa,EAAS,SAAS,MAAe,EAAM,SAAS;EAGjE,CAAI,CAAC,KAAc,CAAE,MAAM,EAAS,YAAY,CAAiB,OAC/D,IAAa,EAAS,SAAS,MAAe,EAAM,SAAS;EAE/D,IAAM,IAAoB,IAAU,IAAI,IAAY,GAI9C,IAAyB,IAAa,IAAI,EAAgB,KAAU,IAAI,GACxE,IAAa,KAAK,IAAI,EAAc,IAAU,CAAsB,GACpE,IAAa,KAAK,IAAI,EAAc,IAAU,CAAsB,GAIpE,IAAM,GACN,IAAM,IAAa,EAAgB,KAAU,GAC7C,IAAS,IAAa,IAAI,EAAgB,KAAU,IAAI,GACxD,IAAS,EAAM,GAAK,GAAQ,CAAG,GAM/B,IAAkB,CAAC,EAAe,SAAS,EAAa,CAAS,KAAK,QAAQ,MAAW,KAAU,EAAM,UAAU,KAAU,KAAK,IAAS,IAAM,IAAa,KAAc,EAAgB,KAAU,IAAI,GAE1M,IAAkB,IAAkB,IAAS,IAAM,IAAS,IAAM,IAAS,IAAM;EACvF,OAAO;IACJ,IAAO,EAAO,KAAQ;GACvB,MAAM;KACH,IAAO;IACR,cAAc,IAAS,IAAS;IAChC,GAAI,KAAmB,EACrB,mBACF;GACF;GACA,OAAO;EACT;CACF;AACF,IAQa,KAAS,GAAS,OAAU;CACvC,GAAG,EAAU,CAAO;CACpB,SAAS,CAAC,GAAS,CAAI;AACzB"}
|
package/dist/index392.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
//#region ../../node_modules/@base-ui/react/utils/hideMiddleware.mjs
|
|
2
|
+
var e = {
|
|
3
|
+
name: "hide",
|
|
4
|
+
async fn(e) {
|
|
5
|
+
let { width: t, height: n, x: r, y: i } = e.rects.reference, a = t === 0 && n === 0 && r === 0 && i === 0, o = await e.platform.detectOverflow(e, { elementContext: "reference" });
|
|
6
|
+
return { data: { referenceHidden: o.top - n >= 0 || o.right - t >= 0 || o.bottom - n >= 0 || o.left - t >= 0 || a } };
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { e as hide };
|
|
11
11
|
|
|
12
12
|
//# sourceMappingURL=index392.js.map
|
package/dist/index392.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index392.js","names":[
|
|
1
|
+
{"version":3,"file":"index392.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/hideMiddleware.mjs"],"sourcesContent":["export const hide = {\n name: 'hide',\n async fn(state) {\n const {\n width,\n height,\n x,\n y\n } = state.rects.reference;\n const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;\n // Mirrors Floating UI's `hide()` referenceHidden strategy. Floating UI injects\n // `detectOverflow` into the middleware platform before invoking middleware.\n const overflow = await state.platform.detectOverflow(state, {\n elementContext: 'reference'\n });\n const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;\n return {\n data: {\n referenceHidden: referenceHidden || anchorHidden\n }\n };\n }\n};"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,IAAO;CAClB,MAAM;CACN,MAAM,GAAG,GAAO;EACd,IAAM,EACJ,UACA,WACA,MACA,SACE,EAAM,MAAM,WACV,IAAe,MAAU,KAAK,MAAW,KAAK,MAAM,KAAK,MAAM,GAG/D,IAAW,MAAM,EAAM,SAAS,eAAe,GAAO,EAC1D,gBAAgB,YAClB,CAAC;EAED,OAAO,EACL,MAAM,EACJ,iBAHoB,EAAS,MAAM,KAAU,KAAK,EAAS,QAAQ,KAAS,KAAK,EAAS,SAAS,KAAU,KAAK,EAAS,OAAO,KAAS,KAGvG,EACtC,EACF;CACF;AACF"}
|
package/dist/index393.js
CHANGED
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
async fn(s) {
|
|
7
|
-
let { x: c, y: l, placement: u, rects: d, platform: f, elements: p, middlewareData: m } = s, { element: h, padding: g = 0, offsetParent: _ = "real" } = t(o, s) || {};
|
|
8
|
-
if (h == null) return {};
|
|
9
|
-
let v = a(g), y = {
|
|
10
|
-
x: c,
|
|
11
|
-
y: l
|
|
12
|
-
}, b = r(u), x = i(b), S = await f.getDimensions(h), C = b === "y", w = C ? "top" : "left", T = C ? "bottom" : "right", E = C ? "clientHeight" : "clientWidth", D = d.reference[x] + d.reference[b] - y[b] - d.floating[x], O = y[b] - d.reference[b], k = _ === "real" ? await f.getOffsetParent?.(h) : p.floating, A = p.floating[E] || d.floating[x];
|
|
13
|
-
(!A || !await f.isElement?.(k)) && (A = p.floating[E] || d.floating[x]);
|
|
14
|
-
let j = D / 2 - O / 2, M = A / 2 - S[x] / 2 - 1, N = Math.min(v[w], M), P = Math.min(v[T], M), F = N, I = A - S[x] - P, L = A / 2 - S[x] / 2 + j, R = e(F, L, I), z = !m.arrow && n(u) != null && L !== R && d.reference[x] / 2 - (L < F ? N : P) - S[x] / 2 < 0, B = z ? L < F ? L - F : L - I : 0;
|
|
15
|
-
return {
|
|
16
|
-
[b]: y[b] + B,
|
|
17
|
-
data: {
|
|
18
|
-
[b]: R,
|
|
19
|
-
centerOffset: L - R - B,
|
|
20
|
-
...z && { alignmentOffset: B }
|
|
21
|
-
},
|
|
22
|
-
reset: z
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}), s = (e, t) => ({
|
|
26
|
-
...o(e),
|
|
27
|
-
options: [e, t]
|
|
28
|
-
});
|
|
1
|
+
//#region ../../node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
|
|
2
|
+
var e = {
|
|
3
|
+
sideX: "left",
|
|
4
|
+
sideY: "top"
|
|
5
|
+
};
|
|
29
6
|
//#endregion
|
|
30
|
-
export {
|
|
7
|
+
export { e as DEFAULT_SIDES };
|
|
31
8
|
|
|
32
9
|
//# sourceMappingURL=index393.js.map
|
package/dist/index393.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index393.js","names":[],"sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index393.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs"],"sourcesContent":["export const DEFAULT_SIDES = {\n sideX: 'left',\n sideY: 'top'\n};\n\n// Self-contained stand-in for Floating UI's `Middleware` type. Referencing the real type in\n// store state makes `tsc` declaration emit reference `Platform`/`detectOverflow` from\n// `@floating-ui/core` internals, which fails as non-portable (TS2883) in consuming builds."],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,IAAgB;CAC3B,OAAO;CACP,OAAO;AACT"}
|
package/dist/index394.js
CHANGED
|
@@ -1,13 +1,257 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
import { getWindow as e } from "./index200.js";
|
|
3
|
+
import { useStableCallback as t } from "./index202.js";
|
|
4
|
+
import { useIsoLayoutEffect as n } from "./index204.js";
|
|
5
|
+
import { ownerDocument as r } from "./index207.js";
|
|
6
|
+
import { useValueAsRef as i } from "./index229.js";
|
|
7
|
+
import { getAlignment as a, getSide as o, getSideAxis as s } from "./index233.js";
|
|
8
|
+
import { autoUpdate as c } from "./index249.js";
|
|
9
|
+
import { flip as l, limitShift as u, offset as d, shift as f, size as ee } from "./index250.js";
|
|
10
|
+
import { useBaseUIFloating as p } from "./index273.js";
|
|
11
|
+
import { useDirection as m } from "./index390.js";
|
|
12
|
+
import { arrow as h } from "./index391.js";
|
|
13
|
+
import { hide as te } from "./index392.js";
|
|
14
|
+
import { DEFAULT_SIDES as ne } from "./index393.js";
|
|
15
|
+
import * as g from "react";
|
|
16
|
+
//#region ../../node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
|
|
17
|
+
var _ = "--available-width", v = "--available-height";
|
|
18
|
+
function y(e, t, n) {
|
|
19
|
+
let r = e === "inline-start" || e === "inline-end";
|
|
20
|
+
return {
|
|
21
|
+
top: "top",
|
|
22
|
+
right: r ? n ? "inline-start" : "inline-end" : "right",
|
|
23
|
+
bottom: "bottom",
|
|
24
|
+
left: r ? n ? "inline-end" : "inline-start" : "left"
|
|
25
|
+
}[t];
|
|
26
|
+
}
|
|
27
|
+
function re(e, t, n) {
|
|
28
|
+
let { rects: r, placement: i } = e;
|
|
29
|
+
return {
|
|
30
|
+
side: y(t, o(i), n),
|
|
31
|
+
align: a(i) || "center",
|
|
32
|
+
anchor: {
|
|
33
|
+
width: r.reference.width,
|
|
34
|
+
height: r.reference.height
|
|
35
|
+
},
|
|
36
|
+
positioner: {
|
|
37
|
+
width: r.floating.width,
|
|
38
|
+
height: r.floating.height
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function ie(e) {
|
|
43
|
+
return b(e, p);
|
|
44
|
+
}
|
|
45
|
+
function b(p, ie) {
|
|
46
|
+
let { anchor: b, positionMethod: oe = "absolute", side: x = "bottom", sideOffset: S = 0, align: C = "center", alignOffset: w = 0, collisionBoundary: se, collisionPadding: ce = 5, sticky: T = !1, arrowPadding: le = 5, disableAnchorTracking: E = !1, inline: ue, keepMounted: D = !1, floatingRootContext: O, mounted: k, collisionAvoidance: A, shift: de, nodeId: fe, adaptiveOrigin: j, lazyFlip: pe = !1, externalTree: me } = p, [he, ge] = g.useState(null);
|
|
47
|
+
!k && he !== null && ge(null);
|
|
48
|
+
let M = A.side || "flip", N = A.align || "flip", _e = A.fallbackAxisSide || "end", P = de?.crossAxis ?? !1, ve = de?.rootBoundary, ye = typeof b == "function" ? b : void 0, be = t(ye), xe = ye ? be : b, F = i(b), Se = i(k), I = m() === "rtl", L = he || {
|
|
49
|
+
top: "top",
|
|
50
|
+
right: "right",
|
|
51
|
+
bottom: "bottom",
|
|
52
|
+
left: "left",
|
|
53
|
+
"inline-end": I ? "left" : "right",
|
|
54
|
+
"inline-start": I ? "right" : "left"
|
|
55
|
+
}[x], Ce = C === "center" ? L : `${L}-${C}`, R = ce;
|
|
56
|
+
typeof R == "number" ? R = {
|
|
57
|
+
top: R,
|
|
58
|
+
right: R,
|
|
59
|
+
bottom: R,
|
|
60
|
+
left: R
|
|
61
|
+
} : R &&= {
|
|
62
|
+
top: R.top || 0,
|
|
63
|
+
right: R.right || 0,
|
|
64
|
+
bottom: R.bottom || 0,
|
|
65
|
+
left: R.left || 0
|
|
66
|
+
};
|
|
67
|
+
let we = +(x === "bottom"), Te = +(x === "top"), Ee = +(x === "right"), De = +(x === "left"), z = {
|
|
68
|
+
boundary: se === "clipping-ancestors" ? "clippingAncestors" : se,
|
|
69
|
+
padding: R
|
|
70
|
+
}, B = g.useRef(null), V = i(S), H = i(w), Oe = typeof S == "function" ? 0 : S, ke = typeof w == "function" ? 0 : w, U = [];
|
|
71
|
+
ue && U.push(ue), U.push(d((e) => {
|
|
72
|
+
let t = re(e, x, I), n = typeof V.current == "function" ? V.current(t) : V.current, r = typeof H.current == "function" ? H.current(t) : H.current;
|
|
73
|
+
return {
|
|
74
|
+
mainAxis: n,
|
|
75
|
+
crossAxis: r,
|
|
76
|
+
alignmentAxis: r
|
|
77
|
+
};
|
|
78
|
+
}, [
|
|
79
|
+
Oe,
|
|
80
|
+
ke,
|
|
81
|
+
I,
|
|
82
|
+
x
|
|
83
|
+
]));
|
|
84
|
+
let Ae = N === "none" && M !== "shift", je = !Ae && (T || P || M === "shift"), Me = M === "none" ? null : l({
|
|
85
|
+
...z,
|
|
86
|
+
padding: {
|
|
87
|
+
top: R.top + 1 + we,
|
|
88
|
+
right: R.right + 1 + De,
|
|
89
|
+
bottom: R.bottom + 1 + Te,
|
|
90
|
+
left: R.left + 1 + Ee
|
|
91
|
+
},
|
|
92
|
+
mainAxis: !P && M === "flip",
|
|
93
|
+
crossAxis: N === "flip" && "alignment",
|
|
94
|
+
fallbackAxisSideDirection: _e
|
|
95
|
+
}), Ne = Ae ? null : f({
|
|
96
|
+
...z,
|
|
97
|
+
rootBoundary: ve,
|
|
98
|
+
mainAxis: N !== "none",
|
|
99
|
+
crossAxis: je,
|
|
100
|
+
limiter: T || P ? void 0 : u((e) => {
|
|
101
|
+
if (!B.current) return {};
|
|
102
|
+
let { width: t, height: n } = B.current.getBoundingClientRect(), r = s(o(e.placement)), i = r === "y" ? t : n, a = r === "y" ? R.left + R.right : R.top + R.bottom;
|
|
103
|
+
return { offset: i / 2 + a / 2 };
|
|
104
|
+
})
|
|
105
|
+
}, [
|
|
106
|
+
z,
|
|
107
|
+
T,
|
|
108
|
+
P,
|
|
109
|
+
ve,
|
|
110
|
+
R,
|
|
111
|
+
N
|
|
112
|
+
]);
|
|
113
|
+
M === "shift" || N === "shift" || C === "center" ? U.push(Ne, Me) : U.push(Me, Ne), U.push(ee({
|
|
114
|
+
...z,
|
|
115
|
+
apply({ elements: { floating: t }, availableWidth: n, availableHeight: r, rects: i }) {
|
|
116
|
+
if (!Se.current) return;
|
|
117
|
+
let a = t.style;
|
|
118
|
+
a.setProperty(_, `${n}px`), a.setProperty(v, `${r}px`);
|
|
119
|
+
let o = e(t).devicePixelRatio || 1, { x: s, y: c, width: l, height: u } = i.reference, d = (Math.round((s + l) * o) - Math.round(s * o)) / o, f = (Math.round((c + u) * o) - Math.round(c * o)) / o;
|
|
120
|
+
a.setProperty("--anchor-width", `${d}px`), a.setProperty("--anchor-height", `${f}px`);
|
|
121
|
+
}
|
|
122
|
+
}), h((e) => ({
|
|
123
|
+
element: B.current || r(e.elements.floating).createElement("div"),
|
|
124
|
+
padding: le,
|
|
125
|
+
offsetParent: "floating"
|
|
126
|
+
}), [le]), {
|
|
127
|
+
name: "transformOrigin",
|
|
128
|
+
fn(e) {
|
|
129
|
+
let { elements: t, middlewareData: n, placement: r, rects: i, y: a } = e, c = o(r), l = s(c), u = B.current, d = n.arrow?.x || 0, f = n.arrow?.y || 0, ee = u?.clientWidth || 0, p = u?.clientHeight || 0, m = d + ee / 2, h = f + p / 2, te = Math.abs(n.shift?.y || 0), ne = i.reference.height / 2, g = typeof S == "function" ? S(re(e, x, I)) : S, _ = te > g, v = {
|
|
130
|
+
top: `${m}px calc(100% + ${g}px)`,
|
|
131
|
+
bottom: `${m}px ${-g}px`,
|
|
132
|
+
left: `calc(100% + ${g}px) ${h}px`,
|
|
133
|
+
right: `${-g}px ${h}px`
|
|
134
|
+
}[c], y = `${m}px ${i.reference.y + ne - a}px`;
|
|
135
|
+
return t.floating.style.setProperty("--transform-origin", je && l === "y" && _ ? y : v), {};
|
|
136
|
+
}
|
|
137
|
+
}, te, j), n(() => {
|
|
138
|
+
!k && O && O.update({
|
|
139
|
+
referenceElement: null,
|
|
140
|
+
floatingElement: null,
|
|
141
|
+
domReferenceElement: null,
|
|
142
|
+
positionReference: null
|
|
143
|
+
});
|
|
144
|
+
}, [k, O]);
|
|
145
|
+
let W = g.useMemo(() => ({
|
|
146
|
+
elementResize: !E && typeof ResizeObserver < "u",
|
|
147
|
+
layoutShift: !E && typeof IntersectionObserver < "u"
|
|
148
|
+
}), [E]), { refs: G, elements: K, x: Pe, y: Fe, middlewareData: q, update: J, placement: Ie, context: Le, isPositioned: Y, floatingStyles: Re } = ie({
|
|
149
|
+
rootContext: O,
|
|
150
|
+
open: D ? k : void 0,
|
|
151
|
+
placement: Ce,
|
|
152
|
+
middleware: U,
|
|
153
|
+
strategy: oe,
|
|
154
|
+
whileElementsMounted: D ? void 0 : (...e) => c(...e, W),
|
|
155
|
+
nodeId: fe,
|
|
156
|
+
externalTree: me
|
|
157
|
+
}), { sideX: ze, sideY: Be } = q.adaptiveOrigin || ne, X = Y ? oe : "fixed", Z = g.useMemo(() => {
|
|
158
|
+
let e;
|
|
159
|
+
return e = Y ? j ? {
|
|
160
|
+
position: X,
|
|
161
|
+
[ze]: Pe,
|
|
162
|
+
[Be]: Fe
|
|
163
|
+
} : {
|
|
164
|
+
...Re,
|
|
165
|
+
position: X
|
|
166
|
+
} : {
|
|
167
|
+
position: X,
|
|
168
|
+
top: 0,
|
|
169
|
+
left: 0
|
|
170
|
+
}, e[_] = "100vw", e[v] = "100vh", Y || (e.opacity = 0), e;
|
|
171
|
+
}, [
|
|
172
|
+
j,
|
|
173
|
+
X,
|
|
174
|
+
ze,
|
|
175
|
+
Pe,
|
|
176
|
+
Be,
|
|
177
|
+
Fe,
|
|
178
|
+
Re,
|
|
179
|
+
Y
|
|
180
|
+
]), Q = g.useRef(null);
|
|
181
|
+
n(() => {
|
|
182
|
+
if (!k) return;
|
|
183
|
+
let e = F.current, t = typeof e == "function" ? e() : e, n = (ae(t) ? t.current : t) || null;
|
|
184
|
+
n !== Q.current && (G.setPositionReference(n), Q.current = n);
|
|
185
|
+
}, [
|
|
186
|
+
k,
|
|
187
|
+
G,
|
|
188
|
+
xe,
|
|
189
|
+
F
|
|
190
|
+
]), g.useEffect(() => {
|
|
191
|
+
if (!k) return;
|
|
192
|
+
let e = F.current;
|
|
193
|
+
typeof e != "function" && ae(e) && e.current !== Q.current && (G.setPositionReference(e.current), Q.current = e.current);
|
|
194
|
+
}, [
|
|
195
|
+
k,
|
|
196
|
+
G,
|
|
197
|
+
xe,
|
|
198
|
+
F
|
|
199
|
+
]), g.useEffect(() => {
|
|
200
|
+
if (D && k && K.reference && K.floating) return c(K.reference, K.floating, J, W);
|
|
201
|
+
}, [
|
|
202
|
+
D,
|
|
203
|
+
k,
|
|
204
|
+
K,
|
|
205
|
+
J,
|
|
206
|
+
W
|
|
207
|
+
]);
|
|
208
|
+
let $ = o(Ie), Ve = y(x, $, I), He = a(Ie) || "center", Ue = !!q.hide?.referenceHidden;
|
|
209
|
+
n(() => {
|
|
210
|
+
pe && k && Y && $ !== L && ge($);
|
|
211
|
+
}, [
|
|
212
|
+
pe,
|
|
213
|
+
k,
|
|
214
|
+
Y,
|
|
215
|
+
$,
|
|
216
|
+
L
|
|
217
|
+
]);
|
|
218
|
+
let We = g.useMemo(() => ({
|
|
219
|
+
position: "absolute",
|
|
220
|
+
top: q.arrow?.y,
|
|
221
|
+
left: q.arrow?.x
|
|
222
|
+
}), [q.arrow]), Ge = q.arrow?.centerOffset !== 0;
|
|
223
|
+
return g.useMemo(() => ({
|
|
224
|
+
positionerStyles: Z,
|
|
225
|
+
arrowStyles: We,
|
|
226
|
+
arrowRef: B,
|
|
227
|
+
arrowUncentered: Ge,
|
|
228
|
+
side: Ve,
|
|
229
|
+
align: He,
|
|
230
|
+
physicalSide: $,
|
|
231
|
+
anchorHidden: Ue,
|
|
232
|
+
refs: G,
|
|
233
|
+
context: Le,
|
|
234
|
+
isPositioned: Y,
|
|
235
|
+
update: J
|
|
236
|
+
}), [
|
|
237
|
+
Z,
|
|
238
|
+
We,
|
|
239
|
+
B,
|
|
240
|
+
Ge,
|
|
241
|
+
Ve,
|
|
242
|
+
He,
|
|
243
|
+
$,
|
|
244
|
+
Ue,
|
|
245
|
+
G,
|
|
246
|
+
Le,
|
|
247
|
+
Y,
|
|
248
|
+
J
|
|
249
|
+
]);
|
|
250
|
+
}
|
|
251
|
+
function ae(e) {
|
|
252
|
+
return e != null && "current" in e;
|
|
253
|
+
}
|
|
10
254
|
//#endregion
|
|
11
|
-
export {
|
|
255
|
+
export { ie as useAnchorPositioning, b as useAnchorPositioningWithHook };
|
|
12
256
|
|
|
13
257
|
//# sourceMappingURL=index394.js.map
|
package/dist/index394.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index394.js","names":["nativeHide"],"sources":["../../../node_modules/@base-ui/react/utils/hideMiddleware.mjs"],"sourcesContent":["import { hide as nativeHide } from '@floating-ui/react-dom';\nconst nativeHideFn = nativeHide().fn;\nexport const hide = {\n name: 'hide',\n async fn(state) {\n const {\n width,\n height,\n x,\n y\n } = state.rects.reference;\n const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;\n const nativeHideResult = await nativeHideFn(state);\n return {\n data: {\n referenceHidden: nativeHideResult.data?.referenceHidden || anchorHidden\n }\n };\n }\n};"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAM,IAAeA,EAAW,CAAC,CAAC,IACrB,IAAO;CAClB,MAAM;CACN,MAAM,GAAG,GAAO;EACd,IAAM,EACJ,UACA,WACA,MACA,SACE,EAAM,MAAM,WACV,IAAe,MAAU,KAAK,MAAW,KAAK,MAAM,KAAK,MAAM;EAErE,OAAO,EACL,MAAM,EACJ,kBAAiB,MAHU,EAAa,CAAK,EAAA,CAGX,MAAM,mBAAmB,EAC7D,EACF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"index394.js","names":["React","shift","floatingShift","ownerWindow"],"sources":["../../../node_modules/@base-ui/react/internals/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 as floatingShift, size } from \"../floating-ui-react/index.mjs\";\nimport { useBaseUIFloating } from \"../floating-ui-react/hooks/useFloating.mjs\";\nimport { useDirection } from \"./direction-context/DirectionContext.mjs\";\nimport { arrow } from \"../floating-ui-react/middleware/arrow.mjs\";\nimport { hide } from \"../utils/hideMiddleware.mjs\";\nimport { DEFAULT_SIDES } from \"../utils/adaptiveOriginConstants.mjs\";\nconst AVAILABLE_WIDTH_VAR = '--available-width';\nconst AVAILABLE_HEIGHT_VAR = '--available-height';\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 return useAnchorPositioningWithHook(params, useBaseUIFloating);\n}\nexport function useAnchorPositioningWithHook(params, useFloatingHook) {\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 shift,\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 shiftCrossAxis = shift?.crossAxis ?? false;\n const shiftRootBoundary = shift?.rootBoundary;\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 if (typeof collisionPadding === 'number') {\n collisionPadding = {\n top: collisionPadding,\n right: collisionPadding,\n bottom: collisionPadding,\n left: collisionPadding\n };\n } else if (collisionPadding) {\n collisionPadding = {\n top: collisionPadding.top || 0,\n right: collisionPadding.right || 0,\n bottom: collisionPadding.bottom || 0,\n left: collisionPadding.left || 0\n };\n }\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 // The bias is only applied to `flip()` so it doesn't shift the resting position\n // computed by `shift()` and `size()` away from the requested `collisionPadding`.\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 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 + biasTop,\n right: collisionPadding.right + bias + biasRight,\n bottom: collisionPadding.bottom + bias + biasBottom,\n left: collisionPadding.left + bias + biasLeft\n },\n mainAxis: !shiftCrossAxis && collisionAvoidanceSide === 'flip',\n crossAxis: collisionAvoidanceAlign === 'flip' ? 'alignment' : false,\n fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide\n });\n const shiftMiddleware = shiftDisabled ? null : floatingShift({\n ...commonCollisionProps,\n // Use the Layout Viewport to avoid shifting around when pinch-zooming.\n rootBoundary: shiftRootBoundary,\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 }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, 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_VAR, `${availableWidth}px`);\n floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `${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 } = useFloatingHook({\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 let base;\n if (!isPositioned) {\n // Until a position for the current open is computed, ignore any coordinates retained from a\n // previous open (or from a pass that measured the hidden popup as 0x0). Rendering the\n // full-size popup at such stale coordinates can overflow the layout viewport, which makes\n // mobile Chrome zoom the page out and reflow everything the popup is anchored to.\n base = {\n position: resolvedPosition,\n top: 0,\n left: 0\n };\n } else if (adaptiveOrigin) {\n base = {\n position: resolvedPosition,\n [sideX]: x,\n [sideY]: y\n };\n } else {\n base = {\n ...originalFloatingStyles,\n position: resolvedPosition\n };\n }\n\n // Seed the available size vars so consumer `max-height: min(x, var(--available-height))` rules\n // resolve to a valid length on the first positioning pass, before `size()` writes the real\n // values. Without a fallback the unresolved `var()` invalidates the whole declaration, so the\n // popup is measured unconstrained while `flip()` picks its side, against the full content\n // height rather than the capped one. Seeded unconditionally (not only while `!isPositioned`):\n // the keys must stay present with a constant value so React's per-property style diff never\n // rewrites them after mount, preserving the px values `size()` sets imperatively. Moving them\n // into the `!isPositioned` branch makes React remove them once positioned, wiping `size()`'s\n // values and leaving the popup unconstrained.\n base[AVAILABLE_WIDTH_VAR] = '100vw';\n base[AVAILABLE_HEIGHT_VAR] = '100vh';\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 && renderedSide !== side) {\n setMountSide(renderedSide);\n }\n }, [lazyFlip, mounted, isPositioned, renderedSide, side]);\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}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AAcA,IAAM,IAAsB,qBACtB,IAAuB;AAC7B,SAAS,EAAe,GAAW,GAAc,GAAO;CACtD,IAAM,IAAqB,MAAc,kBAAkB,MAAc;CAGzE,OAAO;EACL,KAAK;EACL,OAAO,IAJY,IAAQ,iBAAiB,eAID;EAC3C,QAAQ;EACR,MAAM,IALY,IAAQ,eAAe,iBAKA;CAC3C,EAAE;AACJ;AACA,SAAS,GAAc,GAAO,GAAW,GAAO;CAC9C,IAAM,EACJ,UACA,iBACE;CAaJ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,GAC7C,EAAM,gBAAgB;EACpB,IAAI,KAAe,KAAW,EAAS,aAAa,EAAS,UAC3D,OAAO,EAAW,EAAS,WAAW,EAAS,UAAU,GAAQ,CAAiB;CAGtF,GAAG;EAAC;EAAa;EAAS;EAAU;EAAQ;CAAiB,CAAC;CAC9D,IAAM,IAAe,EAAQ,EAAiB,GACxC,KAAsB,EAAe,GAAW,GAAc,CAAK,GACnE,KAAgB,EAAa,EAAiB,KAAK,UACnD,KAAe,EAAQ,EAAe,MAAM;CAKlD,QAAyB;EACvB,AAAI,MAAY,KAAW,KAAgB,MAAiB,KAC1D,GAAa,CAAY;CAE7B,GAAG;EAAC;EAAU;EAAS;EAAc;EAAc;CAAI,CAAC;CACxD,IAAM,KAAcA,EAAM,eAAe;EACvC,UAAU;EACV,KAAK,EAAe,OAAO;EAC3B,MAAM,EAAe,OAAO;CAC9B,IAAI,CAAC,EAAe,KAAK,CAAC,GACpB,KAAkB,EAAe,OAAO,iBAAiB;CAC/D,OAAOA,EAAM,eAAe;EAC1B,kBAAkB;EAClB;EACA;EACA;EACA,MAAM;EACN,OAAO;EACP,cAAc;EACd;EACA;EACA;EACA;EACA;CACF,IAAI;EAAC;EAAgB;EAAa;EAAU;EAAiB;EAAqB;EAAe;EAAc;EAAc;EAAM;EAAS;EAAc;CAAM,CAAC;AACnK;AACA,SAAS,GAAM,GAAO;CACpB,OAAO,KAAS,QAAQ,aAAa;AACvC"}
|
package/dist/index395.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import e from "./index183.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
//#region ../../node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
|
|
5
|
+
var n = /*#__PURE__*/ t.createContext(void 0);
|
|
6
|
+
process.env.NODE_ENV !== "production" && (n.displayName = "SelectPositionerContext");
|
|
7
|
+
function r() {
|
|
8
|
+
let r = t.useContext(n);
|
|
9
|
+
if (!r) throw Error(process.env.NODE_ENV === "production" ? e(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
6
12
|
//#endregion
|
|
7
|
-
export {
|
|
13
|
+
export { n as SelectPositionerContext, r as useSelectPositionerContext };
|
|
8
14
|
|
|
9
15
|
//# sourceMappingURL=index395.js.map
|