@rpcbase/ui 0.242.0 → 0.244.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
- package/dist/index105.js +36 -36
- package/dist/index117.js +6 -6
- package/dist/index120.js +10 -10
- package/dist/index122.js +2 -2
- package/dist/index123.js +3 -3
- package/dist/index124.js +1 -1
- package/dist/index126.js +2 -2
- package/dist/index128.js +2 -2
- package/dist/index149.js.map +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +91 -91
- package/dist/index16.js.map +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +58 -14
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +8 -68
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +87 -37
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +19 -13
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +16 -23
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +5 -111
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +6 -13
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +6 -4
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +5 -4
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +7 -5
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +16 -11
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +4 -19
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +5 -11
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +12 -176
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +9 -279
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +13 -4
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +14 -28
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +4 -126
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +5 -63
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +6 -8
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +6 -16
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +53 -29
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +8 -69
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +5 -20
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +4 -66
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +8 -6
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -5
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +4 -11
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +3 -3
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +10 -50
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +10 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +9 -29
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +10 -16
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +10 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +9 -21
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +6 -53
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +5 -20
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +4 -41
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +5 -39
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +7 -46
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +5 -20
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +13 -67
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +7 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +10 -3
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +10 -11
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +21 -13
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +8 -18
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +9 -36
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +9 -239
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +4 -252
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +5 -68
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +15 -98
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +9 -83
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +18 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +19 -28
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +12 -16
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +29 -34
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +12 -17
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +25 -3
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -26
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +20 -29
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +67 -4
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +6 -78
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +5 -272
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +11 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +3 -10
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +49 -24
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +4 -17
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +27 -123
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +15 -4
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +5 -65
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +22 -14
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +53 -7
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +20 -5
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +41 -3
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +39 -10
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +46 -8
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +22 -132
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +16 -396
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +21 -5
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +68 -50
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +17 -11
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +3 -27
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +11 -11
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +30 -58
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +13 -8
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +15 -84
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +35 -18
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +69 -16
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +239 -5
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +251 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +68 -6
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +99 -4
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +176 -6
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +83 -16
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +13 -5
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +3 -4
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +29 -12
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +16 -9
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +38 -14
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +35 -14
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +68 -4
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +17 -5
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +3 -6
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +111 -5
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +25 -53
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +28 -8
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +4 -5
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +126 -4
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +4 -8
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +78 -4
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +272 -4
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +11 -3
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +28 -11
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +16 -10
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +10 -9
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +25 -10
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +16 -10
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +125 -9
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +5 -6
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +65 -5
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +14 -5
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +14 -6
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +11 -6
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +5 -16
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +3 -7
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +10 -10
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +7 -10
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +133 -21
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +279 -8
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +399 -9
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +5 -10
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +52 -4
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +11 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +26 -15
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +11 -9
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +4 -18
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +14 -20
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +4 -13
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +5 -30
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +11 -12
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +63 -25
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +8 -5
- package/dist/index314.js.map +1 -1
- package/dist/index315.js.map +1 -1
- package/dist/index316.js.map +1 -1
- package/dist/index317.js.map +1 -1
- package/dist/index318.js.map +1 -1
- package/dist/index319.js.map +1 -1
- package/dist/index320.js.map +1 -1
- package/dist/index321.js.map +1 -1
- package/dist/index322.js.map +1 -1
- package/dist/index323.js.map +1 -1
- package/dist/index324.js.map +1 -1
- package/dist/index325.js.map +1 -1
- package/dist/index326.js.map +1 -1
- package/dist/index327.js.map +1 -1
- package/dist/index328.js.map +1 -1
- package/dist/index329.js.map +1 -1
- package/dist/index330.js.map +1 -1
- package/dist/index331.js.map +1 -1
- package/dist/index332.js.map +1 -1
- package/dist/index333.js.map +1 -1
- package/dist/index334.js.map +1 -1
- package/dist/index335.js.map +1 -1
- package/dist/index336.js.map +1 -1
- package/dist/index337.js.map +1 -1
- package/dist/index338.js.map +1 -1
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +2 -2
- package/dist/index34.js.map +1 -1
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +4 -8
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +18 -12
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +12 -8
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +8 -13
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +11 -3
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +8 -3
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +12 -16
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +3 -51
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +3 -5
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +5 -5
- package/dist/index35.js.map +1 -1
- package/dist/index350.js +4 -62
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +14 -66
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +10 -7
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +6 -5
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +4 -11
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +3 -22
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +8 -16
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +52 -8
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +15 -143
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +8 -80
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +11 -11
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +5 -61
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +21 -15
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +45 -4
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +18 -6
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +5 -3
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +199 -10
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +73 -20
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +122 -43
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +17 -17
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +62 -5
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +3 -3
- package/dist/index37.js.map +1 -1
- package/dist/index370.js +61 -195
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +11 -73
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +20 -122
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +144 -4
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +79 -17
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +61 -12
- package/dist/index375.js.map +1 -1
- package/dist/index376.js.map +1 -1
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +4 -8
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +5 -27
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +4 -4
- package/dist/index38.js.map +1 -1
- package/dist/index380.js +4 -138
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +15 -12
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +8 -46
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +5 -3
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +4 -21
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +542 -72
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +46 -11
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +17 -3
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +5 -71
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +7 -35
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +5 -5
- package/dist/index39.js.map +1 -1
- package/dist/index390.js +7 -7
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +7 -15
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +12 -3
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +9 -3
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +12 -4
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +3 -5
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +3 -4
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +7 -16
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +12 -8
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +46 -5
- package/dist/index399.js.map +1 -1
- package/dist/index40.js +3 -3
- package/dist/index40.js.map +1 -1
- package/dist/index400.js +137 -4
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +7 -544
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +27 -47
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +3 -17
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +21 -5
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +75 -7
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +12 -7
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +3 -7
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +71 -11
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +35 -8
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +10 -10
- package/dist/index41.js.map +1 -1
- package/dist/index410.js +15 -12
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +5 -3
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +55 -14
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +66 -490
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +31 -8
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +9 -2
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +150 -41
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +108 -56
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +6 -6
- package/dist/index418.js.map +1 -1
- package/dist/index420.js +38 -49
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +50 -50
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +7 -32
- package/dist/index422.js.map +1 -1
- package/dist/index423.js +2 -68
- package/dist/index423.js.map +1 -1
- package/dist/index424.js +55 -31
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +56 -9
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +3 -153
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +15 -108
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +491 -4
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +32 -55
- package/dist/index429.js.map +1 -1
- package/dist/index44.js.map +1 -1
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +36 -36
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +29 -29
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +2 -2
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +12 -12
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +4 -4
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +1 -1
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +21 -21
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +5 -5
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +5 -5
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +8 -8
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +5 -5
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +17 -17
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +5 -5
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +3 -3
- package/dist/index62.js.map +1 -1
- package/dist/index77.js.map +1 -1
- package/dist/index78.js.map +1 -1
- package/package.json +1 -1
package/dist/index50.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index50.js","sources":["../node_modules/@base-ui/react/select/popup/SelectPopup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the select list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPopup = /*#__PURE__*/React.forwardRef(function SelectPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n firstItemTextRef,\n selectedItemTextRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef,\n listRef,\n highlightItemOnHover\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const floatingRootContext = useSelectFloatingContext();\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const openMethod = useStore(store, selectors.openMethod);\n const mounted = useStore(store, selectors.mounted);\n const popupProps = useStore(store, selectors.popupProps);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const reachedMaxHeightRef = React.useRef(false);\n const initialPlacedRef = React.useRef(false);\n const originalPositionerStylesRef = React.useRef({});\n const scrollArrowFrame = useAnimationFrame();\n const handleScroll = useStableCallback(scroller => {\n if (!positionerElement || !popupRef.current || !initialPlacedRef.current) {\n return;\n }\n if (reachedMaxHeightRef.current || !alignItemWithTriggerActive) {\n handleScrollArrowVisibility();\n return;\n }\n const isTopPositioned = positionerElement.style.top === '0px';\n const isBottomPositioned = positionerElement.style.bottom === '0px';\n if (!isTopPositioned && !isBottomPositioned) {\n handleScrollArrowVisibility();\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n let nextPositionerHeight = 0;\n let nextScrollTop = null;\n let setReachedMax = false;\n let scrollToMax = false;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const handleSmallDiff = (diff, targetScrollTop) => {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = targetScrollTop;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n nextPositionerHeight = nextHeight;\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n handleSmallDiff(diff, isTopPositioned ? maxScrollTop : 0);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n if (isTopPositioned) {\n scrollToMax = true;\n } else {\n nextScrollTop = 0;\n }\n } else {\n setReachedMax = true;\n if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n }\n nextPositionerHeight = Math.ceil(nextPositionerHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (scrollToMax || nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const nextMaxScrollTop = getMaxScrollTop(scroller);\n const target = scrollToMax ? nextMaxScrollTop : clamp(nextScrollTop, 0, nextMaxScrollTop);\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (setReachedMax || nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n });\n React.useImperativeHandle(scrollHandlerRef, () => handleScroll, [handleScroll]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n onOpenChangeComplete?.(true);\n }\n }\n });\n const state = {\n open,\n transitionStatus,\n side,\n align\n };\n useIsoLayoutEffect(() => {\n if (!positionerElement || !popupRef.current || Object.keys(originalPositionerStylesRef.current).length) {\n return;\n }\n originalPositionerStylesRef.current = {\n top: positionerElement.style.top || '0',\n left: positionerElement.style.left || '0',\n right: positionerElement.style.right,\n height: positionerElement.style.height,\n bottom: positionerElement.style.bottom,\n minHeight: positionerElement.style.minHeight,\n maxHeight: positionerElement.style.maxHeight,\n marginTop: positionerElement.style.marginTop,\n marginBottom: positionerElement.style.marginBottom\n };\n }, [popupRef, positionerElement]);\n useIsoLayoutEffect(() => {\n if (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n if (!alignItemWithTriggerActive) {\n initialPlacedRef.current = true;\n scrollArrowFrame.request(handleScrollArrowVisibility);\n popupElement.style.removeProperty('--transform-origin');\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n popupElement.style.removeProperty('--transform-origin');\n try {\n let textElement = selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = selectors.hasSelectedValue(store.state);\n textElement = !hasSelectedValue && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;\n }\n const valueElement = valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\n const paddingLeft = 5;\n const paddingRight = 5;\n const triggerCollisionThreshold = 20;\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const viewportWidth = doc.documentElement.clientWidth;\n const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;\n let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\n }\n const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;\n let height = Math.min(viewportHeight, idealHeight);\n const maxHeight = viewportHeight - marginTop - marginBottom;\n const scrollTop = idealHeight - height;\n const maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n if (isTopPositioned) {\n height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);\n }\n\n // When the trigger is too close to the top or bottom of the viewport, or the minHeight is\n // reached, we fallback to aligning the popup to the trigger as the UX is poor otherwise.\n const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n initialPlacedRef.current = true;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\n if (isTopPositioned) {\n const topOffset = Math.max(0, viewportHeight - idealHeight);\n positionerElement.style.top = positionerRect.height >= maxHeight ? '0' : `${topOffset}px`;\n positionerElement.style.height = `${height}px`;\n scroller.scrollTop = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const transformOriginY = popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50;\n const clampedY = clamp(transformOriginY, 0, 100);\n popupElement.style.setProperty('--transform-origin', `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n initialPlacedRef.current = true;\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, valueRef, firstItemTextRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, listRef, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [setOpen, alignItemWithTriggerActive, positionerElement, open]);\n const defaultProps = {\n ...(listElement ? {\n role: 'presentation',\n 'aria-orientation': undefined\n } : {\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n id: `${id}-list`\n }),\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: listElement ? {\n height: '100%'\n } : LIST_FUNCTIONAL_STYLES\n })\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, popupRef],\n state,\n stateAttributesMapping,\n props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), {\n className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : undefined\n }, elementProps]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight || '';\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}"],"names":["stateAttributesMapping","popupStateMapping","transitionStatusMapping","SelectPopup","React","componentProps","forwardedRef","render","className","style","finalFocus","elementProps","store","popupRef","onOpenChangeComplete","setOpen","valueRef","firstItemTextRef","selectedItemTextRef","multiple","handleScrollArrowVisibility","scrollHandlerRef","listRef","highlightItemOnHover","useSelectRootContext","side","align","alignItemWithTriggerActive","isPositioned","setControlledAlignItemWithTrigger","useSelectPositionerContext","insideToolbar","useToolbarRootContext","floatingRootContext","useSelectFloatingContext","direction","useDirection","nonce","disableStyleElements","useCSPContext","id","useStore","selectors","open","openMethod","mounted","popupProps","transitionStatus","triggerElement","positionerElement","listElement","reachedMaxHeightRef","initialPlacedRef","originalPositionerStylesRef","scrollArrowFrame","useAnimationFrame","handleScroll","useStableCallback","scroller","isTopPositioned","isBottomPositioned","scale","getScale","currentHeight","normalizeSize","doc","ownerDocument","win","ownerWindow","positionerStyles","marginTop","marginBottom","maxPopupHeight","getMaxPopupHeight","maxAvailableHeight","scrollTop","maxScrollTop","getMaxScrollTop","nextPositionerHeight","nextScrollTop","setReachedMax","scrollToMax","setHeight","height","handleSmallDiff","diff","targetScrollTop","heightDelta","clamp","SCROLL_EDGE_TOLERANCE_PX","nextHeight","overshoot","nextMaxScrollTop","target","useOpenChangeComplete","state","useIsoLayoutEffect","clearStyles","popupElement","restoreTransformStyles","unsetTransformStyles","textElement","valueElement","popupStyles","triggerRect","normalizeRect","positionerRect","triggerHeight","scrollHeight","borderBottom","minHeight","paddingLeft","paddingRight","triggerCollisionThreshold","viewportHeight","viewportWidth","availableSpaceBeneathTrigger","textRect","alignedLeft","offsetY","valueRect","valueCenterFromTriggerTop","idealHeight","maxHeight","maxRight","fallbackToAlignPopupToTrigger","isPinchZoomed","platform.engine.webkit","initialHeight","topOffset","popupTop","popupHeight","textCenterY","transformOriginY","clampedY","handleResize","event","createChangeEventDetails","REASONS.windowResize","addEventListener","defaultProps","COMPOSITE_KEYS","LIST_FUNCTIONAL_STYLES","element","useRenderElement","getDisabledMountTransitionStyles","styleDisableScrollbar","_jsxs","_jsx","FloatingFocusManager","maxHeightStyle","getMaxScrollOffset","floatingPlatform","size","axis","rect","rectToClientRect","TRANSFORM_STYLE_RESETS","originalStyles","property","value","originalValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAyB;AAAA,EAC7B,GAAGC;AAAA,EACH,GAAGC;AACL,GAQaC,KAA2B,gBAAAC,EAAM,WAAW,SA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GAAiB;AAAA,IACtB,GAAG5F,EAAc2F,EAAK,GAAG,KAAK9F,CAAK;AAAA,IACnC,GAAGG,EAAc2F,EAAK,GAAG,KAAK9F,CAAK;AAAA,IACnC,OAAOG,EAAc2F,EAAK,OAAO,KAAK9F,CAAK;AAAA,IAC3C,QAAQG,EAAc2F,EAAK,QAAQ,KAAK9F,CAAK;AAAA,EACjD,CAAG;AACH;AACA,MAAMgG,KAAyB,CAAC,CAAC,aAAa,MAAM,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,aAAa,KAAK,CAAC;AAC3F,SAASzD,GAAqBF,GAAc;AAC1C,QAAM;AAAA,IACJ,OAAAzF;AAAA,EACJ,IAAMyF,GACE4D,IAAiB,CAAA;AACvB,aAAW,CAACC,GAAUC,CAAK,KAAKH;AAC9B,IAAAC,EAAeC,CAAQ,IAAItJ,EAAM,iBAAiBsJ,CAAQ,GAC1DtJ,EAAM,YAAYsJ,GAAUC,GAAO,WAAW;AAEhD,SAAO,MAAM;AACX,eAAW,CAACD,CAAQ,KAAKF,IAAwB;AAC/C,YAAMI,IAAgBH,EAAeC,CAAQ;AAC7C,MAAIE,IACFxJ,EAAM,YAAYsJ,GAAUE,CAAa,IAEzCxJ,EAAM,eAAesJ,CAAQ;AAAA,IAEjC;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index50.js","sources":["../../../node_modules/@base-ui/react/select/popup/SelectPopup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the select list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPopup = /*#__PURE__*/React.forwardRef(function SelectPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n firstItemTextRef,\n selectedItemTextRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef,\n listRef,\n highlightItemOnHover\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const floatingRootContext = useSelectFloatingContext();\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const openMethod = useStore(store, selectors.openMethod);\n const mounted = useStore(store, selectors.mounted);\n const popupProps = useStore(store, selectors.popupProps);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const reachedMaxHeightRef = React.useRef(false);\n const initialPlacedRef = React.useRef(false);\n const originalPositionerStylesRef = React.useRef({});\n const scrollArrowFrame = useAnimationFrame();\n const handleScroll = useStableCallback(scroller => {\n if (!positionerElement || !popupRef.current || !initialPlacedRef.current) {\n return;\n }\n if (reachedMaxHeightRef.current || !alignItemWithTriggerActive) {\n handleScrollArrowVisibility();\n return;\n }\n const isTopPositioned = positionerElement.style.top === '0px';\n const isBottomPositioned = positionerElement.style.bottom === '0px';\n if (!isTopPositioned && !isBottomPositioned) {\n handleScrollArrowVisibility();\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n let nextPositionerHeight = 0;\n let nextScrollTop = null;\n let setReachedMax = false;\n let scrollToMax = false;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const handleSmallDiff = (diff, targetScrollTop) => {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = targetScrollTop;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n nextPositionerHeight = nextHeight;\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n handleSmallDiff(diff, isTopPositioned ? maxScrollTop : 0);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n if (isTopPositioned) {\n scrollToMax = true;\n } else {\n nextScrollTop = 0;\n }\n } else {\n setReachedMax = true;\n if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n }\n nextPositionerHeight = Math.ceil(nextPositionerHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (scrollToMax || nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const nextMaxScrollTop = getMaxScrollTop(scroller);\n const target = scrollToMax ? nextMaxScrollTop : clamp(nextScrollTop, 0, nextMaxScrollTop);\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (setReachedMax || nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n });\n React.useImperativeHandle(scrollHandlerRef, () => handleScroll, [handleScroll]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n onOpenChangeComplete?.(true);\n }\n }\n });\n const state = {\n open,\n transitionStatus,\n side,\n align\n };\n useIsoLayoutEffect(() => {\n if (!positionerElement || !popupRef.current || Object.keys(originalPositionerStylesRef.current).length) {\n return;\n }\n originalPositionerStylesRef.current = {\n top: positionerElement.style.top || '0',\n left: positionerElement.style.left || '0',\n right: positionerElement.style.right,\n height: positionerElement.style.height,\n bottom: positionerElement.style.bottom,\n minHeight: positionerElement.style.minHeight,\n maxHeight: positionerElement.style.maxHeight,\n marginTop: positionerElement.style.marginTop,\n marginBottom: positionerElement.style.marginBottom\n };\n }, [popupRef, positionerElement]);\n useIsoLayoutEffect(() => {\n if (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n if (!alignItemWithTriggerActive) {\n initialPlacedRef.current = true;\n scrollArrowFrame.request(handleScrollArrowVisibility);\n popupElement.style.removeProperty('--transform-origin');\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n popupElement.style.removeProperty('--transform-origin');\n try {\n let textElement = selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = selectors.hasSelectedValue(store.state);\n textElement = !hasSelectedValue && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;\n }\n const valueElement = valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\n const paddingLeft = 5;\n const paddingRight = 5;\n const triggerCollisionThreshold = 20;\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const viewportWidth = doc.documentElement.clientWidth;\n const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;\n let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\n }\n const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;\n let height = Math.min(viewportHeight, idealHeight);\n const maxHeight = viewportHeight - marginTop - marginBottom;\n const scrollTop = idealHeight - height;\n const maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n if (isTopPositioned) {\n height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);\n }\n\n // When the trigger is too close to the top or bottom of the viewport, or the minHeight is\n // reached, we fallback to aligning the popup to the trigger as the UX is poor otherwise.\n const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n initialPlacedRef.current = true;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\n if (isTopPositioned) {\n const topOffset = Math.max(0, viewportHeight - idealHeight);\n positionerElement.style.top = positionerRect.height >= maxHeight ? '0' : `${topOffset}px`;\n positionerElement.style.height = `${height}px`;\n scroller.scrollTop = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const transformOriginY = popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50;\n const clampedY = clamp(transformOriginY, 0, 100);\n popupElement.style.setProperty('--transform-origin', `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n initialPlacedRef.current = true;\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, valueRef, firstItemTextRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, listRef, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [setOpen, alignItemWithTriggerActive, positionerElement, open]);\n const defaultProps = {\n ...(listElement ? {\n role: 'presentation',\n 'aria-orientation': undefined\n } : {\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n id: `${id}-list`\n }),\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: listElement ? {\n height: '100%'\n } : LIST_FUNCTIONAL_STYLES\n })\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, popupRef],\n state,\n stateAttributesMapping,\n props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), {\n className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : undefined\n }, elementProps]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight || '';\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}"],"names":["stateAttributesMapping","popupStateMapping","transitionStatusMapping","SelectPopup","React","componentProps","forwardedRef","render","className","style","finalFocus","elementProps","store","popupRef","onOpenChangeComplete","setOpen","valueRef","firstItemTextRef","selectedItemTextRef","multiple","handleScrollArrowVisibility","scrollHandlerRef","listRef","highlightItemOnHover","useSelectRootContext","side","align","alignItemWithTriggerActive","isPositioned","setControlledAlignItemWithTrigger","useSelectPositionerContext","insideToolbar","useToolbarRootContext","floatingRootContext","useSelectFloatingContext","direction","useDirection","nonce","disableStyleElements","useCSPContext","id","useStore","selectors","open","openMethod","mounted","popupProps","transitionStatus","triggerElement","positionerElement","listElement","reachedMaxHeightRef","initialPlacedRef","originalPositionerStylesRef","scrollArrowFrame","useAnimationFrame","handleScroll","useStableCallback","scroller","isTopPositioned","isBottomPositioned","scale","getScale","currentHeight","normalizeSize","doc","ownerDocument","win","ownerWindow","positionerStyles","marginTop","marginBottom","maxPopupHeight","getMaxPopupHeight","maxAvailableHeight","scrollTop","maxScrollTop","getMaxScrollTop","nextPositionerHeight","nextScrollTop","setReachedMax","scrollToMax","setHeight","height","handleSmallDiff","diff","targetScrollTop","heightDelta","clamp","SCROLL_EDGE_TOLERANCE_PX","nextHeight","overshoot","nextMaxScrollTop","target","useOpenChangeComplete","state","useIsoLayoutEffect","clearStyles","popupElement","restoreTransformStyles","unsetTransformStyles","textElement","valueElement","popupStyles","triggerRect","normalizeRect","positionerRect","triggerHeight","scrollHeight","borderBottom","minHeight","paddingLeft","paddingRight","triggerCollisionThreshold","viewportHeight","viewportWidth","availableSpaceBeneathTrigger","textRect","alignedLeft","offsetY","valueRect","valueCenterFromTriggerTop","idealHeight","maxHeight","maxRight","fallbackToAlignPopupToTrigger","isPinchZoomed","platform.engine.webkit","initialHeight","topOffset","popupTop","popupHeight","textCenterY","transformOriginY","clampedY","handleResize","event","createChangeEventDetails","REASONS.windowResize","addEventListener","defaultProps","COMPOSITE_KEYS","LIST_FUNCTIONAL_STYLES","element","useRenderElement","getDisabledMountTransitionStyles","styleDisableScrollbar","_jsxs","_jsx","FloatingFocusManager","maxHeightStyle","getMaxScrollOffset","floatingPlatform","size","axis","rect","rectToClientRect","TRANSFORM_STYLE_RESETS","originalStyles","property","value","originalValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAyB;AAAA,EAC7B,GAAGC;AAAA,EACH,GAAGC;AACL,GA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AAckD,GAAM9F,GAAO;AAClC,SAAO+F,GAAiB;AAAA,IACtB,GAAG5F,EAAc2F,EAAK,GAAG,KAAK9F,CAAK;AAAA,IACnC,GAAGG,EAAc2F,EAAK,GAAG,KAAK9F,CAAK;AAAA,IACnC,OAAOG,EAAc2F,EAAK,OAAO,KAAK9F,CAAK;AAAA,IAC3C,QAAQG,EAAc2F,EAAK,QAAQ,KAAK9F,CAAK;AAAA,EACjD,CAAG;AACH;AACA,MAAMgG,KAAyB,CAAC,CAAC,aAAa,MAAM,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,aAAa,KAAK,CAAC;AAC3F,SAASzD,GAAqBF,GAAc;AAC1C,QAAM;AAAA,IACJ,OAAAzF;AAAA,EACJ,IAAMyF,GACE4D,IAAiB,CAAA;AACvB,aAAW,CAACC,GAAUC,CAAK,KAAKH;AAC9B,IAAAC,EAAeC,CAAQ,IAAItJ,EAAM,iBAAiBsJ,CAAQ,GAC1DtJ,EAAM,YAAYsJ,GAAUC,GAAO,WAAW;AAEhD,SAAO,MAAM;AACX,eAAW,CAACD,CAAQ,KAAKF,IAAwB;AAC/C,YAAMI,IAAgBH,EAAeC,CAAQ;AAC7C,MAAIE,IACFxJ,EAAM,YAAYsJ,GAAUE,CAAa,IAEzCxJ,EAAM,eAAesJ,CAAQ;AAAA,IAEjC;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
|
package/dist/index51.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import { SelectGroupContext as c } from "./
|
|
3
|
-
import { useRenderElement as p } from "./
|
|
2
|
+
import { SelectGroupContext as c } from "./index307.js";
|
|
3
|
+
import { useRenderElement as p } from "./index272.js";
|
|
4
4
|
import { j as m } from "./index30.js";
|
|
5
5
|
const u = /* @__PURE__ */ r.forwardRef(function(t, s) {
|
|
6
6
|
const {
|
package/dist/index51.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index51.js","sources":["
|
|
1
|
+
{"version":3,"file":"index51.js","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\";"],"names":["SelectGroup","React","componentProps","forwardedRef","render","className","style","elementProps","labelId","setLabelId","contextValue","element","useRenderElement","_jsx","SelectGroupContext"],"mappings":";;;;AAaY,MAACA,IAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAML,GACE,CAACM,GAASC,CAAU,IAAIR,EAAM,SAAQ,GACtCS,IAAeT,EAAM,QAAQ,OAAO;AAAA,IACxC,SAAAO;AAAA,IACA,YAAAC;AAAA,EACJ,IAAM,CAACD,GAASC,CAAU,CAAC,GACnBE,IAAUC,EAAiB,OAAOV,GAAgB;AAAA,IACtD,KAAKC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,mBAAmBK;AAAA,IACzB,GAAOD,CAAY;AAAA,EACnB,CAAG;AACD,SAAoBM,gBAAAA,EAAAA,IAAKC,EAAmB,UAAU;AAAA,IACpD,OAAOJ;AAAA,IACP,UAAUC;AAAA,EACd,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcX,EAAY,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index52.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import { useIsoLayoutEffect as U } from "./
|
|
3
|
-
import { useSelectRootContext as Q } from "./
|
|
4
|
-
import { useCompositeListItem as X, IndexGuessBehavior as Z } from "./
|
|
5
|
-
import { useRenderElement as $ } from "./
|
|
6
|
-
import { SelectItemContext as ee } from "./
|
|
7
|
-
import { selectors as a } from "./
|
|
8
|
-
import { createChangeEventDetails as M } from "./
|
|
9
|
-
import { compareItemEquality as te, removeItem as re } from "./
|
|
10
|
-
import { isVirtualClick as oe } from "./
|
|
2
|
+
import { useIsoLayoutEffect as U } from "./index238.js";
|
|
3
|
+
import { useSelectRootContext as Q } from "./index242.js";
|
|
4
|
+
import { useCompositeListItem as X, IndexGuessBehavior as Z } from "./index304.js";
|
|
5
|
+
import { useRenderElement as $ } from "./index272.js";
|
|
6
|
+
import { SelectItemContext as ee } from "./index305.js";
|
|
7
|
+
import { selectors as a } from "./index247.js";
|
|
8
|
+
import { createChangeEventDetails as M } from "./index248.js";
|
|
9
|
+
import { compareItemEquality as te, removeItem as re } from "./index252.js";
|
|
10
|
+
import { isVirtualClick as oe } from "./index306.js";
|
|
11
11
|
import { j as ne } from "./index30.js";
|
|
12
|
-
import { useStore as f } from "./
|
|
13
|
-
import { useButton as se } from "./
|
|
14
|
-
import { itemPress as g } from "./
|
|
12
|
+
import { useStore as f } from "./index257.js";
|
|
13
|
+
import { useButton as se } from "./index275.js";
|
|
14
|
+
import { itemPress as g } from "./index266.js";
|
|
15
15
|
const ie = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(k, D) {
|
|
16
16
|
const {
|
|
17
17
|
render: ce,
|
package/dist/index52.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index52.js","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\";"],"names":["SelectItem","React","componentProps","forwardedRef","render","className","style","itemValue","label","disabled","nativeButton","elementProps","textRef","listItem","useCompositeListItem","IndexGuessBehavior","store","itemProps","setOpen","setValue","selectionRef","typingRef","valuesRef","multiple","selectedItemTextRef","selectDisabled","readOnly","useSelectRootContext","highlighted","useStore","selectors","open","selected","selectedByFocus","isItemEqualToValue","index","hasRegistered","itemRef","useIsoLayoutEffect","values","selectedValue","selectedCandidate","compareItemEquality","lastKeyRef","pointerTypeRef","allowMouseSelectionRef","getButtonProps","buttonRef","useButton","state","commitSelection","event","currentValue","nextValue","removeItem","createChangeEventDetails","REASONS.itemPress","resetDragMovement","defaultProps","isMouseClick","clickPointerType","isVirtualMouseClick","isVirtualClick","isInvalidMouseClick","selection","disallowSelectedMouseUp","disallowUnselectedMouseUp","element","useRenderElement","contextValue","_jsx","SelectItemContext"],"mappings":";;;;;;;;;;;;;;AAuBY,MAACA,KAA0B,gBAAAC,EAAM,KAAkB,gBAAAA,EAAM,WAAW,SAAoBC,GAAgBC,GAAc;AAChI,QAAM;AAAA,IACJ,QAAAC;AAAA,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,MAAIiC,KAA2BC,MAG/BrB,EAAuB,UAAU,IACjCR,EAAQ,SAAS,MAAK,GACtBQ,EAAuB,UAAU;AAAA,IACnC;AAAA,EACJ,GACQsB,IAAUC,EAAiB,OAAOlE,GAAgB;AAAA,IACtD,KAAK,CAAC6C,GAAW5C,GAAcU,EAAS,KAAKwB,CAAO;AAAA,IACpD,OAAAY;AAAA,IACA,OAAO,CAAChC,GAAWyC,GAAc/C,GAAcmC,CAAc;AAAA,EACjE,CAAG,GACKuB,IAAepE,EAAM,QAAQ,OAAO;AAAA,IACxC,UAAA+B;AAAA,IACA,OAAAG;AAAA,IACA,SAAAvB;AAAA,IACA,iBAAAqB;AAAA,IACA,eAAAG;AAAA,EACJ,IAAM,CAACJ,GAAUG,GAAOvB,GAASqB,GAAiBG,CAAa,CAAC;AAC9D,SAAoBkC,gBAAAA,GAAAA,IAAKC,GAAkB,UAAU;AAAA,IACnD,OAAOF;AAAA,IACP,UAAUF;AAAA,EACd,CAAG;AACH,CAAC,CAAC;AACE,QAAQ,IAAI,aAAa,iBAAcnE,GAAW,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index52.js","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\";"],"names":["SelectItem","React","componentProps","forwardedRef","render","className","style","itemValue","label","disabled","nativeButton","elementProps","textRef","listItem","useCompositeListItem","IndexGuessBehavior","store","itemProps","setOpen","setValue","selectionRef","typingRef","valuesRef","multiple","selectedItemTextRef","selectDisabled","readOnly","useSelectRootContext","highlighted","useStore","selectors","open","selected","selectedByFocus","isItemEqualToValue","index","hasRegistered","itemRef","useIsoLayoutEffect","values","selectedValue","selectedCandidate","compareItemEquality","lastKeyRef","pointerTypeRef","allowMouseSelectionRef","getButtonProps","buttonRef","useButton","state","commitSelection","event","currentValue","nextValue","removeItem","createChangeEventDetails","REASONS.itemPress","resetDragMovement","defaultProps","isMouseClick","clickPointerType","isVirtualMouseClick","isVirtualClick","isInvalidMouseClick","selection","disallowSelectedMouseUp","disallowUnselectedMouseUp","element","useRenderElement","contextValue","_jsx","SelectItemContext"],"mappings":";;;;;;;;;;;;;;AAuBY,MAACA,KAA0B,gBAAAC,EAAM,KAAkB,gBAAAA,EAAM,WAAW,SAAoBC,GAAgBC,GAAc;AAChI,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAOC,IAAY;AAAA,IACnB,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,cAAAC,IAAe;AAAA,IACf,GAAGC;AAAA,EACP,IAAMT,GACEU,IAAUX,EAAM,OAAO,IAAI,GAC3BY,IAAWC,EAAqB;AAAA,IACpC,OAAAN;AAAA,IACA,SAAAI;AAAA,IACA,oBAAoBG,EAAmB;AAAA,EAC3C,CAAG,GACK;AAAA,IACJ,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAUC;AAAA,IACV,UAAAC;AAAA,EACJ,IAAMC,EAAoB,GAClBC,IAAcC,EAASb,GAAOc,EAAU,UAAUjB,EAAS,KAAK,GAChEkB,IAAOF,EAASb,GAAOc,EAAU,IAAI,GACrCE,IAAWH,EAASb,GA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aAAa,iBAAcnE,GAAW,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index53.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import { useIsoLayoutEffect as n } from "./
|
|
3
|
-
import { useBaseUiId as p } from "./
|
|
4
|
-
import { useSelectGroupContext as c } from "./
|
|
5
|
-
import { useRenderElement as i } from "./
|
|
2
|
+
import { useIsoLayoutEffect as n } from "./index238.js";
|
|
3
|
+
import { useBaseUiId as p } from "./index308.js";
|
|
4
|
+
import { useSelectGroupContext as c } from "./index307.js";
|
|
5
|
+
import { useRenderElement as i } from "./index272.js";
|
|
6
6
|
const a = /* @__PURE__ */ m.forwardRef(function(o, r) {
|
|
7
7
|
const {
|
|
8
8
|
render: u,
|
package/dist/index53.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index53.js","sources":["
|
|
1
|
+
{"version":3,"file":"index53.js","sources":["../../../node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectGroupLabel = /*#__PURE__*/React.forwardRef(function SelectGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useSelectGroupContext();\n const id = useBaseUiId(idProp);\n useIsoLayoutEffect(() => {\n setLabelId(id);\n }, [id, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroupLabel.displayName = \"SelectGroupLabel\";"],"names":["SelectGroupLabel","React","componentProps","forwardedRef","render","className","style","idProp","elementProps","setLabelId","useSelectGroupContext","id","useBaseUiId","useIsoLayoutEffect","useRenderElement"],"mappings":";;;;;AAcY,MAACA,IAAgC,gBAAAC,EAAM,WAAW,SAA0BC,GAAgBC,GAAc;AACpH,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,IAAIC;AAAA,IACJ,GAAGC;AAAA,EACP,IAAMN,GACE;AAAA,IACJ,YAAAO;AAAA,EACJ,IAAMC,EAAqB,GACnBC,IAAKC,EAAYL,CAAM;AAC7B,SAAAM,EAAmB,MAAM;AACvB,IAAAJ,EAAWE,CAAE;AAAA,EACf,GAAG,CAACA,GAAIF,CAAU,CAAC,GACHK,EAAiB,OAAOZ,GAAgB;AAAA,IACtD,KAAKC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,IAAAQ;AAAA,IACN,GAAOH,CAAY;AAAA,EACnB,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcR,EAAiB,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index54.js
CHANGED
package/dist/index54.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index54.js","sources":["
|
|
1
|
+
{"version":3,"file":"index54.js","sources":["../../../node_modules/@base-ui/react/separator/Separator.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\n\n/**\n * A separator element accessible to screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)\n */\nexport const Separator = /*#__PURE__*/React.forwardRef(function SeparatorComponent(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'separator',\n 'aria-orientation': orientation\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") Separator.displayName = \"Separator\";"],"names":["Separator","React","componentProps","forwardedRef","className","render","orientation","style","elementProps","useRenderElement"],"mappings":";;AAWY,MAACA,IAAyB,gBAAAC,EAAM,WAAW,SAA4BC,GAAgBC,GAAc;AAC/G,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMN;AAYJ,SARgBO,EAAiB,OAAOP,GAAgB;AAAA,IACtD,OAJY;AAAA,MACZ,aAAAI;AAAA,IACJ;AAAA,IAGI,KAAKH;AAAA,IACL,OAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,oBAAoBG;AAAA,IAC1B,GAAOE,CAAY;AAAA,EACnB,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcR,EAAU,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index55.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as g from "react";
|
|
2
|
-
import { ownerDocument as se } from "./
|
|
3
|
-
import { useTimeout as b } from "./
|
|
4
|
-
import { useStableCallback as ie } from "./
|
|
5
|
-
import { useValueAsRef as le } from "./
|
|
6
|
-
import { useSelectRootContext as ae } from "./
|
|
7
|
-
import { useFieldRootContext as ue } from "./
|
|
8
|
-
import { useLabelableContext as ce } from "./
|
|
9
|
-
import { pressableTriggerOpenStateMapping as de } from "./
|
|
10
|
-
import { fieldValidityMapping as pe } from "./
|
|
11
|
-
import { useRenderElement as me } from "./
|
|
12
|
-
import { selectors as t } from "./
|
|
13
|
-
import { getPseudoElementBounds as fe } from "./
|
|
14
|
-
import { createChangeEventDetails as B } from "./
|
|
15
|
-
import { useLabelableId as ge } from "./
|
|
16
|
-
import { resolveAriaLabelledBy as be } from "./
|
|
17
|
-
import { useStore as o } from "./
|
|
18
|
-
import { useButton as Se } from "./
|
|
19
|
-
import { mergeProps as Ee } from "./
|
|
20
|
-
import { getFloatingFocusElement as Te } from "./
|
|
21
|
-
import { contains as S } from "./
|
|
22
|
-
import { none as Re, cancelOpen as Me } from "./
|
|
2
|
+
import { ownerDocument as se } from "./index267.js";
|
|
3
|
+
import { useTimeout as b } from "./index268.js";
|
|
4
|
+
import { useStableCallback as ie } from "./index239.js";
|
|
5
|
+
import { useValueAsRef as le } from "./index240.js";
|
|
6
|
+
import { useSelectRootContext as ae } from "./index242.js";
|
|
7
|
+
import { useFieldRootContext as ue } from "./index243.js";
|
|
8
|
+
import { useLabelableContext as ce } from "./index269.js";
|
|
9
|
+
import { pressableTriggerOpenStateMapping as de } from "./index270.js";
|
|
10
|
+
import { fieldValidityMapping as pe } from "./index271.js";
|
|
11
|
+
import { useRenderElement as me } from "./index272.js";
|
|
12
|
+
import { selectors as t } from "./index247.js";
|
|
13
|
+
import { getPseudoElementBounds as fe } from "./index273.js";
|
|
14
|
+
import { createChangeEventDetails as B } from "./index248.js";
|
|
15
|
+
import { useLabelableId as ge } from "./index245.js";
|
|
16
|
+
import { resolveAriaLabelledBy as be } from "./index274.js";
|
|
17
|
+
import { useStore as o } from "./index257.js";
|
|
18
|
+
import { useButton as Se } from "./index275.js";
|
|
19
|
+
import { mergeProps as Ee } from "./index263.js";
|
|
20
|
+
import { getFloatingFocusElement as Te } from "./index276.js";
|
|
21
|
+
import { contains as S } from "./index277.js";
|
|
22
|
+
import { none as Re, cancelOpen as Me } from "./index266.js";
|
|
23
23
|
const d = 2, De = 400, he = {
|
|
24
24
|
...de,
|
|
25
25
|
...pe,
|
package/dist/index55.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index55.js","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\";"],"names":["BOUNDARY_OFFSET","SELECTED_DELAY","stateAttributesMapping","pressableTriggerOpenStateMapping","fieldValidityMapping","side","SelectTrigger","React","componentProps","forwardedRef","render","className","idProp","disabledProp","nativeButton","style","elementProps","setTouched","setFocused","validationMode","fieldState","fieldDisabled","useFieldRootContext","fieldLabelId","useLabelableContext","store","setOpen","selectionRef","validation","readOnly","required","alignItemWithTriggerActiveRef","selectDisabled","useSelectRootContext","disabled","open","useStore","selectors","mounted","value","triggerProps","positionerElement","listElement","popupSideValue","rootId","selectLabelId","hasSelectedValue","popupSide","id","ariaLabelledBy","resolveAriaLabelledBy","useLabelableId","positionerRef","useValueAsRef","triggerRef","getButtonProps","buttonRef","useButton","setTriggerElement","useStableCallback","element","timeoutFocus","useTimeout","timeoutMouseDown","selectedDelayTimeout","mergedProps","mergeProps","getFloatingFocusElement","event","createChangeEventDetails","REASONS.none","contains","doc","ownerDocument","handleMouseUp","mouseEvent","mouseUpTarget","bounds","getPseudoElementBounds","REASONS.cancelOpen","props","state","useRenderElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,IAAkB,GAClBC,KAAiB,KACjBC,KAAyB;AAAA,EAC7B,GAAGC;AAAA,EACH,GAAGC;AAAA,EACH,WAAW,CAAAC,MAAQA,IAAO;AAAA,IACxB,mBAAmBA;AAAA,EACvB,IAAM;AAAA,EACJ,OAAO,MAAM;AACf,GAQaC,KAA6B,gBAAAC,EAAM,WAAW,SAAuBC,GAAgBC,GAAc;AAC9G,QAAM;AAAA,IACJ,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AC;AACG,QAAQ,IAAI,aAAa,iBAAc1E,GAAc,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index55.js","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\";"],"names":["BOUNDARY_OFFSET","SELECTED_DELAY","stateAttributesMapping","pressableTriggerOpenStateMapping","fieldValidityMapping","side","SelectTrigger","React","componentProps","forwardedRef","render","className","idProp","disabledProp","nativeButton","style","elementProps","setTouched","setFocused","validationMode","fieldState","fieldDisabled","useFieldRootContext","fieldLabelId","useLabelableContext","store","setOpen","selectionRef","validation","readOnly","required","alignItemWithTriggerActiveRef","selectDisabled","useSelectRootContext","disabled","open","useStore","selectors","mounted","value","triggerProps","positionerElement","listElement","popupSideValue","rootId","selectLabelId","hasSelectedValue","popupSide","id","ariaLabelledBy","resolveAriaLabelledBy","useLabelableId","positionerRef","useValueAsRef","triggerRef","getButtonProps","buttonRef","useButton","setTriggerElement","useStableCallback","element","timeoutFocus","useTimeout","timeoutMouseDown","selectedDelayTimeout","mergedProps","mergeProps","getFloatingFocusElement","event","createChangeEventDetails","REASONS.none","contains","doc","ownerDocument","handleMouseUp","mouseEvent","mouseUpTarget","bounds","getPseudoElementBounds","REASONS.cancelOpen","props","state","useRenderElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,IAAkB,GAClBC,KAAiB,KACjBC,KAAyB;AAAA,EAC7B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kB;AAAA,IACA,aAAa,CAACD;AAAA,EAClB;AACE,SAAOoC,GAAiB,UAAU1E,GAAgB;AAAA,IAChD,KAAK,CAACC,GAAc6C,GAAYE,GAAWE,CAAiB;AAAA,IAC5D,OAAAuB;AAAA,IACA,wBAAA/E;AAAA,IACA,OAAA8E;AAAA,EACJ,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAc1E,GAAc,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index56.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as b from "react";
|
|
2
|
-
import { useRenderElement as v } from "./
|
|
3
|
-
import { useSelectRootContext as L } from "./
|
|
4
|
-
import { resolveMultipleLabels as N, resolveSelectedLabel as V } from "./
|
|
5
|
-
import { selectors as s } from "./
|
|
6
|
-
import { useStore as r } from "./
|
|
2
|
+
import { useRenderElement as v } from "./index272.js";
|
|
3
|
+
import { useSelectRootContext as L } from "./index242.js";
|
|
4
|
+
import { resolveMultipleLabels as N, resolveSelectedLabel as V } from "./index251.js";
|
|
5
|
+
import { selectors as s } from "./index247.js";
|
|
6
|
+
import { useStore as r } from "./index257.js";
|
|
7
7
|
const y = {
|
|
8
8
|
value: () => null
|
|
9
9
|
}, R = /* @__PURE__ */ b.forwardRef(function(c, m) {
|
package/dist/index56.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index56.js","sources":["
|
|
1
|
+
{"version":3,"file":"index56.js","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 (!hasSelectedValue && placeholder != null && !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\";"],"names":["stateAttributesMapping","SelectValue","React","componentProps","forwardedRef","className","render","childrenProp","placeholder","style","elementProps","store","valueRef","useSelectRootContext","value","useStore","selectors","items","itemToStringLabel","hasSelectedValue","shouldCheckNullItemLabel","hasNullLabel","state","children","resolveMultipleLabels","resolveSelectedLabel","useRenderElement"],"mappings":";;;;;;AAQA,MAAMA,IAAyB;AAAA,EAC7B,OAAO,MAAM;AACf,GAQaC,IAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAUC;AAAA,IACV,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMP,GACE;AAAA,IACJ,OAAAQ;AAAA,IACA,UAAAC;AAAA,EACJ,IAAMC,EAAoB,GAClBC,IAAQC,EAASJ,GAAOK,EAAU,KAAK,GACvCC,IAAQF,EAASJ,GAAOK,EAAU,KAAK,GACvCE,IAAoBH,EAASJ,GAAOK,EAAU,iBAAiB,GAC/DG,IAAmBJ,EAASJ,GAAOK,EAAU,gBAAgB,GAC7DI,IAA2B,CAACD,KAAoBX,KAAe,QAAQD,KAAgB,MACvFc,IAAeN,EAASJ,GAAOK,EAAU,kBAAkBI,CAAwB,GACnFE,IAAQ;AAAA,IACZ,OAAAR;AAAA,IACA,aAAa,CAACK;AAAA,EAClB;AACE,MAAII,IAAW;AACf,SAAI,OAAOhB,KAAiB,aAC1BgB,IAAWhB,EAAaO,CAAK,IACpBP,KAAgB,OACzBgB,IAAWhB,IACF,CAACY,KAAoBX,KAAe,QAAQ,CAACa,IACtDE,IAAWf,IACF,MAAM,QAAQM,CAAK,IAC5BS,IAAWC,EAAsBV,GAAOG,GAAOC,CAAiB,IAEhEK,IAAWE,EAAqBX,GAAOG,GAAOC,CAAiB,GAEjDQ,EAAiB,QAAQvB,GAAgB;AAAA,IACvD,OAAAmB;AAAA,IACA,KAAK,CAAClB,GAAcQ,CAAQ;AAAA,IAC5B,OAAO,CAAC;AAAA,MACN,UAAAW;AAAA,IACN,GAAOb,CAAY;AAAA,IACf,wBAAAV;AAAA,EACJ,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcC,EAAY,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index57.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import { useRenderElement as p } from "./
|
|
3
|
-
import { useSelectRootContext as c } from "./
|
|
4
|
-
import { triggerOpenStateMapping as i } from "./
|
|
5
|
-
import { selectors as m } from "./
|
|
6
|
-
import { useStore as a } from "./
|
|
2
|
+
import { useRenderElement as p } from "./index272.js";
|
|
3
|
+
import { useSelectRootContext as c } from "./index242.js";
|
|
4
|
+
import { triggerOpenStateMapping as i } from "./index270.js";
|
|
5
|
+
import { selectors as m } from "./index247.js";
|
|
6
|
+
import { useStore as a } from "./index257.js";
|
|
7
7
|
const l = /* @__PURE__ */ s.forwardRef(function(e, t) {
|
|
8
8
|
const {
|
|
9
9
|
render: d,
|
package/dist/index57.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index57.js","sources":["
|
|
1
|
+
{"version":3,"file":"index57.js","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\";"],"names":["SelectIcon","React","componentProps","forwardedRef","render","className","style","elementProps","store","useSelectRootContext","state","useStore","selectors","useRenderElement","triggerOpenStateMapping"],"mappings":";;;;;;AAeY,MAACA,IAA0B,gBAAAC,EAAM,WAAW,SAAoBC,GAAgBC,GAAc;AACxG,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAML,GACE;AAAA,IACJ,OAAAM;AAAA,EACJ,IAAMC,EAAoB,GAElBC,IAAQ;AAAA,IACZ,MAFWC,EAASH,GAAOI,EAAU,IAAI;AAAA,EAG7C;AAUE,SATgBC,EAAiB,QAAQX,GAAgB;AAAA,IACvD,OAAAQ;AAAA,IACA,KAAKP;AAAA,IACL,OAAO,CAAC;AAAA,MACN,eAAe;AAAA,MACf,UAAU;AAAA,IAChB,GAAOI,CAAY;AAAA,IACf,wBAAwBO;AAAA,EAC5B,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcd,EAAW,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index58.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
|
-
import { useStableCallback as S } from "./
|
|
3
|
-
import { useSelectRootContext as N } from "./
|
|
4
|
-
import { useSelectPositionerContext as L } from "./
|
|
5
|
-
import { useRenderElement as b } from "./
|
|
6
|
-
import { styleDisableScrollbar as h } from "./
|
|
7
|
-
import { LIST_FUNCTIONAL_STYLES as E } from "./
|
|
8
|
-
import { selectors as t } from "./
|
|
9
|
-
import { useStore as o } from "./
|
|
2
|
+
import { useStableCallback as S } from "./index239.js";
|
|
3
|
+
import { useSelectRootContext as N } from "./index242.js";
|
|
4
|
+
import { useSelectPositionerContext as L } from "./index283.js";
|
|
5
|
+
import { useRenderElement as b } from "./index272.js";
|
|
6
|
+
import { styleDisableScrollbar as h } from "./index292.js";
|
|
7
|
+
import { LIST_FUNCTIONAL_STYLES as E } from "./index286.js";
|
|
8
|
+
import { selectors as t } from "./index247.js";
|
|
9
|
+
import { useStore as o } from "./index257.js";
|
|
10
10
|
const R = /* @__PURE__ */ u.forwardRef(function(s, l) {
|
|
11
11
|
const {
|
|
12
12
|
render: g,
|
package/dist/index58.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index58.js","sources":["
|
|
1
|
+
{"version":3,"file":"index58.js","sources":["../../../node_modules/@base-ui/react/select/list/SelectList.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { LIST_FUNCTIONAL_STYLES } from \"../popup/utils.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A container for the select items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectList = /*#__PURE__*/React.forwardRef(function SelectList(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n scrollHandlerRef\n } = useSelectRootContext();\n const {\n alignItemWithTriggerActive\n } = useSelectPositionerContext();\n const hasScrollArrows = useStore(store, selectors.hasScrollArrows);\n const openMethod = useStore(store, selectors.openMethod);\n const multiple = useStore(store, selectors.multiple);\n const id = useStore(store, selectors.id);\n const defaultProps = {\n id: `${id}-list`,\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n onScroll(event) {\n scrollHandlerRef.current?.(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: LIST_FUNCTIONAL_STYLES\n }),\n className: hasScrollArrows && openMethod !== 'touch' ? styleDisableScrollbar.className : undefined\n };\n const setListElement = useStableCallback(element => {\n store.set('listElement', element);\n });\n return useRenderElement('div', componentProps, {\n ref: [forwardedRef, setListElement],\n props: [defaultProps, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectList.displayName = \"SelectList\";"],"names":["SelectList","React","componentProps","forwardedRef","render","className","style","elementProps","store","scrollHandlerRef","useSelectRootContext","alignItemWithTriggerActive","useSelectPositionerContext","hasScrollArrows","useStore","selectors","openMethod","multiple","defaultProps","event","LIST_FUNCTIONAL_STYLES","styleDisableScrollbar","setListElement","useStableCallback","element","useRenderElement"],"mappings":";;;;;;;;;AAkBY,MAACA,IAA0B,gBAAAC,EAAM,WAAW,SAAoBC,GAAgBC,GAAc;AACxG,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAML,GACE;AAAA,IACJ,OAAAM;AAAA,IACA,kBAAAC;AAAA,EACJ,IAAMC,EAAoB,GAClB;AAAA,IACJ,4BAAAC;AAAA,EACJ,IAAMC,EAA0B,GACxBC,IAAkBC,EAASN,GAAOO,EAAU,eAAe,GAC3DC,IAAaF,EAASN,GAAOO,EAAU,UAAU,GACjDE,IAAWH,EAASN,GAAOO,EAAU,QAAQ,GAE7CG,IAAe;AAAA,IACnB,IAAI,GAFKJ,EAASN,GAAOO,EAAU,EAAE,CAE5B;AAAA,IACT,MAAM;AAAA,IACN,wBAAwBE,KAAY;AAAA,IACpC,SAASE,GAAO;AACd,MAAAV,EAAiB,UAAUU,EAAM,aAAa;AAAA,IAChD;AAAA,IACA,GAAIR,KAA8B;AAAA,MAChC,OAAOS;AAAA,IACb;AAAA,IACI,WAAWP,KAAmBG,MAAe,UAAUK,EAAsB,YAAY;AAAA,EAC7F,GACQC,IAAiBC,EAAkB,CAAAC,MAAW;AAClD,IAAAhB,EAAM,IAAI,eAAegB,CAAO;AAAA,EAClC,CAAC;AACD,SAAOC,EAAiB,OAAOvB,GAAgB;AAAA,IAC7C,KAAK,CAACC,GAAcmB,CAAc;AAAA,IAClC,OAAO,CAACJ,GAAcX,CAAY;AAAA,EACtC,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcP,EAAW,cAAc;","x_google_ignoreList":[0]}
|