@rpcbase/ui 0.280.0 → 0.282.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 +88 -88
- 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/index261.js
CHANGED
|
@@ -1,46 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { NOOP as e } from "./index191.js";
|
|
3
|
+
import { useStableCallback as t } from "./index202.js";
|
|
4
|
+
import { useIsoLayoutEffect as n } from "./index204.js";
|
|
5
|
+
import { useStore as r } from "./index259.js";
|
|
6
|
+
import { Store as i } from "./index260.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
//#region ../../node_modules/@base-ui/utils/store/ReactStore.mjs
|
|
9
|
+
var o = class extends i {
|
|
10
|
+
constructor(e, t = {}, n) {
|
|
11
|
+
super(e), this.context = t, this.selectors = n;
|
|
12
|
+
}
|
|
13
|
+
useSyncedValue(e, t) {
|
|
14
|
+
a.useDebugValue(e);
|
|
15
|
+
let r = this;
|
|
16
|
+
n(() => {
|
|
17
|
+
r.state[e] !== t && r.set(e, t);
|
|
18
|
+
}, [
|
|
19
|
+
r,
|
|
20
|
+
e,
|
|
21
|
+
t
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
useSyncedValueWithCleanup(e, t) {
|
|
25
|
+
let r = this;
|
|
26
|
+
n(() => (r.state[e] !== t && r.set(e, t), () => {
|
|
27
|
+
r.set(e, void 0);
|
|
28
|
+
}), [
|
|
29
|
+
r,
|
|
30
|
+
e,
|
|
31
|
+
t
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
useSyncedValues(e) {
|
|
35
|
+
let t = this;
|
|
36
|
+
if (process.env.NODE_ENV !== "production") {
|
|
37
|
+
a.useDebugValue(e, (e) => Object.keys(e));
|
|
38
|
+
let t = a.useRef(Object.keys(e)).current, n = Object.keys(e);
|
|
39
|
+
(t.length !== n.length || t.some((e, t) => e !== n[t])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
18
40
|
}
|
|
41
|
+
let r = Object.values(e);
|
|
42
|
+
n(() => {
|
|
43
|
+
t.update(e);
|
|
44
|
+
}, [t, ...r]);
|
|
19
45
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
46
|
+
useControlledProp(e, t) {
|
|
47
|
+
a.useDebugValue(e);
|
|
48
|
+
let r = this, i = t !== void 0;
|
|
49
|
+
if (n(() => {
|
|
50
|
+
i && !Object.is(r.state[e], t) && r.setState({
|
|
51
|
+
...r.state,
|
|
52
|
+
[e]: t
|
|
25
53
|
});
|
|
26
|
-
|
|
54
|
+
}, [
|
|
55
|
+
r,
|
|
56
|
+
e,
|
|
57
|
+
t,
|
|
58
|
+
i
|
|
59
|
+
]), process.env.NODE_ENV !== "production") {
|
|
60
|
+
let t = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
61
|
+
t.has(e) || t.set(e, i);
|
|
62
|
+
let n = t.get(e);
|
|
63
|
+
n !== void 0 && n !== i && console.error(`A component is changing the ${i ? "" : "un"}controlled state of ${e.toString()} to be ${i ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
27
64
|
}
|
|
28
65
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[e]: t
|
|
33
|
-
});
|
|
66
|
+
select(e, t, n, r) {
|
|
67
|
+
let i = this.selectors[e];
|
|
68
|
+
return i(this.state, t, n, r);
|
|
34
69
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.setState(e);
|
|
70
|
+
useState(e, t, n, i) {
|
|
71
|
+
return a.useDebugValue(e), r(this, this.selectors[e], t, n, i);
|
|
38
72
|
}
|
|
39
|
-
|
|
40
|
-
|
|
73
|
+
useContextCallback(n, r) {
|
|
74
|
+
a.useDebugValue(n);
|
|
75
|
+
let i = t(r ?? e);
|
|
76
|
+
this.context[n] = i;
|
|
77
|
+
}
|
|
78
|
+
useStateSetter(e) {
|
|
79
|
+
let t = a.useRef(void 0);
|
|
80
|
+
return t.current === void 0 && (t.current = (t) => {
|
|
81
|
+
this.set(e, t);
|
|
82
|
+
}), t.current;
|
|
83
|
+
}
|
|
84
|
+
observe(e, t) {
|
|
85
|
+
let n;
|
|
86
|
+
n = typeof e == "function" ? e : this.selectors[e];
|
|
87
|
+
let r = n(this.state);
|
|
88
|
+
return t(r, r, this), this.subscribe((e) => {
|
|
89
|
+
let i = n(e);
|
|
90
|
+
if (!Object.is(r, i)) {
|
|
91
|
+
let e = r;
|
|
92
|
+
r = i, t(i, e, this);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
41
95
|
}
|
|
42
96
|
};
|
|
43
97
|
//#endregion
|
|
44
|
-
export {
|
|
98
|
+
export { o as ReactStore };
|
|
45
99
|
|
|
46
100
|
//# sourceMappingURL=index261.js.map
|
package/dist/index261.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index261.js","names":[],"sources":["../../../node_modules/@base-ui/utils/store/
|
|
1
|
+
{"version":3,"file":"index261.js","names":["React"],"sources":["../../../node_modules/@base-ui/utils/store/ReactStore.mjs"],"sourcesContent":["/* False positives - ESLint thinks we're calling a hook from a class component. */\n/* eslint-disable react-hooks/rules-of-hooks */\n'use client';\n\nimport * as React from 'react';\nimport { Store } from \"./Store.mjs\";\nimport { useStore } from \"./useStore.mjs\";\nimport { useStableCallback } from \"../useStableCallback.mjs\";\nimport { useIsoLayoutEffect } from \"../useIsoLayoutEffect.mjs\";\nimport { NOOP } from \"../empty.mjs\";\n\n/**\n * A Store that supports controlled state keys, non-reactive values and provides utility methods for React.\n */\nexport class ReactStore extends Store {\n /**\n * Creates a new ReactStore instance.\n *\n * @param state Initial state of the store.\n * @param context Non-reactive context values.\n * @param selectors Optional selectors for use with `useState`.\n */\n constructor(state, context = {}, selectors) {\n super(state);\n this.context = context;\n this.selectors = selectors;\n }\n\n /**\n * Non-reactive values such as refs, callbacks, etc.\n */\n\n /**\n * Synchronizes a single external value into the store.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValue(key, value) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes a single external value into the store and\n * cleans it up (sets to `undefined`) on unmount.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValueWithCleanup(key, value) {\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n return () => {\n store.set(key, undefined);\n };\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes multiple external values into the store.\n *\n * Note that the while the values in `state` are updated immediately, the values returned\n * by `useState` are updated before the next render (similarly to React's `useState`).\n */\n useSyncedValues(statePart) {\n // eslint-disable-next-line consistent-this\n const store = this;\n if (process.env.NODE_ENV !== 'production') {\n // Check that an object with the same shape is passed on every render\n React.useDebugValue(statePart, p => Object.keys(p));\n const keys = React.useRef(Object.keys(statePart)).current;\n const nextKeys = Object.keys(statePart);\n if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) {\n console.error('ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.');\n }\n }\n const dependencies = Object.values(statePart);\n useIsoLayoutEffect(() => {\n store.update(statePart);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [store, ...dependencies]);\n }\n\n /**\n * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`\n * is non-undefined, the store's state at `key` is updated to match `controlled`.\n */\n useControlledProp(key, controlled) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n const isControlled = controlled !== undefined;\n useIsoLayoutEffect(() => {\n if (isControlled && !Object.is(store.state[key], controlled)) {\n // Set the internal state to match the controlled value.\n store.setState({\n ...store.state,\n [key]: controlled\n });\n }\n }, [store, key, controlled, isControlled]);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n const cache = this.controlledValues ??= new Map();\n if (!cache.has(key)) {\n cache.set(key, isControlled);\n }\n const previouslyControlled = cache.get(key);\n if (previouslyControlled !== undefined && previouslyControlled !== isControlled) {\n console.error(`A component is changing the ${isControlled ? '' : 'un'}controlled state of ${key.toString()} to be ${isControlled ? 'un' : ''}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);\n }\n }\n }\n\n /** Gets the current value from the store using a selector with the provided key.\n *\n * @param key Key of the selector to use.\n */\n\n select(key, a1, a2, a3) {\n const selector = this.selectors[key];\n return selector(this.state, a1, a2, a3);\n }\n\n /**\n * Returns a value from the store's state using a selector function.\n * Used to subscribe to specific parts of the state.\n * This methods causes a rerender whenever the selected state changes.\n *\n * @param key Key of the selector to use.\n */\n\n useState(key, a1, a2, a3) {\n React.useDebugValue(key);\n return useStore(this, this.selectors[key], a1, a2, a3);\n }\n\n /**\n * Wraps a function with `useStableCallback` to ensure it has a stable reference\n * and assigns it to the context.\n *\n * @param key Key of the event callback. Must be a function in the context.\n * @param fn Function to assign.\n */\n useContextCallback(key, fn) {\n React.useDebugValue(key);\n const stableFunction = useStableCallback(fn ?? NOOP);\n this.context[key] = stableFunction;\n }\n\n /**\n * Returns a stable setter function for a specific key in the store's state.\n * It's commonly used to pass as a ref callback to React elements.\n *\n * @param key Key of the state to set.\n */\n useStateSetter(key) {\n const ref = React.useRef(undefined);\n if (ref.current === undefined) {\n ref.current = value => {\n this.set(key, value);\n };\n }\n return ref.current;\n }\n\n /**\n * Observes changes derived from the store's selectors and calls the listener when the selected value changes.\n *\n * @param key Key of the selector to observe.\n * @param listener Listener function called when the selector result changes.\n */\n\n observe(selector, listener) {\n let selectFn;\n if (typeof selector === 'function') {\n selectFn = selector;\n } else {\n selectFn = this.selectors[selector];\n }\n let prevValue = selectFn(this.state);\n listener(prevValue, prevValue, this);\n return this.subscribe(nextState => {\n const nextValue = selectFn(nextState);\n if (!Object.is(prevValue, nextValue)) {\n const oldValue = prevValue;\n prevValue = nextValue;\n listener(nextValue, oldValue, this);\n }\n });\n }\n}"],"x_google_ignoreList":[0],"mappings":"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"}
|
package/dist/index262.js
CHANGED
|
@@ -1,99 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
a
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { isClickLikeEvent as e } from "./index223.js";
|
|
2
|
+
import { createEventEmitter as t } from "./index242.js";
|
|
3
|
+
import { ReactStore as n } from "./index261.js";
|
|
4
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
|
|
5
|
+
var r = {
|
|
6
|
+
open: (e) => e.open,
|
|
7
|
+
transitionStatus: (e) => e.transitionStatus,
|
|
8
|
+
domReferenceElement: (e) => e.domReferenceElement,
|
|
9
|
+
referenceElement: (e) => e.positionReference ?? e.referenceElement,
|
|
10
|
+
floatingElement: (e) => e.floatingElement,
|
|
11
|
+
floatingId: (e) => e.floatingId
|
|
12
|
+
}, i = class extends n {
|
|
13
|
+
constructor(e) {
|
|
14
|
+
let { syncOnly: n, nested: i, onOpenChange: a, triggerElements: o, ...s } = e;
|
|
15
|
+
super({
|
|
16
|
+
...s,
|
|
17
|
+
positionReference: s.referenceElement,
|
|
18
|
+
domReferenceElement: s.referenceElement
|
|
19
|
+
}, {
|
|
20
|
+
onOpenChange: a,
|
|
21
|
+
dataRef: { current: {} },
|
|
22
|
+
events: t(),
|
|
23
|
+
nested: i,
|
|
24
|
+
triggerElements: o
|
|
25
|
+
}, r), this.syncOnly = n;
|
|
26
|
+
}
|
|
27
|
+
syncOpenEvent = (t, n) => {
|
|
28
|
+
(!t || !this.state.open || n != null && e(n)) && (this.context.dataRef.current.openEvent = t ? n : void 0);
|
|
29
|
+
};
|
|
30
|
+
dispatchOpenChange = (e, t) => {
|
|
31
|
+
this.syncOpenEvent(e, t.event);
|
|
32
|
+
let n = {
|
|
33
|
+
open: e,
|
|
34
|
+
reason: t.reason,
|
|
35
|
+
nativeEvent: t.event,
|
|
36
|
+
nested: this.context.nested,
|
|
37
|
+
triggerElement: t.trigger
|
|
38
|
+
};
|
|
39
|
+
this.context.events.emit("openchange", n);
|
|
40
|
+
};
|
|
41
|
+
setOpen = (e, t) => {
|
|
42
|
+
if (this.syncOnly) {
|
|
43
|
+
this.context.onOpenChange?.(e, t);
|
|
44
|
+
return;
|
|
40
45
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, [t, ...Object.values(e)]);
|
|
44
|
-
}
|
|
45
|
-
useControlledProp(e, t) {
|
|
46
|
-
a.useDebugValue(e);
|
|
47
|
-
let r = this, i = t !== void 0;
|
|
48
|
-
if (n(() => {
|
|
49
|
-
i && !Object.is(r.state[e], t) && r.setState({
|
|
50
|
-
...r.state,
|
|
51
|
-
[e]: t
|
|
52
|
-
});
|
|
53
|
-
}, [
|
|
54
|
-
r,
|
|
55
|
-
e,
|
|
56
|
-
t,
|
|
57
|
-
i
|
|
58
|
-
]), process.env.NODE_ENV !== "production") {
|
|
59
|
-
let t = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
60
|
-
t.has(e) || t.set(e, i);
|
|
61
|
-
let n = t.get(e);
|
|
62
|
-
n !== void 0 && n !== i && console.error(`A component is changing the ${i ? "" : "un"}controlled state of ${e.toString()} to be ${i ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
select(e, t, n, r) {
|
|
66
|
-
let i = this.selectors[e];
|
|
67
|
-
return i(this.state, t, n, r);
|
|
68
|
-
}
|
|
69
|
-
useState(e, t, n, i) {
|
|
70
|
-
return a.useDebugValue(e), r(this, this.selectors[e], t, n, i);
|
|
71
|
-
}
|
|
72
|
-
useContextCallback(n, r) {
|
|
73
|
-
a.useDebugValue(n);
|
|
74
|
-
let i = t(r ?? e);
|
|
75
|
-
this.context[n] = i;
|
|
76
|
-
}
|
|
77
|
-
useStateSetter(e) {
|
|
78
|
-
let t = a.useRef(void 0);
|
|
79
|
-
return t.current === void 0 && (t.current = (t) => {
|
|
80
|
-
this.set(e, t);
|
|
81
|
-
}), t.current;
|
|
82
|
-
}
|
|
83
|
-
observe(e, t) {
|
|
84
|
-
let n;
|
|
85
|
-
n = typeof e == "function" ? e : this.selectors[e];
|
|
86
|
-
let r = n(this.state);
|
|
87
|
-
return t(r, r, this), this.subscribe((e) => {
|
|
88
|
-
let i = n(e);
|
|
89
|
-
if (!Object.is(r, i)) {
|
|
90
|
-
let e = r;
|
|
91
|
-
r = i, t(i, e, this);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
46
|
+
this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
|
|
47
|
+
};
|
|
95
48
|
};
|
|
96
49
|
//#endregion
|
|
97
|
-
export {
|
|
50
|
+
export { i as FloatingRootStore };
|
|
98
51
|
|
|
99
52
|
//# sourceMappingURL=index262.js.map
|
package/dist/index262.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index262.js","names":[
|
|
1
|
+
{"version":3,"file":"index262.js","names":[],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs"],"sourcesContent":["import { ReactStore } from '@base-ui/utils/store';\nimport { createEventEmitter } from \"../utils/createEventEmitter.mjs\";\nimport { isClickLikeEvent } from \"../utils.mjs\";\nconst selectors = {\n open: state => state.open,\n transitionStatus: state => state.transitionStatus,\n domReferenceElement: state => state.domReferenceElement,\n referenceElement: state => state.positionReference ?? state.referenceElement,\n floatingElement: state => state.floatingElement,\n floatingId: state => state.floatingId\n};\nexport class FloatingRootStore extends ReactStore {\n constructor(options) {\n const {\n syncOnly,\n nested,\n onOpenChange,\n triggerElements,\n ...initialState\n } = options;\n super({\n ...initialState,\n positionReference: initialState.referenceElement,\n domReferenceElement: initialState.referenceElement\n }, {\n onOpenChange,\n dataRef: {\n current: {}\n },\n events: createEventEmitter(),\n nested,\n triggerElements\n }, selectors);\n this.syncOnly = syncOnly;\n }\n\n /**\n * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.\n */\n syncOpenEvent = (newOpen, event) => {\n if (!newOpen || !this.state.open ||\n // Prevent a pending hover-open from overwriting a click-open event, while allowing\n // click events to upgrade a hover-open.\n event != null && isClickLikeEvent(event)) {\n this.context.dataRef.current.openEvent = newOpen ? event : undefined;\n }\n };\n\n /**\n * Runs the root-owned side effects for an open state change.\n */\n dispatchOpenChange = (newOpen, eventDetails) => {\n this.syncOpenEvent(newOpen, eventDetails.event);\n const details = {\n open: newOpen,\n reason: eventDetails.reason,\n nativeEvent: eventDetails.event,\n nested: this.context.nested,\n triggerElement: eventDetails.trigger\n };\n this.context.events.emit('openchange', details);\n };\n\n /**\n * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.\n *\n * @param newOpen The new open state.\n * @param eventDetails Details about the event that triggered the open state change.\n */\n setOpen = (newOpen, eventDetails) => {\n if (this.syncOnly) {\n this.context.onOpenChange?.(newOpen, eventDetails);\n return;\n }\n this.dispatchOpenChange(newOpen, eventDetails);\n this.context.onOpenChange?.(newOpen, eventDetails);\n };\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAGA,IAAM,IAAY;CAChB,OAAM,MAAS,EAAM;CACrB,mBAAkB,MAAS,EAAM;CACjC,sBAAqB,MAAS,EAAM;CACpC,mBAAkB,MAAS,EAAM,qBAAqB,EAAM;CAC5D,kBAAiB,MAAS,EAAM;CAChC,aAAY,MAAS,EAAM;AAC7B,GACa,IAAb,cAAuC,EAAW;CAChD,YAAY,GAAS;EACnB,IAAM,EACJ,aACA,WACA,iBACA,oBACA,GAAG,MACD;EAcJ,AAbA,MAAM;GACJ,GAAG;GACH,mBAAmB,EAAa;GAChC,qBAAqB,EAAa;EACpC,GAAG;GACD;GACA,SAAS,EACP,SAAS,CAAC,EACZ;GACA,QAAQ,EAAmB;GAC3B;GACA;EACF,GAAG,CAAS,GACZ,KAAK,WAAW;CAClB;CAKA,iBAAiB,GAAS,MAAU;EAClC,CAAI,CAAC,KAAW,CAAC,KAAK,MAAM,QAG5B,KAAS,QAAQ,EAAiB,CAAK,OACrC,KAAK,QAAQ,QAAQ,QAAQ,YAAY,IAAU,IAAQ,KAAA;CAE/D;CAKA,sBAAsB,GAAS,MAAiB;EAC9C,KAAK,cAAc,GAAS,EAAa,KAAK;EAC9C,IAAM,IAAU;GACd,MAAM;GACN,QAAQ,EAAa;GACrB,aAAa,EAAa;GAC1B,QAAQ,KAAK,QAAQ;GACrB,gBAAgB,EAAa;EAC/B;EACA,KAAK,QAAQ,OAAO,KAAK,cAAc,CAAO;CAChD;CAQA,WAAW,GAAS,MAAiB;EACnC,IAAI,KAAK,UAAU;GACjB,KAAK,QAAQ,eAAe,GAAS,CAAY;GACjD;EACF;EAEA,AADA,KAAK,mBAAmB,GAAS,CAAY,GAC7C,KAAK,QAAQ,eAAe,GAAS,CAAY;CACnD;AACF"}
|
package/dist/index263.js
CHANGED
|
@@ -1,53 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
syncOpenEvent = (t, n) => {
|
|
29
|
-
(!t || !this.state.open || n != null && e(n)) && (this.context.dataRef.current.openEvent = t ? n : void 0);
|
|
30
|
-
};
|
|
31
|
-
dispatchOpenChange = (e, t) => {
|
|
32
|
-
this.syncOpenEvent(e, t.event);
|
|
33
|
-
let n = {
|
|
34
|
-
open: e,
|
|
35
|
-
reason: t.reason,
|
|
36
|
-
nativeEvent: t.event,
|
|
37
|
-
nested: this.context.nested,
|
|
38
|
-
triggerElement: t.trigger
|
|
1
|
+
"use client";
|
|
2
|
+
import { isElement as e } from "./index200.js";
|
|
3
|
+
import { useIsoLayoutEffect as t } from "./index204.js";
|
|
4
|
+
import { FloatingRootStore as n } from "./index262.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
|
|
7
|
+
function i(i) {
|
|
8
|
+
let { popupStore: a, treatPopupAsFloatingElement: o = !1, floatingRootContext: s, floatingId: c, nested: l, onOpenChange: u } = i, d = a.useState("open"), f = a.useState("activeTriggerElement"), p = a.useState(o ? "popupElement" : "positionerElement"), m = a.context.triggerElements, h = u, g = r.useRef(null);
|
|
9
|
+
s === void 0 && g.current === null && (g.current = new n({
|
|
10
|
+
open: d,
|
|
11
|
+
transitionStatus: void 0,
|
|
12
|
+
referenceElement: f,
|
|
13
|
+
floatingElement: p,
|
|
14
|
+
triggerElements: m,
|
|
15
|
+
onOpenChange: h,
|
|
16
|
+
floatingId: c,
|
|
17
|
+
syncOnly: !0,
|
|
18
|
+
nested: l
|
|
19
|
+
}));
|
|
20
|
+
let _ = s ?? g.current;
|
|
21
|
+
return a.useSyncedValue("floatingId", c), t(() => {
|
|
22
|
+
let t = {
|
|
23
|
+
open: d,
|
|
24
|
+
floatingId: c,
|
|
25
|
+
referenceElement: f,
|
|
26
|
+
floatingElement: p
|
|
39
27
|
};
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
28
|
+
e(f) && (t.domReferenceElement = f), _.state.positionReference === _.state.referenceElement && (t.positionReference = f), _.update(t);
|
|
29
|
+
}, [
|
|
30
|
+
d,
|
|
31
|
+
c,
|
|
32
|
+
f,
|
|
33
|
+
p,
|
|
34
|
+
_
|
|
35
|
+
]), _.context.onOpenChange = h, _.context.nested = l, _;
|
|
36
|
+
}
|
|
50
37
|
//#endregion
|
|
51
|
-
export {
|
|
38
|
+
export { i as useSyncedFloatingRootContext };
|
|
52
39
|
|
|
53
40
|
//# sourceMappingURL=index263.js.map
|
package/dist/index263.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index263.js","names":[],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/
|
|
1
|
+
{"version":3,"file":"index263.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\n/**\n * Keeps a FloatingRootStore in sync with the provided PopupStore.\n * Uses the provided FloatingRootStore when one exists, otherwise creates one once and updates it on every render.\n */\nexport function useSyncedFloatingRootContext(options) {\n const {\n popupStore,\n treatPopupAsFloatingElement = false,\n floatingRootContext: floatingRootContextProp,\n floatingId,\n nested,\n onOpenChange\n } = options;\n const open = popupStore.useState('open');\n const referenceElement = popupStore.useState('activeTriggerElement');\n const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? 'popupElement' : 'positionerElement');\n const triggerElements = popupStore.context.triggerElements;\n const handleOpenChange = onOpenChange;\n const internalStoreRef = React.useRef(null);\n if (floatingRootContextProp === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = new FloatingRootStore({\n open,\n transitionStatus: undefined,\n referenceElement,\n floatingElement,\n triggerElements,\n onOpenChange: handleOpenChange,\n floatingId,\n syncOnly: true,\n nested\n });\n }\n const store = floatingRootContextProp ?? internalStoreRef.current;\n popupStore.useSyncedValue('floatingId', floatingId);\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId,\n referenceElement,\n floatingElement\n };\n if (isElement(referenceElement)) {\n valuesToSync.domReferenceElement = referenceElement;\n }\n if (store.state.positionReference === store.state.referenceElement) {\n valuesToSync.positionReference = referenceElement;\n }\n store.update(valuesToSync);\n }, [open, floatingId, referenceElement, floatingElement, store]);\n\n // Keep non-reactive context values fresh for interactions that call `store.setOpen`.\n store.context.onOpenChange = handleOpenChange;\n store.context.nested = nested;\n return store;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAUA,SAAgB,EAA6B,GAAS;CACpD,IAAM,EACJ,eACA,iCAA8B,IAC9B,qBAAqB,GACrB,eACA,WACA,oBACE,GACE,IAAO,EAAW,SAAS,MAAM,GACjC,IAAmB,EAAW,SAAS,sBAAsB,GAC7D,IAAkB,EAAW,SAAS,IAA8B,iBAAiB,mBAAmB,GACxG,IAAkB,EAAW,QAAQ,iBACrC,IAAmB,GACnB,IAAmBA,EAAM,OAAO,IAAI;CAC1C,AAAI,MAA4B,KAAA,KAAa,EAAiB,YAAY,SACxE,EAAiB,UAAU,IAAI,EAAkB;EAC/C;EACA,kBAAkB,KAAA;EAClB;EACA;EACA;EACA,cAAc;EACd;EACA,UAAU;EACV;CACF,CAAC;CAEH,IAAM,IAAQ,KAA2B,EAAiB;CAqB1D,OApBA,EAAW,eAAe,cAAc,CAAU,GAClD,QAAyB;EACvB,IAAM,IAAe;GACnB;GACA;GACA;GACA;EACF;EAOA,AANI,EAAU,CAAgB,MAC5B,EAAa,sBAAsB,IAEjC,EAAM,MAAM,sBAAsB,EAAM,MAAM,qBAChD,EAAa,oBAAoB,IAEnC,EAAM,OAAO,CAAY;CAC3B,GAAG;EAAC;EAAM;EAAY;EAAkB;EAAiB;CAAK,CAAC,GAG/D,EAAM,QAAQ,eAAe,GAC7B,EAAM,QAAQ,SAAS,GAChB;AACT"}
|
package/dist/index264.js
CHANGED
|
@@ -1,40 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
import { useIsoLayoutEffect as e } from "./index204.js";
|
|
3
|
+
import { AnimationFrame as t } from "./index230.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
//#region ../../node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
6
|
+
function r(r, i = !1, a = !1) {
|
|
7
|
+
let [o, s] = n.useState(r && i ? "idle" : void 0), [c, l] = n.useState(r);
|
|
8
|
+
return r && !c && (l(!0), s("starting")), !r && c && o !== "ending" && !a && s("ending"), !r && !c && o === "ending" && s(void 0), e(() => {
|
|
9
|
+
if (!r && c && o !== "ending" && a) {
|
|
10
|
+
let e = t.request(() => {
|
|
11
|
+
s("ending");
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
t.cancel(e);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}, [
|
|
18
|
+
r,
|
|
19
|
+
c,
|
|
20
|
+
o,
|
|
21
|
+
a
|
|
22
|
+
]), e(() => {
|
|
23
|
+
if (!r || i) return;
|
|
24
|
+
let e = t.request(() => {
|
|
25
|
+
s(void 0);
|
|
26
|
+
});
|
|
27
|
+
return () => {
|
|
28
|
+
t.cancel(e);
|
|
29
|
+
};
|
|
30
|
+
}, [i, r]), e(() => {
|
|
31
|
+
if (!r || !i) return;
|
|
32
|
+
r && c && o !== "idle" && s("starting");
|
|
33
|
+
let e = t.request(() => {
|
|
34
|
+
s("idle");
|
|
35
|
+
});
|
|
36
|
+
return () => {
|
|
37
|
+
t.cancel(e);
|
|
27
38
|
};
|
|
28
|
-
e(f) && (t.domReferenceElement = f), _.state.positionReference === _.state.referenceElement && (t.positionReference = f), _.update(t);
|
|
29
39
|
}, [
|
|
30
|
-
|
|
40
|
+
i,
|
|
41
|
+
r,
|
|
31
42
|
c,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
o
|
|
44
|
+
]), {
|
|
45
|
+
mounted: c,
|
|
46
|
+
setMounted: l,
|
|
47
|
+
transitionStatus: o
|
|
48
|
+
};
|
|
36
49
|
}
|
|
37
50
|
//#endregion
|
|
38
|
-
export {
|
|
51
|
+
export { r as useTransitionStatus };
|
|
39
52
|
|
|
40
53
|
//# sourceMappingURL=index264.js.map
|