@rpcbase/ui 0.159.0 → 0.160.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/HoursPicker/index.d.ts +9 -6
- package/dist/components/HoursPicker/index.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/index.js +32 -31
- package/dist/index100.js +105 -126
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +24 -20
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +8 -76
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +4 -18
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +5 -101
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +5 -5
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +466 -14
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +186 -2
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +107 -7
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +241 -305
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +9 -49
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +42 -5
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +4 -68
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +52 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +4 -363
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +4 -261
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +15 -60
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +5 -46
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +7 -169
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +16 -109
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +4 -24
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +5 -8
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +5 -4
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +5 -5
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +3 -3
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +4 -466
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +6 -185
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +24 -107
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +6 -262
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +4 -9
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +6 -42
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +5 -4
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -52
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +5 -4
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +3 -3
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +6 -13
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +4 -4
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +4 -7
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +4 -16
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +6 -4
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +145 -4
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +39 -5
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +4 -5
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +7 -4
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +13 -4
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +13 -6
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +7 -24
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +31 -6
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +10 -4
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +10 -6
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +8 -5
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +13 -4
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +101 -5
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +20 -5
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +53 -8
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +72 -5
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +9 -4
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +20 -4
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +16 -6
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +23 -145
- package/dist/index159.js.map +1 -1
- package/dist/index160.js +6 -39
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +5 -4
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +23 -7
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +35 -14
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +16 -14
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +6 -7
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +4 -31
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +4 -10
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +4 -10
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +4 -8
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +3 -13
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +6 -101
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +24 -20
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +7 -53
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +6 -72
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +5 -9
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +3 -20
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +3 -16
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +4 -23
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +3 -6
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +475 -465
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +4 -5
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +3 -23
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +4 -35
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +4 -16
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +3 -6
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +33 -4
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +249 -4
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +114 -4
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +219 -4
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +66 -3
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +20 -6
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +210 -24
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +319 -7
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +130 -6
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +20 -5
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +75 -3
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +18 -3
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +101 -4
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +5 -4
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +14 -4
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +113 -105
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +2 -4
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +7 -3
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +326 -3
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +46 -602
- package/dist/index203.js.map +1 -1
- package/dist/index205.js +3 -3
- package/dist/index206.js +3 -3
- package/dist/index209.js +1 -1
- package/dist/index210.js +1 -1
- package/dist/index215.js +63 -60
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +179 -47
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +46 -39
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +13 -100
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +151 -94
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +27 -96
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +9 -13
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +40 -147
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -29
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +44 -9
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +88 -40
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +85 -10
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +102 -41
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +45 -88
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +10 -85
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +28 -96
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +8 -52
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +115 -10
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +16 -36
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +15 -8
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +3 -116
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +35 -16
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +19 -14
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +9 -3
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +8 -36
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +58 -20
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +8 -9
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +66 -8
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +18 -18
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +15 -27
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +4 -15
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +4 -57
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +6 -8
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +4 -66
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +7 -19
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +17 -16
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +5 -5
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +5 -5
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +13 -6
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +10 -4
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +14 -7
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +14 -17
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -5
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +6 -5
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +7 -13
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +5 -9
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +9 -14
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +5 -14
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +5 -5
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +9 -6
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +5 -7
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -6
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +4 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +11 -5
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +10 -5
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +10 -9
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +11 -5
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +11 -5
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +10 -4
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +7 -11
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +6 -10
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +5 -10
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +6 -11
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +6 -10
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +6 -10
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +55 -7
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +19 -6
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +28 -5
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +16 -6
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +23 -7
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +16 -6
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +7 -55
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +10 -23
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +9 -15
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +21 -7
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +1 -1
- package/dist/index290.js +10 -10
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +9 -10
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +9 -21
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -10
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +5 -9
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +16 -9
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +9 -4
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +18 -5
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +15 -16
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +12 -9
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +14 -14
- package/dist/index300.js +29 -18
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +12 -15
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +25 -12
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +5 -29
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +62 -10
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +48 -25
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +39 -5
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +98 -65
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +94 -177
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +98 -45
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +3 -3
- package/dist/index310.js +2 -5
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +2 -3
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +5 -24
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +3 -113
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +23 -15
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +107 -519
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +14 -126
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +516 -125
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +128 -2
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +134 -2
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +2 -2
- package/dist/index320.js +1 -1
- package/dist/index325.js +2 -2
- package/dist/index326.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index336.js +2 -2
- package/dist/index339.js +1 -1
- package/dist/index34.js +1 -1
- package/dist/index340.js +2 -2
- package/dist/index342.js +1 -1
- package/dist/index343.js +1 -1
- package/dist/index344.js +1 -1
- package/dist/index345.js +1 -1
- package/dist/index35.js +1 -1
- package/dist/index355.js +11 -21
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +26 -11
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +4 -27
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +22 -4
- package/dist/index358.js.map +1 -1
- package/dist/index36.js +1 -1
- package/dist/index39.js +2 -2
- package/dist/index40.js +24 -24
- package/dist/index42.js +1 -1
- package/dist/index50.js +2 -2
- package/dist/index55.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index59.js +1 -1
- package/dist/index66.js +4 -4
- package/dist/index68.js +1 -1
- package/dist/index77.js +1 -1
- package/dist/index78.js +53 -11
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -1
- package/dist/index80.js +2 -2
- package/dist/index81.js +2 -2
- package/dist/index82.js +12 -2
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +2 -2
- package/dist/index84.js +2 -47
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +41 -200
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +204 -20
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +22 -25
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +23 -398
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +392 -39
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +44 -51
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +605 -3
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +5 -33
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +65 -246
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +2 -115
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +359 -215
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +257 -62
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +58 -18
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +44 -207
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +159 -309
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index308.js
CHANGED
|
@@ -1,184 +1,101 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { createContextScope as z } from "./index61.js";
|
|
6
|
-
import { useId as q } from "./index65.js";
|
|
7
|
-
import { Primitive as G } from "./index68.js";
|
|
8
|
-
import { useCallbackRef as J } from "./index70.js";
|
|
9
|
-
import { useControllableState as Q } from "./index71.js";
|
|
10
|
-
import { useDirection as W } from "./index62.js";
|
|
11
|
-
import { j as d } from "./index28.js";
|
|
12
|
-
var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [y, N, Z] = H(I), [$, Fe] = z(
|
|
13
|
-
I,
|
|
14
|
-
[Z]
|
|
15
|
-
), [ee, oe] = $(I), O = s.forwardRef(
|
|
16
|
-
(e, r) => /* @__PURE__ */ d.jsx(y.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(y.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(te, { ...e, ref: r }) }) })
|
|
17
|
-
);
|
|
18
|
-
O.displayName = I;
|
|
19
|
-
var te = s.forwardRef((e, r) => {
|
|
20
|
-
const {
|
|
21
|
-
__scopeRovingFocusGroup: c,
|
|
22
|
-
orientation: o,
|
|
23
|
-
loop: T = !1,
|
|
24
|
-
dir: w,
|
|
25
|
-
currentTabStopId: v,
|
|
26
|
-
defaultCurrentTabStopId: C,
|
|
27
|
-
onCurrentTabStopIdChange: S,
|
|
28
|
-
onEntryFocus: m,
|
|
29
|
-
preventScrollOnEntryFocus: u = !1,
|
|
30
|
-
...b
|
|
31
|
-
} = e, F = s.useRef(null), g = V(r, F), R = W(w), [E, t] = Q({
|
|
32
|
-
prop: v,
|
|
33
|
-
defaultProp: C ?? null,
|
|
34
|
-
onChange: S,
|
|
35
|
-
caller: I
|
|
36
|
-
}), [i, h] = s.useState(!1), a = J(m), l = N(c), x = s.useRef(!1), [k, D] = s.useState(0);
|
|
37
|
-
return s.useEffect(() => {
|
|
38
|
-
const n = F.current;
|
|
39
|
-
if (n)
|
|
40
|
-
return n.addEventListener(_, a), () => n.removeEventListener(_, a);
|
|
41
|
-
}, [a]), /* @__PURE__ */ d.jsx(
|
|
42
|
-
ee,
|
|
43
|
-
{
|
|
44
|
-
scope: c,
|
|
45
|
-
orientation: o,
|
|
46
|
-
dir: R,
|
|
47
|
-
loop: T,
|
|
48
|
-
currentTabStopId: E,
|
|
49
|
-
onItemFocus: s.useCallback(
|
|
50
|
-
(n) => t(n),
|
|
51
|
-
[t]
|
|
52
|
-
),
|
|
53
|
-
onItemShiftTab: s.useCallback(() => h(!0), []),
|
|
54
|
-
onFocusableItemAdd: s.useCallback(
|
|
55
|
-
() => D((n) => n + 1),
|
|
56
|
-
[]
|
|
57
|
-
),
|
|
58
|
-
onFocusableItemRemove: s.useCallback(
|
|
59
|
-
() => D((n) => n - 1),
|
|
60
|
-
[]
|
|
61
|
-
),
|
|
62
|
-
children: /* @__PURE__ */ d.jsx(
|
|
63
|
-
G.div,
|
|
64
|
-
{
|
|
65
|
-
tabIndex: i || k === 0 ? -1 : 0,
|
|
66
|
-
"data-orientation": o,
|
|
67
|
-
...b,
|
|
68
|
-
ref: g,
|
|
69
|
-
style: { outline: "none", ...e.style },
|
|
70
|
-
onMouseDown: p(e.onMouseDown, () => {
|
|
71
|
-
x.current = !0;
|
|
72
|
-
}),
|
|
73
|
-
onFocus: p(e.onFocus, (n) => {
|
|
74
|
-
const L = !x.current;
|
|
75
|
-
if (n.target === n.currentTarget && L && !i) {
|
|
76
|
-
const P = new CustomEvent(_, X);
|
|
77
|
-
if (n.currentTarget.dispatchEvent(P), !P.defaultPrevented) {
|
|
78
|
-
const A = l().filter((f) => f.focusable), U = A.find((f) => f.active), B = A.find((f) => f.id === E), Y = [U, B, ...A].filter(
|
|
79
|
-
Boolean
|
|
80
|
-
).map((f) => f.ref.current);
|
|
81
|
-
M(Y, u);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
x.current = !1;
|
|
85
|
-
}),
|
|
86
|
-
onBlur: p(e.onBlur, () => h(!1))
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}), K = "RovingFocusGroupItem", j = s.forwardRef(
|
|
92
|
-
(e, r) => {
|
|
1
|
+
import { DIRECTION as s } from "./index304.js";
|
|
2
|
+
class f {
|
|
3
|
+
constructor(t, e) {
|
|
4
|
+
this.masked = t, this._log = [];
|
|
93
5
|
const {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
children: v,
|
|
99
|
-
...C
|
|
100
|
-
} = e, S = q(), m = w || S, u = oe(K, c), b = u.currentTabStopId === m, F = N(c), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
|
|
101
|
-
return s.useEffect(() => {
|
|
102
|
-
if (o)
|
|
103
|
-
return g(), () => R();
|
|
104
|
-
}, [o, g, R]), /* @__PURE__ */ d.jsx(
|
|
105
|
-
y.ItemSlot,
|
|
6
|
+
offset: i,
|
|
7
|
+
index: h
|
|
8
|
+
} = t._mapPosToBlock(e) || (e < 0 ? (
|
|
9
|
+
// first
|
|
106
10
|
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
focusable: o,
|
|
110
|
-
active: T,
|
|
111
|
-
children: /* @__PURE__ */ d.jsx(
|
|
112
|
-
G.span,
|
|
113
|
-
{
|
|
114
|
-
tabIndex: b ? 0 : -1,
|
|
115
|
-
"data-orientation": u.orientation,
|
|
116
|
-
...C,
|
|
117
|
-
ref: r,
|
|
118
|
-
onMouseDown: p(e.onMouseDown, (t) => {
|
|
119
|
-
o ? u.onItemFocus(m) : t.preventDefault();
|
|
120
|
-
}),
|
|
121
|
-
onFocus: p(e.onFocus, () => u.onItemFocus(m)),
|
|
122
|
-
onKeyDown: p(e.onKeyDown, (t) => {
|
|
123
|
-
if (t.key === "Tab" && t.shiftKey) {
|
|
124
|
-
u.onItemShiftTab();
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
if (t.target !== t.currentTarget) return;
|
|
128
|
-
const i = se(t, u.orientation, u.dir);
|
|
129
|
-
if (i !== void 0) {
|
|
130
|
-
if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
|
|
131
|
-
t.preventDefault();
|
|
132
|
-
let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
|
|
133
|
-
if (i === "last") a.reverse();
|
|
134
|
-
else if (i === "prev" || i === "next") {
|
|
135
|
-
i === "prev" && a.reverse();
|
|
136
|
-
const l = a.indexOf(t.currentTarget);
|
|
137
|
-
a = u.loop ? ce(a, l + 1) : a.slice(l + 1);
|
|
138
|
-
}
|
|
139
|
-
setTimeout(() => M(a));
|
|
140
|
-
}
|
|
141
|
-
}),
|
|
142
|
-
children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
|
|
143
|
-
}
|
|
144
|
-
)
|
|
11
|
+
index: 0,
|
|
12
|
+
offset: 0
|
|
145
13
|
}
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
14
|
+
) : (
|
|
15
|
+
// last
|
|
16
|
+
{
|
|
17
|
+
index: this.masked._blocks.length,
|
|
18
|
+
offset: 0
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
this.offset = i, this.index = h, this.ok = !1;
|
|
22
|
+
}
|
|
23
|
+
get block() {
|
|
24
|
+
return this.masked._blocks[this.index];
|
|
25
|
+
}
|
|
26
|
+
get pos() {
|
|
27
|
+
return this.masked._blockStartPos(this.index) + this.offset;
|
|
28
|
+
}
|
|
29
|
+
get state() {
|
|
30
|
+
return {
|
|
31
|
+
index: this.index,
|
|
32
|
+
offset: this.offset,
|
|
33
|
+
ok: this.ok
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
set state(t) {
|
|
37
|
+
Object.assign(this, t);
|
|
38
|
+
}
|
|
39
|
+
pushState() {
|
|
40
|
+
this._log.push(this.state);
|
|
41
|
+
}
|
|
42
|
+
popState() {
|
|
43
|
+
const t = this._log.pop();
|
|
44
|
+
return t && (this.state = t), t;
|
|
45
|
+
}
|
|
46
|
+
bindBlock() {
|
|
47
|
+
this.block || (this.index < 0 && (this.index = 0, this.offset = 0), this.index >= this.masked._blocks.length && (this.index = this.masked._blocks.length - 1, this.offset = this.block.displayValue.length));
|
|
48
|
+
}
|
|
49
|
+
_pushLeft(t) {
|
|
50
|
+
for (this.pushState(), this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((e = this.block) == null ? void 0 : e.displayValue.length) || 0) {
|
|
51
|
+
var e;
|
|
52
|
+
if (t()) return this.ok = !0;
|
|
53
|
+
}
|
|
54
|
+
return this.ok = !1;
|
|
55
|
+
}
|
|
56
|
+
_pushRight(t) {
|
|
57
|
+
for (this.pushState(), this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0)
|
|
58
|
+
if (t()) return this.ok = !0;
|
|
59
|
+
return this.ok = !1;
|
|
60
|
+
}
|
|
61
|
+
pushLeftBeforeFilled() {
|
|
62
|
+
return this._pushLeft(() => {
|
|
63
|
+
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, s.FORCE_LEFT), this.offset !== 0))
|
|
64
|
+
return !0;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
pushLeftBeforeInput() {
|
|
68
|
+
return this._pushLeft(() => {
|
|
69
|
+
if (!this.block.isFixed)
|
|
70
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.LEFT), !0;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
pushLeftBeforeRequired() {
|
|
74
|
+
return this._pushLeft(() => {
|
|
75
|
+
if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
|
|
76
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.LEFT), !0;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
pushRightBeforeFilled() {
|
|
80
|
+
return this._pushRight(() => {
|
|
81
|
+
if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, s.FORCE_RIGHT), this.offset !== this.block.value.length))
|
|
82
|
+
return !0;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
pushRightBeforeInput() {
|
|
86
|
+
return this._pushRight(() => {
|
|
87
|
+
if (!this.block.isFixed)
|
|
88
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.NONE), !0;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
pushRightBeforeRequired() {
|
|
92
|
+
return this._pushRight(() => {
|
|
93
|
+
if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
|
|
94
|
+
return this.offset = this.block.nearestInputPos(this.offset, s.NONE), !0;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
175
97
|
}
|
|
176
|
-
var ge = O, Re = j;
|
|
177
98
|
export {
|
|
178
|
-
|
|
179
|
-
ge as Root,
|
|
180
|
-
O as RovingFocusGroup,
|
|
181
|
-
j as RovingFocusGroupItem,
|
|
182
|
-
Fe as createRovingFocusGroupScope
|
|
99
|
+
f as default
|
|
183
100
|
};
|
|
184
101
|
//# sourceMappingURL=index308.js.map
|
package/dist/index308.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index308.js","sources":["../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IAAIA,IAAc,iCACdC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAI,GAClDC,IAAa,oBACb,CAACC,GAAYC,GAAeC,CAAqB,IAAIC,EAAiBJ,CAAU,GAChF,CAACK,GAA+BC,EAA2B,IAAIC;AAAA,EACjEP;AAAA,EACA,CAACG,CAAqB;AACxB,GACI,CAACK,IAAqBC,EAAqB,IAAIJ,EAA8BL,CAAU,GACvFU,IAAmBC,EAAM;AAAA,EAC3B,CAACC,GAAOC,MACiBC,gBAAAA,MAAIb,EAAW,UAAU,EAAE,OAAOW,EAAM,yBAAyB,UAA0BE,gBAAAA,MAAIb,EAAW,MAAM,EAAE,OAAOW,EAAM,yBAAyB,UAA0BE,gBAAAA,EAAAA,IAAIC,IAAsB,EAAE,GAAGH,GAAO,KAAKC,GAAc,EAAC,CAAE,EAAC,CAAE;AAE5Q;AACAH,EAAiB,cAAcV;AAC/B,IAAIe,KAAuBJ,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACnE,QAAM;AAAA,IACJ,yBAAAG;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,KAAAC;AAAA,IACA,kBAAkBC;AAAA,IAClB,yBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,cAAAC;AAAA,IACA,2BAAAC,IAA4B;AAAA,IAC5B,GAAGC;AAAA,EACP,IAAMb,GACEc,IAAMf,EAAM,OAAO,IAAI,GACvBgB,IAAeC,EAAgBf,GAAca,CAAG,GAChDG,IAAYC,EAAaX,CAAG,GAC5B,CAACY,GAAkBC,CAAmB,IAAIC,EAAqB;AAAA,IACnE,MAAMb;AAAA,IACN,aAAaC,KAA2B;AAAA,IACxC,UAAUC;A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B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAO1E,GACP2E,KAAO5B;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index308.js","sources":["../../../node_modules/imask/esm/masked/pattern/cursor.js"],"sourcesContent":["import { DIRECTION } from '../../core/utils.js';\n\nclass PatternCursor {\n constructor(masked, pos) {\n this.masked = masked;\n this._log = [];\n const {\n offset,\n index\n } = masked._mapPosToBlock(pos) || (pos < 0 ?\n // first\n {\n index: 0,\n offset: 0\n } :\n // last\n {\n index: this.masked._blocks.length,\n offset: 0\n });\n this.offset = offset;\n this.index = index;\n this.ok = false;\n }\n get block() {\n return this.masked._blocks[this.index];\n }\n get pos() {\n return this.masked._blockStartPos(this.index) + this.offset;\n }\n get state() {\n return {\n index: this.index,\n offset: this.offset,\n ok: this.ok\n };\n }\n set state(s) {\n Object.assign(this, s);\n }\n pushState() {\n this._log.push(this.state);\n }\n popState() {\n const s = this._log.pop();\n if (s) this.state = s;\n return s;\n }\n bindBlock() {\n if (this.block) return;\n if (this.index < 0) {\n this.index = 0;\n this.offset = 0;\n }\n if (this.index >= this.masked._blocks.length) {\n this.index = this.masked._blocks.length - 1;\n this.offset = this.block.displayValue.length; // TODO this is stupid type error, `block` depends on index that was changed above\n }\n }\n _pushLeft(fn) {\n this.pushState();\n for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) == null ? void 0 : _this$block.displayValue.length) || 0) {\n var _this$block;\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n _pushRight(fn) {\n this.pushState();\n for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) {\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n pushLeftBeforeFilled() {\n return this._pushLeft(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT);\n if (this.offset !== 0) return true;\n });\n }\n pushLeftBeforeInput() {\n // cases:\n // filled input: 00|\n // optional empty input: 00[]|\n // nested block: XX<[]>|\n return this._pushLeft(() => {\n if (this.block.isFixed) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushLeftBeforeRequired() {\n return this._pushLeft(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushRightBeforeFilled() {\n return this._pushRight(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT);\n if (this.offset !== this.block.value.length) return true;\n });\n }\n pushRightBeforeInput() {\n return this._pushRight(() => {\n if (this.block.isFixed) return;\n\n // const o = this.offset;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n // HACK cases like (STILL DOES NOT WORK FOR NESTED)\n // aa|X\n // aa<X|[]>X_ - this will not work\n // if (o && o === this.offset && this.block instanceof PatternInputDefinition) continue;\n return true;\n });\n }\n pushRightBeforeRequired() {\n return this._pushRight(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n\n // TODO check |[*]XX_\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n return true;\n });\n }\n}\n\nexport { PatternCursor as default };\n"],"names":["PatternCursor","masked","pos","offset","index","s","fn","_this$block","DIRECTION"],"mappings":";AAEA,MAAMA,EAAc;AAAA,EAClB,YAAYC,GAAQC,GAAK;AACvB,SAAK,SAASD,GACd,KAAK,OAAO,CAAA;AACZ,UAAM;AAAA,MACJ,QAAAE;AAAA,MACA,OAAAC;AAAA,IACN,IAAQH,EAAO,eAAeC,CAAG,MAAMA,IAAM;AAAA;AAAA,MAEzC;AAAA,QACE,OAAO;AAAA,QACP,QAAQ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A,0BAA0B;AACxB,WAAO,KAAK,WAAW,MAAM;AAC3B,UAAI,OAAK,MAAM,WAAW,KAAK,MAAM,cAAc,CAAC,KAAK,MAAM;AAG/D,oBAAK,SAAS,KAAK,MAAM,gBAAgB,KAAK,QAAQA,EAAU,IAAI,GAC7D;AAAA,IACT,CAAC;AAAA,EACH;AACF;","x_google_ignoreList":[0]}
|
package/dist/index309.js
CHANGED
|
@@ -1,50 +1,103 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import n from "./index185.js";
|
|
2
|
+
import { DIRECTION as a, isString as l } from "./index304.js";
|
|
3
|
+
import u from "./index306.js";
|
|
4
|
+
class c {
|
|
5
|
+
/** */
|
|
6
|
+
/** */
|
|
7
|
+
/** */
|
|
8
|
+
/** */
|
|
9
|
+
/** */
|
|
10
|
+
/** */
|
|
11
|
+
constructor(e) {
|
|
12
|
+
Object.assign(this, e), this._value = "", this.isFixed = !0;
|
|
13
|
+
}
|
|
14
|
+
get value() {
|
|
15
|
+
return this._value;
|
|
16
|
+
}
|
|
17
|
+
get unmaskedValue() {
|
|
18
|
+
return this.isUnmasking ? this.value : "";
|
|
19
|
+
}
|
|
20
|
+
get rawInputValue() {
|
|
21
|
+
return this._isRawInput ? this.value : "";
|
|
22
|
+
}
|
|
23
|
+
get displayValue() {
|
|
24
|
+
return this.value;
|
|
25
|
+
}
|
|
26
|
+
reset() {
|
|
27
|
+
this._isRawInput = !1, this._value = "";
|
|
28
|
+
}
|
|
29
|
+
remove(e, t) {
|
|
30
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), this._value = this._value.slice(0, e) + this._value.slice(t), this._value || (this._isRawInput = !1), new n();
|
|
31
|
+
}
|
|
32
|
+
nearestInputPos(e, t) {
|
|
33
|
+
t === void 0 && (t = a.NONE);
|
|
34
|
+
const i = 0, s = this._value.length;
|
|
35
|
+
switch (t) {
|
|
36
|
+
case a.LEFT:
|
|
37
|
+
case a.FORCE_LEFT:
|
|
38
|
+
return i;
|
|
39
|
+
case a.NONE:
|
|
40
|
+
case a.RIGHT:
|
|
41
|
+
case a.FORCE_RIGHT:
|
|
42
|
+
default:
|
|
43
|
+
return s;
|
|
23
44
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
}
|
|
46
|
+
totalInputPositions(e, t) {
|
|
47
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), this._isRawInput ? t - e : 0;
|
|
48
|
+
}
|
|
49
|
+
extractInput(e, t, i) {
|
|
50
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), i === void 0 && (i = {}), i.raw && this._isRawInput && this._value.slice(e, t) || "";
|
|
51
|
+
}
|
|
52
|
+
get isComplete() {
|
|
53
|
+
return !0;
|
|
54
|
+
}
|
|
55
|
+
get isFilled() {
|
|
56
|
+
return !!this._value;
|
|
57
|
+
}
|
|
58
|
+
_appendChar(e, t) {
|
|
59
|
+
if (t === void 0 && (t = {}), this.isFilled) return new n();
|
|
60
|
+
const i = this.eager === !0 || this.eager === "append", r = this.char === e && (this.isUnmasking || t.input || t.raw) && (!t.raw || !i) && !t.tail, h = new n({
|
|
61
|
+
inserted: this.char,
|
|
62
|
+
rawInserted: r ? this.char : ""
|
|
63
|
+
});
|
|
64
|
+
return this._value = this.char, this._isRawInput = r && (t.raw || t.input), h;
|
|
65
|
+
}
|
|
66
|
+
_appendEager() {
|
|
67
|
+
return this._appendChar(this.char, {
|
|
68
|
+
tail: !0
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
_appendPlaceholder() {
|
|
72
|
+
const e = new n();
|
|
73
|
+
return this.isFilled || (this._value = e.inserted = this.char), e;
|
|
74
|
+
}
|
|
75
|
+
extractTail() {
|
|
76
|
+
return new u("");
|
|
77
|
+
}
|
|
78
|
+
appendTail(e) {
|
|
79
|
+
return l(e) && (e = new u(String(e))), e.appendTo(this);
|
|
80
|
+
}
|
|
81
|
+
append(e, t, i) {
|
|
82
|
+
const s = this._appendChar(e[0], t);
|
|
83
|
+
return i != null && (s.tailShift += this.appendTail(i).tailShift), s;
|
|
84
|
+
}
|
|
85
|
+
doCommit() {
|
|
86
|
+
}
|
|
87
|
+
get state() {
|
|
88
|
+
return {
|
|
89
|
+
_value: this._value,
|
|
90
|
+
_rawInputValue: this.rawInputValue
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
set state(e) {
|
|
94
|
+
this._value = e._value, this._isRawInput = !!e._rawInputValue;
|
|
95
|
+
}
|
|
96
|
+
pad(e) {
|
|
97
|
+
return this._appendPlaceholder();
|
|
98
|
+
}
|
|
46
99
|
}
|
|
47
100
|
export {
|
|
48
|
-
|
|
101
|
+
c as default
|
|
49
102
|
};
|
|
50
103
|
//# sourceMappingURL=index309.js.map
|
package/dist/index309.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index309.js","sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"index309.js","sources":["../../../node_modules/imask/esm/masked/pattern/fixed-definition.js"],"sourcesContent":["import ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION, isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport '../../core/holder.js';\n\nclass PatternFixedDefinition {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n Object.assign(this, opts);\n this._value = '';\n this.isFixed = true;\n }\n get value() {\n return this._value;\n }\n get unmaskedValue() {\n return this.isUnmasking ? this.value : '';\n }\n get rawInputValue() {\n return this._isRawInput ? this.value : '';\n }\n get displayValue() {\n return this.value;\n }\n reset() {\n this._isRawInput = false;\n this._value = '';\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);\n if (!this._value) this._isRawInput = false;\n return new ChangeDetails();\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n const minPos = 0;\n const maxPos = this._value.length;\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return minPos;\n case DIRECTION.NONE:\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n default:\n return maxPos;\n }\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n return this._isRawInput ? toPos - fromPos : 0;\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n if (flags === void 0) {\n flags = {};\n }\n return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || '';\n }\n get isComplete() {\n return true;\n }\n get isFilled() {\n return Boolean(this._value);\n }\n _appendChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (this.isFilled) return new ChangeDetails();\n const appendEager = this.eager === true || this.eager === 'append';\n const appended = this.char === ch;\n const isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && (!flags.raw || !appendEager) && !flags.tail;\n const details = new ChangeDetails({\n inserted: this.char,\n rawInserted: isResolved ? this.char : ''\n });\n this._value = this.char;\n this._isRawInput = isResolved && (flags.raw || flags.input);\n return details;\n }\n _appendEager() {\n return this._appendChar(this.char, {\n tail: true\n });\n }\n _appendPlaceholder() {\n const details = new ChangeDetails();\n if (this.isFilled) return details;\n this._value = details.inserted = this.char;\n return details;\n }\n extractTail() {\n return new ContinuousTailDetails('');\n }\n appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n append(str, flags, tail) {\n const details = this._appendChar(str[0], flags);\n if (tail != null) {\n details.tailShift += this.appendTail(tail).tailShift;\n }\n return details;\n }\n doCommit() {}\n get state() {\n return {\n _value: this._value,\n _rawInputValue: this.rawInputValue\n };\n }\n set state(state) {\n this._value = state._value;\n this._isRawInput = Boolean(state._rawInputValue);\n }\n pad(flags) {\n return this._appendPlaceholder();\n }\n}\n\nexport { PatternFixedDefinition as default };\n"],"names":["PatternFixedDefinition","opts","fromPos","toPos","ChangeDetails","cursorPos","direction","DIRECTION","minPos","maxPos","flags","ch","appendEager","isResolved","details","ContinuousTailDetails","tail","isString","str","state"],"mappings":";;;AAKA,MAAMA,EAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa3B,YAAYC,GAAM;AAChB,WAAO,OAAO,MAAMA,CAAI,GACxB,KAAK,SAAS,IACd,KAAK,UAAU;AAAA,EACjB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,KAAK;AAAA,EACd;AAAA,EACA,IAAI,gBAAgB;AAClB,WAAO,KAAK,cAAc,KAAK,QAAQ;AAAA,EACzC;AAAA,EACA,IAAI,gBAAgB;AAClB,WAAO,KAAK,cAAc,KAAK,QAAQ;AAAA,EACzC;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,KAAK;AAAA,EACd;AAAA,EACA,QAAQ;AACN,SAAK,cAAc,IACnB,KAAK,SAAS;AAAA,EAChB;AAAA,EACA,OAAOC,GAASC,GAAO;AACrB,WAAID,MAAY,WACd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
|
+
import { DIRECTION as r } from "./index304.js";
|
|
2
|
+
import h from "./index305.js";
|
|
3
3
|
import u, { maskedClass as l } from "./index32.js";
|
|
4
4
|
import d from "./index33.js";
|
|
5
5
|
import p from "./index34.js";
|
|
6
6
|
import _ from "./index36.js";
|
|
7
|
-
import o from "./
|
|
7
|
+
import o from "./index184.js";
|
|
8
8
|
import m from "./index37.js";
|
|
9
9
|
import "./index35.js";
|
|
10
10
|
class c {
|
package/dist/index310.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
var r =
|
|
1
|
+
var r = {};
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
l as noScrollbarsClassName,
|
|
5
|
-
e as removedBarSizeVariable,
|
|
6
|
-
r as zeroRightClassName
|
|
3
|
+
r as __exports
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=index310.js.map
|
package/dist/index310.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index310.js","sources":[
|
|
1
|
+
{"version":3,"file":"index310.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index311.js
CHANGED
package/dist/index311.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index311.js","sources":[
|
|
1
|
+
{"version":3,"file":"index311.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index312.js
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { assignRef as o } from "./index346.js";
|
|
3
|
-
import { useCallbackRef as l } from "./index347.js";
|
|
4
|
-
var s = typeof window < "u" ? f.useLayoutEffect : f.useEffect, c = /* @__PURE__ */ new WeakMap();
|
|
5
|
-
function v(e, m) {
|
|
6
|
-
var t = l(null, function(n) {
|
|
7
|
-
return e.forEach(function(u) {
|
|
8
|
-
return o(u, n);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
return s(function() {
|
|
12
|
-
var n = c.get(t);
|
|
13
|
-
if (n) {
|
|
14
|
-
var u = new Set(n), r = new Set(e), i = t.current;
|
|
15
|
-
u.forEach(function(a) {
|
|
16
|
-
r.has(a) || o(a, null);
|
|
17
|
-
}), r.forEach(function(a) {
|
|
18
|
-
u.has(a) || o(a, i);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
c.set(t, e);
|
|
22
|
-
}, [e]), t;
|
|
23
|
-
}
|
|
1
|
+
var r = "right-scroll-bar-position", a = "width-before-scroll-bar", l = "with-scroll-bars-hidden", e = "--removed-body-scroll-bar-size";
|
|
24
2
|
export {
|
|
25
|
-
|
|
3
|
+
a as fullWidthClassName,
|
|
4
|
+
l as noScrollbarsClassName,
|
|
5
|
+
e as removedBarSizeVariable,
|
|
6
|
+
r as zeroRightClassName
|
|
26
7
|
};
|
|
27
8
|
//# sourceMappingURL=index312.js.map
|