@rpcbase/ui 0.247.0 → 0.248.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 +157 -157
- 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/index171.js +14 -58
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +68 -8
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +37 -87
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +13 -19
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +23 -16
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +111 -5
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +13 -6
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +4 -6
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +4 -5
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +5 -7
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +11 -16
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +19 -4
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +11 -5
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +176 -12
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +279 -9
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +4 -13
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +28 -14
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +126 -4
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +63 -5
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +8 -6
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +16 -6
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +29 -53
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +69 -8
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +58 -4
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +8 -4
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +87 -8
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +19 -4
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -4
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +5 -3
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +5 -10
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +6 -9
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +4 -9
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +6 -10
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +16 -10
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -9
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +4 -6
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +12 -5
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +9 -4
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +13 -5
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +13 -6
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +4 -5
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +5 -16
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -7
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -10
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +54 -10
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +8 -21
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +4 -8
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +4 -9
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +8 -9
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +4 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +4 -5
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -16
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -9
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +9 -18
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +9 -20
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +10 -12
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +10 -29
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +9 -12
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +6 -25
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -5
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +4 -14
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +5 -68
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +7 -38
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +6 -14
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +16 -23
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +7 -111
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +11 -13
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +10 -4
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +22 -4
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +9 -5
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +9 -11
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +9 -19
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +5 -11
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +5 -176
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +15 -278
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +9 -4
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +19 -28
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +18 -124
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +12 -63
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +29 -8
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +12 -15
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +25 -30
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +5 -69
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +20 -155
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +65 -31
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +6 -11
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -49
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +11 -9
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +3 -11
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +48 -41
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +4 -98
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +27 -84
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +14 -103
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +5 -52
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +21 -11
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +53 -4
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +20 -37
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +41 -8
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +39 -3
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +46 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +18 -133
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +69 -16
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +17 -15
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +3 -36
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +11 -20
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +13 -8
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +18 -24
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +35 -27
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +239 -16
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +253 -20
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +66 -64
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +99 -6
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +83 -5
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +3 -11
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +29 -3
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +16 -50
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +35 -4
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +16 -28
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +3 -16
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +26 -5
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +27 -20
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +4 -54
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +76 -18
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +268 -37
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +11 -39
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +10 -45
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +25 -20
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +15 -69
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +122 -14
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +5 -3
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +65 -11
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +14 -14
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -18
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +5 -36
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +3 -239
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +10 -252
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +7 -68
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +128 -94
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +391 -75
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +5 -4
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +51 -28
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +10 -15
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +28 -35
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +11 -17
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +154 -3
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +31 -25
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +11 -28
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +50 -4
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +9 -78
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +10 -271
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +43 -11
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +97 -10
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +86 -25
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +104 -15
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +50 -123
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +11 -5
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +4 -65
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +37 -13
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +8 -7
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +135 -5
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +17 -3
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +15 -10
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +3 -7
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +32 -129
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +18 -397
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +10 -5
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +8 -52
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +8 -11
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +11 -27
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +2 -2
- package/dist/index340.js +8 -11
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +13 -4
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +4 -18
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +3 -12
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +16 -7
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +22 -9
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +27 -7
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +14 -11
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +51 -3
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +61 -3
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +5 -5
- package/dist/index350.js +65 -16
- package/dist/index350.js.map +1 -1
- package/dist/index352.js +8 -51
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +5 -62
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +11 -66
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +21 -8
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +17 -5
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +8 -12
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +144 -21
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +77 -14
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +11 -11
- package/dist/index360.js +62 -8
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +15 -145
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +4 -79
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +17 -61
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +13 -15
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +4 -5
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +10 -19
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +6 -4
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +3 -6
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +21 -3
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +3 -3
- package/dist/index370.js +44 -11
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +17 -20
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +5 -45
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +198 -15
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +74 -5
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +115 -192
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +4 -73
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +19 -122
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +8 -4
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +27 -5
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +4 -4
- package/dist/index380.js +138 -4
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +12 -15
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +46 -8
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +3 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +21 -4
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +72 -542
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +11 -46
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +3 -17
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +71 -5
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +35 -7
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +5 -5
- package/dist/index390.js +7 -7
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +15 -7
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +4 -11
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +4 -8
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +4 -13
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +15 -8
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +9 -27
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +5 -137
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +4 -12
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +543 -44
- package/dist/index399.js.map +1 -1
- package/dist/index40.js +3 -3
- package/dist/index400.js +47 -4
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +17 -21
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +5 -75
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +8 -12
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +6 -3
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +7 -71
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +11 -35
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +9 -7
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +12 -15
- package/dist/index408.js.map +1 -1
- package/dist/index41.js +10 -10
- package/dist/index411.js +14 -4
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +3 -56
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +490 -66
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +5 -31
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +56 -9
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +61 -146
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +26 -103
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +9 -15
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +153 -3
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +106 -490
- package/dist/index420.js.map +1 -1
- package/dist/index49.js +36 -36
- package/dist/index50.js +29 -29
- package/dist/index51.js +2 -2
- package/dist/index52.js +12 -12
- package/dist/index53.js +4 -4
- package/dist/index54.js +1 -1
- package/dist/index55.js +21 -21
- package/dist/index56.js +5 -5
- package/dist/index57.js +5 -5
- package/dist/index58.js +8 -8
- package/dist/index59.js +5 -5
- package/dist/index60.js +17 -17
- package/dist/index61.js +5 -5
- package/dist/index62.js +3 -3
- package/package.json +1 -1
package/dist/index269.js
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { useIsoLayoutEffect as c } from "./index261.js";
|
|
3
|
+
import { AnimationFrame as u } from "./index301.js";
|
|
4
|
+
function g(t, s = !1, f = !1) {
|
|
5
|
+
const [n, r] = a.useState(t && s ? "idle" : void 0), [i, d] = a.useState(t);
|
|
6
|
+
return t && !i && (d(!0), r("starting")), !t && i && n !== "ending" && !f && r("ending"), !t && !i && n === "ending" && r(void 0), c(() => {
|
|
7
|
+
if (!t && i && n !== "ending" && f) {
|
|
8
|
+
const e = u.request(() => {
|
|
9
|
+
r("ending");
|
|
10
|
+
});
|
|
11
|
+
return () => {
|
|
12
|
+
u.cancel(e);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}, [t, i, n, f]), c(() => {
|
|
16
|
+
if (!t || s)
|
|
17
|
+
return;
|
|
18
|
+
const e = u.request(() => {
|
|
19
|
+
r(void 0);
|
|
20
|
+
});
|
|
21
|
+
return () => {
|
|
22
|
+
u.cancel(e);
|
|
23
|
+
};
|
|
24
|
+
}, [s, t]), c(() => {
|
|
25
|
+
if (!t || !s)
|
|
26
|
+
return;
|
|
27
|
+
t && i && n !== "idle" && r("starting");
|
|
28
|
+
const e = u.request(() => {
|
|
29
|
+
r("idle");
|
|
30
|
+
});
|
|
31
|
+
return () => {
|
|
32
|
+
u.cancel(e);
|
|
33
|
+
};
|
|
34
|
+
}, [s, t, i, n]), {
|
|
35
|
+
mounted: i,
|
|
36
|
+
setMounted: d,
|
|
37
|
+
transitionStatus: n
|
|
38
|
+
};
|
|
3
39
|
}
|
|
4
40
|
export {
|
|
5
|
-
|
|
41
|
+
g as useTransitionStatus
|
|
6
42
|
};
|
|
7
43
|
//# sourceMappingURL=index269.js.map
|
package/dist/index269.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index269.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index269.js","sources":["../../../node_modules/@base-ui/react/internals/useTransitionStatus.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { AnimationFrame } from '@base-ui/utils/useAnimationFrame';\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {\n const [transitionStatus, setTransitionStatus] = React.useState(open && enableIdleState ? 'idle' : undefined);\n const [mounted, setMounted] = React.useState(open);\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus('starting');\n }\n if (!open && mounted && transitionStatus !== 'ending' && !deferEndingState) {\n setTransitionStatus('ending');\n }\n if (!open && !mounted && transitionStatus === 'ending') {\n setTransitionStatus(undefined);\n }\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== 'ending' && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('ending');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n const frame = AnimationFrame.request(() => {\n // Avoid `flushSync` here due to Firefox.\n // See https://github.com/mui/base-ui/pull/3424\n setTransitionStatus(undefined);\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n if (open && mounted && transitionStatus !== 'idle') {\n setTransitionStatus('starting');\n }\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('idle');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, transitionStatus]);\n return {\n mounted,\n setMounted,\n transitionStatus\n };\n}"],"names":["useTransitionStatus","open","enableIdleState","deferEndingState","transitionStatus","setTransitionStatus","React","mounted","setMounted","useIsoLayoutEffect","frame","AnimationFrame"],"mappings":";;;AAUO,SAASA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C9C;AAAA,IACL,SAAAG;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAJ;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
|
package/dist/index270.js
CHANGED
|
@@ -1,13 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { compareItemEquality as i } from "./index273.js";
|
|
2
|
+
import { hasNullItemLabel as n, stringifyAsValue as a } from "./index272.js";
|
|
3
|
+
import { createSelector as r } from "./index361.js";
|
|
4
|
+
const c = {
|
|
5
|
+
id: r((e) => e.id),
|
|
6
|
+
labelId: r((e) => e.labelId),
|
|
7
|
+
modal: r((e) => e.modal),
|
|
8
|
+
multiple: r((e) => e.multiple),
|
|
9
|
+
items: r((e) => e.items),
|
|
10
|
+
itemToStringLabel: r((e) => e.itemToStringLabel),
|
|
11
|
+
itemToStringValue: r((e) => e.itemToStringValue),
|
|
12
|
+
isItemEqualToValue: r((e) => e.isItemEqualToValue),
|
|
13
|
+
value: r((e) => e.value),
|
|
14
|
+
hasSelectedValue: r((e) => {
|
|
15
|
+
const {
|
|
16
|
+
value: t,
|
|
17
|
+
multiple: o,
|
|
18
|
+
itemToStringValue: l
|
|
19
|
+
} = e;
|
|
20
|
+
return t == null ? !1 : o && Array.isArray(t) ? t.length > 0 : a(t, l) !== "";
|
|
21
|
+
}),
|
|
22
|
+
hasNullItemLabel: r((e, t) => t ? n(e.items) : !1),
|
|
23
|
+
open: r((e) => e.open),
|
|
24
|
+
mounted: r((e) => e.mounted),
|
|
25
|
+
forceMount: r((e) => e.forceMount),
|
|
26
|
+
transitionStatus: r((e) => e.transitionStatus),
|
|
27
|
+
openMethod: r((e) => e.openMethod),
|
|
28
|
+
activeIndex: r((e) => e.activeIndex),
|
|
29
|
+
selectedIndex: r((e) => e.selectedIndex),
|
|
30
|
+
isActive: r((e, t) => e.activeIndex === t),
|
|
31
|
+
isSelected: r((e, t) => {
|
|
32
|
+
const o = e.isItemEqualToValue, l = e.value;
|
|
33
|
+
return e.multiple ? Array.isArray(l) && l.some((s) => i(t, s, o)) : i(t, l, o);
|
|
34
|
+
}),
|
|
35
|
+
isSelectedByFocus: r((e, t) => e.selectedIndex === t),
|
|
36
|
+
popupProps: r((e) => e.popupProps),
|
|
37
|
+
triggerProps: r((e) => e.triggerProps),
|
|
38
|
+
triggerElement: r((e) => e.triggerElement),
|
|
39
|
+
positionerElement: r((e) => e.positionerElement),
|
|
40
|
+
listElement: r((e) => e.listElement),
|
|
41
|
+
popupSide: r((e) => e.popupSide),
|
|
42
|
+
scrollUpArrowVisible: r((e) => e.scrollUpArrowVisible),
|
|
43
|
+
scrollDownArrowVisible: r((e) => e.scrollDownArrowVisible),
|
|
44
|
+
hasScrollArrows: r((e) => e.hasScrollArrows)
|
|
45
|
+
};
|
|
10
46
|
export {
|
|
11
|
-
|
|
47
|
+
c as selectors
|
|
12
48
|
};
|
|
13
49
|
//# sourceMappingURL=index270.js.map
|
package/dist/index270.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index270.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index270.js","sources":["../../../node_modules/@base-ui/react/select/store.mjs"],"sourcesContent":["import { createSelector } from '@base-ui/utils/store';\nimport { compareItemEquality } from \"../internals/itemEquality.mjs\";\nimport { hasNullItemLabel, stringifyAsValue } from \"../internals/resolveValueLabel.mjs\";\nexport const selectors = {\n id: createSelector(state => state.id),\n labelId: createSelector(state => state.labelId),\n modal: createSelector(state => state.modal),\n multiple: createSelector(state => state.multiple),\n items: createSelector(state => state.items),\n itemToStringLabel: createSelector(state => state.itemToStringLabel),\n itemToStringValue: createSelector(state => state.itemToStringValue),\n isItemEqualToValue: createSelector(state => state.isItemEqualToValue),\n value: createSelector(state => state.value),\n hasSelectedValue: createSelector(state => {\n const {\n value,\n multiple,\n itemToStringValue\n } = state;\n if (value == null) {\n return false;\n }\n if (multiple && Array.isArray(value)) {\n return value.length > 0;\n }\n return stringifyAsValue(value, itemToStringValue) !== '';\n }),\n hasNullItemLabel: createSelector((state, enabled) => {\n return enabled ? hasNullItemLabel(state.items) : false;\n }),\n open: createSelector(state => state.open),\n mounted: createSelector(state => state.mounted),\n forceMount: createSelector(state => state.forceMount),\n transitionStatus: createSelector(state => state.transitionStatus),\n openMethod: createSelector(state => state.openMethod),\n activeIndex: createSelector(state => state.activeIndex),\n selectedIndex: createSelector(state => state.selectedIndex),\n isActive: createSelector((state, index) => state.activeIndex === index),\n isSelected: createSelector((state, itemValue) => {\n const comparer = state.isItemEqualToValue;\n const storeValue = state.value;\n if (state.multiple) {\n return Array.isArray(storeValue) && storeValue.some(selectedItem => compareItemEquality(itemValue, selectedItem, comparer));\n }\n\n // The value is the source of truth: a stale `selectedIndex` (e.g. the controlled\n // value changes while the popup is open, where the index sync is deferred) must not\n // keep a previously selected item marked as selected.\n return compareItemEquality(itemValue, storeValue, comparer);\n }),\n isSelectedByFocus: createSelector((state, index) => {\n return state.selectedIndex === index;\n }),\n popupProps: createSelector(state => state.popupProps),\n triggerProps: createSelector(state => state.triggerProps),\n triggerElement: createSelector(state => state.triggerElement),\n positionerElement: createSelector(state => state.positionerElement),\n listElement: createSelector(state => state.listElement),\n popupSide: createSelector(state => state.popupSide),\n scrollUpArrowVisible: createSelector(state => state.scrollUpArrowVisible),\n scrollDownArrowVisible: createSelector(state => state.scrollDownArrowVisible),\n hasScrollArrows: createSelector(state => state.hasScrollArrows)\n};"],"names":["selectors","createSelector","state","value","multiple","itemToStringValue","stringifyAsValue","enabled","hasNullItemLabel","index","itemValue","comparer","storeValue","selectedItem","compareItemEquality"],"mappings":";;;AAGY,MAACA,IAAY;AAAA,EACvB,IAAIC,EAAe,CAAAC,MAASA,EAAM,EAAE;AAAA,EACpC,SAASD,EAAe,CAAAC,MAASA,EAAM,OAAO;AAAA,EAC9C,OAAOD,EAAe,CAAAC,MAASA,E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QAAQU,CAAU,KAAKA,EAAW,KAAK,CAAAC,MAAgBC,EAAoBJ,GAAWG,GAAcF,CAAQ,CAAC,IAMrHG,EAAoBJ,GAAWE,GAAYD,CAAQ;AAAA,EAC5D,CAAC;AAAA,EACD,mBAAmBV,EAAe,CAACC,GAAOO,MACjCP,EAAM,kBAAkBO,CAChC;AAAA,EACD,YAAYR,EAAe,CAAAC,MAASA,EAAM,UAAU;AAAA,EACpD,cAAcD,EAAe,CAAAC,MAASA,EAAM,YAAY;AAAA,EACxD,gBAAgBD,EAAe,CAAAC,MAASA,EAAM,cAAc;AAAA,EAC5D,mBAAmBD,EAAe,CAAAC,MAASA,EAAM,iBAAiB;AAAA,EAClE,aAAaD,EAAe,CAAAC,MAASA,EAAM,WAAW;AAAA,EACtD,WAAWD,EAAe,CAAAC,MAASA,EAAM,SAAS;AAAA,EAClD,sBAAsBD,EAAe,CAAAC,MAASA,EAAM,oBAAoB;AAAA,EACxE,wBAAwBD,EAAe,CAAAC,MAASA,EAAM,sBAAsB;AAAA,EAC5E,iBAAiBD,EAAe,CAAAC,MAASA,EAAM,eAAe;AAChE;","x_google_ignoreList":[0]}
|
package/dist/index271.js
CHANGED
|
@@ -1,139 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { isPossibleNumber as S } from "./index255.js";
|
|
8
|
-
import x from "./index164.js";
|
|
9
|
-
import R from "./index269.js";
|
|
10
|
-
import E from "./index260.js";
|
|
11
|
-
import I from "./index274.js";
|
|
12
|
-
import A from "./index168.js";
|
|
13
|
-
import p from "./index275.js";
|
|
14
|
-
var H = 250, L = new RegExp("[" + s + y + "]"), U = new RegExp("[^" + y + "#]+$");
|
|
15
|
-
function Z(t, r, o) {
|
|
16
|
-
r = r || {};
|
|
17
|
-
var e = new T(o);
|
|
18
|
-
if (r.defaultCountry && !e.hasCountry(r.defaultCountry))
|
|
19
|
-
throw r.v2 ? new c("INVALID_COUNTRY") : new Error("Unknown country: ".concat(r.defaultCountry));
|
|
20
|
-
var a = G(t, r.v2, r.extract), m = a.number, n = a.ext, f = a.error;
|
|
21
|
-
if (!m) {
|
|
22
|
-
if (r.v2)
|
|
23
|
-
throw f === "TOO_SHORT" ? new c("TOO_SHORT") : new c("NOT_A_NUMBER");
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
var i = D(
|
|
27
|
-
m,
|
|
28
|
-
r.defaultCountry,
|
|
29
|
-
r.defaultCallingCode,
|
|
30
|
-
// If `country` is returned, its numbering plan will also be selected in `metadata`.
|
|
31
|
-
// Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`.
|
|
32
|
-
// Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`.
|
|
33
|
-
e
|
|
34
|
-
), l = i.country, u = i.nationalNumber, d = i.countryCallingCode, N = i.countryCallingCodeSource, b = i.carrierCode;
|
|
35
|
-
if (!e.hasSelectedNumberingPlan()) {
|
|
36
|
-
if (r.v2)
|
|
37
|
-
throw new c("INVALID_COUNTRY");
|
|
38
|
-
return {};
|
|
39
|
-
}
|
|
40
|
-
if (!u || u.length < P) {
|
|
41
|
-
if (r.v2)
|
|
42
|
-
throw new c("TOO_SHORT");
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
if (u.length > h) {
|
|
46
|
-
if (r.v2)
|
|
47
|
-
throw new c("TOO_LONG");
|
|
48
|
-
return {};
|
|
49
|
-
}
|
|
50
|
-
if (r.v2) {
|
|
51
|
-
var C = new x(d, u, e.metadata);
|
|
52
|
-
return l && (C.country = l), b && (C.carrierCode = b), n && (C.ext = n), C.__countryCallingCodeSource = N, C;
|
|
53
|
-
}
|
|
54
|
-
var _ = (r.extended ? e.hasSelectedNumberingPlan() : l) ? R(u, e.nationalNumberPattern()) : !1;
|
|
55
|
-
return r.extended ? {
|
|
56
|
-
country: l,
|
|
57
|
-
countryCallingCode: d,
|
|
58
|
-
carrierCode: b,
|
|
59
|
-
valid: _,
|
|
60
|
-
possible: _ ? !0 : !!(r.extended === !0 && e.possibleLengths() && S(u, e)),
|
|
61
|
-
phone: u,
|
|
62
|
-
ext: n
|
|
63
|
-
} : _ ? M(l, u, n) : {};
|
|
64
|
-
}
|
|
65
|
-
function F(t, r, o) {
|
|
66
|
-
if (t) {
|
|
67
|
-
if (t.length > H) {
|
|
68
|
-
if (o)
|
|
69
|
-
throw new c("TOO_LONG");
|
|
70
|
-
return;
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { NOOP as r } from "./index264.js";
|
|
3
|
+
const t = /* @__PURE__ */ e.createContext({
|
|
4
|
+
formRef: {
|
|
5
|
+
current: {
|
|
6
|
+
fields: /* @__PURE__ */ new Map()
|
|
71
7
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
8
|
+
},
|
|
9
|
+
errors: {},
|
|
10
|
+
clearErrors: r,
|
|
11
|
+
validationMode: "onSubmit",
|
|
12
|
+
submitAttemptedRef: {
|
|
13
|
+
current: !1
|
|
77
14
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return F(n, o, r);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
if (!e)
|
|
86
|
-
return {};
|
|
87
|
-
if (!v(e))
|
|
88
|
-
return O(e) ? {
|
|
89
|
-
error: "TOO_SHORT"
|
|
90
|
-
} : {};
|
|
91
|
-
var a = w(e);
|
|
92
|
-
return a.ext ? a : {
|
|
93
|
-
number: e
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
function M(t, r, o) {
|
|
97
|
-
var e = {
|
|
98
|
-
country: t,
|
|
99
|
-
phone: r
|
|
100
|
-
};
|
|
101
|
-
return o && (e.ext = o), e;
|
|
102
|
-
}
|
|
103
|
-
function D(t, r, o, e) {
|
|
104
|
-
var a = E(
|
|
105
|
-
g(t),
|
|
106
|
-
void 0,
|
|
107
|
-
// `defaultCountry` and `defaultCallingCode` are only used to detect
|
|
108
|
-
// if it's an "international" phone number or not. They won't be used
|
|
109
|
-
// to derive the resulting `countryCallingCode` from them, or anything like that.
|
|
110
|
-
r,
|
|
111
|
-
o,
|
|
112
|
-
e.metadata
|
|
113
|
-
), m = a.countryCallingCodeSource, n = a.countryCallingCode, f = a.number, i;
|
|
114
|
-
if (n)
|
|
115
|
-
e.selectNumberingPlan(n);
|
|
116
|
-
else if (f && (r || o))
|
|
117
|
-
r ? (i = r, e.selectNumberingPlan(r), n = e.numberingPlan.callingCode()) : (e.selectNumberingPlan(o), n = o);
|
|
118
|
-
else return {};
|
|
119
|
-
if (!f)
|
|
120
|
-
return {
|
|
121
|
-
countryCallingCodeSource: m,
|
|
122
|
-
countryCallingCode: n
|
|
123
|
-
};
|
|
124
|
-
var l = I(g(f), void 0, e), u = l.nationalNumber, d = l.carrierCode, N = A(n, {
|
|
125
|
-
nationalNumber: u,
|
|
126
|
-
metadata: e
|
|
127
|
-
});
|
|
128
|
-
return N && (i = N, N === "001" || e.selectNumberingPlan(i)), {
|
|
129
|
-
country: i,
|
|
130
|
-
countryCallingCode: n,
|
|
131
|
-
countryCallingCodeSource: m,
|
|
132
|
-
nationalNumber: u,
|
|
133
|
-
carrierCode: d
|
|
134
|
-
};
|
|
15
|
+
});
|
|
16
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "FormContext");
|
|
17
|
+
function n() {
|
|
18
|
+
return e.useContext(t);
|
|
135
19
|
}
|
|
136
20
|
export {
|
|
137
|
-
|
|
21
|
+
t as FormContext,
|
|
22
|
+
n as useFormContext
|
|
138
23
|
};
|
|
139
24
|
//# sourceMappingURL=index271.js.map
|
package/dist/index271.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index271.js","sources":["../../../node_modules/libphonenumber-js/es6/parse.js"],"sourcesContent":["// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport { VALID_DIGITS, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN } from './constants.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport isViablePhoneNumber, { isViablePhoneNumberStart } from './helpers/isViablePhoneNumber.js';\nimport extractExtension from './helpers/extension/extractExtension.js';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber.js';\nimport getCountryCallingCode from './getCountryCallingCode.js';\nimport { isPossibleNumber } from './isPossible.js';\n// import { parseRFC3966 } from './helpers/RFC3966.js'\nimport PhoneNumber from './PhoneNumber.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractNationalNumber from './helpers/extractNationalNumber.js';\n// import stripIddPrefix from './helpers/stripIddPrefix.js'\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js';\n\n// We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\nvar MAX_INPUT_STRING_LENGTH = 250;\n\n// This consists of the plus symbol, digits, and arabic-indic digits.\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');\n\n// Regular expression of trailing characters that we want to remove.\n// A trailing `#` is sometimes used when writing phone numbers with extensions in US.\n// Example: \"+1 (645) 123 1234-910#\" number has extension \"910\".\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\n// Examples:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\n\n/**\r\n * Parses a phone number.\r\n *\r\n * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)\r\n * parse('123456789', { defaultCountry: 'RU' }, metadata)\r\n * parse('123456789', undefined, metadata)\r\n *\r\n * @param {string} input\r\n * @param {object} [options]\r\n * @param {object} metadataJson\r\n * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).\r\n */\nexport default function parse(text, options, metadataJson) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n var metadata = new Metadata(metadataJson);\n\n // Validate `defaultCountry`.\n if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n throw new Error(\"Unknown country: \".concat(options.defaultCountry));\n }\n\n // Parse the phone number.\n var _parseInput = parseInput(text, options.v2, options.extract),\n formattedPhoneNumber = _parseInput.number,\n ext = _parseInput.ext,\n error = _parseInput.error;\n\n // If the phone number is not viable then return nothing.\n if (!formattedPhoneNumber) {\n if (options.v2) {\n if (error === 'TOO_SHORT') {\n throw new ParseError('TOO_SHORT');\n }\n throw new ParseError('NOT_A_NUMBER');\n }\n return {};\n }\n var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode,\n // If `country` is returned, its numbering plan will also be selected in `metadata`.\n // Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`.\n // Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`.\n metadata),\n country = _parsePhoneNumber.country,\n nationalNumber = _parsePhoneNumber.nationalNumber,\n countryCallingCode = _parsePhoneNumber.countryCallingCode,\n countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,\n carrierCode = _parsePhoneNumber.carrierCode;\n if (!metadata.hasSelectedNumberingPlan()) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n return {};\n }\n\n // Validate national (significant) number length.\n if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n // Won't throw here because the regexp already demands length > 1.\n /* istanbul ignore if */\n if (options.v2) {\n throw new ParseError('TOO_SHORT');\n }\n // Google's demo just throws an error in this case.\n return {};\n }\n\n // Validate national (significant) number length.\n //\n // A sidenote:\n //\n // They say that sometimes national (significant) numbers\n // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n // Such numbers will just be discarded.\n //\n if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n if (options.v2) {\n throw new ParseError('TOO_LONG');\n }\n // Google's demo just throws an error in this case.\n return {};\n }\n if (options.v2) {\n var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n if (country) {\n phoneNumber.country = country;\n }\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n if (ext) {\n phoneNumber.ext = ext;\n }\n phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;\n return phoneNumber;\n }\n\n // Check if national phone number pattern matches the number.\n // National number pattern is different for each country,\n // even for those ones which are part of the \"NANPA\" group.\n var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;\n if (!options.extended) {\n return valid ? result(country, nationalNumber, ext) : {};\n }\n\n // isInternational: countryCallingCode !== undefined\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n carrierCode: carrierCode,\n valid: valid,\n possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,\n phone: nationalNumber,\n ext: ext\n };\n}\n\n/**\r\n * Extracts a formatted phone number from text.\r\n * Doesn't guarantee that the extracted phone number\r\n * is a valid phone number (for example, doesn't validate its length).\r\n * @param {string} text\r\n * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.\r\n * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.\r\n * @return {string}\r\n * @example\r\n * // Returns \"(213) 373-4253\".\r\n * extractFormattedPhoneNumber(\"Call (213) 373-4253 for assistance.\")\r\n */\nfunction _extractFormattedPhoneNumber(text, extract, throwOnError) {\n if (!text) {\n return;\n }\n if (text.length > MAX_INPUT_STRING_LENGTH) {\n if (throwOnError) {\n throw new ParseError('TOO_LONG');\n }\n return;\n }\n if (extract === false) {\n return text;\n }\n // Attempt to extract a possible number from the string passed in\n var startsAt = text.search(PHONE_NUMBER_START_PATTERN);\n if (startsAt < 0) {\n return;\n }\n return text\n // Trim everything to the left of the phone number\n .slice(startsAt)\n // Remove trailing non-numerical characters\n .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n\n/**\r\n * @param {string} text - Input.\r\n * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.\r\n * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\nfunction parseInput(text, v2, extract) {\n // // Parse RFC 3966 phone number URI.\n // if (text && text.indexOf('tel:') === 0) {\n // \treturn parseRFC3966(text)\n // }\n // let number = extractFormattedPhoneNumber(text, extract, v2)\n var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {\n extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {\n return _extractFormattedPhoneNumber(text, extract, v2);\n }\n });\n // If the phone number is not viable, then abort.\n if (!number) {\n return {};\n }\n if (!isViablePhoneNumber(number)) {\n if (isViablePhoneNumberStart(number)) {\n return {\n error: 'TOO_SHORT'\n };\n }\n return {};\n }\n // Attempt to parse extension first, since it doesn't require region-specific\n // data and we want to have the non-normalised number here.\n var withExtensionStripped = extractExtension(number);\n if (withExtensionStripped.ext) {\n return withExtensionStripped;\n }\n return {\n number: number\n };\n}\n\n/**\r\n * Creates `parse()` result object.\r\n */\nfunction result(country, nationalNumber, ext) {\n var result = {\n country: country,\n phone: nationalNumber\n };\n if (ext) {\n result.ext = ext;\n }\n return result;\n}\n\n/**\r\n * Parses a viable phone number.\r\n * @param {string} formattedPhoneNumber — Example: \"(213) 373-4253\".\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {Metadata} metadata — Metadata instance with no pre-selected numbering plan. If `country` is returned, its numbering plan will also be selected in `metadata`. Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`. Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`.\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Attempt to extract a calling code from a phone number.\n // * If the phone number is found to be \"international\":\n // * It will attempt to identify the calling code part of it and whether that part is complete and valid.\n // * If the calling code part is complete and valid, it will return two properties:\n // that calling code part (without `+`) and the rest of the digits.\n // * Otherwise, i.e. if the calling code part is incomplete or invalid,\n // it will return an empty object.\n // * Otherwise, i.e. if the phone number is national, there's no callind code to extract\n // so it will just return the originally-passed `number` string as the only property.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined,\n // `defaultCountry` and `defaultCallingCode` are only used to detect\n // if it's an \"international\" phone number or not. They won't be used\n // to derive the resulting `countryCallingCode` from them, or anything like that.\n defaultCountry, defaultCallingCode, metadata.metadata),\n countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number;\n\n // The exact country of the phone number\n var country;\n\n // If `formattedPhoneNumber` is passed in \"international\" format,\n // choose a country by `countryCallingCode`.\n if (countryCallingCode) {\n metadata.selectNumberingPlan(countryCallingCode);\n }\n // Else, if `formattedPhoneNumber` is passed in \"national\" format,\n // then `number` is defined and `countryCallingCode` is `undefined`.\n else if (number && (defaultCountry || defaultCallingCode)) {\n if (defaultCountry) {\n country = defaultCountry;\n metadata.selectNumberingPlan(defaultCountry);\n countryCallingCode = metadata.numberingPlan.callingCode();\n } else {\n metadata.selectNumberingPlan(defaultCallingCode);\n countryCallingCode = defaultCallingCode;\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(countryCallingCode)) {\n country = '001';\n }\n }\n }\n } else return {};\n\n // At this point, `country` could be `undefined` but `countryCallingCode` is always defined.\n //\n // Also, if `country` is defined, its numbering plan is selected in `metadata`.\n // Otherwise, the numering plan for the `countryCallingCode` is selected in `metadata`.\n\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), undefined, metadata),\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode;\n\n // Sometimes there are several countries\n // corresponding to the same country phone code\n // (e.g. NANPA countries all having `1` country phone code).\n // Therefore, to reliably determine the exact country,\n // national (significant) number should have been parsed first.\n //\n // When `metadata.json` is generated, all \"ambiguous\" country phone codes\n // get their countries populated with the full set of\n // \"phone number type\" regular expressions.\n //\n var exactCountry = getCountryByCallingCode(countryCallingCode, {\n nationalNumber: nationalNumber,\n metadata: metadata\n });\n if (exactCountry) {\n country = exactCountry;\n /* istanbul ignore if */\n if (exactCountry === '001') {\n // Can't happen with `USE_NON_GEOGRAPHIC_COUNTRY_CODE` being `false`.\n // If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` is set to `true` for some reason,\n // then remove the \"istanbul ignore if\".\n } else {\n metadata.selectNumberingPlan(country);\n }\n }\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n countryCallingCodeSource: countryCallingCodeSource,\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n}\n//# sourceMappingURL=parse.js.map"],"names":["MAX_INPUT_STRING_LENGTH","PHONE_NUMBER_START_PATTERN","PLUS_CHARS","VALID_DIGITS","AFTER_PHONE_NUMBER_END_PATTERN","parse","text","options","metadataJson","metadata","Metadata","ParseError","_parseInput","parseInput","formattedPhoneNumber","ext","error","_parsePhoneNumber","parsePhoneNumber","country","nationalNumber","countryCallingCode","countryCallingCodeSource","carrierCode","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","phoneNumber","PhoneNumber","valid","matchesEntirely","isPossibleNumber","result","_extractFormattedPhoneNumber","extract","throwOnError","startsAt","v2","number","extractFormattedPhoneNumberFromPossibleRfc3966NumberUri","isViablePhoneNumber","isViablePhoneNumberStart","withExtensionStripped","extractExtension","defaultCountry","defaultCallingCode","_extractCountryCallin","extractCountryCallingCode","parseIncompletePhoneNumber","_extractNationalNumbe","extractNationalNumber","exactCountry","getCountryByCallingCode"],"mappings":";;;;;;;;;;;;;AAwBA,IAAIA,IAA0B,KAG1BC,IAA6B,IAAI,OAAO,MAAMC,IAAaC,IAAe,GAAG,GAK7EC,IAAiC,IAAI,OAAO,OAAOD,IAAe,MAAW;AA2BlE,SAASE,EAAMC,GAAMC,GAASC,GAAc;AAGzD,EAAAD,IAAUA,KAAW,CAAA;AACrB,MAAIE,IAAW,IAAIC,EAASF,CAAY;AAGxC,MAAID,EAAQ,kBAAkB,CAACE,EAAS,WAAWF,EAAQ,cAAc;AACvE,UAAIA,EAAQ,KACJ,IAAII,EAAW,iBAAiB,IAElC,IAAI,MAAM,oBAAoB,OAAOJ,EAAQ,cAAc,CAAC;AAIpE,MAAIK,IAAcC,EAAWP,GAAMC,EAAQ,IAAIA,EAAQ,OAAO,GAC5DO,IAAuBF,EAAY,QACnCG,IAAMH,EAAY,KAClBI,IAAQJ,EAAY;AAGtB,MAAI,CAACE,GAAsB;AACzB,QAAIP,EAAQ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EAAQ,GACrDa,IAA2BuB,EAAsB,0BACjDxB,IAAqBwB,EAAsB,oBAC3CR,IAASQ,EAAsB,QAG7B1B;AAIJ,MAAIE;AACF,IAAAZ,EAAS,oBAAoBY,CAAkB;AAAA,WAIxCgB,MAAWM,KAAkBC;AACpC,IAAID,KACFxB,IAAUwB,GACVlC,EAAS,oBAAoBkC,CAAc,GAC3CtB,IAAqBZ,EAAS,cAAc,YAAW,MAEvDA,EAAS,oBAAoBmC,CAAkB,GAC/CvB,IAAqBuB;AAAA,MAQlB,QAAO,CAAA;AAOd,MAAI,CAACP;AACH,WAAO;AAAA,MACL,0BAA0Bf;AAAA,MAC1B,oBAAoBD;AAAA,IAC1B;AAEE,MAAI2B,IAAwBC,EAAsBF,EAA2BV,CAAM,GAAG,QAAW5B,CAAQ,GACvGW,IAAiB4B,EAAsB,gBACvCzB,IAAcyB,EAAsB,aAYlCE,IAAeC,EAAwB9B,GAAoB;AAAA,IAC7D,gBAAgBD;AAAA,IAChB,UAAUX;AAAA,EACd,CAAG;AACD,SAAIyC,MACF/B,IAAU+B,GAENA,MAAiB,SAKnBzC,EAAS,oBAAoBU,CAAO,IAGjC;AAAA,IACL,SAASA;AAAA,IACT,oBAAoBE;AAAA,IACpB,0BAA0BC;AAAA,IAC1B,gBAAgBF;AAAA,IAChB,aAAaG;AAAA,EACjB;AACA;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index271.js","sources":["../../../node_modules/@base-ui/react/internals/form-context/FormContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../noop.mjs\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n formRef: {\n current: {\n fields: new Map()\n }\n },\n errors: {},\n clearErrors: NOOP,\n validationMode: 'onSubmit',\n submitAttemptedRef: {\n current: false\n }\n});\nif (process.env.NODE_ENV !== \"production\") FormContext.displayName = \"FormContext\";\nexport function useFormContext() {\n return React.useContext(FormContext);\n}"],"names":["FormContext","React","NOOP","useFormContext"],"mappings":";;AAIY,MAACA,IAA2B,gBAAAC,EAAM,cAAc;AAAA,EAC1D,SAAS;AAAA,IACP,SAAS;AAAA,MACP,QAAQ,oBAAI,IAAG;AAAA,IACrB;AAAA,EACA;AAAA,EACE,QAAQ,CAAA;AAAA,EACR,aAAaC;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,IAClB,SAAS;AAAA,EACb;AACA,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcF,EAAY,cAAc;AAC9D,SAASG,IAAiB;AAC/B,SAAOF,EAAM,WAAWD,CAAW;AACrC;","x_google_ignoreList":[0]}
|
package/dist/index272.js
CHANGED
|
@@ -1,21 +1,74 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"^" + n + "$|^" + R + "$",
|
|
7
|
-
"i"
|
|
8
|
-
);
|
|
9
|
-
function A(N) {
|
|
10
|
-
return N.length >= e && T.test(N);
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { serializeValue as a } from "./index366.js";
|
|
3
|
+
import { j as i } from "./index30.js";
|
|
4
|
+
function s(r) {
|
|
5
|
+
return r != null && r.length > 0 && typeof r[0] == "object" && r[0] != null && "items" in r[0];
|
|
11
6
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
7
|
+
function A(r) {
|
|
8
|
+
if (!Array.isArray(r))
|
|
9
|
+
return r != null && "null" in r;
|
|
10
|
+
const n = r;
|
|
11
|
+
if (s(n)) {
|
|
12
|
+
for (const l of n)
|
|
13
|
+
for (const u of l.items)
|
|
14
|
+
if (u && u.value == null && u.label != null)
|
|
15
|
+
return !0;
|
|
16
|
+
return !1;
|
|
17
|
+
}
|
|
18
|
+
for (const l of n)
|
|
19
|
+
if (l && l.value == null && l.label != null)
|
|
20
|
+
return !0;
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function b(r, n) {
|
|
24
|
+
if (n && r != null)
|
|
25
|
+
return n(r) ?? "";
|
|
26
|
+
if (r && typeof r == "object") {
|
|
27
|
+
if ("label" in r && r.label != null)
|
|
28
|
+
return String(r.label);
|
|
29
|
+
if ("value" in r)
|
|
30
|
+
return String(r.value);
|
|
31
|
+
}
|
|
32
|
+
return a(r);
|
|
33
|
+
}
|
|
34
|
+
function h(r, n) {
|
|
35
|
+
return n && r != null ? n(r) ?? "" : r && typeof r == "object" && "value" in r && "label" in r ? a(r.value) : a(r);
|
|
36
|
+
}
|
|
37
|
+
function p(r, n, l) {
|
|
38
|
+
function u() {
|
|
39
|
+
return b(r, l);
|
|
40
|
+
}
|
|
41
|
+
if (l && r != null)
|
|
42
|
+
return l(r);
|
|
43
|
+
if (r && typeof r == "object" && "label" in r && r.label != null)
|
|
44
|
+
return r.label;
|
|
45
|
+
if (n && !Array.isArray(n))
|
|
46
|
+
return n[r] ?? u();
|
|
47
|
+
if (Array.isArray(n)) {
|
|
48
|
+
const e = n, t = s(e) ? e.flatMap((f) => f.items) : e;
|
|
49
|
+
if (r == null || typeof r != "object") {
|
|
50
|
+
const f = t.find((o) => o.value === r);
|
|
51
|
+
return f && f.label != null ? f.label : u();
|
|
52
|
+
}
|
|
53
|
+
if ("value" in r) {
|
|
54
|
+
const f = t.find((o) => o && o.value === r.value);
|
|
55
|
+
if (f && f.label != null)
|
|
56
|
+
return f.label;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return u();
|
|
60
|
+
}
|
|
61
|
+
function d(r, n, l) {
|
|
62
|
+
return r.reduce((u, e, t) => (t > 0 && u.push(", "), u.push(/* @__PURE__ */ i.jsx(c.Fragment, {
|
|
63
|
+
children: p(e, n, l)
|
|
64
|
+
}, t)), u), []);
|
|
14
65
|
}
|
|
15
66
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
67
|
+
A as hasNullItemLabel,
|
|
68
|
+
s as isGroupedItems,
|
|
69
|
+
d as resolveMultipleLabels,
|
|
70
|
+
p as resolveSelectedLabel,
|
|
71
|
+
b as stringifyAsLabel,
|
|
72
|
+
h as stringifyAsValue
|
|
20
73
|
};
|
|
21
74
|
//# sourceMappingURL=index272.js.map
|
package/dist/index272.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index272.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index272.js","sources":["../../../node_modules/@base-ui/react/internals/resolveValueLabel.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { serializeValue } from \"./serializeValue.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function isGroupedItems(items) {\n return items != null && items.length > 0 && typeof items[0] === 'object' && items[0] != null && 'items' in items[0];\n}\n\n/**\n * Checks if the items array contains an item with a null value that has a non-null label.\n */\nexport function hasNullItemLabel(items) {\n if (!Array.isArray(items)) {\n return items != null && 'null' in items;\n }\n const arrayItems = items;\n if (isGroupedItems(arrayItems)) {\n for (const group of arrayItems) {\n for (const item of group.items) {\n if (item && item.value == null && item.label != null) {\n return true;\n }\n }\n }\n return false;\n }\n for (const item of arrayItems) {\n if (item && item.value == null && item.label != null) {\n return true;\n }\n }\n return false;\n}\nexport function stringifyAsLabel(item, itemToStringLabel) {\n if (itemToStringLabel && item != null) {\n return itemToStringLabel(item) ?? '';\n }\n if (item && typeof item === 'object') {\n if ('label' in item && item.label != null) {\n return String(item.label);\n }\n if ('value' in item) {\n return String(item.value);\n }\n }\n return serializeValue(item);\n}\nexport function stringifyAsValue(item, itemToStringValue) {\n if (itemToStringValue && item != null) {\n return itemToStringValue(item) ?? '';\n }\n if (item && typeof item === 'object' && 'value' in item && 'label' in item) {\n return serializeValue(item.value);\n }\n return serializeValue(item);\n}\nexport function resolveSelectedLabel(value, items, itemToStringLabel) {\n function fallback() {\n return stringifyAsLabel(value, itemToStringLabel);\n }\n if (itemToStringLabel && value != null) {\n return itemToStringLabel(value);\n }\n\n // Custom object with explicit label takes precedence\n if (value && typeof value === 'object' && 'label' in value && value.label != null) {\n return value.label;\n }\n\n // Items provided as plain record map\n if (items && !Array.isArray(items)) {\n return items[value] ?? fallback();\n }\n\n // Items provided as array (flat or grouped)\n if (Array.isArray(items)) {\n const arrayItems = items;\n const flatItems = isGroupedItems(arrayItems) ? arrayItems.flatMap(group => group.items) : arrayItems;\n if (value == null || typeof value !== 'object') {\n const match = flatItems.find(item => item.value === value);\n if (match && match.label != null) {\n return match.label;\n }\n return fallback();\n }\n\n // Object without explicit label: try matching by its `value` property\n if ('value' in value) {\n const match = flatItems.find(item => item && item.value === value.value);\n if (match && match.label != null) {\n return match.label;\n }\n }\n }\n return fallback();\n}\nexport function resolveMultipleLabels(values, items, itemToStringLabel) {\n return values.reduce((acc, value, index) => {\n if (index > 0) {\n acc.push(', ');\n }\n acc.push(/*#__PURE__*/_jsx(React.Fragment, {\n children: resolveSelectedLabel(value, items, itemToStringLabel)\n }, index));\n return acc;\n }, []);\n}"],"names":["isGroupedItems","items","hasNullItemLabel","arrayItems","group","item","stringifyAsLabel","itemToStringLabel","serializeValue","stringifyAsValue","itemToStringValue","resolveSelectedLabel","value","fallback","flatItems","match","resolveMultipleLabels","values","acc","index","_jsx","React"],"mappings":";;;AAKO,SAASA,EAAeC,GAAO;AACpC,SAAOA,KAAS,QAAQA,EAAM,SAAS,KAAK,OAAOA,EAAM,CAAC,KAAM,YAAYA,EAAM,CAAC,KAAK,QAAQ,WAAWA,EAAM,CAAC;AACpH;AAKO,SAASC,EAAiBD,GAAO;AACtC,MAAI,CAAC,MAAM,QAAQA,CAAK;AACtB,WAAOA,KAAS,QAAQ,UAAUA;AAEpC,QAAME,IAAaF;AACnB,MAAID,EAAeG,CAAU,GAAG;AAC9B,eAAWC,KAASD;AAClB,iBAAWE,KAAQD,EAAM;AACvB,YAAIC,KAAQA,EAAK,SAAS,QAAQA,EAAK,SAAS;AAC9C,iBAAO;AAIb,WAAO;AAAA,EACT;AACA,aAAWA,KAAQF;AACjB,QAAIE,KAAQA,EAAK,SAAS,Q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O;AACpB,YAAMG,IAAQD,EAAU,KAAK,CAAAT,MAAQA,KAAQA,EAAK,UAAUO,EAAM,KAAK;AACvE,UAAIG,KAASA,EAAM,SAAS;AAC1B,eAAOA,EAAM;AAAA,IAEjB;AAAA,EACF;AACA,SAAOF,EAAQ;AACjB;AACO,SAASG,EAAsBC,GAAQhB,GAAOM,GAAmB;AACtE,SAAOU,EAAO,OAAO,CAACC,GAAKN,GAAOO,OAC5BA,IAAQ,KACVD,EAAI,KAAK,IAAI,GAEfA,EAAI,KAAkBE,gBAAAA,MAAKC,EAAM,UAAU;AAAA,IACzC,UAAUV,EAAqBC,GAAOX,GAAOM,CAAiB;AAAA,EACpE,GAAOY,CAAK,CAAC,GACFD,IACN,CAAA,CAAE;AACP;","x_google_ignoreList":[0]}
|
package/dist/index273.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t++;
|
|
14
|
-
}
|
|
1
|
+
const i = (n, r) => Object.is(n, r);
|
|
2
|
+
function u(n, r, t) {
|
|
3
|
+
return n == null || r == null ? Object.is(n, r) : t(n, r);
|
|
4
|
+
}
|
|
5
|
+
function e(n, r, t) {
|
|
6
|
+
return !n || n.length === 0 ? !1 : n.some((f) => f === void 0 ? !1 : u(r, f, t));
|
|
7
|
+
}
|
|
8
|
+
function o(n, r, t) {
|
|
9
|
+
return !n || n.length === 0 ? -1 : n.findIndex((f) => f === void 0 ? !1 : u(f, r, t));
|
|
10
|
+
}
|
|
11
|
+
function I(n, r, t) {
|
|
12
|
+
return n.filter((f) => !u(r, f, t));
|
|
15
13
|
}
|
|
16
14
|
export {
|
|
17
|
-
|
|
15
|
+
u as compareItemEquality,
|
|
16
|
+
i as defaultItemEquality,
|
|
17
|
+
o as findItemIndex,
|
|
18
|
+
I as removeItem,
|
|
19
|
+
e as selectedValueIncludes
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=index273.js.map
|
package/dist/index273.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index273.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index273.js","sources":["../../../node_modules/@base-ui/react/internals/itemEquality.mjs"],"sourcesContent":["export const defaultItemEquality = (itemValue, selectedValue) => Object.is(itemValue, selectedValue);\nexport function compareItemEquality(itemValue, selectedValue, comparer) {\n if (itemValue == null || selectedValue == null) {\n return Object.is(itemValue, selectedValue);\n }\n return comparer(itemValue, selectedValue);\n}\nexport function selectedValueIncludes(selectedValues, itemValue, comparer) {\n if (!selectedValues || selectedValues.length === 0) {\n return false;\n }\n return selectedValues.some(selectedValue => {\n if (selectedValue === undefined) {\n return false;\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n });\n}\nexport function findItemIndex(itemValues, selectedValue, comparer) {\n if (!itemValues || itemValues.length === 0) {\n return -1;\n }\n return itemValues.findIndex(itemValue => {\n if (itemValue === undefined) {\n return false;\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n });\n}\nexport function removeItem(selectedValues, itemValue, comparer) {\n return selectedValues.filter(selectedValue => !compareItemEquality(itemValue, selectedValue, comparer));\n}"],"names":["defaultItemEquality","itemValue","selectedValue","compareItemEquality","comparer","selectedValueIncludes","selectedValues","findItemIndex","itemValues","removeItem"],"mappings":"AAAY,MAACA,IAAsB,CAACC,GAAWC,MAAkB,OAAO,GAAGD,GAAWC,CAAa;AAC5F,SAASC,EAAoBF,GAAWC,GAAeE,GAAU;AACtE,SAAIH,KAAa,QAAQC,KAAiB,OACjC,OAAO,GAAGD,GAAWC,CAAa,IAEpCE,EAASH,GAAWC,CAAa;AAC1C;AACO,SAASG,EAAsBC,GAAgBL,GAAWG,GAAU;AACzE,SAAI,CAACE,KAAkBA,EAAe,WAAW,IACxC,KAEFA,EAAe,KAAK,CAAAJ,MACrBA,MAAkB,SACb,KAEFC,EAAoBF,GAAWC,GAAeE,CAAQ,CAC9D;AACH;AACO,SAASG,EAAcC,GAAYN,GAAeE,GAAU;AACjE,SAAI,CAACI,KAAcA,EAAW,WAAW,IAChC,KAEFA,EAAW,UAAU,CAAAP,MACtBA,MAAc,SACT,KAEFE,EAAoBF,GAAWC,GAAeE,CAAQ,CAC9D;AACH;AACO,SAASK,EAAWH,GAAgBL,GAAWG,GAAU;AAC9D,SAAOE,EAAe,OAAO,CAAAJ,MAAiB,CAACC,EAAoBF,GAAWC,GAAeE,CAAQ,CAAC;AACxG;","x_google_ignoreList":[0]}
|
package/dist/index274.js
CHANGED
|
@@ -1,40 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import u from "./index165.js";
|
|
4
|
-
import N from "./index168.js";
|
|
5
|
-
function g(e, n, r) {
|
|
6
|
-
var i = l(e, r), a = i.carrierCode, t = i.nationalNumber;
|
|
7
|
-
if (t !== e) {
|
|
8
|
-
if (!m(e, t, r))
|
|
9
|
-
return {
|
|
10
|
-
nationalNumber: e
|
|
11
|
-
};
|
|
12
|
-
if (r.numberingPlan.possibleLengths() && (n || (n = N(r.numberingPlan.callingCode(), {
|
|
13
|
-
nationalNumber: t,
|
|
14
|
-
metadata: r
|
|
15
|
-
})), !f(t, n, r)))
|
|
16
|
-
return {
|
|
17
|
-
nationalNumber: e
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
nationalNumber: t,
|
|
22
|
-
carrierCode: a
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function m(e, n, r) {
|
|
26
|
-
return !(o(e, r.nationalNumberPattern()) && !o(n, r.nationalNumberPattern()));
|
|
27
|
-
}
|
|
28
|
-
function f(e, n, r) {
|
|
29
|
-
switch (u(e, n, r)) {
|
|
30
|
-
case "TOO_SHORT":
|
|
31
|
-
case "INVALID_LENGTH":
|
|
32
|
-
return !1;
|
|
33
|
-
default:
|
|
34
|
-
return !0;
|
|
35
|
-
}
|
|
1
|
+
function u(t, l, r = (e, n) => e === n) {
|
|
2
|
+
return t.length === l.length && t.every((e, n) => r(e, l[n]));
|
|
36
3
|
}
|
|
37
4
|
export {
|
|
38
|
-
|
|
5
|
+
u as areArraysEqual
|
|
39
6
|
};
|
|
40
7
|
//# sourceMappingURL=index274.js.map
|