@rpcbase/ui 0.242.0 → 0.243.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/index150.js +3 -3
- package/dist/index156.js +1 -1
- package/dist/index16.js +91 -91
- package/dist/index16.js.map +1 -1
- package/dist/index163.js +2 -2
- package/dist/index164.js +7 -7
- package/dist/index167.js +4 -4
- package/dist/index169.js +1 -1
- package/dist/index172.js +3 -3
- package/dist/index175.js +1 -1
- package/dist/index176.js +4 -4
- package/dist/index182.js +2 -2
- package/dist/index184.js +4 -4
- package/dist/index185.js +13 -13
- package/dist/index186.js +1 -1
- package/dist/index188.js +5 -5
- package/dist/index189.js +3 -3
- package/dist/index192.js +2 -2
- package/dist/index193.js +6 -6
- package/dist/index194.js +59 -20
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +8 -66
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +87 -6
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +19 -5
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -11
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +5 -3
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +4 -49
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +7 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +4 -29
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +6 -16
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +16 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -21
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +4 -53
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +12 -20
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +9 -41
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +13 -39
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +14 -46
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +4 -20
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +5 -70
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -3
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +54 -11
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +8 -13
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +4 -18
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +4 -36
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +8 -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 +4 -68
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -99
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -83
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +9 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +9 -29
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +10 -16
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +11 -35
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +9 -17
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +6 -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 +4 -28
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +6 -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 +15 -10
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +7 -10
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +10 -25
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +10 -16
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +21 -125
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +8 -5
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +9 -65
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +10 -14
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +4 -7
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +5 -5
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +16 -3
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +9 -10
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +18 -7
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +19 -132
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +10 -397
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +30 -5
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +12 -52
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +25 -11
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +5 -27
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +153 -10
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +32 -58
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +11 -8
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +43 -81
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +9 -19
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +11 -16
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +42 -4
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +96 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +86 -6
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +105 -4
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +52 -6
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +11 -16
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +4 -4
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +37 -4
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +8 -12
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +135 -9
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +17 -13
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +15 -13
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +3 -4
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +36 -5
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +20 -6
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +8 -5
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +9 -54
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +24 -8
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +28 -4
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +16 -4
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +20 -9
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +66 -4
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +6 -4
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +5 -3
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +11 -10
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +3 -9
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +50 -9
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +4 -11
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +29 -10
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +16 -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 +21 -5
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +53 -4
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +20 -5
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +41 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +39 -5
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +46 -17
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +20 -7
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +69 -9
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +17 -10
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +3 -21
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +11 -8
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +13 -9
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +18 -9
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +36 -4
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +239 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +251 -15
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +68 -9
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +98 -17
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +82 -19
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +3 -12
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +28 -28
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +16 -12
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +34 -25
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +17 -5
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +3 -154
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +25 -31
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +28 -11
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +4 -50
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +78 -9
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +271 -10
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +11 -43
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +10 -97
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +25 -86
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +15 -104
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +123 -50
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +5 -11
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +65 -4
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +13 -37
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +7 -8
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +5 -135
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +3 -17
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +10 -15
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +7 -3
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +129 -32
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +397 -18
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +5 -10
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +52 -8
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +11 -24
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +27 -28
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +11 -16
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +1 -1
- package/dist/index348.js +60 -50
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +66 -5
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +50 -60
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +5 -66
- package/dist/index351.js.map +1 -1
- package/dist/index357.js +1 -1
- package/dist/index358.js +5 -5
- package/dist/index359.js +1 -1
- package/dist/index362.js +5 -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 +13 -3
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +4 -11
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +20 -20
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +4 -45
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +11 -17
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +6 -5
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +3 -201
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +20 -73
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +43 -122
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +18 -5
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +4 -17
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +200 -12
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +73 -4
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +122 -19
- package/dist/index377.js.map +1 -1
- package/dist/index379.js +4 -4
- package/dist/index380.js +3 -3
- package/dist/index382.js +1 -1
- package/dist/index384.js +1 -1
- package/dist/index385.js +2 -2
- package/dist/index388.js +2 -2
- package/dist/index389.js +2 -2
- package/dist/index392.js +5 -3
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +5 -3
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +4 -5
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +15 -4
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +9 -4
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +5 -15
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +4 -8
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +545 -5
- package/dist/index399.js.map +1 -1
- package/dist/index400.js +47 -5
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +15 -543
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +6 -47
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +7 -17
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +6 -5
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +7 -7
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +11 -6
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +8 -7
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +12 -11
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +3 -9
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +3 -13
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +15 -3
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +3 -15
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +1 -1
- package/dist/index414.js +68 -8
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +31 -2
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +9 -44
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +152 -55
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +108 -8
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +5 -2
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +55 -54
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +7 -55
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +2 -33
- package/dist/index422.js.map +1 -1
- package/dist/index423.js +43 -67
- package/dist/index423.js.map +1 -1
- package/dist/index424.js +56 -31
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +8 -9
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +2 -153
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +54 -107
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +55 -4
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +32 -55
- package/dist/index429.js.map +1 -1
- package/dist/index430.js +16 -2
- package/dist/index430.js.map +1 -1
- package/dist/index431.js +29 -2
- package/dist/index431.js.map +1 -1
- package/dist/index432.js +13 -2
- package/dist/index432.js.map +1 -1
- package/dist/index433.js +7 -2
- package/dist/index433.js.map +1 -1
- package/dist/index434.js +2 -16
- package/dist/index434.js.map +1 -1
- package/dist/index435.js +2 -29
- package/dist/index435.js.map +1 -1
- package/dist/index436.js +2 -13
- package/dist/index436.js.map +1 -1
- package/dist/index437.js +2 -7
- package/dist/index437.js.map +1 -1
- package/dist/index49.js +30 -30
- package/dist/index50.js +21 -21
- package/dist/index51.js +1 -1
- package/dist/index52.js +8 -8
- package/dist/index53.js +2 -2
- package/dist/index55.js +16 -16
- package/dist/index56.js +4 -4
- package/dist/index57.js +3 -3
- package/dist/index58.js +7 -7
- package/dist/index59.js +4 -4
- package/dist/index60.js +12 -12
- package/dist/index61.js +2 -2
- package/dist/index62.js +2 -2
- package/package.json +1 -1
package/dist/index348.js
CHANGED
|
@@ -1,55 +1,65 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}), n?.addEventListener("abort", () => r.disconnect(), {
|
|
45
|
-
once: !0
|
|
46
|
-
});
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
o.request(i);
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { useScrollLock as P } from "./index377.js";
|
|
3
|
+
import { EMPTY_OBJECT as f } from "./index290.js";
|
|
4
|
+
import { createChangeEventDetails as C } from "./index175.js";
|
|
5
|
+
import { usePopupRootSync as S, useImplicitActiveTrigger as k, useOpenStateTransitions as E, usePopupInteractionProps as T } from "./index184.js";
|
|
6
|
+
import { useDismiss as h } from "./index305.js";
|
|
7
|
+
import { getTarget as w, contains as x } from "./index317.js";
|
|
8
|
+
import { imperativeAction as I } from "./index177.js";
|
|
9
|
+
function L(e) {
|
|
10
|
+
const {
|
|
11
|
+
store: t,
|
|
12
|
+
actionsRef: a
|
|
13
|
+
} = e, o = t.useState("open");
|
|
14
|
+
S(t, o), k(t);
|
|
15
|
+
const {
|
|
16
|
+
forceUnmount: c
|
|
17
|
+
} = E(o, t), s = r.useCallback(() => {
|
|
18
|
+
t.setOpen(!1, C(I));
|
|
19
|
+
}, [t]);
|
|
20
|
+
r.useImperativeHandle(a, () => ({
|
|
21
|
+
unmount: c,
|
|
22
|
+
close: s
|
|
23
|
+
}), [c, s]);
|
|
24
|
+
}
|
|
25
|
+
function M({
|
|
26
|
+
store: e,
|
|
27
|
+
parentContext: t,
|
|
28
|
+
isDrawer: a
|
|
29
|
+
}) {
|
|
30
|
+
const o = e.useState("open"), c = e.useState("disablePointerDismissal"), s = e.useState("modal"), d = e.useState("popupElement"), O = e.useState("floatingRootContext"), [u, m] = r.useState(0), [l, g] = r.useState(0), D = u === 0, p = h(O, {
|
|
31
|
+
outsidePressEvent() {
|
|
32
|
+
return e.context.internalBackdropRef.current || e.context.backdropRef.current ? "intentional" : {
|
|
33
|
+
mouse: s === "trap-focus" ? "sloppy" : "intentional",
|
|
34
|
+
touch: "sloppy"
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
outsidePress(n) {
|
|
38
|
+
if (!e.context.outsidePressEnabledRef.current || "button" in n && n.button !== 0 || "touches" in n && n.touches.length !== 1)
|
|
39
|
+
return !1;
|
|
40
|
+
const i = w(n);
|
|
41
|
+
return D && !c ? s && (e.context.internalBackdropRef.current || e.context.backdropRef.current) ? e.context.internalBackdropRef.current === i || e.context.backdropRef.current === i || x(i, d) && !i?.hasAttribute("data-base-ui-portal") : !0 : !1;
|
|
42
|
+
},
|
|
43
|
+
escapeKey: D
|
|
50
44
|
});
|
|
45
|
+
P(o && s === !0, d), e.useContextCallback("onNestedDialogOpen", (n, i) => {
|
|
46
|
+
m(n), g(i);
|
|
47
|
+
}), e.useContextCallback("onNestedDialogClose", () => {
|
|
48
|
+
m(0), g(0);
|
|
49
|
+
}), r.useEffect(() => (t?.onNestedDialogOpen && o && t.onNestedDialogOpen(u + 1, l + (a ? 1 : 0)), t?.onNestedDialogClose && !o && t.onNestedDialogClose(), () => {
|
|
50
|
+
t?.onNestedDialogClose && o && t.onNestedDialogClose();
|
|
51
|
+
}), [a, o, u, l, t]);
|
|
52
|
+
const b = p.reference ?? f, R = p.trigger ?? f, N = p.floating ?? f;
|
|
53
|
+
return T(e, {
|
|
54
|
+
activeTriggerProps: b,
|
|
55
|
+
inactiveTriggerProps: R,
|
|
56
|
+
popupProps: N,
|
|
57
|
+
nestedOpenDialogCount: u,
|
|
58
|
+
nestedOpenDrawerCount: l
|
|
59
|
+
}), null;
|
|
51
60
|
}
|
|
52
61
|
export {
|
|
53
|
-
|
|
62
|
+
M as DialogInteractions,
|
|
63
|
+
L as useDialogRoot
|
|
54
64
|
};
|
|
55
65
|
//# sourceMappingURL=index348.js.map
|
package/dist/index348.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index348.js","sources":["../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index348.js","sources":["../node_modules/@base-ui/react/dialog/root/useDialogRoot.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useScrollLock } from '@base-ui/utils/useScrollLock';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useDismiss } from \"../../floating-ui-react/index.mjs\";\nimport { contains, getTarget } from \"../../floating-ui-react/utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useImplicitActiveTrigger, useOpenStateTransitions, usePopupInteractionProps, usePopupRootSync } from \"../../utils/popups/index.mjs\";\nexport function useDialogRoot(params) {\n const {\n store,\n actionsRef\n } = params;\n const open = store.useState('open');\n usePopupRootSync(store, open);\n useImplicitActiveTrigger(store);\n const {\n forceUnmount\n } = useOpenStateTransitions(open, store);\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.imperativeAction));\n }, [store]);\n React.useImperativeHandle(actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n}\nexport function DialogInteractions({\n store,\n parentContext,\n isDrawer\n}) {\n const open = store.useState('open');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const modal = store.useState('modal');\n const popupElement = store.useState('popupElement');\n const floatingRootContext = store.useState('floatingRootContext');\n const [ownNestedOpenDialogs, setOwnNestedOpenDialogs] = React.useState(0);\n const [ownNestedOpenDrawers, setOwnNestedOpenDrawers] = React.useState(0);\n const isTopmost = ownNestedOpenDialogs === 0;\n const dismiss = useDismiss(floatingRootContext, {\n outsidePressEvent() {\n if (store.context.internalBackdropRef.current || store.context.backdropRef.current) {\n return 'intentional';\n }\n // Ensure `aria-hidden` on outside elements is removed immediately\n // on outside press when trapping focus.\n return {\n mouse: modal === 'trap-focus' ? 'sloppy' : 'intentional',\n touch: 'sloppy'\n };\n },\n outsidePress(event) {\n if (!store.context.outsidePressEnabledRef.current) {\n return false;\n }\n\n // For mouse events, only accept left button (button 0)\n // For touch events, a single touch is equivalent to left button\n if ('button' in event && event.button !== 0) {\n return false;\n }\n if ('touches' in event && event.touches.length !== 1) {\n return false;\n }\n const target = getTarget(event);\n if (isTopmost && !disablePointerDismissal) {\n // Only close if the click occurred on the dialog's owning backdrop.\n // This supports multiple modal dialogs that aren't nested in the React tree:\n // https://github.com/mui/base-ui/issues/1320\n if (modal) {\n return store.context.internalBackdropRef.current || store.context.backdropRef.current ? store.context.internalBackdropRef.current === target || store.context.backdropRef.current === target || contains(target, popupElement) && !target?.hasAttribute('data-base-ui-portal') : true;\n }\n return true;\n }\n return false;\n },\n escapeKey: isTopmost\n });\n useScrollLock(open && modal === true, popupElement);\n\n // Listen for nested open/close events on this store to maintain the counts.\n store.useContextCallback('onNestedDialogOpen', (dialogCount, drawerCount) => {\n setOwnNestedOpenDialogs(dialogCount);\n setOwnNestedOpenDrawers(drawerCount);\n });\n store.useContextCallback('onNestedDialogClose', () => {\n setOwnNestedOpenDialogs(0);\n setOwnNestedOpenDrawers(0);\n });\n\n // Notify parent of our open/close state using parent callbacks, if any\n React.useEffect(() => {\n if (parentContext?.onNestedDialogOpen && open) {\n parentContext.onNestedDialogOpen(ownNestedOpenDialogs + 1, ownNestedOpenDrawers + (isDrawer ? 1 : 0));\n }\n if (parentContext?.onNestedDialogClose && !open) {\n parentContext.onNestedDialogClose();\n }\n return () => {\n if (parentContext?.onNestedDialogClose && open) {\n parentContext.onNestedDialogClose();\n }\n };\n }, [isDrawer, open, ownNestedOpenDialogs, ownNestedOpenDrawers, parentContext]);\n const activeTriggerProps = dismiss.reference ?? EMPTY_OBJECT;\n const inactiveTriggerProps = dismiss.trigger ?? EMPTY_OBJECT;\n // Consumers (DialogPopup/DrawerPopup) already spread `FOCUSABLE_POPUP_PROPS`\n // directly, so the popup props only need to carry the dismiss handlers.\n const popupProps = dismiss.floating ?? EMPTY_OBJECT;\n usePopupInteractionProps(store, {\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n nestedOpenDialogCount: ownNestedOpenDialogs,\n nestedOpenDrawerCount: ownNestedOpenDrawers\n });\n return null;\n}"],"names":["useDialogRoot","params","store","actionsRef","open","usePopupRootSync","useImplicitActiveTrigger","forceUnmount","useOpenStateTransitions","handleImperativeClose","React","createChangeEventDetails","REASONS.imperativeAction","DialogInteractions","parentContext","isDrawer","disablePointerDismissal","modal","popupElement","floatingRootContext","ownNestedOpenDialogs","setOwnNestedOpenDialogs","ownNestedOpenDrawers","setOwnNestedOpenDrawers","isTopmost","dismiss","useDismiss","event","target","getTarget","contains","useScrollLock","dialogCount","drawerCount","activeTriggerProps","EMPTY_OBJECT","inactiveTriggerProps","popupProps","usePopupInteractionProps"],"mappings":";;;;;;;;AAUO,SAASA,EAAcC,GAAQ;AACpC,QAAM;AAAA,IACJ,OAAAC;AAAA,IACA,YAAAC;AAAA,EACJ,IAAMF,GACEG,IAAOF,EAAM,SAAS,MAAM;AAClC,EAAAG,EAAiBH,GAAOE,CAAI,GAC5BE,EAAyBJ,CAAK;AAC9B,QAAM;AAAA,IACJ,cAAAK;AAAA,EACJ,IAAMC,EAAwBJ,GAAMF,CAAK,GACjCO,IAAwBC,EAAM,YAAY,MAAM;AACpD,IAAAR,EAAM,QAAQ,IAAOS,EAAyBC,CAAwB,CAAC;AAAA,EACzE,GAAG,CAACV,CAAK,CAAC;AACV,EAAAQ,EAAM,oBAAoBP,GAAY,OAAO;AAAA,IAC3C,SAASI;AAAA,IACT,OAAOE;AAAA,EACX,IAAM,CAACF,GAAcE,CAAqB,CAAC;AAC3C;AACO,SAASI,EAAmB;AAAA,EACjC,OAAAX;AAAA,EACA,eAAAY;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAMX,IAAOF,EAAM,SAAS,MAAM,GAC5Bc,IAA0Bd,EAAM,SAAS,yBAAyB,GAClEe,IAAQf,EAAM,SAAS,OAAO,GAC9BgB,IAAehB,EAAM,SAAS,cAAc,GAC5CiB,IAAsBjB,EAAM,SAAS,qBAAqB,GAC1D,CAACkB,GAAsBC,CAAuB,IAAIX,EAAM,SAAS,CAAC,GAClE,CAACY,GAAsBC,CAAuB,IAAIb,EAAM,SAAS,CAAC,GAClEc,IAAYJ,MAAyB,GACrCK,IAAUC,EAAWP,GAAqB;AAAA,IAC9C,oBAAoB;AAClB,aAAIjB,EAAM,QAAQ,oBAAoB,WAAWA,EAAM,QAAQ,YAAY,UAClE,gBAIF;AAAA,QACL,OAAOe,MAAU,eAAe,WAAW;AAAA,QAC3C,OAAO;AAAA,MACf;AAAA,IACI;AAAA,IACA,aAAaU,GAAO;AAUlB,UATI,CAACzB,EAAM,QAAQ,uBAAuB,WAMtC,YAAYyB,KAASA,EAAM,WAAW,KAGtC,aAAaA,KAASA,EAAM,QAAQ,WAAW;AACjD,eAAO;AAET,YAAMC,IAASC,EAAUF,CAAK;AAC9B,aAAIH,KAAa,CAACR,IAIZC,MACKf,EAAM,QAAQ,oBAAoB,WAAWA,EAAM,QAAQ,YAAY,WAAUA,EAAM,QAAQ,oBAAoB,YAAY0B,KAAU1B,EAAM,QAAQ,YAAY,YAAY0B,KAAUE,EAASF,GAAQV,CAAY,KAAK,CAACU,GAAQ,aAAa,qBAAqB,IAExQ,KAEF;AAAA,IACT;AAAA,IACA,WAAWJ;AAAA,EACf,CAAG;AACD,EAAAO,EAAc3B,KAAQa,MAAU,IAAMC,CAAY,GAGlDhB,EAAM,mBAAmB,sBAAsB,CAAC8B,GAAaC,MAAgB;AAC3E,IAAAZ,EAAwBW,CAAW,GACnCT,EAAwBU,CAAW;AAAA,EACrC,CAAC,GACD/B,EAAM,mBAAmB,uBAAuB,MAAM;AACpD,IAAAmB,EAAwB,CAAC,GACzBE,EAAwB,CAAC;AAAA,EAC3B,CAAC,GAGDb,EAAM,UAAU,OACVI,GAAe,sBAAsBV,KACvCU,EAAc,mBAAmBM,IAAuB,GAAGE,KAAwBP,IAAW,IAAI,EAAE,GAElGD,GAAe,uBAAuB,CAACV,KACzCU,EAAc,oBAAmB,GAE5B,MAAM;AACX,IAAIA,GAAe,uBAAuBV,KACxCU,EAAc,oBAAmB;AAAA,EAErC,IACC,CAACC,GAAUX,GAAMgB,GAAsBE,GAAsBR,CAAa,CAAC;AAC9E,QAAMoB,IAAqBT,EAAQ,aAAaU,GAC1CC,IAAuBX,EAAQ,WAAWU,GAG1CE,IAAaZ,EAAQ,YAAYU;AACvC,SAAAG,EAAyBpC,GAAO;AAAA,IAC9B,oBAAAgC;AAAA,IACA,sBAAAE;AAAA,IACA,YAAAC;AAAA,IACA,uBAAuBjB;AAAA,IACvB,uBAAuBE;AAAA,EAC3B,CAAG,GACM;AACT;","x_google_ignoreList":[0]}
|
package/dist/index349.js
CHANGED
|
@@ -1,9 +1,70 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as p from "react";
|
|
2
|
+
import { ReactStore as l } from "./index358.js";
|
|
3
|
+
import { createPopupFloatingRootContext as d, popupStoreSelectors as u, createInitialPopupStoreState as c } from "./index359.js";
|
|
4
|
+
import { PopupTriggerMap as m } from "./index360.js";
|
|
5
|
+
import { setPopupOpenState as f, usePopupStore as g } from "./index184.js";
|
|
6
|
+
import { createSelector as o } from "./index361.js";
|
|
7
|
+
const C = {
|
|
8
|
+
...u,
|
|
9
|
+
modal: o((e) => e.modal),
|
|
10
|
+
nested: o((e) => e.nested),
|
|
11
|
+
nestedOpenDialogCount: o((e) => e.nestedOpenDialogCount),
|
|
12
|
+
nestedOpenDrawerCount: o((e) => e.nestedOpenDrawerCount),
|
|
13
|
+
disablePointerDismissal: o((e) => e.disablePointerDismissal),
|
|
14
|
+
openMethod: o((e) => e.openMethod),
|
|
15
|
+
descriptionElementId: o((e) => e.descriptionElementId),
|
|
16
|
+
titleElementId: o((e) => e.titleElementId),
|
|
17
|
+
viewportElement: o((e) => e.viewportElement),
|
|
18
|
+
role: o((e) => e.role)
|
|
19
|
+
};
|
|
20
|
+
class a extends l {
|
|
21
|
+
constructor(n, t, r = !1) {
|
|
22
|
+
const i = new m(), s = h(n);
|
|
23
|
+
s.floatingRootContext = d(i, t, r), super(s, {
|
|
24
|
+
popupRef: /* @__PURE__ */ p.createRef(),
|
|
25
|
+
backdropRef: /* @__PURE__ */ p.createRef(),
|
|
26
|
+
internalBackdropRef: /* @__PURE__ */ p.createRef(),
|
|
27
|
+
outsidePressEnabledRef: {
|
|
28
|
+
current: !0
|
|
29
|
+
},
|
|
30
|
+
triggerElements: i,
|
|
31
|
+
onOpenChange: void 0,
|
|
32
|
+
onOpenChangeComplete: void 0
|
|
33
|
+
}, C);
|
|
34
|
+
}
|
|
35
|
+
setOpen = (n, t) => {
|
|
36
|
+
if (t.preventUnmountOnClose = () => {
|
|
37
|
+
this.set("preventUnmountingOnClose", !0);
|
|
38
|
+
}, !n && t.trigger == null && this.state.activeTriggerId != null && (t.trigger = this.state.activeTriggerElement ?? void 0), this.context.onOpenChange?.(n, t), t.isCanceled)
|
|
39
|
+
return;
|
|
40
|
+
this.state.floatingRootContext.dispatchOpenChange(n, t);
|
|
41
|
+
const r = {
|
|
42
|
+
open: n
|
|
43
|
+
};
|
|
44
|
+
f(r, n, t.trigger), this.update(r);
|
|
45
|
+
};
|
|
46
|
+
static useStore(n, t) {
|
|
47
|
+
return g(n, (i, s) => new a(t, i, s), !0).store;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function h(e = {}) {
|
|
51
|
+
return {
|
|
52
|
+
...c(),
|
|
53
|
+
modal: !0,
|
|
54
|
+
disablePointerDismissal: !1,
|
|
55
|
+
popupElement: null,
|
|
56
|
+
viewportElement: null,
|
|
57
|
+
descriptionElementId: void 0,
|
|
58
|
+
titleElementId: void 0,
|
|
59
|
+
openMethod: null,
|
|
60
|
+
nested: !1,
|
|
61
|
+
nestedOpenDialogCount: 0,
|
|
62
|
+
nestedOpenDrawerCount: 0,
|
|
63
|
+
role: "dialog",
|
|
64
|
+
...e
|
|
65
|
+
};
|
|
5
66
|
}
|
|
6
67
|
export {
|
|
7
|
-
|
|
68
|
+
a as DialogStore
|
|
8
69
|
};
|
|
9
70
|
//# sourceMappingURL=index349.js.map
|
package/dist/index349.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index349.js","sources":["../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index349.js","sources":["../node_modules/@base-ui/react/dialog/store/DialogStore.mjs"],"sourcesContent":["import * as React from 'react';\nimport { createSelector, ReactStore } from '@base-ui/utils/store';\nimport { createPopupFloatingRootContext, createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap, setPopupOpenState, usePopupStore } from \"../../utils/popups/index.mjs\";\nconst selectors = {\n ...popupStoreSelectors,\n modal: createSelector(state => state.modal),\n nested: createSelector(state => state.nested),\n nestedOpenDialogCount: createSelector(state => state.nestedOpenDialogCount),\n nestedOpenDrawerCount: createSelector(state => state.nestedOpenDrawerCount),\n disablePointerDismissal: createSelector(state => state.disablePointerDismissal),\n openMethod: createSelector(state => state.openMethod),\n descriptionElementId: createSelector(state => state.descriptionElementId),\n titleElementId: createSelector(state => state.titleElementId),\n viewportElement: createSelector(state => state.viewportElement),\n role: createSelector(state => state.role)\n};\nexport class DialogStore extends ReactStore {\n constructor(initialState, floatingId, nested = false) {\n const triggerElements = new PopupTriggerMap();\n const state = createInitialState(initialState);\n state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);\n super(state, {\n popupRef: /*#__PURE__*/React.createRef(),\n backdropRef: /*#__PURE__*/React.createRef(),\n internalBackdropRef: /*#__PURE__*/React.createRef(),\n outsidePressEnabledRef: {\n current: true\n },\n triggerElements,\n onOpenChange: undefined,\n onOpenChangeComplete: undefined\n }, selectors);\n }\n setOpen = (nextOpen, eventDetails) => {\n eventDetails.preventUnmountOnClose = () => {\n this.set('preventUnmountingOnClose', true);\n };\n if (!nextOpen && eventDetails.trigger == null && this.state.activeTriggerId != null) {\n // When closing the dialog, pass the old trigger to the onOpenChange event\n // so it's not reset too early (potentially causing focus issues in controlled scenarios).\n eventDetails.trigger = this.state.activeTriggerElement ?? undefined;\n }\n this.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const updatedState = {\n open: nextOpen\n };\n setPopupOpenState(updatedState, nextOpen, eventDetails.trigger);\n this.update(updatedState);\n };\n static useStore(externalStore, initialState) {\n /* eslint-disable react-hooks/rules-of-hooks */\n const store = usePopupStore(externalStore, (floatingId, nested) => new DialogStore(initialState, floatingId, nested), true).store;\n /* eslint-enable react-hooks/rules-of-hooks */\n\n return store;\n }\n}\nfunction createInitialState(initialState = {}) {\n return {\n ...createInitialPopupStoreState(),\n modal: true,\n disablePointerDismissal: false,\n popupElement: null,\n viewportElement: null,\n descriptionElementId: undefined,\n titleElementId: undefined,\n openMethod: null,\n nested: false,\n nestedOpenDialogCount: 0,\n nestedOpenDrawerCount: 0,\n role: 'dialog',\n ...initialState\n };\n}"],"names":["selectors","popupStoreSelectors","createSelector","state","DialogStore","ReactStore","initialState","floatingId","nested","triggerElements","PopupTriggerMap","createInitialState","createPopupFloatingRootContext","React","nextOpen","eventDetails","updatedState","setPopupOpenState","externalStore","usePopupStore","createInitialPopupStoreState"],"mappings":";;;;;;AAGA,MAAMA,IAAY;AAAA,EAChB,GAAGC;AAAA,EACH,OAAOC,EAAe,CAAAC,MAASA,EAAM,KAAK;AAAA,EAC1C,QAAQD,EAAe,CAAAC,MAASA,EAAM,MAAM;AAAA,EAC5C,uBAAuBD,EAAe,CAAAC,MAASA,EAAM,qBAAqB;AAAA,EAC1E,uBAAuBD,EAAe,CAAAC,MAASA,EAAM,qBAAqB;AAAA,EAC1E,yBAAyBD,EAAe,CAAAC,MAASA,EAAM,uBAAuB;AAAA,EAC9E,YAAYD,EAAe,CAAAC,MAASA,EAAM,UAAU;AAAA,EACpD,sBAAsBD,EAAe,CAAAC,MAASA,EAAM,oBAAoB;AAAA,EACxE,gBAAgBD,EAAe,CAAAC,MAASA,EAAM,cAAc;AAAA,EAC5D,iBAAiBD,EAAe,CAAAC,MAASA,EAAM,eAAe;AAAA,EAC9D,MAAMD,EAAe,CAAAC,MAASA,EAAM,IAAI;AAC1C;AACO,MAAMC,UAAoBC,EAAW;AAAA,EAC1C,YAAYC,GAAcC,GAAYC,IAAS,IAAO;AACpD,UAAMC,IAAkB,IAAIC,EAAe,GACrCP,IAAQQ,EAAmBL,CAAY;AAC7C,IAAAH,EAAM,sBAAsBS,EAA+BH,GAAiBF,GAAYC,CAAM,GAC9F,MAAML,GAAO;AAAA,MACX,UAAuB,gBAAAU,EAAM,UAAS;AAAA,MACtC,aAA0B,gBAAAA,EAAM,UAAS;AAAA,MACzC,qBAAkC,gBAAAA,EAAM,UAAS;AAAA,MACjD,wBAAwB;AAAA,QACtB,SAAS;AAAA,MACjB;AAAA,MACM,iBAAAJ;AAAA,MACA,cAAc;AAAA,MACd,sBAAsB;AAAA,IAC5B,GAAOT,CAAS;AAAA,EACd;AAAA,EACA,UAAU,CAACc,GAAUC,MAAiB;AAUpC,QATAA,EAAa,wBAAwB,MAAM;AACzC,WAAK,IAAI,4BAA4B,EAAI;AAAA,IAC3C,GACI,CAACD,KAAYC,EAAa,WAAW,QAAQ,KAAK,MAAM,mBAAmB,SAG7EA,EAAa,UAAU,KAAK,MAAM,wBAAwB,SAE5D,KAAK,QAAQ,eAAeD,GAAUC,CAAY,GAC9CA,EAAa;AACf;AAEF,SAAK,MAAM,oBAAoB,mBAAmBD,GAAUC,CAAY;AACxE,UAAMC,IAAe;AAAA,MACnB,MAAMF;AAAA,IACZ;AACI,IAAAG,EAAkBD,GAAcF,GAAUC,EAAa,OAAO,GAC9D,KAAK,OAAOC,CAAY;AAAA,EAC1B;AAAA,EACA,OAAO,SAASE,GAAeZ,GAAc;AAK3C,WAHca,EAAcD,GAAe,CAACX,GAAYC,MAAW,IAAIJ,EAAYE,GAAcC,GAAYC,CAAM,GAAG,EAAI,EAAE;AAAA,EAI9H;AACF;AACA,SAASG,EAAmBL,IAAe,IAAI;AAC7C,SAAO;AAAA,IACL,GAAGc,EAA4B;AAAA,IAC/B,OAAO;AAAA,IACP,yBAAyB;AAAA,IACzB,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,sBAAsB;AAAA,IACtB,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,MAAM;AAAA,IACN,GAAGd;AAAA,EACP;AACA;","x_google_ignoreList":[0]}
|
package/dist/index350.js
CHANGED
|
@@ -1,65 +1,55 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
import * as l from "react-dom";
|
|
2
|
+
import { useAnimationFrame as b } from "./index327.js";
|
|
3
|
+
import { useStableCallback as A } from "./index288.js";
|
|
4
|
+
import { resolveRef as d } from "./index387.js";
|
|
5
|
+
import { TransitionStatusDataAttributes as h } from "./index174.js";
|
|
6
|
+
function y(c, f = !1, m = !0) {
|
|
7
|
+
const o = b();
|
|
8
|
+
return A((s, n = null) => {
|
|
9
|
+
o.cancel();
|
|
10
|
+
const a = d(c);
|
|
11
|
+
if (a == null)
|
|
12
|
+
return;
|
|
13
|
+
const e = a, u = () => {
|
|
14
|
+
l.flushSync(s);
|
|
15
|
+
};
|
|
16
|
+
if (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
17
|
+
s();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
function i() {
|
|
21
|
+
Promise.all(e.getAnimations().map((t) => t.finished)).then(() => {
|
|
22
|
+
n?.aborted || u();
|
|
23
|
+
}).catch(() => {
|
|
24
|
+
if (m) {
|
|
25
|
+
n?.aborted || u();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const t = e.getAnimations();
|
|
29
|
+
!n?.aborted && t.length > 0 && t.some((r) => r.pending || r.playState !== "finished") && i();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (f) {
|
|
33
|
+
const t = h.startingStyle;
|
|
34
|
+
if (!e.hasAttribute(t)) {
|
|
35
|
+
o.request(i);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const r = new MutationObserver(() => {
|
|
39
|
+
e.hasAttribute(t) || (r.disconnect(), i());
|
|
40
|
+
});
|
|
41
|
+
r.observe(e, {
|
|
42
|
+
attributes: !0,
|
|
43
|
+
attributeFilter: [t]
|
|
44
|
+
}), n?.addEventListener("abort", () => r.disconnect(), {
|
|
45
|
+
once: !0
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
o.request(i);
|
|
44
50
|
});
|
|
45
|
-
P(o && s === !0, d), e.useContextCallback("onNestedDialogOpen", (n, i) => {
|
|
46
|
-
m(n), g(i);
|
|
47
|
-
}), e.useContextCallback("onNestedDialogClose", () => {
|
|
48
|
-
m(0), g(0);
|
|
49
|
-
}), r.useEffect(() => (t?.onNestedDialogOpen && o && t.onNestedDialogOpen(u + 1, l + (a ? 1 : 0)), t?.onNestedDialogClose && !o && t.onNestedDialogClose(), () => {
|
|
50
|
-
t?.onNestedDialogClose && o && t.onNestedDialogClose();
|
|
51
|
-
}), [a, o, u, l, t]);
|
|
52
|
-
const b = p.reference ?? f, R = p.trigger ?? f, N = p.floating ?? f;
|
|
53
|
-
return T(e, {
|
|
54
|
-
activeTriggerProps: b,
|
|
55
|
-
inactiveTriggerProps: R,
|
|
56
|
-
popupProps: N,
|
|
57
|
-
nestedOpenDialogCount: u,
|
|
58
|
-
nestedOpenDrawerCount: l
|
|
59
|
-
}), null;
|
|
60
51
|
}
|
|
61
52
|
export {
|
|
62
|
-
|
|
63
|
-
L as useDialogRoot
|
|
53
|
+
y as useAnimationsFinished
|
|
64
54
|
};
|
|
65
55
|
//# sourceMappingURL=index350.js.map
|
package/dist/index350.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index350.js","sources":["../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index350.js","sources":["../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs"],"sourcesContent":["'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { resolveRef } from \"../utils/resolveRef.mjs\";\nimport { TransitionStatusDataAttributes } from \"./stateAttributesMapping.mjs\";\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.\n * @param treatAbortedAsFinished - Whether to treat aborted animations as finished. If `false`, and there are aborted animations,\n * the function will check again if any new animations have started and wait for them to finish.\n * @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback\n */\nexport function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {\n const frame = useAnimationFrame();\n return useStableCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n const element = resolveRef(elementOrRef);\n if (element == null) {\n return;\n }\n const resolvedElement = element;\n const done = () => {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\n };\n if (typeof resolvedElement.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n return;\n }\n function exec() {\n Promise.all(resolvedElement.getAnimations().map(animation => animation.finished)).then(() => {\n if (!signal?.aborted) {\n done();\n }\n }).catch(() => {\n if (treatAbortedAsFinished) {\n if (!signal?.aborted) {\n done();\n }\n return;\n }\n const currentAnimations = resolvedElement.getAnimations();\n if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some(animation => animation.pending || animation.playState !== 'finished')) {\n // Sometimes animations can be aborted because a property they depend on changes while the animation plays.\n // In such cases, we need to re-check if any new animations have started.\n exec();\n }\n });\n }\n if (waitForStartingStyleRemoved) {\n const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;\n\n // If `[data-starting-style]` isn't present, fall back to waiting one more frame\n // to give \"open\" animations a chance to be registered.\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n frame.request(exec);\n return;\n }\n\n // Wait for `[data-starting-style]` to have been removed.\n const attributeObserver = new MutationObserver(() => {\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n attributeObserver.disconnect();\n exec();\n }\n });\n attributeObserver.observe(resolvedElement, {\n attributes: true,\n attributeFilter: [startingStyleAttribute]\n });\n signal?.addEventListener('abort', () => attributeObserver.disconnect(), {\n once: true\n });\n return;\n }\n frame.request(exec);\n });\n}"],"names":["useAnimationsFinished","elementOrRef","waitForStartingStyleRemoved","treatAbortedAsFinished","frame","useAnimationFrame","useStableCallback","fnToExecute","signal","element","resolveRef","resolvedElement","done","ReactDOM","exec","animation","currentAnimations","startingStyleAttribute","TransitionStatusDataAttributes","attributeObserver"],"mappings":";;;;;AAgBO,SAASA,EAAsBC,GAAcC,IAA8B,IAAOC,IAAyB,IAAM;AACtH,QAAMC,IAAQC,EAAiB;AAC/B,SAAOC,EAAkB,CAACC,GAM1BC,IAAS,SAAS;AAChB,IAAAJ,EAAM,OAAM;AACZ,UAAMK,IAAUC,EAAWT,CAAY;AACvC,QAAIQ,KAAW;AACb;AAEF,UAAME,IAAkBF,GAClBG,IAAO,MAAM;AAGjB,MAAAC,EAAS,UAAUN,CAAW;AAAA,IAChC;AACA,QAAI,OAAOI,EAAgB,iBAAkB,cAAc,WAAW,6BAA6B;AACjG,MAAAJ,EAAW;AACX;AAAA,IACF;AACA,aAASO,IAAO;AACd,cAAQ,IAAIH,EAAgB,gBAAgB,IAAI,CAAAI,MAAaA,EAAU,QAAQ,CAAC,EAAE,KAAK,MAAM;AAC3F,QAAKP,GAAQ,WACXI,EAAI;AAAA,MAER,CAAC,EAAE,MAAM,MAAM;AACb,YAAIT,GAAwB;AAC1B,UAAKK,GAAQ,WACXI,EAAI;AAEN;AAAA,QACF;AACA,cAAMI,IAAoBL,EAAgB,cAAa;AACvD,QAAI,CAACH,GAAQ,WAAWQ,EAAkB,SAAS,KAAKA,EAAkB,KAAK,CAAAD,MAAaA,EAAU,WAAWA,EAAU,cAAc,UAAU,KAGjJD,EAAI;AAAA,MAER,CAAC;AAAA,IACH;AACA,QAAIZ,GAA6B;AAC/B,YAAMe,IAAyBC,EAA+B;AAI9D,UAAI,CAACP,EAAgB,aAAaM,CAAsB,GAAG;AACzD,QAAAb,EAAM,QAAQU,CAAI;AAClB;AAAA,MACF;AAGA,YAAMK,IAAoB,IAAI,iBAAiB,MAAM;AACnD,QAAKR,EAAgB,aAAaM,CAAsB,MACtDE,EAAkB,WAAU,GAC5BL,EAAI;AAAA,MAER,CAAC;AACD,MAAAK,EAAkB,QAAQR,GAAiB;AAAA,QACzC,YAAY;AAAA,QACZ,iBAAiB,CAACM,CAAsB;AAAA,MAChD,CAAO,GACDT,GAAQ,iBAAiB,SAAS,MAAMW,EAAkB,WAAU,GAAI;AAAA,QACtE,MAAM;AAAA,MACd,CAAO;AACD;AAAA,IACF;AACA,IAAAf,EAAM,QAAQU,CAAI;AAAA,EACpB,CAAC;AACH;","x_google_ignoreList":[0]}
|
package/dist/index351.js
CHANGED
|
@@ -1,70 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { setPopupOpenState as f, usePopupStore as g } from "./index184.js";
|
|
6
|
-
import { createSelector as o } from "./index361.js";
|
|
7
|
-
const C = {
|
|
8
|
-
...u,
|
|
9
|
-
modal: o((e) => e.modal),
|
|
10
|
-
nested: o((e) => e.nested),
|
|
11
|
-
nestedOpenDialogCount: o((e) => e.nestedOpenDialogCount),
|
|
12
|
-
nestedOpenDrawerCount: o((e) => e.nestedOpenDrawerCount),
|
|
13
|
-
disablePointerDismissal: o((e) => e.disablePointerDismissal),
|
|
14
|
-
openMethod: o((e) => e.openMethod),
|
|
15
|
-
descriptionElementId: o((e) => e.descriptionElementId),
|
|
16
|
-
titleElementId: o((e) => e.titleElementId),
|
|
17
|
-
viewportElement: o((e) => e.viewportElement),
|
|
18
|
-
role: o((e) => e.role)
|
|
19
|
-
};
|
|
20
|
-
class a extends l {
|
|
21
|
-
constructor(n, t, r = !1) {
|
|
22
|
-
const i = new m(), s = h(n);
|
|
23
|
-
s.floatingRootContext = d(i, t, r), super(s, {
|
|
24
|
-
popupRef: /* @__PURE__ */ p.createRef(),
|
|
25
|
-
backdropRef: /* @__PURE__ */ p.createRef(),
|
|
26
|
-
internalBackdropRef: /* @__PURE__ */ p.createRef(),
|
|
27
|
-
outsidePressEnabledRef: {
|
|
28
|
-
current: !0
|
|
29
|
-
},
|
|
30
|
-
triggerElements: i,
|
|
31
|
-
onOpenChange: void 0,
|
|
32
|
-
onOpenChangeComplete: void 0
|
|
33
|
-
}, C);
|
|
34
|
-
}
|
|
35
|
-
setOpen = (n, t) => {
|
|
36
|
-
if (t.preventUnmountOnClose = () => {
|
|
37
|
-
this.set("preventUnmountingOnClose", !0);
|
|
38
|
-
}, !n && t.trigger == null && this.state.activeTriggerId != null && (t.trigger = this.state.activeTriggerElement ?? void 0), this.context.onOpenChange?.(n, t), t.isCanceled)
|
|
39
|
-
return;
|
|
40
|
-
this.state.floatingRootContext.dispatchOpenChange(n, t);
|
|
41
|
-
const r = {
|
|
42
|
-
open: n
|
|
43
|
-
};
|
|
44
|
-
f(r, n, t.trigger), this.update(r);
|
|
45
|
-
};
|
|
46
|
-
static useStore(n, t) {
|
|
47
|
-
return g(n, (i, s) => new a(t, i, s), !0).store;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function h(e = {}) {
|
|
51
|
-
return {
|
|
52
|
-
...c(),
|
|
53
|
-
modal: !0,
|
|
54
|
-
disablePointerDismissal: !1,
|
|
55
|
-
popupElement: null,
|
|
56
|
-
viewportElement: null,
|
|
57
|
-
descriptionElementId: void 0,
|
|
58
|
-
titleElementId: void 0,
|
|
59
|
-
openMethod: null,
|
|
60
|
-
nested: !1,
|
|
61
|
-
nestedOpenDialogCount: 0,
|
|
62
|
-
nestedOpenDrawerCount: 0,
|
|
63
|
-
role: "dialog",
|
|
64
|
-
...e
|
|
65
|
-
};
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const e = parseInt(t.version, 10);
|
|
3
|
+
function o(r) {
|
|
4
|
+
return e >= r;
|
|
66
5
|
}
|
|
67
6
|
export {
|
|
68
|
-
|
|
7
|
+
o as isReactVersionAtLeast
|
|
69
8
|
};
|
|
70
9
|
//# sourceMappingURL=index351.js.map
|
package/dist/index351.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index351.js","sources":["../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index351.js","sources":["../node_modules/@base-ui/utils/reactVersion.mjs"],"sourcesContent":["import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}"],"names":["majorVersion","React","isReactVersionAtLeast","reactVersionToCheck"],"mappings":";AACA,MAAMA,IAAe,SAASC,EAAM,SAAS,EAAE;AACxC,SAASC,EAAsBC,GAAqB;AACzD,SAAOH,KAAgBG;AACzB;","x_google_ignoreList":[0]}
|
package/dist/index357.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lowerPlatform as t, lowerUserAgent as n, maxTouchPoints as i } from "./
|
|
1
|
+
import { lowerPlatform as t, lowerUserAgent as n, maxTouchPoints as i } from "./index429.js";
|
|
2
2
|
const s = /^i(os$|p)/.test(t) || t === "macintel" && i > 1, o = "android", c = t === o || n.includes(o), r = !s && t.startsWith("mac");
|
|
3
3
|
t.startsWith("win");
|
|
4
4
|
const e = r || s;
|
package/dist/index358.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import { Store as l } from "./
|
|
3
|
-
import { useStore as a } from "./
|
|
4
|
-
import { useStableCallback as f } from "./
|
|
5
|
-
import { useIsoLayoutEffect as u } from "./
|
|
6
|
-
import { NOOP as d } from "./
|
|
2
|
+
import { Store as l } from "./index309.js";
|
|
3
|
+
import { useStore as a } from "./index303.js";
|
|
4
|
+
import { useStableCallback as f } from "./index288.js";
|
|
5
|
+
import { useIsoLayoutEffect as u } from "./index287.js";
|
|
6
|
+
import { NOOP as d } from "./index290.js";
|
|
7
7
|
class g extends l {
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new ReactStore instance.
|
package/dist/index359.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EMPTY_OBJECT as r } from "./
|
|
1
|
+
import { EMPTY_OBJECT as r } from "./index290.js";
|
|
2
2
|
import { FloatingRootStore as l } from "./index388.js";
|
|
3
3
|
import { getEmptyRootContext as d } from "./index391.js";
|
|
4
4
|
import { createSelector as o } from "./index361.js";
|
package/dist/index362.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function r(s, t) {
|
|
2
|
+
const e = t.startOfMonth(s), n = e.getDay() > 0 ? e.getDay() : 7, a = t.addDays(s, -n + 1), o = t.addDays(a, 34);
|
|
3
|
+
return t.getMonth(s) === t.getMonth(o) ? 5 : 4;
|
|
4
|
+
}
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
r as getBroadcastWeeksInMonth
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=index362.js.map
|
package/dist/index362.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index362.js","sources":["
|
|
1
|
+
{"version":3,"file":"index362.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js"],"sourcesContent":["const FIVE_WEEKS = 5;\nconst FOUR_WEEKS = 4;\n/**\n * Returns the number of weeks to display in the broadcast calendar for a given\n * month.\n *\n * The broadcast calendar may have either 4 or 5 weeks in a month, depending on\n * the start and end dates of the broadcast weeks.\n *\n * @since 9.4.0\n * @param month The month for which to calculate the number of weeks.\n * @param dateLib The date library to use for date manipulation.\n * @returns The number of weeks in the broadcast calendar (4 or 5).\n */\nexport function getBroadcastWeeksInMonth(month, dateLib) {\n // Get the first day of the month\n const firstDayOfMonth = dateLib.startOfMonth(month);\n // Get the day of the week for the first day of the month (1-7, where 1 is Monday)\n const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;\n const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);\n const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);\n const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek)\n ? FIVE_WEEKS\n : FOUR_WEEKS;\n return numberOfWeeks;\n}\n"],"names":["getBroadcastWeeksInMonth","month","dateLib","firstDayOfMonth","firstDayOfWeek","broadcastStartDate","lastDateOfLastWeek"],"mappings":"AAcO,SAASA,EAAyBC,GAAOC,GAAS;AAErD,QAAMC,IAAkBD,EAAQ,aAAaD,CAAK,GAE5CG,IAAiBD,EAAgB,OAAM,IAAK,IAAIA,EAAgB,OAAM,IAAK,GAC3EE,IAAqBH,EAAQ,QAAQD,GAAO,CAACG,IAAiB,CAAC,GAC/DE,IAAqBJ,EAAQ,QAAQG,GAAoB,EAAkB;AAIjF,SAHsBH,EAAQ,SAASD,CAAK,MAAMC,EAAQ,SAASI,CAAkB,IAC/E,IACA;AAEV;","x_google_ignoreList":[0]}
|