@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/index385.js
CHANGED
|
@@ -1,115 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import { useLabelableId as re } from "./index373.js";
|
|
20
|
-
import { selectors as h } from "./index377.js";
|
|
21
|
-
import { resolveAriaLabelledBy as g } from "./index383.js";
|
|
22
|
-
import { getPseudoElementBounds as ie } from "./index384.js";
|
|
23
|
-
import * as _ from "react";
|
|
24
|
-
//#region ../../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
|
|
25
|
-
var v = 2, y = 400, b = {
|
|
26
|
-
...n,
|
|
27
|
-
...m,
|
|
28
|
-
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
29
|
-
value: () => null
|
|
30
|
-
}, x = /*#__PURE__*/ _.forwardRef(function(n, m) {
|
|
31
|
-
let { render: x, className: ae, id: oe, disabled: S = !1, nativeButton: C = !0, style: se, ...w } = n, { setTouched: T, setFocused: E, validationMode: D, state: O, disabled: k } = te(), { labelId: A } = ne(), { store: j, setOpen: M, selectionRef: N, validation: P, readOnly: F, required: I, alignItemWithTriggerActiveRef: L, disabled: R } = p(), z = k || R || S, B = f(j, h.open), V = f(j, h.mounted), H = f(j, h.value), U = f(j, h.triggerProps), W = f(j, h.positionerElement), G = f(j, h.listElement), K = f(j, h.popupSide), q = f(j, h.id), ce = f(j, h.labelId), le = f(j, h.hasSelectedValue), ue = V && W ? K : null, J = oe ?? q, Y = g(A, ce);
|
|
32
|
-
re({ id: J });
|
|
33
|
-
let de = u(W), X = _.useRef(null), { getButtonProps: fe, buttonRef: pe } = i({
|
|
34
|
-
disabled: z,
|
|
35
|
-
native: C
|
|
36
|
-
}), me = r((e) => {
|
|
37
|
-
j.set("triggerElement", e);
|
|
38
|
-
}), he = s(), Z = s(), Q = s();
|
|
39
|
-
_.useEffect(() => {
|
|
40
|
-
if (B) return Q.start(y, () => {
|
|
41
|
-
N.current.allowUnselectedMouseUp = !0, N.current.allowSelectedMouseUp = !0;
|
|
42
|
-
}), () => {
|
|
43
|
-
Q.clear();
|
|
44
|
-
};
|
|
45
|
-
N.current = {
|
|
46
|
-
allowSelectedMouseUp: !1,
|
|
47
|
-
allowUnselectedMouseUp: !1,
|
|
48
|
-
dragY: 0
|
|
49
|
-
}, Z.clear();
|
|
50
|
-
}, [
|
|
51
|
-
B,
|
|
52
|
-
N,
|
|
53
|
-
Z,
|
|
54
|
-
Q
|
|
55
|
-
]);
|
|
56
|
-
let ge = e(U, {
|
|
57
|
-
id: J,
|
|
58
|
-
role: "combobox",
|
|
59
|
-
"aria-expanded": B ? "true" : "false",
|
|
60
|
-
"aria-haspopup": "listbox",
|
|
61
|
-
"aria-controls": B ? G?.id ?? l(W)?.id : void 0,
|
|
62
|
-
"aria-labelledby": Y,
|
|
63
|
-
"aria-readonly": F || void 0,
|
|
64
|
-
"aria-required": I || void 0,
|
|
65
|
-
tabIndex: z ? -1 : 0,
|
|
66
|
-
onFocus(e) {
|
|
67
|
-
E(!0), B && L.current && M(!1, o(a, e.nativeEvent)), he.start(0, () => {
|
|
68
|
-
j.set("forceMount", !0);
|
|
69
|
-
});
|
|
70
|
-
},
|
|
71
|
-
onBlur(e) {
|
|
72
|
-
c(W, e.relatedTarget) || (T(!0), E(!1), D === "onBlur" && P.commit(H));
|
|
73
|
-
},
|
|
74
|
-
onMouseDown(e) {
|
|
75
|
-
if (B) return;
|
|
76
|
-
let t = d(e.currentTarget);
|
|
77
|
-
function n(e) {
|
|
78
|
-
if (!X.current) return;
|
|
79
|
-
let t = e.target;
|
|
80
|
-
if (c(X.current, t) || c(de.current, t)) return;
|
|
81
|
-
let n = ie(X.current);
|
|
82
|
-
e.clientX >= n.left - v && e.clientX <= n.right + v && e.clientY >= n.top - v && e.clientY <= n.bottom + v || M(!1, o(ee, e));
|
|
83
|
-
}
|
|
84
|
-
Z.start(0, () => {
|
|
85
|
-
t.addEventListener("mouseup", n, { once: !0 });
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}, w, fe), $ = P.getValidationProps(z, ge);
|
|
89
|
-
$.role = "combobox";
|
|
90
|
-
let _e = {
|
|
91
|
-
...O,
|
|
92
|
-
open: B,
|
|
93
|
-
disabled: z,
|
|
94
|
-
value: H,
|
|
95
|
-
readOnly: F,
|
|
96
|
-
popupSide: ue,
|
|
97
|
-
placeholder: !le
|
|
98
|
-
};
|
|
99
|
-
return t("button", n, {
|
|
100
|
-
ref: [
|
|
101
|
-
m,
|
|
102
|
-
X,
|
|
103
|
-
pe,
|
|
104
|
-
me
|
|
105
|
-
],
|
|
106
|
-
state: _e,
|
|
107
|
-
stateAttributesMapping: b,
|
|
108
|
-
props: $
|
|
2
|
+
import { useRenderElement as e } from "./index196.js";
|
|
3
|
+
import { useStore as t } from "./index259.js";
|
|
4
|
+
import { useSelectRootContext as n } from "./index367.js";
|
|
5
|
+
import { resolveMultipleLabels as r, resolveSelectedLabel as i } from "./index375.js";
|
|
6
|
+
import { selectors as a } from "./index376.js";
|
|
7
|
+
import * as o from "react";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/select/value/SelectValue.mjs
|
|
9
|
+
var s = { value: () => null }, c = /*#__PURE__*/ o.forwardRef(function(o, c) {
|
|
10
|
+
let { className: l, render: u, children: d, placeholder: f, style: p, ...m } = o, { store: h, valueRef: g } = n(), _ = t(h, a.value), v = t(h, a.items), y = t(h, a.itemToStringLabel), b = t(h, a.hasSelectedValue), x = !b && f != null && d == null, S = t(h, a.hasNullItemLabel, x), C = {
|
|
11
|
+
value: _,
|
|
12
|
+
placeholder: !b
|
|
13
|
+
}, w = null;
|
|
14
|
+
return w = typeof d == "function" ? d(_) : d ?? (x && !S ? f : Array.isArray(_) ? r(_, v, y) : i(_, v, y)), e("span", o, {
|
|
15
|
+
state: C,
|
|
16
|
+
ref: [c, g],
|
|
17
|
+
props: [{ children: w }, m],
|
|
18
|
+
stateAttributesMapping: s
|
|
109
19
|
});
|
|
110
20
|
});
|
|
111
|
-
process.env.NODE_ENV !== "production" && (
|
|
21
|
+
process.env.NODE_ENV !== "production" && (c.displayName = "SelectValue");
|
|
112
22
|
//#endregion
|
|
113
|
-
export {
|
|
23
|
+
export { c as SelectValue };
|
|
114
24
|
|
|
115
25
|
//# sourceMappingURL=index385.js.map
|
package/dist/index385.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index385.js","names":["React","REASONS.none","REASONS.cancelOpen"],"sources":["../../../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { getPseudoElementBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { contains, getFloatingFocusElement } from \"../../floating-ui-react/utils.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { resolveAriaLabelledBy } from \"../../utils/resolveAriaLabelledBy.mjs\";\nconst BOUNDARY_OFFSET = 2;\nconst SELECTED_DELAY = 400;\nconst stateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n popupSide: side => side ? {\n 'data-popup-side': side\n } : null,\n value: () => null\n};\n\n/**\n * A button that opens the select popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectTrigger = /*#__PURE__*/React.forwardRef(function SelectTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n disabled: disabledProp = false,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched,\n setFocused,\n validationMode,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const {\n store,\n setOpen,\n selectionRef,\n validation,\n readOnly,\n required,\n alignItemWithTriggerActiveRef,\n disabled: selectDisabled\n } = useSelectRootContext();\n const disabled = fieldDisabled || selectDisabled || disabledProp;\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const value = useStore(store, selectors.value);\n const triggerProps = useStore(store, selectors.triggerProps);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const popupSideValue = useStore(store, selectors.popupSide);\n const rootId = useStore(store, selectors.id);\n const selectLabelId = useStore(store, selectors.labelId);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const popupSide = mounted && positionerElement ? popupSideValue : null;\n const id = idProp ?? rootId;\n const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);\n useLabelableId({\n id\n });\n const positionerRef = useValueAsRef(positionerElement);\n const triggerRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const setTriggerElement = useStableCallback(element => {\n store.set('triggerElement', element);\n });\n const timeoutFocus = useTimeout();\n const timeoutMouseDown = useTimeout();\n const selectedDelayTimeout = useTimeout();\n React.useEffect(() => {\n if (open) {\n // A mousedown on the trigger can open the popup under the cursor. Keep mouseup selection\n // disabled briefly so releasing over either the selected item or a neighboring item doesn't\n // commit an accidental selection. SelectItem can still opt into unselected mouseup sooner\n // after a real drag over the item.\n selectedDelayTimeout.start(SELECTED_DELAY, () => {\n selectionRef.current.allowUnselectedMouseUp = true;\n selectionRef.current.allowSelectedMouseUp = true;\n });\n return () => {\n selectedDelayTimeout.clear();\n };\n }\n selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n };\n timeoutMouseDown.clear();\n return undefined;\n }, [open, selectionRef, timeoutMouseDown, selectedDelayTimeout]);\n const mergedProps = mergeProps(triggerProps, {\n id,\n role: 'combobox',\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': 'listbox',\n 'aria-controls': open ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : undefined,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n tabIndex: disabled ? -1 : 0,\n onFocus(event) {\n setFocused(true);\n\n // The popup element shouldn't obscure the focused trigger.\n if (open && alignItemWithTriggerActiveRef.current) {\n setOpen(false, createChangeEventDetails(REASONS.none, event.nativeEvent));\n }\n\n // Saves a re-render on initial click: `forceMount === true` mounts\n // the items before `open === true`. We could sync those cycles better\n // without a timeout, but this is enough for now.\n timeoutFocus.start(0, () => {\n store.set('forceMount', true);\n });\n },\n onBlur(event) {\n // If focus is moving into the popup, don't count it as a blur.\n if (contains(positionerElement, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n },\n onMouseDown(event) {\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n if (!triggerRef.current) {\n return;\n }\n const mouseUpTarget = mouseEvent.target;\n\n // Don't treat the release as an outside press when it lands on the trigger or inside\n // the popup positioner (or their children).\n if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) {\n return;\n }\n const bounds = getPseudoElementBounds(triggerRef.current);\n if (mouseEvent.clientX >= bounds.left - BOUNDARY_OFFSET && mouseEvent.clientX <= bounds.right + BOUNDARY_OFFSET && mouseEvent.clientY >= bounds.top - BOUNDARY_OFFSET && mouseEvent.clientY <= bounds.bottom + BOUNDARY_OFFSET) {\n return;\n }\n setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n\n // Firefox can fire this upon mousedown\n timeoutMouseDown.start(0, () => {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n });\n }\n }, elementProps, getButtonProps);\n const props = validation.getValidationProps(disabled, mergedProps);\n\n // ensure nested useButton does not overwrite the combobox role:\n // <Toolbar.Button render={<Select.Trigger />} />\n props.role = 'combobox';\n const state = {\n ...fieldState,\n open,\n disabled,\n value,\n readOnly,\n popupSide,\n placeholder: !hasSelectedValue\n };\n return useRenderElement('button', componentProps, {\n ref: [forwardedRef, triggerRef, buttonRef, setTriggerElement],\n state,\n stateAttributesMapping,\n props\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectTrigger.displayName = \"SelectTrigger\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAM,IAAkB,GAClB,IAAiB,KACjB,IAAyB;CAC7B,GAAG;CACH,GAAG;CACH,YAAW,MAAQ,IAAO,EACxB,mBAAmB,EACrB,IAAI;CACJ,aAAa;AACf,GAQa,IAA6B,gBAAM,WAAW,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Ac,GACzB,IAAQ,EAAW,mBAAmB,GAAU,EAAW;CAIjE,EAAM,OAAO;CACb,IAAM,KAAQ;EACZ,GAAG;EACH;EACA;EACA;EACA;EACA;EACA,aAAa,CAAC;CAChB;CACA,OAAO,EAAiB,UAAU,GAAgB;EAChD,KAAK;GAAC;GAAc;GAAY;GAAW;EAAiB;EAC5D;EACA;EACA;CACF,CAAC;AACH,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAc,cAAc"}
|
|
1
|
+
{"version":3,"file":"index385.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/value/SelectValue.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { resolveMultipleLabels, resolveSelectedLabel } from \"../../internals/resolveValueLabel.mjs\";\nimport { selectors } from \"../store.mjs\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n placeholder,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n valueRef\n } = useSelectRootContext();\n const value = useStore(store, selectors.value);\n const items = useStore(store, selectors.items);\n const itemToStringLabel = useStore(store, selectors.itemToStringLabel);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;\n const hasNullLabel = useStore(store, selectors.hasNullItemLabel, shouldCheckNullItemLabel);\n const state = {\n value,\n placeholder: !hasSelectedValue\n };\n let children = null;\n if (typeof childrenProp === 'function') {\n children = childrenProp(value);\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (shouldCheckNullItemLabel && !hasNullLabel) {\n children = placeholder;\n } else if (Array.isArray(value)) {\n children = resolveMultipleLabels(value, items, itemToStringLabel);\n } else {\n children = resolveSelectedLabel(value, items, itemToStringLabel);\n }\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,IAAM,IAAyB,EAC7B,aAAa,KACf,GAQa,IAA2B,gBAAM,WAAW,SAAqB,GAAgB,GAAc;CAC1G,IAAM,EACJ,cACA,WACA,UAAU,GACV,gBACA,UACA,GAAG,MACD,GACE,EACJ,UACA,gBACE,EAAqB,GACnB,IAAQ,EAAS,GAAO,EAAU,KAAK,GACvC,IAAQ,EAAS,GAAO,EAAU,KAAK,GACvC,IAAoB,EAAS,GAAO,EAAU,iBAAiB,GAC/D,IAAmB,EAAS,GAAO,EAAU,gBAAgB,GAC7D,IAA2B,CAAC,KAAoB,KAAe,QAAQ,KAAgB,MACvF,IAAe,EAAS,GAAO,EAAU,kBAAkB,CAAwB,GACnF,IAAQ;EACZ;EACA,aAAa,CAAC;CAChB,GACI,IAAW;CAoBf,OAnBA,AAGE,IAHE,OAAO,KAAiB,aACf,EAAa,CAAK,IACpB,MAEA,KAA4B,CAAC,IAC3B,IACF,MAAM,QAAQ,CAAK,IACjB,EAAsB,GAAO,GAAO,CAAiB,IAErD,EAAqB,GAAO,GAAO,CAAiB,IAEjD,EAAiB,QAAQ,GAAgB;EACvD;EACA,KAAK,CAAC,GAAc,CAAQ;EAC5B,OAAO,CAAC,EACN,YACF,GAAG,CAAY;EACf;CACF,CACa;AACf,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAY,cAAc"}
|
package/dist/index386.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useRenderElement as e } from "./index196.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { selectors as
|
|
7
|
-
import * as
|
|
8
|
-
//#region ../../node_modules/@base-ui/react/select/
|
|
9
|
-
var
|
|
10
|
-
let {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
stateAttributesMapping:
|
|
3
|
+
import { triggerOpenStateMapping as t } from "./index198.js";
|
|
4
|
+
import { useStore as n } from "./index259.js";
|
|
5
|
+
import { useSelectRootContext as r } from "./index367.js";
|
|
6
|
+
import { selectors as i } from "./index376.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/select/icon/SelectIcon.mjs
|
|
9
|
+
var o = /*#__PURE__*/ a.forwardRef(function(a, o) {
|
|
10
|
+
let { render: s, className: c, style: l, ...u } = a, { store: d } = r(), f = { open: n(d, i.open) };
|
|
11
|
+
return e("span", a, {
|
|
12
|
+
state: f,
|
|
13
|
+
ref: o,
|
|
14
|
+
props: [{
|
|
15
|
+
"aria-hidden": !0,
|
|
16
|
+
children: "▼"
|
|
17
|
+
}, u],
|
|
18
|
+
stateAttributesMapping: t
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
process.env.NODE_ENV !== "production" && (
|
|
21
|
+
process.env.NODE_ENV !== "production" && (o.displayName = "SelectIcon");
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { o as SelectIcon };
|
|
24
24
|
|
|
25
25
|
//# sourceMappingURL=index386.js.map
|
package/dist/index386.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index386.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/
|
|
1
|
+
{"version":3,"file":"index386.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/icon/SelectIcon.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * An icon that indicates that the trigger button opens a select popup.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectIcon = /*#__PURE__*/React.forwardRef(function SelectIcon(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const state = {\n open\n };\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: '▼'\n }, elementProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectIcon.displayName = \"SelectIcon\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAeA,IAAa,IAA0B,gBAAM,WAAW,SAAoB,GAAgB,GAAc;CACxG,IAAM,EACJ,WACA,cACA,UACA,GAAG,MACD,GACE,EACJ,aACE,EAAqB,GAEnB,IAAQ,EACZ,MAFW,EAAS,GAAO,EAAU,IAElC,EACL;CAUA,OATgB,EAAiB,QAAQ,GAAgB;EACvD;EACA,KAAK;EACL,OAAO,CAAC;GACN,eAAe;GACf,UAAU;EACZ,GAAG,CAAY;EACf,wBAAwB;CAC1B,CACa;AACf,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAW,cAAc"}
|
package/dist/index387.js
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
//#region ../../node_modules/@base-ui/react/select/
|
|
9
|
-
var o = /*#__PURE__*/
|
|
10
|
-
let {
|
|
11
|
-
return
|
|
12
|
-
state: { open: n(d, i.open) },
|
|
2
|
+
import { FloatingPortal as e } from "./index241.js";
|
|
3
|
+
import { useStore as t } from "./index259.js";
|
|
4
|
+
import { useSelectRootContext as n } from "./index367.js";
|
|
5
|
+
import { selectors as r } from "./index376.js";
|
|
6
|
+
import * as i from "react";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs
|
|
9
|
+
var o = /*#__PURE__*/ i.forwardRef(function(i, o) {
|
|
10
|
+
let { store: s } = n(), c = t(s, r.mounted), l = t(s, r.forceMount);
|
|
11
|
+
return c || l ? /*#__PURE__*/ a(e, {
|
|
13
12
|
ref: o,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
children: "▼"
|
|
17
|
-
}, u],
|
|
18
|
-
stateAttributesMapping: t
|
|
19
|
-
});
|
|
13
|
+
...i
|
|
14
|
+
}) : null;
|
|
20
15
|
});
|
|
21
|
-
process.env.NODE_ENV !== "production" && (o.displayName = "
|
|
16
|
+
process.env.NODE_ENV !== "production" && (o.displayName = "SelectPortal");
|
|
22
17
|
//#endregion
|
|
23
|
-
export { o as
|
|
18
|
+
export { o as SelectPortal };
|
|
24
19
|
|
|
25
20
|
//# sourceMappingURL=index387.js.map
|
package/dist/index387.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index387.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/
|
|
1
|
+
{"version":3,"file":"index387.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const {\n store\n } = useSelectRootContext();\n const mounted = useStore(store, selectors.mounted);\n const forceMount = useStore(store, selectors.forceMount);\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAgBA,IAAa,IAA4B,gBAAM,WAAW,SAAsB,GAAa,GAAc;CACzG,IAAM,EACJ,aACE,EAAqB,GACnB,IAAU,EAAS,GAAO,EAAU,OAAO,GAC3C,IAAa,EAAS,GAAO,EAAU,UAAU;CAKvD,OAJqB,KAAW,IAIZ,gBAAK,GAAgB;EACvC,KAAK;EACL,GAAG;CACL,CAAC,IALQ;AAMX,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAa,cAAc"}
|
package/dist/index388.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
//#region ../../node_modules/@base-ui/react/
|
|
4
|
-
var t = /*#__PURE__*/ e.createContext(
|
|
5
|
-
|
|
3
|
+
//#region ../../node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
|
|
4
|
+
var t = /*#__PURE__*/ e.createContext({
|
|
5
|
+
register: () => {},
|
|
6
|
+
unregister: () => {},
|
|
7
|
+
subscribeMapChange: () => () => {},
|
|
8
|
+
nextIndexRef: { current: 0 }
|
|
9
|
+
});
|
|
10
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "CompositeListContext");
|
|
11
|
+
function n() {
|
|
12
|
+
return e.useContext(t);
|
|
13
|
+
}
|
|
6
14
|
//#endregion
|
|
7
|
-
export { t as
|
|
15
|
+
export { t as CompositeListContext, n as useCompositeListContext };
|
|
8
16
|
|
|
9
17
|
//# sourceMappingURL=index388.js.map
|
package/dist/index388.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index388.js","names":[],"sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index388.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport const CompositeListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n subscribeMapChange: () => () => {},\n nextIndexRef: {\n current: 0\n }\n});\nif (process.env.NODE_ENV !== \"production\") CompositeListContext.displayName = \"CompositeListContext\";\nexport function useCompositeListContext() {\n return React.useContext(CompositeListContext);\n}"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAa,IAAoC,gBAAM,cAAc;CACnE,gBAAgB,CAAC;CACjB,kBAAkB,CAAC;CACnB,gCAAgC,CAAC;CACjC,cAAc,EACZ,SAAS,EACX;AACF,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAqB,cAAc;AAC9E,SAAgB,IAA0B;CACxC,OAAOA,EAAM,WAAW,CAAoB;AAC9C"}
|
package/dist/index389.js
CHANGED
|
@@ -1,24 +1,117 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import { useRefWithInit as e } from "./index185.js";
|
|
3
|
+
import { useStableCallback as t } from "./index202.js";
|
|
4
|
+
import { useIsoLayoutEffect as n } from "./index204.js";
|
|
5
|
+
import { CompositeListContext as r } from "./index388.js";
|
|
6
|
+
import * as i from "react";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
|
|
9
|
+
function o(o) {
|
|
10
|
+
let { children: p, elementsRef: m, labelsRef: h, onMapChange: g } = o, _ = t(g), [, v] = i.useState(!1), y = e(c).current, b = e(s).current, x = i.useRef(0), S = i.useRef(!0), C = i.useRef([]), w = i.useRef(null), T = t(() => {
|
|
11
|
+
S.current || (S.current = !0, v((e) => !e));
|
|
12
|
+
}), E = t((e, t) => {
|
|
13
|
+
b.set(e, t), T();
|
|
14
|
+
}), D = t((e) => {
|
|
15
|
+
b.delete(e), T();
|
|
16
|
+
}), O = t((e) => {
|
|
17
|
+
let t = /* @__PURE__ */ new Map();
|
|
18
|
+
return m.current.length = 0, h && (h.current.length = 0), e.forEach((e) => {
|
|
19
|
+
t.set(e.element, {
|
|
20
|
+
...e.registration.metadata ?? {},
|
|
21
|
+
index: e.index
|
|
22
|
+
}), m.current[e.index] = e.element, h && (h.current[e.index] = e.registration.label === void 0 ? e.registration.textRef?.current?.textContent ?? e.element.textContent : e.registration.label);
|
|
23
|
+
}), x.current = m.current.length, t;
|
|
24
|
+
});
|
|
25
|
+
function k(e) {
|
|
26
|
+
if (w.current?.disconnect(), w.current = null, typeof MutationObserver != "function" || e.length < 2) return;
|
|
27
|
+
let t = new MutationObserver((n) => {
|
|
28
|
+
if (!d(n)) return;
|
|
29
|
+
let r = null;
|
|
30
|
+
for (let n of e) if (n.isConnected) {
|
|
31
|
+
if (r && f(r, n) > 0) {
|
|
32
|
+
t.disconnect(), T();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
r = n;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
w.current = t;
|
|
39
|
+
let n = /* @__PURE__ */ new Set();
|
|
40
|
+
for (let t = 1; t < e.length; t += 1) {
|
|
41
|
+
let r = u(e[t - 1], e[t]);
|
|
42
|
+
r && n.add(r);
|
|
43
|
+
}
|
|
44
|
+
n.forEach((e) => t.observe(e, { childList: !0 }));
|
|
45
|
+
}
|
|
46
|
+
let A = t(() => {
|
|
47
|
+
let [e, t] = l(b), n = O(e);
|
|
48
|
+
k(t), C.current = e, S.current = !1, y.forEach((e) => e(n)), _(n);
|
|
49
|
+
});
|
|
50
|
+
n(() => (S.current || O(C.current), () => {
|
|
51
|
+
m.current = [], h && (h.current = []);
|
|
52
|
+
}), [
|
|
53
|
+
m,
|
|
54
|
+
h,
|
|
55
|
+
O
|
|
56
|
+
]), n(() => {
|
|
57
|
+
S.current && A();
|
|
58
|
+
}), n(() => () => {
|
|
59
|
+
w.current?.disconnect(), S.current = !0;
|
|
60
|
+
}, []);
|
|
61
|
+
let j = t((e) => (y.add(e), () => {
|
|
62
|
+
y.delete(e);
|
|
63
|
+
})), M = i.useMemo(() => ({
|
|
64
|
+
register: E,
|
|
65
|
+
unregister: D,
|
|
66
|
+
subscribeMapChange: j,
|
|
67
|
+
nextIndexRef: x
|
|
68
|
+
}), [
|
|
69
|
+
E,
|
|
70
|
+
D,
|
|
71
|
+
j,
|
|
72
|
+
x
|
|
73
|
+
]);
|
|
74
|
+
return /*#__PURE__*/ a(r.Provider, {
|
|
75
|
+
value: M,
|
|
76
|
+
children: p
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function s() {
|
|
80
|
+
return /* @__PURE__ */ new Map();
|
|
81
|
+
}
|
|
82
|
+
function c() {
|
|
83
|
+
return /* @__PURE__ */ new Set();
|
|
84
|
+
}
|
|
85
|
+
function l(e) {
|
|
86
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = [];
|
|
87
|
+
e.forEach((e, i) => {
|
|
88
|
+
if (!i.isConnected) return;
|
|
89
|
+
let a = e.index, o = {
|
|
90
|
+
index: a ?? -1,
|
|
91
|
+
element: i,
|
|
92
|
+
registration: e
|
|
93
|
+
};
|
|
94
|
+
a === null ? r.push(o) : a >= 0 && (t.add(a), n.push(o));
|
|
95
|
+
});
|
|
96
|
+
let i = 0;
|
|
97
|
+
return r.sort((e, t) => f(e.element, t.element)), r.forEach((e) => {
|
|
98
|
+
for (; t.has(i);) i += 1;
|
|
99
|
+
e.index = i, n.push(e), i += 1;
|
|
100
|
+
}), t.size > 0 && n.sort((e, t) => e.index - t.index), [n, r.map((e) => e.element)];
|
|
101
|
+
}
|
|
102
|
+
function u(e, t) {
|
|
103
|
+
let n = e.parentElement;
|
|
104
|
+
for (; n && !n.contains(t);) n = n.parentElement;
|
|
105
|
+
return n;
|
|
106
|
+
}
|
|
107
|
+
function d(e) {
|
|
108
|
+
for (let t of e) for (let e = 0; e < t.removedNodes.length; e += 1) if (t.removedNodes[e].isConnected) return !0;
|
|
109
|
+
return !1;
|
|
110
|
+
}
|
|
111
|
+
function f(e, t) {
|
|
112
|
+
return e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
113
|
+
}
|
|
21
114
|
//#endregion
|
|
22
|
-
export {
|
|
115
|
+
export { o as CompositeList };
|
|
23
116
|
|
|
24
117
|
//# sourceMappingURL=index389.js.map
|
package/dist/index389.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index389.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { SelectPortalContext } from \"./SelectPortalContext.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const {\n store\n } = useSelectRootContext();\n const mounted = useStore(store, selectors.mounted);\n const forceMount = useStore(store, selectors.forceMount);\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(SelectPortalContext.Provider, {\n value: true,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AAiBA,IAAa,IAA4B,gBAAM,WAAW,SAAsB,GAAa,GAAc;CACzG,IAAM,EACJ,aACE,EAAqB,GACnB,IAAU,EAAS,GAAO,EAAU,OAAO,GAC3C,IAAa,EAAS,GAAO,EAAU,UAAU;CAKvD,OAJqB,KAAW,IAIZ,gBAAK,EAAoB,UAAU;EACrD,OAAO;EACP,UAAuB,gBAAK,GAAgB;GAC1C,KAAK;GACL,GAAG;EACL,CAAC;CACH,CAAC,IARQ;AASX,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAa,cAAc"}
|
|
1
|
+
{"version":3,"file":"index389.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs"],"sourcesContent":["/* eslint-disable no-bitwise */\n'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { CompositeListContext } from \"./CompositeListContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Provides context for a list of items in a composite component.\n */\nexport function CompositeList(props) {\n const {\n children,\n elementsRef,\n labelsRef,\n onMapChange: onMapChangeProp\n } = props;\n const onMapChange = useStableCallback(onMapChangeProp);\n const [, setMapTick] = React.useState(false);\n const listeners = useRefWithInit(createListeners).current;\n const map = useRefWithInit(createMap).current;\n const nextIndexRef = React.useRef(0);\n const isDirtyRef = React.useRef(true);\n const itemsRef = React.useRef([]);\n const mutationObserverRef = React.useRef(null);\n\n // Item effects can run without their parent rendering. Schedule one synchronous\n // parent update for the whole commit so refs are rebuilt before paint and while\n // the originating React event is still inside `act()` in tests.\n const scheduleMapUpdate = useStableCallback(() => {\n if (isDirtyRef.current) {\n return;\n }\n isDirtyRef.current = true;\n setMapTick(tick => !tick);\n });\n const register = useStableCallback((node, registration) => {\n map.set(node, registration);\n scheduleMapUpdate();\n });\n const unregister = useStableCallback(node => {\n map.delete(node);\n scheduleMapUpdate();\n });\n const syncRefs = useStableCallback(items => {\n const nextMap = new Map();\n elementsRef.current.length = 0;\n if (labelsRef) {\n labelsRef.current.length = 0;\n }\n items.forEach(item => {\n nextMap.set(item.element, {\n ...(item.registration.metadata ?? {}),\n index: item.index\n });\n elementsRef.current[item.index] = item.element;\n if (labelsRef) {\n labelsRef.current[item.index] = item.registration.label !== undefined ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent;\n }\n });\n nextIndexRef.current = elementsRef.current.length;\n return nextMap;\n });\n function observe(sortedNodes) {\n mutationObserverRef.current?.disconnect();\n mutationObserverRef.current = null;\n\n // A single item can't reorder.\n if (typeof MutationObserver !== 'function' || sortedNodes.length < 2) {\n return;\n }\n const mutationObserver = new MutationObserver(entries => {\n // Only verify the order after a move: a node that was removed and later\n // re-added within the same batch. Additions and removals alone can't\n // change the relative order of the remaining items, and items that mount\n // or unmount re-sort through `register`/`unregister`.\n if (!hasMovedNode(entries)) {\n return;\n }\n let previousConnectedNode = null;\n\n // If any connected node now appears before the previous connected node,\n // wrappers/items moved and the index map needs to be rebuilt.\n for (const node of sortedNodes) {\n if (!node.isConnected) {\n continue;\n }\n if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {\n mutationObserver.disconnect();\n scheduleMapUpdate();\n return;\n }\n previousConnectedNode = node;\n }\n });\n mutationObserverRef.current = mutationObserver;\n\n // A reorder that changes item indexes must invert at least one adjacent pair\n // from the previous sorted order. Observing each pair's common parent catches\n // both direct item moves and ancestor wrapper moves at the boundary.\n const roots = new Set();\n for (let i = 1; i < sortedNodes.length; i += 1) {\n const root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);\n if (root) {\n roots.add(root);\n }\n }\n roots.forEach(root => mutationObserver.observe(root, {\n childList: true\n }));\n }\n const flush = useStableCallback(() => {\n const [items, automaticNodes] = getCompositeListSnapshot(map);\n const nextMap = syncRefs(items);\n observe(automaticNodes);\n itemsRef.current = items;\n isDirtyRef.current = false;\n listeners.forEach(listener => listener(nextMap));\n onMapChange(nextMap);\n });\n useIsoLayoutEffect(() => {\n // Re-copy the last committed snapshot when the ref objects change or Strict Mode replays\n // effects without reattaching callback refs.\n if (!isDirtyRef.current) {\n syncRefs(itemsRef.current);\n }\n return () => {\n elementsRef.current = [];\n if (labelsRef) {\n labelsRef.current = [];\n }\n };\n }, [elementsRef, labelsRef, syncRefs]);\n useIsoLayoutEffect(() => {\n if (isDirtyRef.current) {\n flush();\n }\n });\n useIsoLayoutEffect(() => {\n return () => {\n mutationObserverRef.current?.disconnect();\n // React 18 Strict Mode replays effects without replaying callback refs.\n // Mark the retained map dirty so the replay rebuilds refs and observation.\n isDirtyRef.current = true;\n };\n }, []);\n const subscribeMapChange = useStableCallback(fn => {\n listeners.add(fn);\n return () => {\n listeners.delete(fn);\n };\n });\n const contextValue = React.useMemo(() => ({\n register,\n unregister,\n subscribeMapChange,\n nextIndexRef\n }), [register, unregister, subscribeMapChange, nextIndexRef]);\n return /*#__PURE__*/_jsx(CompositeListContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nfunction createMap() {\n return new Map();\n}\nfunction createListeners() {\n return new Set();\n}\nfunction getCompositeListSnapshot(map) {\n const reservedIndices = new Set();\n const items = [];\n const automaticItems = [];\n map.forEach((registration, node) => {\n if (!node.isConnected) {\n return;\n }\n const index = registration.index;\n const item = {\n index: index ?? -1,\n element: node,\n registration\n };\n if (index === null) {\n automaticItems.push(item);\n } else if (index >= 0) {\n reservedIndices.add(index);\n items.push(item);\n }\n });\n let nextAutomaticIndex = 0;\n automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element));\n automaticItems.forEach(item => {\n while (reservedIndices.has(nextAutomaticIndex)) {\n nextAutomaticIndex += 1;\n }\n item.index = nextAutomaticIndex;\n items.push(item);\n nextAutomaticIndex += 1;\n });\n if (reservedIndices.size > 0) {\n items.sort((a, b) => a.index - b.index);\n }\n return [items, automaticItems.map(item => item.element)];\n}\nfunction getCommonAncestor(firstNode, lastNode) {\n let ancestor = firstNode.parentElement;\n\n // The `parentElement` walk cannot cross shadow boundaries, so the native\n // `contains` is sufficient here.\n while (ancestor && !ancestor.contains(lastNode)) {\n ancestor = ancestor.parentElement;\n }\n return ancestor;\n}\nfunction hasMovedNode(entries) {\n for (const entry of entries) {\n for (let i = 0; i < entry.removedNodes.length; i += 1) {\n if (entry.removedNodes[i].isConnected) {\n return true;\n }\n }\n }\n return false;\n}\nfunction sortByDocumentPosition(a, b) {\n // `DOCUMENT_POSITION_CONTAINED_BY` is always reported alongside `FOLLOWING`, and `CONTAINS`\n // alongside `PRECEDING`, so testing `FOLLOWING` alone orders siblings and nested items alike.\n return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAYA,SAAgB,EAAc,GAAO;CACnC,IAAM,EACJ,aACA,gBACA,cACA,aAAa,MACX,GACE,IAAc,EAAkB,CAAe,GAC/C,GAAG,KAAcA,EAAM,SAAS,EAAK,GACrC,IAAY,EAAe,CAAe,CAAC,CAAC,SAC5C,IAAM,EAAe,CAAS,CAAC,CAAC,SAChC,IAAeA,EAAM,OAAO,CAAC,GAC7B,IAAaA,EAAM,OAAO,EAAI,GAC9B,IAAWA,EAAM,OAAO,CAAC,CAAC,GAC1B,IAAsBA,EAAM,OAAO,IAAI,GAKvC,IAAoB,Q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OACrB,IAAO;GACX,OAAO,KAAS;GAChB,SAAS;GACT;EACF;EACA,AAAI,MAAU,OACZ,EAAe,KAAK,CAAI,IACf,KAAS,MAClB,EAAgB,IAAI,CAAK,GACzB,EAAM,KAAK,CAAI;CAEnB,CAAC;CACD,IAAI,IAAqB;CAazB,OAZA,EAAe,MAAM,GAAG,MAAM,EAAuB,EAAE,SAAS,EAAE,OAAO,CAAC,GAC1E,EAAe,SAAQ,MAAQ;EAC7B,OAAO,EAAgB,IAAI,CAAkB,IAC3C,KAAsB;EAIxB,AAFA,EAAK,QAAQ,GACb,EAAM,KAAK,CAAI,GACf,KAAsB;CACxB,CAAC,GACG,EAAgB,OAAO,KACzB,EAAM,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK,GAEjC,CAAC,GAAO,EAAe,KAAI,MAAQ,EAAK,OAAO,CAAC;AACzD;AACA,SAAS,EAAkB,GAAW,GAAU;CAC9C,IAAI,IAAW,EAAU;CAIzB,OAAO,KAAY,CAAC,EAAS,SAAS,CAAQ,IAC5C,IAAW,EAAS;CAEtB,OAAO;AACT;AACA,SAAS,EAAa,GAAS;CAC7B,KAAK,IAAM,KAAS,GAClB,KAAK,IAAI,IAAI,GAAG,IAAI,EAAM,aAAa,QAAQ,KAAK,GAClD,IAAI,EAAM,aAAa,EAAE,CAAC,aACxB,OAAO;CAIb,OAAO;AACT;AACA,SAAS,EAAuB,GAAG,GAAG;CAGpC,OAAO,EAAE,wBAAwB,CAAC,IAAI,KAAK,8BAA8B,KAAK;AAChF"}
|
package/dist/index390.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
//#region ../../node_modules/@base-ui/react/internals/
|
|
4
|
-
var t = /*#__PURE__*/ e.createContext(
|
|
5
|
-
|
|
6
|
-
unregister: () => {},
|
|
7
|
-
subscribeMapChange: () => () => {},
|
|
8
|
-
elementsRef: { current: [] },
|
|
9
|
-
nextIndexRef: { current: 0 }
|
|
10
|
-
});
|
|
11
|
-
process.env.NODE_ENV !== "production" && (t.displayName = "CompositeListContext");
|
|
3
|
+
//#region ../../node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
|
|
4
|
+
var t = /*#__PURE__*/ e.createContext(void 0);
|
|
5
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "DirectionContext");
|
|
12
6
|
function n() {
|
|
13
|
-
return e.useContext(t);
|
|
7
|
+
return e.useContext(t)?.direction ?? "ltr";
|
|
14
8
|
}
|
|
15
9
|
//#endregion
|
|
16
|
-
export { t as
|
|
10
|
+
export { t as DirectionContext, n as useDirection };
|
|
17
11
|
|
|
18
12
|
//# sourceMappingURL=index390.js.map
|
package/dist/index390.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index390.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/
|
|
1
|
+
{"version":3,"file":"index390.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport const DirectionContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DirectionContext.displayName = \"DirectionContext\";\nexport function useDirection() {\n const context = React.useContext(DirectionContext);\n return context?.direction ?? 'ltr';\n}"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAa,IAAgC,gBAAM,cAAc,KAAA,CAAS;AAC1E,QAAA,IAAA,aAA6B,iBAAc,EAAiB,cAAc;AAC1E,SAAgB,IAAe;CAE7B,OADgBA,EAAM,WAAW,CACpB,CAAC,EAAE,aAAa;AAC/B"}
|