@rpcbase/ui 0.279.0 → 0.281.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AddressAutocompleteInput/index.d.ts +1 -1
- package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/components/ApplePayButton/index.d.ts +1 -1
- package/dist/components/ApplePayButton/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/DayPickerField/index.d.ts +2 -2
- package/dist/components/DayPickerField/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.d.ts +9 -9
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/FilesUploadField/index.d.ts +1 -1
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/components/HourPickerField/index.d.ts +2 -2
- package/dist/components/HourPickerField/index.d.ts.map +1 -1
- package/dist/components/I18nField/index.d.ts +1 -1
- package/dist/components/I18nField/index.d.ts.map +1 -1
- package/dist/components/Image/index.d.ts +1 -1
- package/dist/components/Image/index.d.ts.map +1 -1
- package/dist/components/ImagesField/index.d.ts +1 -1
- package/dist/components/ImagesField/index.d.ts.map +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
- package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
- package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/header/MenuPopover/index.d.ts +1 -1
- package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js +6 -4
- package/dist/index10.js.map +1 -1
- package/dist/index12.js.map +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index14.js.map +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index154.js +19 -7
- package/dist/index154.js.map +1 -1
- package/dist/index16.js +36 -45
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +3 -3
- package/dist/index160.js.map +1 -1
- package/dist/index166.js +5 -5
- package/dist/index166.js.map +1 -1
- package/dist/index172.js +27 -25
- package/dist/index172.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +145 -162
- package/dist/index182.js.map +1 -1
- package/dist/index184.js +6 -8
- package/dist/index184.js.map +1 -1
- package/dist/index186.js +2 -8
- package/dist/index186.js.map +1 -1
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -15
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +13 -17
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +3 -2
- package/dist/index200.js.map +1 -1
- package/dist/index207.js +5 -90
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +15 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +102 -22
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +3 -28
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +23 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +27 -6
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +19 -14
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +14 -26
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +7 -22
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +27 -6
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +23 -5
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +6 -4
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +5 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +4 -24
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +4 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +21 -21
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +3 -23
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -6
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +22 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -17
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -49
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +18 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +50 -19
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +20 -28
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +27 -104
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +98 -33
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +28 -113
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +117 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +12 -4
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +4 -15
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +13 -62
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +64 -9
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +10 -106
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +107 -13
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +16 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +13 -5
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +4 -316
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +315 -58
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +58 -223
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +215 -318
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +250 -306
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +308 -173
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +178 -7
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +8 -15
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +41 -5
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +46 -38
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +7 -50
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +49 -6
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +48 -46
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +6 -51
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +10 -9
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +60 -8
- package/dist/index259.js.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +41 -60
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +88 -34
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +47 -94
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +36 -49
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +45 -32
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +47 -46
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +18 -48
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +174 -15
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +47 -169
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +17 -34
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +59 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +10 -66
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +4 -4
- package/dist/index273.js +71 -69
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +158 -152
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +7 -13
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -5
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +12 -6
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +11 -12
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +65 -9
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +6 -74
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +25 -6
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +24 -24
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +125 -24
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +52 -115
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +59 -55
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +48 -61
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +5 -48
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +14 -8
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +18 -14
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +10 -17
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +23 -11
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +52 -25
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +6 -52
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +137 -5
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +59 -149
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +90 -49
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +11 -117
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +863 -11
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +21 -865
- package/dist/index299.js.map +1 -1
- package/dist/index3.js.map +1 -1
- package/dist/index300.js +417 -27
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +774 -483
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +7436 -803
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -7429
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +12 -6
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +5 -12
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +469 -5
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +32 -464
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +18 -36
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +28 -17
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +4 -30
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +59 -4
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +11 -59
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +5 -9
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +9 -5
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +12 -9
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +3 -13
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +17 -3
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +23 -14
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +39 -23
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +5 -41
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +25 -5
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +18 -24
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +32 -17
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +5 -34
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +9 -5
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +7 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +9 -8
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +10 -9
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +7 -10
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +75 -7
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +153 -66
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +99 -147
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +13 -113
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +78 -12
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +23 -57
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +12 -45
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +16 -13
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +100 -15
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +50 -95
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +57 -5
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +41 -78
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +100 -58
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +46 -104
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +39 -51
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +143 -42
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +122 -123
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +224 -108
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +158 -174
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +213 -144
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +5 -309
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +6 -5
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +7 -6
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +4 -5
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +4 -4
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +21 -6
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +10 -21
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +128 -10
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +36 -122
- package/dist/index359.js.map +1 -1
- package/dist/index360.js +64 -38
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +115 -66
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +485 -112
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +7 -490
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +1 -1
- package/dist/index364.js.map +1 -1
- package/dist/index367.js +2 -9
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +26 -5
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +43 -27
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +35 -46
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +16 -27
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +41 -16
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +11 -42
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +10 -14
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +51 -9
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +40 -53
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +17 -43
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +4 -15
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +4 -4
- package/dist/index379.js.map +1 -1
- package/dist/index380.js +9 -4
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +304 -9
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +4 -339
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +21 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +106 -16
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +19 -109
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +18 -18
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +14 -19
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +12 -4
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +113 -20
- package/dist/index389.js.map +1 -1
- package/dist/index390.js +5 -11
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +28 -85
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +9 -9
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +6 -29
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +254 -10
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +12 -6
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +11 -252
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +6 -11
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +22 -10
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +22 -6
- package/dist/index399.js.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index400.js +103 -21
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +15 -23
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +11 -108
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +10 -15
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +237 -10
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +27 -9
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +33 -238
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +11 -30
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +118 -48
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +39 -11
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +18 -121
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +11 -39
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +21 -24
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +17 -11
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +10 -20
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +4 -17
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +300 -14
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +61 -323
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +4 -63
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +28 -4
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +468 -25
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +250 -452
- package/dist/index421.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +91 -133
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +2 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +11 -4
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -3
- package/dist/index72.js.map +1 -1
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +16 -19
- package/dist/index9.js.map +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
- package/package.json +15 -15
- package/dist/index422.js +0 -272
- package/dist/index422.js.map +0 -1
package/dist/index408.js
CHANGED
|
@@ -1,56 +1,126 @@
|
|
|
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
|
-
|
|
27
|
-
]);
|
|
28
|
-
return e(() => {
|
|
29
|
-
if (l != null) return;
|
|
30
|
-
let e = y.current;
|
|
31
|
-
if (e) return u(e, o), () => {
|
|
32
|
-
d(e);
|
|
2
|
+
import { useRenderElement as e } from "./index196.js";
|
|
3
|
+
import { useIsoLayoutEffect as t } from "./index204.js";
|
|
4
|
+
import { useButton as n } from "./index209.js";
|
|
5
|
+
import { itemPress as r } from "./index210.js";
|
|
6
|
+
import { createChangeEventDetails as i } from "./index211.js";
|
|
7
|
+
import { isVirtualClick as a } from "./index223.js";
|
|
8
|
+
import { useStore as o } from "./index259.js";
|
|
9
|
+
import { useSelectRootContext as s } from "./index367.js";
|
|
10
|
+
import { compareItemEquality as c, removeItem as l } from "./index373.js";
|
|
11
|
+
import { selectors as u } from "./index376.js";
|
|
12
|
+
import { useCompositeListItem as d } from "./index406.js";
|
|
13
|
+
import { SelectItemContext as f } from "./index407.js";
|
|
14
|
+
import * as p from "react";
|
|
15
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
16
|
+
//#region ../../node_modules/@base-ui/react/select/item/SelectItem.mjs
|
|
17
|
+
var h = /*#__PURE__*/ p.memo(/*#__PURE__*/ p.forwardRef(function(h, g) {
|
|
18
|
+
let { render: _, className: ee, style: te, value: v = null, label: y, disabled: b = !1, nativeButton: x = !1, ...S } = h, C = p.useRef(null), w = d({
|
|
19
|
+
guess: !0,
|
|
20
|
+
label: y,
|
|
21
|
+
textRef: C
|
|
22
|
+
}), { store: T, itemProps: E, setOpen: D, setValue: O, selectionRef: k, typingRef: A, valuesRef: j, multiple: M, selectedItemTextRef: N, disabled: P, readOnly: F } = s(), I = P || b, L = o(T, u.isActive, w.index), R = o(T, u.open), z = o(T, u.isSelected, v), B = o(T, u.isSelectedByFocus, w.index), V = o(T, u.isItemEqualToValue), H = w.index, U = p.useRef(null);
|
|
23
|
+
t(() => {
|
|
24
|
+
let e = j.current;
|
|
25
|
+
return e[H] = v, () => {
|
|
26
|
+
delete e[H];
|
|
33
27
|
};
|
|
34
28
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
let t = y.current ? e.get(y.current)?.index : null;
|
|
42
|
-
t != null && v(t);
|
|
43
|
-
});
|
|
29
|
+
H,
|
|
30
|
+
v,
|
|
31
|
+
j
|
|
32
|
+
]), t(() => {
|
|
33
|
+
let e = T.state.value, t = e;
|
|
34
|
+
M && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && c(v, t, V) && (T.set("selectedIndex", H), C.current && (N.current = C.current));
|
|
44
35
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
H,
|
|
37
|
+
M,
|
|
38
|
+
V,
|
|
39
|
+
T,
|
|
40
|
+
v,
|
|
41
|
+
N
|
|
42
|
+
]);
|
|
43
|
+
let W = p.useRef("mouse"), G = p.useRef(!1), { getButtonProps: K, buttonRef: q } = n({
|
|
44
|
+
disabled: I,
|
|
45
|
+
focusableWhenDisabled: !0,
|
|
46
|
+
native: x,
|
|
47
|
+
composite: !0
|
|
48
|
+
}), J = {
|
|
49
|
+
disabled: I,
|
|
50
|
+
selected: z,
|
|
51
|
+
highlighted: L
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
+
function Y(e) {
|
|
54
|
+
if (P || F) return;
|
|
55
|
+
let t = T.state.value;
|
|
56
|
+
if (M) {
|
|
57
|
+
let n = Array.isArray(t) ? t : [], a = z ? l(n, v, V) : [...n, v];
|
|
58
|
+
O(a, i(r, e));
|
|
59
|
+
} else O(v, i(r, e)), D(!1, i(r, e));
|
|
60
|
+
}
|
|
61
|
+
function X() {
|
|
62
|
+
k.current.dragY = 0;
|
|
63
|
+
}
|
|
64
|
+
let Z = {
|
|
65
|
+
role: "option",
|
|
66
|
+
"aria-selected": z,
|
|
67
|
+
tabIndex: R && L ? 0 : -1,
|
|
68
|
+
onKeyDown(e) {
|
|
69
|
+
T.set("activeIndex", H), e.key === " " && A.current && e.preventDefault();
|
|
70
|
+
},
|
|
71
|
+
onClick(e) {
|
|
72
|
+
let t = W.current !== "touch", n = e.nativeEvent.pointerType, r = t && a(e.nativeEvent) && (n !== void 0 || L), i = t && !r && !G.current;
|
|
73
|
+
G.current = !1, !(I || i) && Y(e.nativeEvent);
|
|
74
|
+
},
|
|
75
|
+
onPointerEnter(e) {
|
|
76
|
+
W.current = e.pointerType;
|
|
77
|
+
},
|
|
78
|
+
onPointerMove(e) {
|
|
79
|
+
if (e.pointerType === "mouse" && e.buttons === 1) {
|
|
80
|
+
let t = k.current;
|
|
81
|
+
t.dragY += e.movementY, t.dragY ** 2 >= 64 && (t.allowUnselectedMouseUp = !0);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
onPointerDown(e) {
|
|
85
|
+
W.current = e.pointerType, G.current = !0, X();
|
|
86
|
+
},
|
|
87
|
+
onMouseUp() {
|
|
88
|
+
if (X(), I || W.current === "touch" || G.current) return;
|
|
89
|
+
let e = !k.current.allowSelectedMouseUp && z, t = !k.current.allowUnselectedMouseUp && !z;
|
|
90
|
+
e || t || (G.current = !0, U.current?.click(), G.current = !1);
|
|
91
|
+
}
|
|
92
|
+
}, Q = e("div", h, {
|
|
93
|
+
ref: [
|
|
94
|
+
q,
|
|
95
|
+
g,
|
|
96
|
+
w.ref,
|
|
97
|
+
U
|
|
98
|
+
],
|
|
99
|
+
state: J,
|
|
100
|
+
props: [
|
|
101
|
+
E,
|
|
102
|
+
Z,
|
|
103
|
+
S,
|
|
104
|
+
K
|
|
105
|
+
]
|
|
106
|
+
}), $ = p.useMemo(() => ({
|
|
107
|
+
selected: z,
|
|
108
|
+
index: H,
|
|
109
|
+
textRef: C,
|
|
110
|
+
selectedByFocus: B
|
|
111
|
+
}), [
|
|
112
|
+
z,
|
|
113
|
+
H,
|
|
114
|
+
C,
|
|
115
|
+
B
|
|
116
|
+
]);
|
|
117
|
+
return /*#__PURE__*/ m(f.Provider, {
|
|
118
|
+
value: $,
|
|
119
|
+
children: Q
|
|
120
|
+
});
|
|
121
|
+
}));
|
|
122
|
+
process.env.NODE_ENV !== "production" && (h.displayName = "SelectItem");
|
|
53
123
|
//#endregion
|
|
54
|
-
export {
|
|
124
|
+
export { h as SelectItem };
|
|
55
125
|
|
|
56
126
|
//# sourceMappingURL=index408.js.map
|
package/dist/index408.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index408.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useCompositeListContext } from \"./CompositeListContext.mjs\";\nexport let IndexGuessBehavior = /*#__PURE__*/function (IndexGuessBehavior) {\n IndexGuessBehavior[IndexGuessBehavior[\"None\"] = 0] = \"None\";\n IndexGuessBehavior[IndexGuessBehavior[\"GuessFromOrder\"] = 1] = \"GuessFromOrder\";\n return IndexGuessBehavior;\n}({});\n\n/**\n * Used to register a list item and its index (DOM position) in the `CompositeList`.\n */\nexport function useCompositeListItem(params = {}) {\n const {\n label,\n metadata,\n textRef,\n indexGuessBehavior,\n index: externalIndex\n } = params;\n const {\n register,\n unregister,\n subscribeMapChange,\n elementsRef,\n labelsRef,\n nextIndexRef\n } = useCompositeListContext();\n const indexRef = React.useRef(-1);\n const [index, setIndex] = React.useState(externalIndex ?? (indexGuessBehavior === IndexGuessBehavior.GuessFromOrder ? () => {\n if (indexRef.current === -1) {\n const newIndex = nextIndexRef.current;\n nextIndexRef.current += 1;\n indexRef.current = newIndex;\n }\n return indexRef.current;\n } : -1));\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index !== -1 && node !== null) {\n elementsRef.current[index] = node;\n if (labelsRef) {\n const isLabelDefined = label !== undefined;\n labelsRef.current[index] = isLabelDefined ? label : textRef?.current?.textContent ?? node.textContent;\n }\n }\n }, [index, elementsRef, labelsRef, label, textRef]);\n useIsoLayoutEffect(() => {\n if (externalIndex != null) {\n return undefined;\n }\n const node = componentRef.current;\n if (node) {\n register(node, metadata);\n return () => {\n unregister(node);\n };\n }\n return undefined;\n }, [externalIndex, register, unregister, metadata]);\n useIsoLayoutEffect(() => {\n if (externalIndex != null) {\n return undefined;\n }\n return subscribeMapChange(map => {\n const i = componentRef.current ? map.get(componentRef.current)?.index : null;\n if (i != null) {\n setIndex(i);\n }\n });\n }, [externalIndex, subscribeMapChange, setIndex]);\n return {\n ref,\n index\n };\n}"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,IAAW,IAAkC,uBAAU,GAAoB;CAGzE,OAFA,EAAmB,EAAmB,OAAU,KAAK,QACrD,EAAmB,EAAmB,iBAAoB,KAAK,kBACxD;AACT,EAAE,CAAC,CAAC;AAKJ,SAAgB,EAAqB,IAAS,CAAC,GAAG;CAChD,IAAM,EACJ,UACA,aACA,YACA,uBACA,OAAO,MACL,GACE,EACJ,aACA,eACA,uBACA,gBACA,cACA,oBACE,EAAwB,GACtB,IAAWA,EAAM,OAAO,EAAE,GAC1B,CAAC,GAAO,KAAYA,EAAM,SAAS,MAAkB,MAAuB,EAAmB,uBAAuB;EAC1H,IAAI,EAAS,YAAY,IAAI;GAC3B,IAAM,IAAW,EAAa;GAE9B,AADA,EAAa,WAAW,GACxB,EAAS,UAAU;EACrB;EACA,OAAO,EAAS;CAClB,IAAI,GAAG,GACD,IAAeA,EAAM,OAAO,IAAI,GAChC,IAAMA,EAAM,aAAY,MAAQ;EAEpC,IADA,EAAa,UAAU,GACnB,MAAU,MAAM,MAAS,SAC3B,EAAY,QAAQ,KAAS,GACzB,IAAW;GACb,IAAM,IAAiB,MAAU,KAAA;GACjC,EAAU,QAAQ,KAAS,IAAiB,IAAQ,GAAS,SAAS,eAAe,EAAK;EAC5F;CAEJ,GAAG;EAAC;EAAO;EAAa;EAAW;EAAO;CAAO,CAAC;CAyBlD,OAxBA,QAAyB;EACvB,IAAI,KAAiB,MACnB;EAEF,IAAM,IAAO,EAAa;EAC1B,IAAI,GAEF,OADA,EAAS,GAAM,CAAQ,SACV;GACX,EAAW,CAAI;EACjB;CAGJ,GAAG;EAAC;EAAe;EAAU;EAAY;CAAQ,CAAC,GAClD,QAAyB;EACnB,SAAiB,MAGrB,OAAO,GAAmB,MAAO;GAC/B,IAAM,IAAI,EAAa,UAAU,EAAI,IAAI,EAAa,OAAO,CAAC,EAAE,QAAQ;GACxE,AAAI,KAAK,QACP,EAAS,CAAC;EAEd,CAAC;CACH,GAAG;EAAC;EAAe;EAAoB;CAAQ,CAAC,GACzC;EACL;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"index408.js","names":["React","REASONS.itemPress"],"sources":["../../../node_modules/@base-ui/react/select/item/SelectItem.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\n\n/**\n * An individual option in the select popup.\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 SelectItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItem(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n value: itemValue = null,\n label,\n disabled: disabledProp = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n guess: true,\n label,\n textRef\n });\n const {\n store,\n itemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n multiple,\n selectedItemTextRef,\n disabled: selectDisabled,\n readOnly\n } = useSelectRootContext();\n const disabled = selectDisabled || disabledProp;\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const open = useStore(store, selectors.open);\n const selected = useStore(store, selectors.isSelected, itemValue);\n const selectedByFocus = useStore(store, selectors.isSelectedByFocus, listItem.index);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const index = listItem.index;\n const itemRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n const values = valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [index, itemValue, valuesRef]);\n useIsoLayoutEffect(() => {\n const selectedValue = store.state.value;\n let selectedCandidate = selectedValue;\n if (multiple && Array.isArray(selectedValue)) {\n // Compare against the last selected item, or `undefined` when nothing is selected — never\n // the raw array, which a custom `isItemEqualToValue` isn't expected to receive.\n selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : undefined;\n }\n if (selectedCandidate !== undefined && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (textRef.current) {\n selectedItemTextRef.current = textRef.current;\n }\n }\n }, [index, multiple, isItemEqualToValue, store, itemValue, selectedItemTextRef]);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n store.set('activeIndex', index);\n if (event.key === ' ' && typingRef.current) {\n // `useButton` skips Space activation for `role=\"option\"` items when the keydown\n // is `defaultPrevented`, keeping typeahead spaces from committing a selection.\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n if (disabled || isInvalidMouseClick) {\n return;\n }\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus\n }), [selected, index, textRef, selectedByFocus]);\n return /*#__PURE__*/_jsx(SelectItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItem.displayName = \"SelectItem\";"],"x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AFA,EAAe,UAAU,EAAM,aAC/B,EAAuB,UAAU,IACjC,EAAkB;EACpB;EACA,YAAY;GAOV,IANA,EAAkB,GACd,KAAY,EAAe,YAAY,WAKvC,EAAuB,SACzB;GAEF,IAAM,IAA0B,CAAC,EAAa,QAAQ,wBAAwB,GACxE,IAA4B,CAAC,EAAa,QAAQ,0BAA0B,CAAC;GAC/E,KAA2B,MAG/B,EAAuB,UAAU,IACjC,EAAQ,SAAS,MAAM,GACvB,EAAuB,UAAU;EACnC;CACF,GACM,IAAU,EAAiB,OAAO,GAAgB;EACtD,KAAK;GAAC;GAAW;GAAc,EAAS;GAAK;EAAO;EACpD;EACA,OAAO;GAAC;GAAW;GAAc;GAAc;EAAc;CAC/D,CAAC,GACK,IAAeD,EAAM,eAAe;EACxC;EACA;EACA;EACA;CACF,IAAI;EAAC;EAAU;EAAO;EAAS;CAAe,CAAC;CAC/C,OAAoB,gBAAK,EAAkB,UAAU;EACnD,OAAO;EACP,UAAU;CACZ,CAAC;AACH,CAAC,CAAC;AACF,QAAA,IAAA,aAA6B,iBAAc,EAAW,cAAc"}
|
package/dist/index409.js
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import e from "./
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
2
|
+
import { useRenderElement as e } from "./index196.js";
|
|
3
|
+
import { transitionStatusMapping as t } from "./index197.js";
|
|
4
|
+
import { useTransitionStatus as n } from "./index264.js";
|
|
5
|
+
import { useOpenChangeComplete as r } from "./index266.js";
|
|
6
|
+
import { useSelectItemContext as i } from "./index407.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs
|
|
10
|
+
var s = /*#__PURE__*/ a.forwardRef(function(e, t) {
|
|
11
|
+
let { selected: n } = i();
|
|
12
|
+
return e.keepMounted || n ? /*#__PURE__*/ o(c, {
|
|
13
|
+
...e,
|
|
14
|
+
ref: t
|
|
15
|
+
}) : null;
|
|
16
|
+
});
|
|
17
|
+
process.env.NODE_ENV !== "production" && (s.displayName = "SelectItemIndicator");
|
|
18
|
+
var c = /*#__PURE__*/ a.memo(/*#__PURE__*/ a.forwardRef((o, s) => {
|
|
19
|
+
let { render: c, className: l, style: u, keepMounted: d, ...f } = o, { selected: p } = i(), m = a.useRef(null), { transitionStatus: h, setMounted: g } = n(p), _ = e("span", o, {
|
|
20
|
+
ref: [s, m],
|
|
21
|
+
state: {
|
|
22
|
+
selected: p,
|
|
23
|
+
transitionStatus: h
|
|
24
|
+
},
|
|
25
|
+
props: [{
|
|
26
|
+
"aria-hidden": !0,
|
|
27
|
+
children: "✔️"
|
|
28
|
+
}, f],
|
|
29
|
+
stateAttributesMapping: t
|
|
30
|
+
});
|
|
31
|
+
return r({
|
|
32
|
+
open: p,
|
|
33
|
+
ref: m,
|
|
34
|
+
onComplete() {
|
|
35
|
+
p || g(!1);
|
|
36
|
+
}
|
|
37
|
+
}), _;
|
|
38
|
+
}));
|
|
39
|
+
process.env.NODE_ENV !== "production" && (c.displayName = "Inner");
|
|
12
40
|
//#endregion
|
|
13
|
-
export {
|
|
41
|
+
export { s as SelectItemIndicator };
|
|
14
42
|
|
|
15
43
|
//# sourceMappingURL=index409.js.map
|
package/dist/index409.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index409.js","names":["React"
|
|
1
|
+
{"version":3,"file":"index409.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\n\n/**\n * Indicates whether the select item is selected.\n * Renders a `<span>` 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 SelectItemIndicator = /*#__PURE__*/React.forwardRef(function SelectItemIndicator(componentProps, forwardedRef) {\n const {\n selected\n } = useSelectItemContext();\n const shouldRender = componentProps.keepMounted || selected;\n if (!shouldRender) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return /*#__PURE__*/_jsx(Inner, {\n ...componentProps,\n ref: forwardedRef\n });\n});\n\n// Split the core implementation to avoid paying the hook costs unless the element needs to mount.\nif (process.env.NODE_ENV !== \"production\") SelectItemIndicator.displayName = \"SelectItemIndicator\";\nconst Inner = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef((componentProps, forwardedRef) => {\n const {\n render,\n className,\n style,\n keepMounted,\n ...elementProps\n } = componentProps;\n const {\n selected\n } = useSelectItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n setMounted\n } = useTransitionStatus(selected);\n const state = {\n selected,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: [{\n 'aria-hidden': true,\n children: '✔️'\n }, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n useOpenChangeComplete({\n open: selected,\n ref: indicatorRef,\n onComplete() {\n if (!selected) {\n setMounted(false);\n }\n }\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") Inner.displayName = \"Inner\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AAgBA,IAAa,IAAmC,gBAAM,WAAW,SAA6B,GAAgB,GAAc;CAC1H,IAAM,EACJ,gBACE,EAAqB;CAOzB,OANqB,EAAe,eAAe,IAM/B,gBAAK,GAAO;EAC9B,GAAG;EACH,KAAK;CACP,CAAC,IAPQ;AAQX,CAAC;AAGD,QAAA,IAAA,aAA6B,iBAAc,EAAoB,cAAc;AAC7E,IAAM,IAAqB,gBAAM,KAAkB,gBAAM,YAAY,GAAgB,MAAiB;CACpG,IAAM,EACJ,WACA,cACA,UACA,gBACA,GAAG,MACD,GACE,EACJ,gBACE,EAAqB,GACnB,IAAeA,EAAM,OAAO,IAAI,GAChC,EACJ,qBACA,kBACE,EAAoB,CAAQ,GAK1B,IAAU,EAAiB,QAAQ,GAAgB;EACvD,KAAK,CAAC,GAAc,CAAY;EAChC,OAAA;GALA;GACA;EAII;EACJ,OAAO,CAAC;GACN,eAAe;GACf,UAAU;EACZ,GAAG,CAAY;EACf,wBAAwB;CAC1B,CAAC;CAUD,OATA,EAAsB;EACpB,MAAM;EACN,KAAK;EACL,aAAa;GACX,AAAK,KACH,EAAW,EAAK;EAEpB;CACF,CAAC,GACM;AACT,CAAC,CAAC;AACF,QAAA,IAAA,aAA6B,iBAAc,EAAM,cAAc"}
|
package/dist/index410.js
CHANGED
|
@@ -1,132 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useRenderElement as e } from "./index196.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { compareItemEquality as c, removeItem as l } from "./index374.js";
|
|
11
|
-
import { selectors as u } from "./index377.js";
|
|
12
|
-
import { IndexGuessBehavior as d, useCompositeListItem as f } from "./index408.js";
|
|
13
|
-
import { SelectItemContext as p } from "./index409.js";
|
|
14
|
-
import * as m from "react";
|
|
15
|
-
import { jsx as h } from "react/jsx-runtime";
|
|
16
|
-
//#region ../../node_modules/@base-ui/react/select/item/SelectItem.mjs
|
|
17
|
-
var g = /*#__PURE__*/ m.memo(/*#__PURE__*/ m.forwardRef(function(g, _) {
|
|
18
|
-
let { render: ee, className: te, style: ne, value: v = null, label: y, disabled: b = !1, nativeButton: x = !1, ...S } = g, C = m.useRef(null), w = f({
|
|
19
|
-
label: y,
|
|
20
|
-
textRef: C,
|
|
21
|
-
indexGuessBehavior: d.GuessFromOrder
|
|
22
|
-
}), { store: T, itemProps: E, setOpen: D, setValue: O, selectionRef: k, typingRef: A, valuesRef: j, multiple: M, selectedItemTextRef: N, disabled: P, readOnly: F } = s(), I = o(T, u.isActive, w.index), L = o(T, u.open), R = o(T, u.isSelected, v), z = o(T, u.isSelectedByFocus, w.index), B = o(T, u.isItemEqualToValue), V = w.index, H = V !== -1, U = m.useRef(null);
|
|
23
|
-
t(() => {
|
|
24
|
-
if (!H) return;
|
|
25
|
-
let e = j.current;
|
|
26
|
-
return e[V] = v, () => {
|
|
27
|
-
delete e[V];
|
|
28
|
-
};
|
|
3
|
+
import { useSelectRootContext as t } from "./index367.js";
|
|
4
|
+
import { useSelectItemContext as n } from "./index407.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
//#region ../../node_modules/@base-ui/react/select/item-text/SelectItemText.mjs
|
|
7
|
+
var i = /*#__PURE__*/ r.memo(/*#__PURE__*/ r.forwardRef(function(i, a) {
|
|
8
|
+
let { index: o, textRef: s, selectedByFocus: c } = n(), { firstItemTextRef: l, selectedItemTextRef: u } = t(), { render: d, className: f, style: p, ...m } = i, h = r.useCallback((e) => {
|
|
9
|
+
e && (o === 0 && (l.current = e), c && (u.current = e));
|
|
29
10
|
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
]), t(() => {
|
|
35
|
-
if (!H) return;
|
|
36
|
-
let e = T.state.value, t = e;
|
|
37
|
-
M && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && c(v, t, B) && (T.set("selectedIndex", V), C.current && (N.current = C.current));
|
|
38
|
-
}, [
|
|
39
|
-
H,
|
|
40
|
-
V,
|
|
41
|
-
M,
|
|
42
|
-
B,
|
|
43
|
-
T,
|
|
44
|
-
v,
|
|
45
|
-
N
|
|
11
|
+
l,
|
|
12
|
+
u,
|
|
13
|
+
o,
|
|
14
|
+
c
|
|
46
15
|
]);
|
|
47
|
-
|
|
48
|
-
disabled: b,
|
|
49
|
-
focusableWhenDisabled: !0,
|
|
50
|
-
native: x,
|
|
51
|
-
composite: !0
|
|
52
|
-
}), Y = {
|
|
53
|
-
disabled: b,
|
|
54
|
-
selected: R,
|
|
55
|
-
highlighted: I
|
|
56
|
-
};
|
|
57
|
-
function X(e) {
|
|
58
|
-
if (P || F) return;
|
|
59
|
-
let t = T.state.value;
|
|
60
|
-
if (M) {
|
|
61
|
-
let n = Array.isArray(t) ? t : [], a = R ? l(n, v, B) : [...n, v];
|
|
62
|
-
O(a, i(r, e));
|
|
63
|
-
} else O(v, i(r, e)), D(!1, i(r, e));
|
|
64
|
-
}
|
|
65
|
-
function Z() {
|
|
66
|
-
k.current.dragY = 0;
|
|
67
|
-
}
|
|
68
|
-
let Q = {
|
|
69
|
-
role: "option",
|
|
70
|
-
"aria-selected": R,
|
|
71
|
-
tabIndex: L && I ? 0 : -1,
|
|
72
|
-
onKeyDown(e) {
|
|
73
|
-
W.current = e.key, T.set("activeIndex", V), e.key === " " && A.current && e.preventDefault();
|
|
74
|
-
},
|
|
75
|
-
onClick(e) {
|
|
76
|
-
let t = e.type === "click" && G.current !== "touch", n = e.nativeEvent.pointerType, r = t && a(e.nativeEvent) && (n !== void 0 || I), i = t && !r && !K.current;
|
|
77
|
-
K.current = !1, !(e.type === "keydown" && W.current === null) && (b || e.type === "keydown" && W.current === " " && A.current || i || (W.current = null, X(e.nativeEvent)));
|
|
78
|
-
},
|
|
79
|
-
onPointerEnter(e) {
|
|
80
|
-
G.current = e.pointerType;
|
|
81
|
-
},
|
|
82
|
-
onPointerMove(e) {
|
|
83
|
-
if (e.pointerType === "mouse" && e.buttons === 1) {
|
|
84
|
-
let t = k.current;
|
|
85
|
-
t.dragY += e.movementY, t.dragY ** 2 >= 64 && (t.allowUnselectedMouseUp = !0);
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
onPointerDown(e) {
|
|
89
|
-
G.current = e.pointerType, K.current = !0, Z();
|
|
90
|
-
},
|
|
91
|
-
onMouseUp() {
|
|
92
|
-
if (Z(), b || G.current === "touch" || K.current) return;
|
|
93
|
-
let e = !k.current.allowSelectedMouseUp && R, t = !k.current.allowUnselectedMouseUp && !R;
|
|
94
|
-
e || t || (K.current = !0, U.current?.click(), K.current = !1);
|
|
95
|
-
}
|
|
96
|
-
}, $ = e("div", g, {
|
|
16
|
+
return e("div", i, {
|
|
97
17
|
ref: [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
U
|
|
18
|
+
h,
|
|
19
|
+
a,
|
|
20
|
+
s
|
|
102
21
|
],
|
|
103
|
-
|
|
104
|
-
props: [
|
|
105
|
-
E,
|
|
106
|
-
Q,
|
|
107
|
-
S,
|
|
108
|
-
q
|
|
109
|
-
]
|
|
110
|
-
}), re = m.useMemo(() => ({
|
|
111
|
-
selected: R,
|
|
112
|
-
index: V,
|
|
113
|
-
textRef: C,
|
|
114
|
-
selectedByFocus: z,
|
|
115
|
-
hasRegistered: H
|
|
116
|
-
}), [
|
|
117
|
-
R,
|
|
118
|
-
V,
|
|
119
|
-
C,
|
|
120
|
-
z,
|
|
121
|
-
H
|
|
122
|
-
]);
|
|
123
|
-
return /*#__PURE__*/ h(p.Provider, {
|
|
124
|
-
value: re,
|
|
125
|
-
children: $
|
|
22
|
+
props: m
|
|
126
23
|
});
|
|
127
24
|
}));
|
|
128
|
-
process.env.NODE_ENV !== "production" && (
|
|
25
|
+
process.env.NODE_ENV !== "production" && (i.displayName = "SelectItemText");
|
|
129
26
|
//#endregion
|
|
130
|
-
export {
|
|
27
|
+
export { i as SelectItemText };
|
|
131
28
|
|
|
132
29
|
//# sourceMappingURL=index410.js.map
|
package/dist/index410.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index410.js","names":["React","REASONS.itemPress"],"sources":["../../../node_modules/@base-ui/react/select/item/SelectItem.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem, IndexGuessBehavior } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\n\n/**\n * An individual option in the select popup.\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 SelectItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItem(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n value: itemValue = null,\n label,\n disabled = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n label,\n textRef,\n indexGuessBehavior: IndexGuessBehavior.GuessFromOrder\n });\n const {\n store,\n itemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n multiple,\n selectedItemTextRef,\n disabled: selectDisabled,\n readOnly\n } = useSelectRootContext();\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const open = useStore(store, selectors.open);\n const selected = useStore(store, selectors.isSelected, itemValue);\n const selectedByFocus = useStore(store, selectors.isSelectedByFocus, listItem.index);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const index = listItem.index;\n const hasRegistered = index !== -1;\n const itemRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return undefined;\n }\n const values = valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [hasRegistered, index, itemValue, valuesRef]);\n useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return;\n }\n const selectedValue = store.state.value;\n let selectedCandidate = selectedValue;\n if (multiple && Array.isArray(selectedValue)) {\n // Compare against the last selected item, or `undefined` when nothing is selected — never\n // the raw array, which a custom `isItemEqualToValue` isn't expected to receive.\n selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : undefined;\n }\n if (selectedCandidate !== undefined && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (textRef.current) {\n selectedItemTextRef.current = textRef.current;\n }\n }\n }, [hasRegistered, index, multiple, isItemEqualToValue, store, itemValue, selectedItemTextRef]);\n const lastKeyRef = React.useRef(null);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n lastKeyRef.current = event.key;\n store.set('activeIndex', index);\n if (event.key === ' ' && typingRef.current) {\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = event.type === 'click' && pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n\n // Prevent double commit on {Enter}\n if (event.type === 'keydown' && lastKeyRef.current === null) {\n return;\n }\n if (disabled || event.type === 'keydown' && lastKeyRef.current === ' ' && typingRef.current || isInvalidMouseClick) {\n return;\n }\n lastKeyRef.current = null;\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus,\n hasRegistered\n }), [selected, index, textRef, selectedByFocus, hasRegistered]);\n return /*#__PURE__*/_jsx(SelectItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItem.displayName = \"SelectItem\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AAuBA,IAAa,IAA0B,gBAAM,KAAkB,gBAAM,WAAW,SAAoB,GAAgB,GAAc;CAChI,IAAM,EACJ,YACA,eACA,WACA,OAAO,IAAY,MACnB,UACA,cAAW,IACX,kBAAe,IACf,GAAG,MACD,GACE,IAAUA,EAAM,OAAO,IAAI,GAC3B,IAAW,EAAqB;EACpC;EACA;EACA,oBAAoB,EAAmB;CACzC,CAAC,GACK,EACJ,UACA,cACA,YACA,aACA,iBACA,cACA,cACA,aACA,wBACA,UAAU,GACV,gBACE,EAAqB,GACnB,IAAc,EAAS,GAAO,EAAU,UAAU,EAAS,KAAK,GAChE,IAAO,EAAS,GAAO,EAAU,IAAI,GACrC,IAAW,EAAS,GAAO,EAAU,YAAY,CAAS,GAC1D,IAAkB,EAAS,GAAO,EAAU,mBAAmB,EAAS,KAAK,GAC7E,IAAqB,EAAS,GAAO,EAAU,kBAAkB,GACjE,IAAQ,EAAS,OACjB,IAAgB,MAAU,IAC1B,IAAUA,EAAM,OAAO,IAAI;CAWjC,AAVA,QAAyB;EACvB,IAAI,CAAC,GACH;EAEF,IAAM,IAAS,EAAU;EAEzB,OADA,EAAO,KAAS,SACH;GACX,OAAO,EAAO;EAChB;CACF,GAAG;EAAC;EAAe;EAAO;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AAoB,gBAAK,EAAkB,UAAU;EACnD,OAAO;EACP,UAAU;CACZ,CAAC;AACH,CAAC,CAAC;AACF,QAAA,IAAA,aAA6B,iBAAc,EAAW,cAAc"}
|
|
1
|
+
{"version":3,"file":"index410.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/select/item-text/SelectItemText.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A text label of the select item.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectItemText = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItemText(componentProps, forwardedRef) {\n const {\n index,\n textRef,\n selectedByFocus\n } = useSelectItemContext();\n const {\n firstItemTextRef,\n selectedItemTextRef\n } = useSelectRootContext();\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const localRef = React.useCallback(node => {\n if (!node) {\n return;\n }\n if (index === 0) {\n firstItemTextRef.current = node;\n }\n if (selectedByFocus) {\n selectedItemTextRef.current = node;\n }\n }, [firstItemTextRef, selectedItemTextRef, index, selectedByFocus]);\n const element = useRenderElement('div', componentProps, {\n ref: [localRef, forwardedRef, textRef],\n props: elementProps\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItemText.displayName = \"SelectItemText\";"],"x_google_ignoreList":[0],"mappings":";;;;;;AAaA,IAAa,IAA8B,gBAAM,KAAkB,gBAAM,WAAW,SAAwB,GAAgB,GAAc;CACxI,IAAM,EACJ,UACA,YACA,uBACE,EAAqB,GACnB,EACJ,qBACA,2BACE,EAAqB,GACnB,EACJ,WACA,cACA,UACA,GAAG,MACD,GACE,IAAWA,EAAM,aAAY,MAAQ;EACpC,MAGD,MAAU,MACZ,EAAiB,UAAU,IAEzB,MACF,EAAoB,UAAU;CAElC,GAAG;EAAC;EAAkB;EAAqB;EAAO;CAAe,CAAC;CAKlE,OAJgB,EAAiB,OAAO,GAAgB;EACtD,KAAK;GAAC;GAAU;GAAc;EAAO;EACrC,OAAO;CACT,CACa;AACf,CAAC,CAAC;AACF,QAAA,IAAA,aAA6B,iBAAc,EAAe,cAAc"}
|
package/dist/index411.js
CHANGED
|
@@ -1,43 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return n || r ? /*#__PURE__*/ o(c, {
|
|
13
|
-
...e,
|
|
14
|
-
ref: t
|
|
15
|
-
}) : null;
|
|
16
|
-
});
|
|
17
|
-
process.env.NODE_ENV !== "production" && (s.displayName = "SelectItemIndicator");
|
|
18
|
-
var c = /*#__PURE__*/ a.memo(/*#__PURE__*/ a.forwardRef((o, s) => {
|
|
19
|
-
let { render: c, className: l, style: u, keepMounted: d, ...f } = o, { selected: p } = i(), m = a.useRef(null), { transitionStatus: h, setMounted: g } = n(p), _ = e("span", o, {
|
|
20
|
-
ref: [s, m],
|
|
21
|
-
state: {
|
|
22
|
-
selected: p,
|
|
23
|
-
transitionStatus: h
|
|
24
|
-
},
|
|
25
|
-
props: [{
|
|
26
|
-
"aria-hidden": !0,
|
|
27
|
-
children: "✔️"
|
|
28
|
-
}, f],
|
|
29
|
-
stateAttributesMapping: t
|
|
30
|
-
});
|
|
31
|
-
return r({
|
|
32
|
-
open: p,
|
|
33
|
-
ref: m,
|
|
34
|
-
onComplete() {
|
|
35
|
-
p || g(!1);
|
|
36
|
-
}
|
|
37
|
-
}), _;
|
|
38
|
-
}));
|
|
39
|
-
process.env.NODE_ENV !== "production" && (c.displayName = "Inner");
|
|
2
|
+
import e from "./index183.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
//#region ../../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs
|
|
5
|
+
var n = /*#__PURE__*/ t.createContext(void 0);
|
|
6
|
+
process.env.NODE_ENV !== "production" && (n.displayName = "SelectGroupContext");
|
|
7
|
+
function r() {
|
|
8
|
+
let r = t.useContext(n);
|
|
9
|
+
if (r === void 0) throw Error(process.env.NODE_ENV === "production" ? e(56) : "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
40
12
|
//#endregion
|
|
41
|
-
export {
|
|
13
|
+
export { n as SelectGroupContext, r as useSelectGroupContext };
|
|
42
14
|
|
|
43
15
|
//# sourceMappingURL=index411.js.map
|
package/dist/index411.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index411.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/select/
|
|
1
|
+
{"version":3,"file":"index411.js","names":["React","_formatErrorMessage"],"sources":["../../../node_modules/@base-ui/react/select/group/SelectGroupContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectGroupContext.displayName = \"SelectGroupContext\";\nexport function useSelectGroupContext() {\n const context = React.useContext(SelectGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));\n }\n return context;\n}"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAa,IAAkC,gBAAM,cAAc,KAAA,CAAS;AAC5E,QAAA,IAAA,aAA6B,iBAAc,EAAmB,cAAc;AAC5E,SAAgB,IAAwB;CACtC,IAAM,IAAUA,EAAM,WAAW,CAAkB;CACnD,IAAI,MAAY,KAAA,GACd,MAAU,MAAA,QAAA,IAAA,aAA+B,eAAmHC,EAAoB,EAAE,IAA1H,iGAA2H;CAErL,OAAO;AACT"}
|
package/dist/index412.js
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useRenderElement as e } from "./index196.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
//#region ../../node_modules/@base-ui/react/select/
|
|
7
|
-
var i = /*#__PURE__*/
|
|
8
|
-
let {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
c,
|
|
18
|
-
l
|
|
19
|
-
]),
|
|
20
|
-
a,
|
|
21
|
-
s
|
|
22
|
-
],
|
|
23
|
-
props: h
|
|
3
|
+
import { SelectGroupContext as t } from "./index411.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
//#region ../../node_modules/@base-ui/react/select/group/SelectGroup.mjs
|
|
7
|
+
var i = /*#__PURE__*/ n.forwardRef(function(i, a) {
|
|
8
|
+
let { render: o, className: s, style: c, ...l } = i, [u, d] = n.useState(), f = n.useMemo(() => ({
|
|
9
|
+
labelId: u,
|
|
10
|
+
setLabelId: d
|
|
11
|
+
}), [u, d]), p = e("div", i, {
|
|
12
|
+
ref: a,
|
|
13
|
+
props: [{
|
|
14
|
+
role: "group",
|
|
15
|
+
"aria-labelledby": u
|
|
16
|
+
}, l]
|
|
24
17
|
});
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
return /*#__PURE__*/ r(t.Provider, {
|
|
19
|
+
value: f,
|
|
20
|
+
children: p
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
process.env.NODE_ENV !== "production" && (i.displayName = "SelectGroup");
|
|
27
24
|
//#endregion
|
|
28
|
-
export { i as
|
|
25
|
+
export { i as SelectGroup };
|
|
29
26
|
|
|
30
27
|
//# sourceMappingURL=index412.js.map
|
package/dist/index412.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index412.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/select/
|
|
1
|
+
{"version":3,"file":"index412.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/select/group/SelectGroup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Groups related select items with the corresponding label.\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 SelectGroup = /*#__PURE__*/React.forwardRef(function SelectGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n const contextValue = React.useMemo(() => ({\n labelId,\n setLabelId\n }), [labelId, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n role: 'group',\n 'aria-labelledby': labelId\n }, elementProps]\n });\n return /*#__PURE__*/_jsx(SelectGroupContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroup.displayName = \"SelectGroup\";"],"x_google_ignoreList":[0],"mappings":";;;;;;AAaA,IAAa,IAA2B,gBAAM,WAAW,SAAqB,GAAgB,GAAc;CAC1G,IAAM,EACJ,WACA,cACA,UACA,GAAG,MACD,GACE,CAAC,GAAS,KAAcA,EAAM,SAAS,GACvC,IAAeA,EAAM,eAAe;EACxC;EACA;CACF,IAAI,CAAC,GAAS,CAAU,CAAC,GACnB,IAAU,EAAiB,OAAO,GAAgB;EACtD,KAAK;EACL,OAAO,CAAC;GACN,MAAM;GACN,mBAAmB;EACrB,GAAG,CAAY;CACjB,CAAC;CACD,OAAoB,gBAAK,EAAmB,UAAU;EACpD,OAAO;EACP,UAAU;CACZ,CAAC;AACH,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAY,cAAc"}
|