@rpcbase/ui 0.230.0 → 0.232.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/I18nField/index.d.ts.map +1 -1
- package/dist/components/PhoneNumberInput/index.d.ts.map +1 -1
- package/dist/index11.js +291 -278
- package/dist/index11.js.map +1 -1
- package/dist/index127.js +36 -36
- package/dist/index139.js +6 -6
- package/dist/index142.js +10 -10
- package/dist/index144.js +2 -2
- package/dist/index145.js +3 -3
- package/dist/index146.js +1 -1
- package/dist/index148.js +2 -2
- package/dist/index150.js +2 -2
- package/dist/index171.js +11 -13
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +62 -148
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +37 -30
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +14 -10
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +23 -48
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +109 -10
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +13 -45
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +4 -95
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +4 -87
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +247 -240
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +5 -106
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +11 -52
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +19 -11
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +13 -38
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +261 -8
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +4 -116
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +28 -18
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +126 -15
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +5 -3
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +76 -34
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +65 -19
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +8 -9
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +15 -8
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +91 -18
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +63 -26
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +44 -15
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +13 -58
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +154 -8
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +28 -64
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +9 -19
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +46 -14
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +11 -5
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +43 -4
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +95 -6
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +86 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +105 -6
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +52 -16
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +11 -4
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +37 -4
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +8 -12
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +116 -9
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +17 -13
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +15 -13
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +3 -4
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +36 -5
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +20 -6
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +9 -5
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +8 -54
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +19 -8
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +28 -4
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +16 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +58 -8
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +8 -4
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +66 -4
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +19 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +16 -10
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +5 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -9
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +6 -10
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +4 -10
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +6 -9
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +16 -6
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +4 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +4 -4
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +12 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +9 -6
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +13 -5
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +13 -16
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +4 -7
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +5 -10
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +6 -10
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +5 -21
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +54 -10
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +8 -9
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +4 -9
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +4 -4
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +8 -5
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +4 -16
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +4 -9
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +3 -18
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +10 -15
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +9 -12
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +9 -29
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +10 -12
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +10 -25
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +9 -5
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +7 -20
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -66
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +4 -6
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +5 -5
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +6 -11
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +5 -50
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +17 -4
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +7 -29
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +10 -16
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +10 -5
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +21 -21
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +10 -51
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +9 -25
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +9 -41
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +4 -39
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +6 -45
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +16 -23
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +9 -19
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +18 -20
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +15 -70
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -17
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +29 -11
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +12 -27
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +25 -13
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +5 -18
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +20 -37
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +64 -63
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +6 -262
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +10 -277
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +49 -67
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +4 -46
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +27 -97
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +15 -82
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +6 -13
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +21 -3
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +50 -28
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +25 -16
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +42 -38
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +39 -34
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +45 -69
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +20 -16
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +70 -3
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +15 -108
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +11 -26
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +26 -27
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +14 -4
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +18 -126
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +36 -4
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +258 -74
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +269 -260
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +68 -11
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +97 -25
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +83 -15
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +3 -10
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +28 -24
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +16 -16
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +34 -125
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +15 -4
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +3 -40
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +24 -63
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +28 -13
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +4 -14
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +78 -7
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +270 -13
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +11 -5
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +10 -3
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +25 -10
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +16 -7
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +109 -117
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +5 -261
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +39 -398
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +65 -52
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +14 -12
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +7 -11
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +5 -4
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +3 -11
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +11 -4
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +8 -5
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +133 -11
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +395 -74
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +51 -65
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +11 -8
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +11 -92
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +7 -19
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +4 -4
- package/dist/index340.js +11 -4
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +8 -17
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +13 -12
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +3 -8
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +3 -11
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +16 -7
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +50 -12
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +5 -3
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +122 -3
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +33 -4
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +5 -5
- package/dist/index350.js +74 -15
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +141 -7
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +61 -51
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +49 -11
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +15 -17
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +8 -5
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +4 -5
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +11 -20
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +21 -44
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +21 -18
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +10 -10
- package/dist/index360.js +5 -5
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +16 -199
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +12 -77
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +4 -123
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +10 -16
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +16 -32
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +5 -73
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +20 -142
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +45 -62
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +17 -49
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +3 -3
- package/dist/index370.js +4 -4
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +200 -11
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +76 -20
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +8 -4
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +26 -5
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +27 -4
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +136 -14
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +12 -8
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +226 -5
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +3 -4
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +4 -4
- package/dist/index380.js +19 -545
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +77 -46
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +12 -18
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +3 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +71 -7
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +9 -7
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +15 -7
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +4 -11
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +4 -8
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +4 -13
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +5 -5
- package/dist/index390.js +16 -3
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +9 -3
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +5 -8
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +5 -26
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +543 -24
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +44 -135
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +16 -11
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +5 -226
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +7 -3
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +6 -19
- package/dist/index399.js.map +1 -1
- package/dist/index40.js +3 -3
- package/dist/index400.js +7 -77
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +12 -12
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +8 -3
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +12 -71
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +3 -9
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +3 -16
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +14 -4
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +490 -54
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +5 -68
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +55 -30
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +10 -10
- package/dist/index410.js +68 -9
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +26 -148
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +9 -108
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +153 -8
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +108 -2
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +7 -43
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +2 -56
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +43 -7
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +56 -2
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +7 -54
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +2 -56
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +54 -14
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +51 -487
- package/dist/index422.js.map +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.js +2 -2
- package/dist/index49.js +34 -34
- 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 +22 -22
- 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/dist/index66.js +1 -1
- package/dist/index67.js +1 -1
- package/dist/index72.js +6 -2
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +8 -2
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +5 -5
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +2 -8
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +2 -6
- package/dist/index76.js.map +1 -1
- package/dist/index80.js +4 -4
- package/dist/index85.js +1 -1
- package/dist/index86.js +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.js +6 -6
- package/dist/index96.js +4 -4
- package/dist/index98.js +1 -1
- package/package.json +1 -1
package/dist/index185.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index185.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} metadata\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, metadata) {\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 metadata = new Metadata(metadata);\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, 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, country, 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\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Extract calling code from phone number.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, 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 metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);\n if (defaultCountry) {\n country = defaultCountry;\n } else {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n country = '001';\n }\n }\n }\n countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);\n } else return {};\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, 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","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","getCountryCallingCode","_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,GAAU;AAOrD,MAJAD,IAAUA,KAAW,CAAA,GACrBC,IAAW,IAAIC,EAASD,CAAQ,GAG5BD,EAAQ,kBAAkB,CAACC,EAAS,WAAWD,EAAQ,cAAc;AACvE,UAAIA,EAAQ,KACJ,IAAIG,EAAW,iBAAiB,IAElC,IAAI,MAAM,oBAAoB,OAAOH,EAAQ,cAAc,CAAC;AAIpE,MAAII,IAAcC,EAAWN,GAAMC,EAAQ,IAAIA,EAAQ,OAAO,GAC5DM,IAAuBF,EAAY,QACnCG,IAAMH,EAAY,KAClBI,IAAQJ,EAAY;AAGtB,MAAI,CAACE,GAAsB;AACzB,QAAIN,EAAQ;AACV,YAAIQ,MAAU,cACN,IAAIL,EAAW,WAAW,IAE5B,IAAIA,EAAW,cAAc;AAErC,WAAO,CAAA;AAAA,EACT;AACA,MAAIM,IAAoBC,EAAiBJ,GA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AC3DD,MACFxB,IAAUwB,IASZtB,IAAqBuB,KAAsBI,EAAsBL,GAAgBlC,EAAS,QAAQ;AAAA,MAC7F,QAAO,CAAA;AACd,MAAI,CAAC4B;AACH,WAAO;AAAA,MACL,0BAA0Bf;AAAA,MAC1B,oBAAoBD;AAAA,IAC1B;AAEE,MAAI4B,IAAwBC,EAAsBH,EAA2BV,CAAM,GAAGlB,GAASV,CAAQ,GACrGW,IAAiB6B,EAAsB,gBACvC1B,IAAc0B,EAAsB,aAYlCE,IAAeC,EAAwB/B,GAAoB;AAAA,IAC7D,gBAAgBD;AAAA,IAChB,UAAUX;AAAA,EACd,CAAG;AACD,SAAI0C,MACFhC,IAAUgC,GAENA,MAAiB,SAKnB1C,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":"index185.js","sources":["../../../node_modules/@base-ui/utils/esm/inertValue.js"],"sourcesContent":["import { isReactVersionAtLeast } from \"./reactVersion.js\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}"],"names":["inertValue","value","isReactVersionAtLeast"],"mappings":";AACO,SAASA,EAAWC,GAAO;AAChC,SAAIC,EAAsB,EAAE,IACnBD,IAGFA,IAAQ,SAAS;AAC1B;","x_google_ignoreList":[0]}
|
package/dist/index186.js
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { j as s } from "./index30.js";
|
|
3
|
+
const a = /* @__PURE__ */ i.forwardRef(function(r, n) {
|
|
4
|
+
const {
|
|
5
|
+
cutout: e,
|
|
6
|
+
...p
|
|
7
|
+
} = r;
|
|
8
|
+
let o;
|
|
9
|
+
if (e) {
|
|
10
|
+
const t = e.getBoundingClientRect();
|
|
11
|
+
o = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${t.left}px ${t.top}px,${t.left}px ${t.bottom}px,${t.right}px ${t.bottom}px,${t.right}px ${t.top}px,${t.left}px ${t.top}px)`;
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ s.jsx("div", {
|
|
14
|
+
ref: n,
|
|
15
|
+
role: "presentation",
|
|
16
|
+
"data-base-ui-inert": "",
|
|
17
|
+
...p,
|
|
18
|
+
style: {
|
|
19
|
+
position: "fixed",
|
|
20
|
+
inset: 0,
|
|
21
|
+
userSelect: "none",
|
|
22
|
+
WebkitUserSelect: "none",
|
|
23
|
+
clipPath: o
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
process.env.NODE_ENV !== "production" && (a.displayName = "InternalBackdrop");
|
|
15
28
|
export {
|
|
16
|
-
|
|
17
|
-
R as VALID_PHONE_NUMBER_WITH_EXTENSION,
|
|
18
|
-
A as default,
|
|
19
|
-
o as isViablePhoneNumberStart
|
|
29
|
+
a as InternalBackdrop
|
|
20
30
|
};
|
|
21
31
|
//# sourceMappingURL=index186.js.map
|
package/dist/index186.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index186.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index186.js","sources":["../../../node_modules/@base-ui/react/esm/utils/InternalBackdrop.js"],"sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const InternalBackdrop = /*#__PURE__*/React.forwardRef(function InternalBackdrop(props, ref) {\n const {\n cutout,\n ...otherProps\n } = props;\n let clipPath;\n if (cutout) {\n const rect = cutout.getBoundingClientRect();\n clipPath = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${rect.left}px ${rect.top}px,${rect.left}px ${rect.bottom}px,${rect.right}px ${rect.bottom}px,${rect.right}px ${rect.top}px,${rect.left}px ${rect.top}px)`;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"presentation\"\n // Ensures Floating UI's outside press detection runs, as it considers\n // it an element that existed when the popup rendered.\n ,\n \"data-base-ui-inert\": \"\",\n ...otherProps,\n style: {\n position: 'fixed',\n inset: 0,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n clipPath\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") InternalBackdrop.displayName = \"InternalBackdrop\";"],"names":["InternalBackdrop","React","props","ref","cutout","otherProps","clipPath","rect","_jsx"],"mappings":";;AAMY,MAACA,IAAgC,gBAAAC,EAAM,WAAW,SAA0BC,GAAOC,GAAK;AAClG,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMH;AACJ,MAAII;AACJ,MAAIF,GAAQ;AACV,UAAMG,IAAOH,EAAO,sBAAqB;AACzC,IAAAE,IAAW,iDAAiDC,EAAK,IAAI,MAAMA,EAAK,GAAG,MAAMA,EAAK,IAAI,MAAMA,EAAK,MAAM,MAAMA,EAAK,KAAK,MAAMA,EAAK,MAAM,MAAMA,EAAK,KAAK,MAAMA,EAAK,GAAG,MAAMA,EAAK,IAAI,MAAMA,EAAK,GAAG;AAAA,EACjN;AACA,SAAoBC,gBAAAA,EAAAA,IAAK,OAAO;AAAA,IAC9B,KAAKL;AAAA,IACL,MAAM;AAAA,IAIN,sBAAsB;AAAA,IACtB,GAAGE;AAAA,IACH,OAAO;AAAA,MACL,UAAU;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB,UAAAC;AAAA,IACN;AAAA,EACA,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcN,EAAiB,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index187.js
CHANGED
|
@@ -1,19 +1,130 @@
|
|
|
1
|
-
import o from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import * as I from "react-dom";
|
|
3
|
+
import { isNode as V } from "./index334.js";
|
|
4
|
+
import { addEventListener as O } from "./index325.js";
|
|
5
|
+
import { mergeCleanups as w } from "./index373.js";
|
|
6
|
+
import { useId as G } from "./index345.js";
|
|
7
|
+
import { useIsoLayoutEffect as _ } from "./index286.js";
|
|
8
|
+
import { useStableCallback as L } from "./index287.js";
|
|
9
|
+
import { EMPTY_OBJECT as k } from "./index289.js";
|
|
10
|
+
import { FocusGuard as S } from "./index374.js";
|
|
11
|
+
import { enableFocusInside as T, isOutsideEvent as C, getPreviousTabbable as q, getNextTabbable as A, disableFocusInside as B } from "./index376.js";
|
|
12
|
+
import { createChangeEventDetails as H } from "./index175.js";
|
|
13
|
+
import { createAttribute as J } from "./index379.js";
|
|
14
|
+
import { useRenderElement as Y } from "./index172.js";
|
|
15
|
+
import { ownerVisuallyHidden as z } from "./index192.js";
|
|
16
|
+
import { j as i } from "./index30.js";
|
|
17
|
+
import { focusOut as K } from "./index177.js";
|
|
18
|
+
const g = /* @__PURE__ */ o.createContext(null);
|
|
19
|
+
process.env.NODE_ENV !== "production" && (g.displayName = "PortalContext");
|
|
20
|
+
const Q = () => o.useContext(g), U = J("portal");
|
|
21
|
+
function W(F = {}) {
|
|
22
|
+
const {
|
|
23
|
+
ref: d,
|
|
24
|
+
container: n,
|
|
25
|
+
componentProps: R = k,
|
|
26
|
+
elementProps: x
|
|
27
|
+
} = F, m = G(), a = Q()?.portalNode, [E, c] = o.useState(null), [e, u] = o.useState(null), p = L((t) => {
|
|
28
|
+
t !== null && u(t);
|
|
29
|
+
}), r = o.useRef(null);
|
|
30
|
+
_(() => {
|
|
31
|
+
if (n === null) {
|
|
32
|
+
r.current && (r.current = null, u(null), c(null));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (m == null)
|
|
36
|
+
return;
|
|
37
|
+
const t = (n && (V(n) ? n : n.current)) ?? a ?? document.body;
|
|
38
|
+
if (t == null) {
|
|
39
|
+
r.current && (r.current = null, u(null), c(null));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
r.current !== t && (r.current = t, u(null), c(t));
|
|
43
|
+
}, [n, a, m]);
|
|
44
|
+
const f = Y("div", R, {
|
|
45
|
+
ref: [d, p],
|
|
46
|
+
props: [{
|
|
47
|
+
id: m,
|
|
48
|
+
[U]: ""
|
|
49
|
+
}, x]
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
portalNode: e,
|
|
53
|
+
portalSubtree: E && f ? /* @__PURE__ */ I.createPortal(f, E) : null
|
|
54
|
+
};
|
|
15
55
|
}
|
|
56
|
+
const X = /* @__PURE__ */ o.forwardRef(function(d, n) {
|
|
57
|
+
const {
|
|
58
|
+
children: R,
|
|
59
|
+
container: x,
|
|
60
|
+
className: m,
|
|
61
|
+
render: j,
|
|
62
|
+
renderGuards: a,
|
|
63
|
+
style: E,
|
|
64
|
+
...c
|
|
65
|
+
} = d, {
|
|
66
|
+
portalNode: e,
|
|
67
|
+
portalSubtree: u
|
|
68
|
+
} = W({
|
|
69
|
+
container: x,
|
|
70
|
+
ref: n,
|
|
71
|
+
componentProps: d,
|
|
72
|
+
elementProps: c
|
|
73
|
+
}), p = o.useRef(null), r = o.useRef(null), f = o.useRef(null), P = o.useRef(null), [t, h] = o.useState(null), b = o.useRef(!1), v = t?.modal, y = t?.open, N = typeof a == "boolean" ? a : !!t && !t.modal && t.open && !!e;
|
|
74
|
+
o.useEffect(() => {
|
|
75
|
+
if (!e || v)
|
|
76
|
+
return;
|
|
77
|
+
function s(l) {
|
|
78
|
+
e && l.relatedTarget && C(l) && (l.type === "focusin" ? b.current && (T(e), b.current = !1) : (B(e), b.current = !0));
|
|
79
|
+
}
|
|
80
|
+
return w(O(e, "focusin", s, !0), O(e, "focusout", s, !0));
|
|
81
|
+
}, [e, v]), o.useEffect(() => {
|
|
82
|
+
!e || y !== !1 || (T(e), b.current = !1);
|
|
83
|
+
}, [y, e]);
|
|
84
|
+
const D = o.useMemo(() => ({
|
|
85
|
+
beforeOutsideRef: p,
|
|
86
|
+
afterOutsideRef: r,
|
|
87
|
+
beforeInsideRef: f,
|
|
88
|
+
afterInsideRef: P,
|
|
89
|
+
portalNode: e,
|
|
90
|
+
setFocusManagerState: h
|
|
91
|
+
}), [e]);
|
|
92
|
+
return /* @__PURE__ */ i.jsxs(o.Fragment, {
|
|
93
|
+
children: [u, /* @__PURE__ */ i.jsxs(g.Provider, {
|
|
94
|
+
value: D,
|
|
95
|
+
children: [N && e && /* @__PURE__ */ i.jsx(S, {
|
|
96
|
+
"data-type": "outside",
|
|
97
|
+
ref: p,
|
|
98
|
+
onFocus: (s) => {
|
|
99
|
+
if (C(s, e))
|
|
100
|
+
f.current?.focus();
|
|
101
|
+
else {
|
|
102
|
+
const l = t ? t.domReference : null;
|
|
103
|
+
q(l)?.focus();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}), N && e && /* @__PURE__ */ i.jsx("span", {
|
|
107
|
+
"aria-owns": e.id,
|
|
108
|
+
style: z
|
|
109
|
+
}), e && /* @__PURE__ */ I.createPortal(R, e), N && e && /* @__PURE__ */ i.jsx(S, {
|
|
110
|
+
"data-type": "outside",
|
|
111
|
+
ref: r,
|
|
112
|
+
onFocus: (s) => {
|
|
113
|
+
if (C(s, e))
|
|
114
|
+
P.current?.focus();
|
|
115
|
+
else {
|
|
116
|
+
const l = t ? t.domReference : null;
|
|
117
|
+
A(l)?.focus(), t?.closeOnFocusOut && t?.onOpenChange(!1, H(K, s.nativeEvent));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
})]
|
|
121
|
+
})]
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
process.env.NODE_ENV !== "production" && (X.displayName = "FloatingPortal");
|
|
16
125
|
export {
|
|
17
|
-
|
|
126
|
+
X as FloatingPortal,
|
|
127
|
+
W as useFloatingPortalNode,
|
|
128
|
+
Q as usePortalContext
|
|
18
129
|
};
|
|
19
130
|
//# sourceMappingURL=index187.js.map
|
package/dist/index187.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index187.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js"],"sourcesContent":["import createExtensionPattern from './createExtensionPattern.js';\n\n// Regexp of all known extension prefixes used by different regions followed by\n// 1 or more valid digits, for use when parsing.\nvar EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i');\n\n// Strips any extension (as in, the part of the number dialled after the call is\n// connected, usually indicated with extn, ext, x or similar) from the end of\n// the number, and returns it.\nexport default function extractExtension(number) {\n var start = number.search(EXTN_PATTERN);\n if (start < 0) {\n return {};\n }\n // If we find a potential extension, and the number preceding this is a viable\n // number, we assume it is an extension.\n var numberWithoutExtension = number.slice(0, start);\n var matches = number.match(EXTN_PATTERN);\n var i = 1;\n while (i < matches.length) {\n if (matches[i]) {\n return {\n number: numberWithoutExtension,\n ext: matches[i]\n };\n }\n i++;\n }\n}\n//# sourceMappingURL=extractExtension.js.map"],"names":["EXTN_PATTERN","createExtensionPattern","extractExtension","number","start","numberWithoutExtension","matches","i"],"mappings":";AAIA,IAAIA,IAAe,IAAI,OAAO,QAAQC,EAAsB,IAAK,MAAM,GAAG;AAK3D,SAASC,EAAiBC,GAAQ;AAC/C,MAAIC,IAAQD,EAAO,OAAOH,CAAY;AACtC,MAAII,IAAQ;AACV,WAAO,CAAA;AAOT,WAHIC,IAAyBF,EAAO,MAAM,GAAGC,CAAK,GAC9CE,IAAUH,EAAO,MAAMH,CAAY,GACnCO,IAAI,GACDA,IAAID,EAAQ,UAAQ;AACzB,QAAIA,EAAQC,CAAC;AACX,aAAO;AAAA,QACL,QAAQF;AAAA,QACR,KAAKC,EAAQC,CAAC;AAAA,MACtB;AAEI,IAAAA;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index187.js","sources":["../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isNode } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { enableFocusInside, disableFocusInside, getPreviousTabbable, getNextTabbable, isOutsideEvent } from \"../utils/tabbable.js\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../internals/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\nimport { ownerVisuallyHidden } from \"../../internals/constants.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PortalContext.displayName = \"PortalContext\";\nexport const usePortalContext = () => React.useContext(PortalContext);\nconst attr = createAttribute('portal');\nexport function useFloatingPortalNode(props = {}) {\n const {\n ref,\n container: containerProp,\n componentProps = EMPTY_OBJECT,\n elementProps\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const parentPortalNode = portalContext?.portalNode;\n const [containerElement, setContainerElement] = React.useState(null);\n const [portalNode, setPortalNode] = React.useState(null);\n const setPortalNodeRef = useStableCallback(node => {\n if (node !== null) {\n // the useIsoLayoutEffect below watching containerProp / parentPortalNode\n // sets setPortalNode(null) when the container becomes null or changes.\n // So even though the ref callback now ignores null, the portal node still gets cleared.\n setPortalNode(node);\n }\n });\n const containerRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n // Wait for the container to be resolved if explicitly `null`.\n if (containerProp === null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n\n // React 17 does not use React.useId().\n if (uniqueId == null) {\n return;\n }\n const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;\n if (resolvedContainer == null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n if (containerRef.current !== resolvedContainer) {\n containerRef.current = resolvedContainer;\n setPortalNode(null);\n setContainerElement(resolvedContainer);\n }\n }, [containerProp, parentPortalNode, uniqueId]);\n const portalElement = useRenderElement('div', componentProps, {\n ref: [ref, setPortalNodeRef],\n props: [{\n id: uniqueId,\n [attr]: ''\n }, elementProps]\n });\n\n // This `createPortal` call injects `portalElement` into the `container`.\n // Another call inside `FloatingPortal`/`FloatingPortalLite` then injects the children into `portalElement`.\n const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ReactDOM.createPortal(portalElement, containerElement) : null;\n return {\n portalNode,\n portalSubtree\n };\n}\n\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n * @internal\n */\nexport const FloatingPortal = /*#__PURE__*/React.forwardRef(function FloatingPortal(componentProps, forwardedRef) {\n const {\n children,\n container,\n className,\n render,\n renderGuards,\n style,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const focusInsideDisabledRef = React.useRef(false);\n const modal = focusManagerState?.modal;\n const open = focusManagerState?.open;\n const shouldRenderGuards = typeof renderGuards === 'boolean' ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || modal) {\n return undefined;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && event.relatedTarget && isOutsideEvent(event)) {\n if (event.type === 'focusin') {\n if (focusInsideDisabledRef.current) {\n enableFocusInside(portalNode);\n focusInsideDisabledRef.current = false;\n }\n } else {\n disableFocusInside(portalNode);\n focusInsideDisabledRef.current = true;\n }\n }\n }\n\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n return mergeCleanups(addEventListener(portalNode, 'focusin', onFocus, true), addEventListener(portalNode, 'focusout', onFocus, true));\n }, [portalNode, modal]);\n React.useEffect(() => {\n if (!portalNode || open !== false) {\n return;\n }\n enableFocusInside(portalNode);\n focusInsideDisabledRef.current = false;\n }, [open, portalNode]);\n const portalContextValue = React.useMemo(() => ({\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [portalNode]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, /*#__PURE__*/_jsxs(PortalContext.Provider, {\n value: portalContextValue,\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n beforeInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: ownerVisuallyHidden\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n afterInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n if (focusManagerState?.closeOnFocusOut) {\n focusManagerState?.onOpenChange(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n }\n }\n })]\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortal.displayName = \"FloatingPortal\";"],"names":["PortalContext","React","usePortalContext","attr","createAttribute","useFloatingPortalNode","props","ref","containerProp","componentProps","EMPTY_OBJECT","elementProps","uniqueId","useId","parentPortalNode","containerElement","setContainerElement","portalNode","setPortalNode","setPortalNodeRef","useStableCallback","node","containerRef","useIsoLayoutEffect","resolvedContainer","isNode","portalElement","useRenderElement","ReactDOM","FloatingPortal","forwardedRef","children","container","className","render","renderGuards","style","portalSubtree","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","focusManagerState","setFocusManagerState","focusInsideDisabledRef","modal","open","shouldRenderGuards","onFocus","event","isOutsideEvent","enableFocusInside","disableFocusInside","mergeCleanups","addEventListener","portalContextValue","_jsxs","_jsx","FocusGuard","domReference","getPreviousTabbable","ownerVisuallyHidden","getNextTabbable","createChangeEventDetails","REASONS.focusOut"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,M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,KAAsB9B,KAA2BwC,gBAAAA,EAAAA,IAAKC,GAAY;AAAA,QAC5I,aAAa;AAAA,QACb,KAAKnB;AAAA,QACL,SAAS,CAAAU,MAAS;AAChB,cAAIC,EAAeD,GAAOhC,CAAU;AAClC,YAAAwB,EAAe,SAAS,MAAK;AAAA,eACxB;AACL,kBAAMkB,IAAejB,IAAoBA,EAAkB,eAAe;AAE1E,YADqBoB,EAAgBH,CAAY,GACnC,MAAK,GACfjB,GAAmB,mBACrBA,GAAmB,aAAa,IAAOqB,EAAyBC,GAAkBf,EAAM,WAAW,CAAC;AAAA,UAExG;AAAA,QACF;AAAA,MACR,CAAO,CAAC;AAAA,IACR,CAAK,CAAC;AAAA,EACN,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcpB,EAAe,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index188.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
function n(r) {
|
|
3
|
+
const e = t.useRef(!0);
|
|
4
|
+
e.current && (e.current = !1, r());
|
|
3
5
|
}
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
n as useOnFirstRender
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index188.js.map
|
package/dist/index188.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index188.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index188.js","sources":["../../../node_modules/@base-ui/utils/esm/useOnFirstRender.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport function useOnFirstRender(fn) {\n const ref = React.useRef(true);\n if (ref.current) {\n ref.current = false;\n fn();\n }\n}"],"names":["useOnFirstRender","fn","ref","React"],"mappings":";AAGO,SAASA,EAAiBC,GAAI;AACnC,QAAMC,IAAMC,EAAM,OAAO,EAAI;AAC7B,EAAID,EAAI,YACNA,EAAI,UAAU,IACdD,EAAE;AAEN;","x_google_ignoreList":[0]}
|
package/dist/index189.js
CHANGED
|
@@ -1,40 +1,82 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { useScrollLock as v } from "./index348.js";
|
|
3
|
+
import { useOpenInteractionType as I } from "./index300.js";
|
|
4
|
+
import { createChangeEventDetails as A } from "./index175.js";
|
|
5
|
+
import { useImplicitActiveTrigger as M, useOpenStateTransitions as B } from "./index193.js";
|
|
6
|
+
import { useSyncedFloatingRootContext as F } from "./index349.js";
|
|
7
|
+
import { useRole as H } from "./index350.js";
|
|
8
|
+
import { useDismiss as K } from "./index304.js";
|
|
9
|
+
import { useInteractions as L } from "./index195.js";
|
|
10
|
+
import { getTarget as U, contains as V } from "./index316.js";
|
|
11
|
+
import { imperativeAction as j } from "./index177.js";
|
|
12
|
+
function $(P) {
|
|
13
|
+
const {
|
|
14
|
+
store: e,
|
|
15
|
+
parentContext: o,
|
|
16
|
+
actionsRef: N,
|
|
17
|
+
isDrawer: m
|
|
18
|
+
} = P, n = e.useState("open"), S = e.useState("disablePointerDismissal"), p = e.useState("modal"), f = e.useState("popupElement"), {
|
|
19
|
+
openMethod: k,
|
|
20
|
+
triggerProps: r
|
|
21
|
+
} = I(n);
|
|
22
|
+
M(e);
|
|
23
|
+
const {
|
|
24
|
+
forceUnmount: g
|
|
25
|
+
} = B(n, e), d = t.useCallback(() => {
|
|
26
|
+
e.setOpen(!1, A(j));
|
|
27
|
+
}, [e]);
|
|
28
|
+
t.useImperativeHandle(N, () => ({
|
|
29
|
+
unmount: g,
|
|
30
|
+
close: d
|
|
31
|
+
}), [g, d]);
|
|
32
|
+
const c = F({
|
|
33
|
+
popupStore: e,
|
|
34
|
+
onOpenChange: e.setOpen,
|
|
35
|
+
treatPopupAsFloatingElement: !0
|
|
36
|
+
}), [i, D] = t.useState(0), [u, C] = t.useState(0), O = i === 0, h = H(c), T = K(c, {
|
|
37
|
+
outsidePressEvent() {
|
|
38
|
+
return e.context.internalBackdropRef.current || e.context.backdropRef.current ? "intentional" : {
|
|
39
|
+
mouse: p === "trap-focus" ? "sloppy" : "intentional",
|
|
40
|
+
touch: "sloppy"
|
|
11
41
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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":
|
|
42
|
+
},
|
|
43
|
+
outsidePress(s) {
|
|
44
|
+
if (!e.context.outsidePressEnabledRef.current || "button" in s && s.button !== 0 || "touches" in s && s.touches.length !== 1)
|
|
45
|
+
return !1;
|
|
46
|
+
const l = U(s);
|
|
47
|
+
if (O && !S) {
|
|
48
|
+
const a = l;
|
|
49
|
+
return p && (e.context.internalBackdropRef.current || e.context.backdropRef.current) ? e.context.internalBackdropRef.current === a || e.context.backdropRef.current === a || V(a, f) && !a?.hasAttribute("data-base-ui-portal") : !0;
|
|
50
|
+
}
|
|
32
51
|
return !1;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
52
|
+
},
|
|
53
|
+
escapeKey: O
|
|
54
|
+
});
|
|
55
|
+
v(n && p === !0, f);
|
|
56
|
+
const {
|
|
57
|
+
getReferenceProps: R,
|
|
58
|
+
getFloatingProps: b,
|
|
59
|
+
getTriggerProps: x
|
|
60
|
+
} = L([h, T]);
|
|
61
|
+
e.useContextCallback("onNestedDialogOpen", (s, l) => {
|
|
62
|
+
D(s), C(l);
|
|
63
|
+
}), e.useContextCallback("onNestedDialogClose", () => {
|
|
64
|
+
D(0), C(0);
|
|
65
|
+
}), t.useEffect(() => (o?.onNestedDialogOpen && n && o.onNestedDialogOpen(i + 1, u + (m ? 1 : 0)), o?.onNestedDialogClose && !n && o.onNestedDialogClose(), () => {
|
|
66
|
+
o?.onNestedDialogClose && n && o.onNestedDialogClose();
|
|
67
|
+
}), [m, n, i, u, o]);
|
|
68
|
+
const w = t.useMemo(() => R(r), [R, r]), E = t.useMemo(() => x(r), [x, r]), y = t.useMemo(() => b(), [b]);
|
|
69
|
+
e.useSyncedValues({
|
|
70
|
+
openMethod: k,
|
|
71
|
+
activeTriggerProps: w,
|
|
72
|
+
inactiveTriggerProps: E,
|
|
73
|
+
popupProps: y,
|
|
74
|
+
floatingRootContext: c,
|
|
75
|
+
nestedOpenDialogCount: i,
|
|
76
|
+
nestedOpenDrawerCount: u
|
|
77
|
+
});
|
|
36
78
|
}
|
|
37
79
|
export {
|
|
38
|
-
|
|
80
|
+
$ as useDialogRoot
|
|
39
81
|
};
|
|
40
82
|
//# sourceMappingURL=index189.js.map
|
package/dist/index189.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index189.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index189.js","sources":["../../../node_modules/@base-ui/react/esm/dialog/root/useDialogRoot.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useScrollLock } from '@base-ui/utils/useScrollLock';\nimport { useDismiss, useInteractions, useRole, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.js\";\nimport { contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.js\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../internals/reasons.js\";\nimport { useImplicitActiveTrigger, useOpenStateTransitions } from \"../../utils/popups/index.js\";\nexport function useDialogRoot(params) {\n const {\n store,\n parentContext,\n actionsRef,\n isDrawer\n } = params;\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 {\n openMethod,\n triggerProps\n } = useOpenInteractionType(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 const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n onOpenChange: store.setOpen,\n treatPopupAsFloatingElement: true\n });\n const [ownNestedOpenDialogs, setOwnNestedOpenDialogs] = React.useState(0);\n const [ownNestedOpenDrawers, setOwnNestedOpenDrawers] = React.useState(0);\n const isTopmost = ownNestedOpenDialogs === 0;\n const role = useRole(floatingRootContext);\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 const eventTarget = target;\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 === eventTarget || store.context.backdropRef.current === eventTarget || contains(eventTarget, popupElement) && !eventTarget?.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 const {\n getReferenceProps,\n getFloatingProps,\n getTriggerProps\n } = useInteractions([role, dismiss]);\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 = React.useMemo(() => getReferenceProps(triggerProps), [getReferenceProps, triggerProps]);\n const inactiveTriggerProps = React.useMemo(() => getTriggerProps(triggerProps), [getTriggerProps, triggerProps]);\n const popupProps = React.useMemo(() => getFloatingProps(), [getFloatingProps]);\n store.useSyncedValues({\n openMethod,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n floatingRootContext,\n nestedOpenDialogCount: ownNestedOpenDialogs,\n nestedOpenDrawerCount: ownNestedOpenDrawers\n });\n}"],"names":["useDialogRoot","params","store","parentContext","actionsRef","isDrawer","open","disablePointerDismissal","modal","popupElement","openMethod","triggerProps","useOpenInteractionType","useImplicitActiveTrigger","forceUnmount","useOpenStateTransitions","handleImperativeClose","React","createChangeEventDetails","REASONS.imperativeAction","floatingRootContext","useSyncedFloatingRootContext","ownNestedOpenDialogs","setOwnNestedOpenDialogs","ownNestedOpenDrawers","setOwnNestedOpenDrawers","isTopmost","role","useRole","dismiss","useDismiss","event","target","getTarget","eventTarget","contains","useScrollLock","getReferenceProps","getFloatingProps","getTriggerProps","useInteractions","dialogCount","drawerCount","activeTriggerProps","inactiveTriggerProps","popupProps"],"mappings":";;;;;;;;;;;AAUO,SAASA,EAAcC,GAAQ;AACpC,QAAM;AAAA,IACJ,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,EACJ,IAAMJ,GACEK,IAAOJ,EAAM,SAAS,MAAM,GAC5BK,IAA0BL,EAAM,SAAS,yBAAyB,GAClEM,IAAQN,EAAM,SAAS,OAAO,GAC9BO,IAAeP,EAAM,SAAS,cAAc,GAC5C;AAAA,IACJ,YAAAQ;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMC,EAAuBN,CAAI;AAC/B,EAAAO,EAAyBX,CAAK;AAC9B,QAAM;AAAA,IACJ,cAAAY;AAAA,EACJ,IAAMC,EAAwBT,GAAMJ,CAAK,GACjCc,IAAwBC,EAAM,YAAY,MAAM;AACpD,IAAAf,EAAM,QAAQ,IAAOgB,EAAyBC,CAAwB,CAAC;AAAA,EACzE,GAAG,CAACjB,CAAK,CAAC;AACV,EAAAe,EAAM,oBAAoBb,GAAY,OAAO;AAAA,IAC3C,SAASU;AAAA,IACT,OAAOE;AAAA,EACX,IAAM,CAACF,GAAcE,CAAqB,CAAC;AACzC,QAAMI,IAAsBC,EAA6B;AAAA,IACvD,YAAYnB;AAAA,IACZ,cAAcA,EAAM;AAAA,IACpB,6BAA6B;AAAA,EACjC,CAAG,GACK,CAACoB,GAAsBC,CAAuB,IAAIN,EAAM,SAAS,CAAC,GAClE,CAACO,GAAsBC,CAAuB,IAAIR,EAAM,SAAS,CAAC,GAClES,IAAYJ,MAAyB,GACrCK,IAAOC,EAAQR,CAAmB,GAClC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F,GAAe,uBAAuB,CAACG,KACzCH,EAAc,oBAAmB,GAE5B,MAAM;AACX,IAAIA,GAAe,uBAAuBG,KACxCH,EAAc,oBAAmB;AAAA,EAErC,IACC,CAACE,GAAUC,GAAMgB,GAAsBE,GAAsBrB,CAAa,CAAC;AAC9E,QAAMwC,IAAqB1B,EAAM,QAAQ,MAAMoB,EAAkB1B,CAAY,GAAG,CAAC0B,GAAmB1B,CAAY,CAAC,GAC3GiC,IAAuB3B,EAAM,QAAQ,MAAMsB,EAAgB5B,CAAY,GAAG,CAAC4B,GAAiB5B,CAAY,CAAC,GACzGkC,IAAa5B,EAAM,QAAQ,MAAMqB,EAAgB,GAAI,CAACA,CAAgB,CAAC;AAC7E,EAAApC,EAAM,gBAAgB;AAAA,IACpB,YAAAQ;AAAA,IACA,oBAAAiC;AAAA,IACA,sBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,qBAAAzB;AAAA,IACA,uBAAuBE;AAAA,IACvB,uBAAuBE;AAAA,EAC3B,CAAG;AACH;","x_google_ignoreList":[0]}
|
package/dist/index190.js
CHANGED
|
@@ -1,24 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { useRefWithInit as d } from "./index283.js";
|
|
3
|
+
import { ReactStore as a } from "./index351.js";
|
|
4
|
+
import { PopupTriggerMap as p } from "./index352.js";
|
|
5
|
+
import { popupStoreSelectors as u, createInitialPopupStoreState as c } from "./index353.js";
|
|
6
|
+
import { createSelector as n } from "./index354.js";
|
|
7
|
+
const m = {
|
|
8
|
+
...u,
|
|
9
|
+
modal: n((e) => e.modal),
|
|
10
|
+
nested: n((e) => e.nested),
|
|
11
|
+
nestedOpenDialogCount: n((e) => e.nestedOpenDialogCount),
|
|
12
|
+
nestedOpenDrawerCount: n((e) => e.nestedOpenDrawerCount),
|
|
13
|
+
disablePointerDismissal: n((e) => e.disablePointerDismissal),
|
|
14
|
+
openMethod: n((e) => e.openMethod),
|
|
15
|
+
descriptionElementId: n((e) => e.descriptionElementId),
|
|
16
|
+
titleElementId: n((e) => e.titleElementId),
|
|
17
|
+
viewportElement: n((e) => e.viewportElement),
|
|
18
|
+
role: n((e) => e.role)
|
|
19
|
+
};
|
|
20
|
+
class s extends a {
|
|
21
|
+
constructor(r) {
|
|
22
|
+
super(g(r), {
|
|
23
|
+
popupRef: /* @__PURE__ */ i.createRef(),
|
|
24
|
+
backdropRef: /* @__PURE__ */ i.createRef(),
|
|
25
|
+
internalBackdropRef: /* @__PURE__ */ i.createRef(),
|
|
26
|
+
outsidePressEnabledRef: {
|
|
27
|
+
current: !0
|
|
28
|
+
},
|
|
29
|
+
triggerElements: new p(),
|
|
30
|
+
onOpenChange: void 0,
|
|
31
|
+
onOpenChangeComplete: void 0
|
|
32
|
+
}, m);
|
|
33
|
+
}
|
|
34
|
+
setOpen = (r, t) => {
|
|
35
|
+
if (t.preventUnmountOnClose = () => {
|
|
36
|
+
this.set("preventUnmountingOnClose", !0);
|
|
37
|
+
}, !r && t.trigger == null && this.state.activeTriggerId != null && (t.trigger = this.state.activeTriggerElement ?? void 0), this.context.onOpenChange?.(r, t), t.isCanceled)
|
|
38
|
+
return;
|
|
39
|
+
this.state.floatingRootContext.dispatchOpenChange(r, t);
|
|
40
|
+
const o = {
|
|
41
|
+
open: r
|
|
42
|
+
}, l = t.trigger?.id ?? null;
|
|
43
|
+
(l || r) && (o.activeTriggerId = l, o.activeTriggerElement = t.trigger ?? null), this.update(o);
|
|
44
|
+
};
|
|
45
|
+
static useStore(r, t) {
|
|
46
|
+
const o = d(() => new s(t)).current;
|
|
47
|
+
return r ?? o;
|
|
16
48
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
49
|
+
}
|
|
50
|
+
function g(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
|
+
};
|
|
20
66
|
}
|
|
21
67
|
export {
|
|
22
|
-
|
|
68
|
+
s as DialogStore
|
|
23
69
|
};
|
|
24
70
|
//# sourceMappingURL=index190.js.map
|