@rpcbase/ui 0.280.0 → 0.282.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/AddressAutocompleteInput/index.d.ts +1 -1
- package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/components/ApplePayButton/index.d.ts +1 -1
- package/dist/components/ApplePayButton/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/DayPickerField/index.d.ts +2 -2
- package/dist/components/DayPickerField/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.d.ts +9 -9
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/FilesUploadField/index.d.ts +1 -1
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/components/HourPickerField/index.d.ts +2 -2
- package/dist/components/HourPickerField/index.d.ts.map +1 -1
- package/dist/components/I18nField/index.d.ts +1 -1
- package/dist/components/I18nField/index.d.ts.map +1 -1
- package/dist/components/Image/index.d.ts +1 -1
- package/dist/components/Image/index.d.ts.map +1 -1
- package/dist/components/ImagesField/index.d.ts +1 -1
- package/dist/components/ImagesField/index.d.ts.map +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
- package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
- package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/header/MenuPopover/index.d.ts +1 -1
- package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js +6 -4
- package/dist/index10.js.map +1 -1
- package/dist/index12.js.map +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +88 -88
- package/dist/index14.js.map +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index154.js +19 -7
- package/dist/index154.js.map +1 -1
- package/dist/index16.js +36 -45
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +3 -3
- package/dist/index160.js.map +1 -1
- package/dist/index166.js +5 -5
- package/dist/index166.js.map +1 -1
- package/dist/index172.js +27 -25
- package/dist/index172.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +145 -162
- package/dist/index182.js.map +1 -1
- package/dist/index184.js +6 -8
- package/dist/index184.js.map +1 -1
- package/dist/index186.js +2 -8
- package/dist/index186.js.map +1 -1
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -15
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +13 -17
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +3 -2
- package/dist/index200.js.map +1 -1
- package/dist/index207.js +5 -90
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +15 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +102 -22
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +3 -28
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +23 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +27 -6
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +19 -14
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +14 -26
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +7 -22
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +27 -6
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +23 -5
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +6 -4
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +5 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +4 -24
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +4 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +21 -21
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +3 -23
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -6
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +22 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -17
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -49
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +18 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +50 -19
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +20 -28
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +27 -104
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +98 -33
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +28 -113
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +117 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +12 -4
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +4 -15
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +13 -62
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +64 -9
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +10 -106
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +107 -13
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +16 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +13 -5
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +4 -316
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +315 -58
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +58 -223
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +215 -318
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +250 -306
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +308 -173
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +178 -7
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +8 -15
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +41 -5
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +46 -38
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +7 -50
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +49 -6
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +48 -46
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +6 -51
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +10 -9
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +60 -8
- package/dist/index259.js.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +41 -60
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +88 -34
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +47 -94
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +36 -49
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +45 -32
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +47 -46
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +18 -48
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +174 -15
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +47 -169
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +17 -34
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +59 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +10 -66
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +4 -4
- package/dist/index273.js +71 -69
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +158 -152
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +7 -13
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -5
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +12 -6
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +11 -12
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +65 -9
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +6 -74
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +25 -6
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +24 -24
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +125 -24
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +52 -115
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +59 -55
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +48 -61
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +5 -48
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +14 -8
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +18 -14
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +10 -17
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +23 -11
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +52 -25
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +6 -52
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +137 -5
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +59 -149
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +90 -49
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +11 -117
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +863 -11
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +21 -865
- package/dist/index299.js.map +1 -1
- package/dist/index3.js.map +1 -1
- package/dist/index300.js +417 -27
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +774 -483
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +7436 -803
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -7429
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +12 -6
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +5 -12
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +469 -5
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +32 -464
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +18 -36
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +28 -17
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +4 -30
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +59 -4
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +11 -59
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +5 -9
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +9 -5
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +12 -9
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +3 -13
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +17 -3
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +23 -14
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +39 -23
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +5 -41
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +25 -5
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +18 -24
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +32 -17
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +5 -34
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +9 -5
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +7 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +9 -8
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +10 -9
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +7 -10
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +75 -7
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +153 -66
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +99 -147
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +13 -113
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +78 -12
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +23 -57
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +12 -45
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +16 -13
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +100 -15
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +50 -95
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +57 -5
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +41 -78
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +100 -58
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +46 -104
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +39 -51
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +143 -42
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +122 -123
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +224 -108
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +158 -174
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +213 -144
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +5 -309
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +6 -5
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +7 -6
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +4 -5
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +4 -4
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +21 -6
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +10 -21
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +128 -10
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +36 -122
- package/dist/index359.js.map +1 -1
- package/dist/index360.js +64 -38
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +115 -66
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +485 -112
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +7 -490
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +1 -1
- package/dist/index364.js.map +1 -1
- package/dist/index367.js +2 -9
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +26 -5
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +43 -27
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +35 -46
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +16 -27
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +41 -16
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +11 -42
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +10 -14
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +51 -9
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +40 -53
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +17 -43
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +4 -15
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +4 -4
- package/dist/index379.js.map +1 -1
- package/dist/index380.js +9 -4
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +304 -9
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +4 -339
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +21 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +106 -16
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +19 -109
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +18 -18
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +14 -19
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +12 -4
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +113 -20
- package/dist/index389.js.map +1 -1
- package/dist/index390.js +5 -11
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +28 -85
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +9 -9
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +6 -29
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +254 -10
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +12 -6
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +11 -252
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +6 -11
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +22 -10
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +22 -6
- package/dist/index399.js.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index400.js +103 -21
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +15 -23
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +11 -108
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +10 -15
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +237 -10
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +27 -9
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +33 -238
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +11 -30
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +118 -48
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +39 -11
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +18 -121
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +11 -39
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +21 -24
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +17 -11
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +10 -20
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +4 -17
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +300 -14
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +61 -323
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +4 -63
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +28 -4
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +468 -25
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +250 -452
- package/dist/index421.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +91 -133
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +2 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +11 -4
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -3
- package/dist/index72.js.map +1 -1
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +16 -19
- package/dist/index9.js.map +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
- package/package.json +15 -15
- package/dist/index422.js +0 -272
- package/dist/index422.js.map +0 -1
package/dist/index182.js
CHANGED
|
@@ -2,95 +2,82 @@ import { useIsTouchDevice as e } from "./index4.js";
|
|
|
2
2
|
import { cn as t } from "./index12.js";
|
|
3
3
|
import { dateMatchModifiers as n } from "./index122.js";
|
|
4
4
|
import { DayPicker as r } from "./index181.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import m, { InputMask as h } from "imask";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { CalendarDays as a, ChevronLeft as o, ChevronRight as s } from "lucide-react";
|
|
7
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { createPortal as d } from "react-dom";
|
|
9
|
+
import { IMaskInput as f } from "react-imask";
|
|
10
|
+
import p, { InputMask as m } from "imask";
|
|
12
11
|
//#region src/components/DayPickerField/index.tsx
|
|
13
|
-
var
|
|
14
|
-
typeof
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
n[0] === e ? (a = n[1], o = n[2], s = n[3], c = n[4], l = n[5]) : ({className: a, classNames: o, components: s, showOutsideDays: l, ...c} = e, n[0] = e, n[1] = a, n[2] = o, n[3] = s, n[4] = c, n[5] = l);
|
|
18
|
-
let d = l === void 0 || l, f;
|
|
19
|
-
n[6] === a ? f = n[7] : (f = t("p-3", a), n[6] = a, n[7] = f);
|
|
20
|
-
let p;
|
|
21
|
-
n[8] === o ? p = n[9] : (p = {
|
|
22
|
-
month: "space-y-4",
|
|
23
|
-
months: "flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative gap-2",
|
|
24
|
-
month_caption: "flex justify-center pt-1 relative items-center",
|
|
25
|
-
month_grid: "w-full border-collapse space-y-1",
|
|
26
|
-
caption_label: "text-sm font-medium",
|
|
27
|
-
nav: "flex items-center justify-between absolute inset-x-0 z-10",
|
|
28
|
-
button_previous: "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10",
|
|
29
|
-
button_next: "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10",
|
|
30
|
-
weeks: "w-full border-collapse",
|
|
31
|
-
weekdays: "flex",
|
|
32
|
-
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
33
|
-
week: "flex w-full mt-2",
|
|
34
|
-
day: "h-9 w-9 p-0 font-normal aria-selected:opacity-100 rounded-md first:aria-selected:rounded-l-md last:aria-selected:rounded-r-md",
|
|
35
|
-
day_button: "inline-flex h-9 w-9 items-center justify-center rounded-md p-0 text-center text-sm font-normal transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
36
|
-
range_start: "day-range-start !bg-accent rounded-l-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
37
|
-
range_end: "day-range-end !bg-accent rounded-r-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
38
|
-
range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground !rounded-none",
|
|
39
|
-
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
40
|
-
today: "bg-gray-50 text-accent-foreground !rounded-md",
|
|
41
|
-
outside: "day-outside text-muted-foreground opacity-50 !aria-selected:bg-accent/50 !aria-selected:text-muted-foreground !aria-selected:opacity-30",
|
|
42
|
-
disabled: "text-muted-foreground opacity-50",
|
|
43
|
-
hidden: "invisible",
|
|
44
|
-
...o
|
|
45
|
-
}, n[8] = o, n[9] = p);
|
|
46
|
-
let m;
|
|
47
|
-
n[10] === s ? m = n[11] : (m = {
|
|
48
|
-
Chevron: v,
|
|
49
|
-
...s
|
|
50
|
-
}, n[10] = s, n[11] = m);
|
|
51
|
-
let h;
|
|
52
|
-
return n[12] !== c || n[13] !== d || n[14] !== f || n[15] !== p || n[16] !== m ? (h = /* @__PURE__ */ u(r, {
|
|
12
|
+
var h = p;
|
|
13
|
+
typeof h.InputMask != "function" && (h.InputMask = m);
|
|
14
|
+
function g({ className: e, classNames: n, components: i, showOutsideDays: a = !0, ...c }) {
|
|
15
|
+
return /* @__PURE__ */ l(r, {
|
|
53
16
|
weekStartsOn: 1,
|
|
54
|
-
showOutsideDays:
|
|
55
|
-
className:
|
|
56
|
-
classNames:
|
|
57
|
-
|
|
17
|
+
showOutsideDays: a,
|
|
18
|
+
className: t("p-3", e),
|
|
19
|
+
classNames: {
|
|
20
|
+
month: "space-y-4",
|
|
21
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative gap-2",
|
|
22
|
+
month_caption: "flex justify-center pt-1 relative items-center",
|
|
23
|
+
month_grid: "w-full border-collapse space-y-1",
|
|
24
|
+
caption_label: "text-sm font-medium",
|
|
25
|
+
nav: "flex items-center justify-between absolute inset-x-0 z-10",
|
|
26
|
+
button_previous: "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10",
|
|
27
|
+
button_next: "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent p-0 opacity-50 shadow-sm transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 z-10",
|
|
28
|
+
weeks: "w-full border-collapse",
|
|
29
|
+
weekdays: "flex",
|
|
30
|
+
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
31
|
+
week: "flex w-full mt-2",
|
|
32
|
+
day: "h-9 w-9 p-0 font-normal aria-selected:opacity-100 rounded-md first:aria-selected:rounded-l-md last:aria-selected:rounded-r-md",
|
|
33
|
+
day_button: "inline-flex h-9 w-9 items-center justify-center rounded-md p-0 text-center text-sm font-normal transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
34
|
+
range_start: "day-range-start !bg-accent rounded-l-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
35
|
+
range_end: "day-range-end !bg-accent rounded-r-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
36
|
+
range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground !rounded-none",
|
|
37
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
38
|
+
today: "bg-gray-50 text-accent-foreground !rounded-md",
|
|
39
|
+
outside: "day-outside text-muted-foreground opacity-50 !aria-selected:bg-accent/50 !aria-selected:text-muted-foreground !aria-selected:opacity-30",
|
|
40
|
+
disabled: "text-muted-foreground opacity-50",
|
|
41
|
+
hidden: "invisible",
|
|
42
|
+
...n
|
|
43
|
+
},
|
|
44
|
+
components: {
|
|
45
|
+
Chevron: (e) => e.orientation === "left" ? /* @__PURE__ */ l(o, {
|
|
46
|
+
...e,
|
|
47
|
+
className: "h-4 w-4"
|
|
48
|
+
}) : /* @__PURE__ */ l(s, {
|
|
49
|
+
...e,
|
|
50
|
+
className: "h-4 w-4"
|
|
51
|
+
}),
|
|
52
|
+
...i
|
|
53
|
+
},
|
|
58
54
|
...c
|
|
59
|
-
}), n[12] = c, n[13] = d, n[14] = f, n[15] = p, n[16] = m, n[17] = h) : h = n[17], h;
|
|
60
|
-
}
|
|
61
|
-
function v(e) {
|
|
62
|
-
return e.orientation === "left" ? /* @__PURE__ */ u(s, {
|
|
63
|
-
...e,
|
|
64
|
-
className: "h-4 w-4"
|
|
65
|
-
}) : /* @__PURE__ */ u(c, {
|
|
66
|
-
...e,
|
|
67
|
-
className: "h-4 w-4"
|
|
68
55
|
});
|
|
69
56
|
}
|
|
70
|
-
|
|
71
|
-
function
|
|
57
|
+
g.displayName = "DayPicker";
|
|
58
|
+
function _(e) {
|
|
72
59
|
return String(e).padStart(2, "0");
|
|
73
60
|
}
|
|
74
|
-
function
|
|
61
|
+
function v(e) {
|
|
75
62
|
let t = new Date(e);
|
|
76
63
|
return t.setHours(0, 0, 0, 0), t;
|
|
77
64
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
65
|
+
function y(e) {
|
|
66
|
+
return v(new Date(e.getFullYear(), e.getMonth(), 1));
|
|
80
67
|
}
|
|
81
|
-
function
|
|
82
|
-
return `${
|
|
68
|
+
function b(e) {
|
|
69
|
+
return `${_(e.getDate())}/${_(e.getMonth() + 1)}/${e.getFullYear()}`;
|
|
83
70
|
}
|
|
84
|
-
function
|
|
71
|
+
function x({ day: e, month: t, year: n }) {
|
|
85
72
|
if (!Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n)) return null;
|
|
86
73
|
let r = new Date(n, t - 1, e);
|
|
87
|
-
return r.getFullYear() !== n || r.getMonth() !== t - 1 || r.getDate() !== e ? null :
|
|
74
|
+
return r.getFullYear() !== n || r.getMonth() !== t - 1 || r.getDate() !== e ? null : v(r);
|
|
88
75
|
}
|
|
89
|
-
function
|
|
76
|
+
function S(e, t) {
|
|
90
77
|
let n = e.trim();
|
|
91
78
|
if (!n) return null;
|
|
92
79
|
let r = /^(\d{2})\/(\d{2})\/(\d{4})$/.exec(n);
|
|
93
|
-
if (r) return
|
|
80
|
+
if (r) return x({
|
|
94
81
|
day: Number(r[1]),
|
|
95
82
|
month: Number(r[2]),
|
|
96
83
|
year: Number(r[3])
|
|
@@ -98,37 +85,37 @@ function w(e, t) {
|
|
|
98
85
|
let i = /^(\d{2})\/(\d{2})\/(\d{2})$/.exec(n);
|
|
99
86
|
if (i) {
|
|
100
87
|
let e = Number(i[3]);
|
|
101
|
-
return Number.isFinite(e) ?
|
|
88
|
+
return Number.isFinite(e) ? x({
|
|
102
89
|
day: Number(i[1]),
|
|
103
90
|
month: Number(i[2]),
|
|
104
91
|
year: 2e3 + e
|
|
105
92
|
}) : null;
|
|
106
93
|
}
|
|
107
94
|
let a = /^(\d{2})\/(\d{2})$/.exec(n);
|
|
108
|
-
return a ?
|
|
95
|
+
return a ? x({
|
|
109
96
|
day: Number(a[1]),
|
|
110
97
|
month: Number(a[2]),
|
|
111
98
|
year: t.getFullYear()
|
|
112
99
|
}) : null;
|
|
113
100
|
}
|
|
114
|
-
var
|
|
115
|
-
let P =
|
|
101
|
+
var C = i.forwardRef(function({ value: e, onChange: r, onValueUpdate: o, className: s, inputClassName: p, placeholder: m = "DD/MM/YYYY", disabled: h, readOnly: x, open: C, onOpenChange: w, dayPickerComponent: T, dayPickerProps: E, onFocus: D, onBlur: O, onKeyDown: k, onPointerDown: A, onMouseDown: j, ...M }, N) {
|
|
102
|
+
let P = i.useRef(null), F = i.useRef(null), I = i.useRef(null), L = i.useRef(!1), R = i.useRef(!1), z = i.useRef(!1), B = i.useRef(!1), V = i.useRef(!1), H = i.useRef(null), [ee, te] = i.useState(!1), U = C ?? ee, W = w ?? te;
|
|
116
103
|
R.current = U;
|
|
117
|
-
let [G, K] =
|
|
104
|
+
let [G, K] = i.useState(() => e ? b(e) : ""), q = i.useMemo(() => S(G, /* @__PURE__ */ new Date()), [G]), [ne, J] = i.useState(() => y(e ?? /* @__PURE__ */ new Date())), [Y, re] = i.useState(() => ({
|
|
118
105
|
left: 0,
|
|
119
106
|
top: 0
|
|
120
|
-
})), X =
|
|
121
|
-
|
|
122
|
-
}, [
|
|
123
|
-
|
|
124
|
-
}, [r,
|
|
125
|
-
|
|
126
|
-
L.current || K(e ?
|
|
127
|
-
}, [e]),
|
|
128
|
-
U && J(
|
|
129
|
-
}, [U, e]),
|
|
130
|
-
U && q && J(
|
|
131
|
-
}, [q, U]),
|
|
107
|
+
})), X = i.useCallback((e) => {
|
|
108
|
+
o && o(e);
|
|
109
|
+
}, [o]), Z = i.useCallback((e) => {
|
|
110
|
+
o && o(e), r(e);
|
|
111
|
+
}, [r, o]);
|
|
112
|
+
i.useEffect(() => {
|
|
113
|
+
L.current || K(e ? b(e) : "");
|
|
114
|
+
}, [e]), i.useEffect(() => {
|
|
115
|
+
U && J(y(e ?? /* @__PURE__ */ new Date()));
|
|
116
|
+
}, [U, e]), i.useEffect(() => {
|
|
117
|
+
U && q && J(y(q));
|
|
118
|
+
}, [q, U]), i.useEffect(() => {
|
|
132
119
|
if (!U) return;
|
|
133
120
|
let e = P.current?.ownerDocument ?? document, t = e.defaultView ?? window, n = (e) => {
|
|
134
121
|
let t = e.target;
|
|
@@ -141,7 +128,7 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
141
128
|
return e.addEventListener("pointerdown", n, !0), t.addEventListener("keydown", r, !0), () => {
|
|
142
129
|
e.removeEventListener("pointerdown", n, !0), t.removeEventListener("keydown", r, !0);
|
|
143
130
|
};
|
|
144
|
-
}, [U]),
|
|
131
|
+
}, [U]), i.useEffect(() => {
|
|
145
132
|
if (!U || typeof window > "u" || !("IntersectionObserver" in window)) return;
|
|
146
133
|
let e = P.current;
|
|
147
134
|
if (!e) return;
|
|
@@ -154,9 +141,9 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
154
141
|
t = !1, n.disconnect();
|
|
155
142
|
};
|
|
156
143
|
}, [U]);
|
|
157
|
-
let ie =
|
|
144
|
+
let ie = i.useCallback((e) => {
|
|
158
145
|
I.current = e, typeof N == "function" ? N(e) : N && (N.current = e);
|
|
159
|
-
}, [N]), Q = () => W(!1), ae = T ??
|
|
146
|
+
}, [N]), Q = () => W(!1), ae = T ?? g, $ = i.useCallback(() => {
|
|
160
147
|
if (typeof window > "u") return;
|
|
161
148
|
let e = P.current, t = F.current;
|
|
162
149
|
if (!e || !t) return;
|
|
@@ -168,7 +155,7 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
168
155
|
top: c
|
|
169
156
|
});
|
|
170
157
|
}, []);
|
|
171
|
-
return
|
|
158
|
+
return i.useLayoutEffect(() => {
|
|
172
159
|
if (!U || h || typeof window > "u") return;
|
|
173
160
|
$();
|
|
174
161
|
let e = window.requestAnimationFrame($);
|
|
@@ -179,16 +166,16 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
179
166
|
h,
|
|
180
167
|
U,
|
|
181
168
|
$
|
|
182
|
-
]), /* @__PURE__ */
|
|
169
|
+
]), /* @__PURE__ */ u("div", {
|
|
183
170
|
ref: P,
|
|
184
171
|
"data-slot": "day-picker-input",
|
|
185
172
|
className: t("relative group", s),
|
|
186
173
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ l(f, {
|
|
188
175
|
...M,
|
|
189
176
|
"data-slot": "day-picker-input-input",
|
|
190
177
|
disabled: h,
|
|
191
|
-
readOnly:
|
|
178
|
+
readOnly: x,
|
|
192
179
|
autoComplete: "off",
|
|
193
180
|
inputRef: ie,
|
|
194
181
|
mask: [
|
|
@@ -211,10 +198,10 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
211
198
|
},
|
|
212
199
|
placeholder: m,
|
|
213
200
|
value: G,
|
|
214
|
-
className: t("flex h-10 w-full rounded-md border border-input bg-background py-2 pr-3 pl-[37px] text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground",
|
|
201
|
+
className: t("flex h-10 w-full rounded-md border border-input bg-background py-2 pr-3 pl-[37px] text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground", p),
|
|
215
202
|
onAccept: (e) => {
|
|
216
203
|
let t = typeof e == "string" ? e : String(e ?? ""), n = G.replace(/\D/g, "").length;
|
|
217
|
-
K(t), t.replace(/\D/g, "").length === 0 && (U && J(
|
|
204
|
+
K(t), t.replace(/\D/g, "").length === 0 && (U && J(y(/* @__PURE__ */ new Date())), n !== 0 && X(null));
|
|
218
205
|
},
|
|
219
206
|
onComplete: (t) => {
|
|
220
207
|
let n = typeof t == "string" ? t : String(t ?? "");
|
|
@@ -222,8 +209,8 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
222
209
|
H.current = null;
|
|
223
210
|
return;
|
|
224
211
|
}
|
|
225
|
-
let r =
|
|
226
|
-
r && (e && r.getTime() ===
|
|
212
|
+
let r = S(n, /* @__PURE__ */ new Date());
|
|
213
|
+
r && (e && r.getTime() === v(e).getTime() || X(r));
|
|
227
214
|
},
|
|
228
215
|
onPointerDown: (e) => {
|
|
229
216
|
z.current = !0, B.current = typeof document < "u" && document.activeElement === e.currentTarget, A?.(e);
|
|
@@ -245,22 +232,22 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
245
232
|
if (t.key === "Enter") {
|
|
246
233
|
if (!q) return;
|
|
247
234
|
if (t.preventDefault(), U) {
|
|
248
|
-
let e = `${q.getFullYear()}-${
|
|
235
|
+
let e = `${q.getFullYear()}-${_(q.getMonth() + 1)}-${_(q.getDate())}`, t = F.current?.querySelector(`[data-day='${e}']:not([data-outside]) button`);
|
|
249
236
|
if (t instanceof HTMLButtonElement) {
|
|
250
237
|
if (t.disabled) return;
|
|
251
238
|
t.focus();
|
|
252
239
|
}
|
|
253
240
|
}
|
|
254
|
-
K(
|
|
241
|
+
K(b(q)), Z(q), W(!1);
|
|
255
242
|
return;
|
|
256
243
|
}
|
|
257
244
|
if (t.key === "ArrowUp" || t.key === "ArrowDown") {
|
|
258
245
|
let r = q ?? e;
|
|
259
246
|
if (!r) return;
|
|
260
|
-
let i =
|
|
247
|
+
let i = v(new Date(r));
|
|
261
248
|
if (i.setDate(i.getDate() + (t.key === "ArrowUp" ? 1 : -1)), E?.disabled && n(i, E.disabled)) return;
|
|
262
249
|
t.preventDefault();
|
|
263
|
-
let a =
|
|
250
|
+
let a = b(i);
|
|
264
251
|
H.current = a, K(a), X(i);
|
|
265
252
|
}
|
|
266
253
|
U || (t.key.length === 1 || t.key === "Backspace" || t.key === "Delete" || t.key === "ArrowUp" || t.key === "ArrowDown") && !t.ctrlKey && !t.metaKey && !t.altKey && W(!0), t.key === "Tab" && !t.defaultPrevented && W(!1);
|
|
@@ -286,15 +273,15 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
286
273
|
e && (K(""), Z(null));
|
|
287
274
|
return;
|
|
288
275
|
}
|
|
289
|
-
let a =
|
|
276
|
+
let a = S(i, /* @__PURE__ */ new Date());
|
|
290
277
|
if (a) {
|
|
291
|
-
K(
|
|
278
|
+
K(b(a)), (!e || a.getTime() !== v(e).getTime()) && Z(a);
|
|
292
279
|
return;
|
|
293
280
|
}
|
|
294
|
-
K(e ?
|
|
281
|
+
K(e ? b(e) : "");
|
|
295
282
|
}
|
|
296
283
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ l("button", {
|
|
298
285
|
type: "button",
|
|
299
286
|
tabIndex: -1,
|
|
300
287
|
disabled: h,
|
|
@@ -310,13 +297,13 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
310
297
|
onClick: () => {
|
|
311
298
|
h || (I.current?.focus({ preventScroll: !0 }), W(!0));
|
|
312
299
|
},
|
|
313
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ l(a, {
|
|
314
301
|
"aria-hidden": !0,
|
|
315
302
|
className: "size-4"
|
|
316
303
|
})
|
|
317
304
|
}),
|
|
318
305
|
U && !h && (() => {
|
|
319
|
-
let t = G.trim() === "" ? void 0 : q ?? e ?? void 0, n = /* @__PURE__ */
|
|
306
|
+
let t = G.trim() === "" ? void 0 : q ?? e ?? void 0, n = /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("div", {
|
|
320
307
|
ref: F,
|
|
321
308
|
"data-slot": "day-picker-input-popover",
|
|
322
309
|
className: "pointer-events-auto fixed z-[60] w-max rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
@@ -330,7 +317,7 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
330
317
|
onMouseDownCapture: () => {
|
|
331
318
|
V.current = !0;
|
|
332
319
|
},
|
|
333
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ l(ae, {
|
|
334
321
|
mode: "single",
|
|
335
322
|
month: ne,
|
|
336
323
|
onMonthChange: J,
|
|
@@ -340,28 +327,28 @@ var T = a.forwardRef(function({ value: e, onChange: r, onValueUpdate: i, classNa
|
|
|
340
327
|
e && Z(null), K(""), Q();
|
|
341
328
|
return;
|
|
342
329
|
}
|
|
343
|
-
let n =
|
|
344
|
-
(!e || n.getTime() !==
|
|
330
|
+
let n = v(t);
|
|
331
|
+
(!e || n.getTime() !== v(e).getTime()) && Z(n), K(b(n)), Q();
|
|
345
332
|
},
|
|
346
333
|
...E
|
|
347
334
|
})
|
|
348
335
|
}) });
|
|
349
|
-
return typeof document > "u" ? n :
|
|
336
|
+
return typeof document > "u" ? n : d(n, document.body);
|
|
350
337
|
})()
|
|
351
338
|
]
|
|
352
339
|
});
|
|
353
340
|
});
|
|
354
|
-
|
|
355
|
-
function
|
|
356
|
-
let T =
|
|
341
|
+
C.displayName = "DayPickerInput";
|
|
342
|
+
function w({ id: e, value: n, onChange: r, onValueUpdate: o, className: s, inputClassName: f, placeholder: p = "DD/MM/YYYY", disabled: m, open: h, onOpenChange: _, dayPickerComponent: x, dayPickerProps: S, triggerTestId: C, isHydrated: w }) {
|
|
343
|
+
let T = i.useRef(null), E = i.useRef(null), D = i.useRef(!1), [O, k] = i.useState(!1), A = h ?? O, j = _ ?? k;
|
|
357
344
|
D.current = A;
|
|
358
|
-
let [M, N] =
|
|
345
|
+
let [M, N] = i.useState(() => y(n ?? /* @__PURE__ */ new Date())), [P, F] = i.useState(() => ({
|
|
359
346
|
left: 0,
|
|
360
347
|
top: 0
|
|
361
348
|
}));
|
|
362
|
-
|
|
363
|
-
A && N(
|
|
364
|
-
}, [A, n]),
|
|
349
|
+
i.useEffect(() => {
|
|
350
|
+
A && N(y(n ?? /* @__PURE__ */ new Date()));
|
|
351
|
+
}, [A, n]), i.useEffect(() => {
|
|
365
352
|
if (!A) return;
|
|
366
353
|
let e = T.current?.ownerDocument ?? document, t = e.defaultView ?? window, n = (e) => {
|
|
367
354
|
let t = e.target;
|
|
@@ -374,7 +361,7 @@ function E({ id: e, value: n, onChange: r, onValueUpdate: i, className: s, input
|
|
|
374
361
|
return e.addEventListener("pointerdown", n, !0), t.addEventListener("keydown", r, !0), () => {
|
|
375
362
|
e.removeEventListener("pointerdown", n, !0), t.removeEventListener("keydown", r, !0);
|
|
376
363
|
};
|
|
377
|
-
}, [A]),
|
|
364
|
+
}, [A]), i.useEffect(() => {
|
|
378
365
|
if (!A || typeof window > "u" || !("IntersectionObserver" in window)) return;
|
|
379
366
|
let e = T.current;
|
|
380
367
|
if (!e) return;
|
|
@@ -387,7 +374,7 @@ function E({ id: e, value: n, onChange: r, onValueUpdate: i, className: s, input
|
|
|
387
374
|
t = !1, n.disconnect();
|
|
388
375
|
};
|
|
389
376
|
}, [A]);
|
|
390
|
-
let I =
|
|
377
|
+
let I = x ?? g, L = i.useCallback(() => {
|
|
391
378
|
if (typeof window > "u") return;
|
|
392
379
|
let e = T.current, t = E.current;
|
|
393
380
|
if (!e || !t) return;
|
|
@@ -399,7 +386,7 @@ function E({ id: e, value: n, onChange: r, onValueUpdate: i, className: s, input
|
|
|
399
386
|
top: c
|
|
400
387
|
});
|
|
401
388
|
}, []);
|
|
402
|
-
|
|
389
|
+
i.useLayoutEffect(() => {
|
|
403
390
|
if (!A || m || typeof window > "u") return;
|
|
404
391
|
L();
|
|
405
392
|
let e = window.requestAnimationFrame(L);
|
|
@@ -411,30 +398,30 @@ function E({ id: e, value: n, onChange: r, onValueUpdate: i, className: s, input
|
|
|
411
398
|
A,
|
|
412
399
|
L
|
|
413
400
|
]);
|
|
414
|
-
let R =
|
|
415
|
-
|
|
416
|
-
}, [r,
|
|
417
|
-
return /* @__PURE__ */
|
|
401
|
+
let R = i.useCallback((e) => {
|
|
402
|
+
o && o(e), r(e);
|
|
403
|
+
}, [r, o]);
|
|
404
|
+
return /* @__PURE__ */ u("div", {
|
|
418
405
|
ref: T,
|
|
419
406
|
"data-slot": "day-picker-input",
|
|
420
407
|
className: t("relative group", s),
|
|
421
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ u("button", {
|
|
422
409
|
id: e,
|
|
423
410
|
type: "button",
|
|
424
411
|
disabled: m,
|
|
425
412
|
"data-testid": C,
|
|
426
413
|
"data-hydrated": w ? "true" : void 0,
|
|
427
414
|
"data-slot": "day-picker-input-input",
|
|
428
|
-
className: t("flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-left text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground", !n && "text-muted-foreground", A && "ring-2 ring-primary ring-offset-2",
|
|
415
|
+
className: t("flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-left text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground", !n && "text-muted-foreground", A && "ring-2 ring-primary ring-offset-2", f),
|
|
429
416
|
onClick: () => {
|
|
430
417
|
m || j(!A);
|
|
431
418
|
},
|
|
432
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ l(a, {
|
|
433
420
|
"aria-hidden": !0,
|
|
434
421
|
className: "mr-2 size-4 text-muted-foreground transition-colors group-hover:text-accent-foreground"
|
|
435
|
-
}), n ?
|
|
422
|
+
}), n ? b(n) : p]
|
|
436
423
|
}), A && !m && (() => {
|
|
437
|
-
let e = /* @__PURE__ */
|
|
424
|
+
let e = /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("div", {
|
|
438
425
|
ref: E,
|
|
439
426
|
"data-slot": "day-picker-input-popover",
|
|
440
427
|
className: "pointer-events-auto fixed z-[60] w-max rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
@@ -442,7 +429,7 @@ function E({ id: e, value: n, onChange: r, onValueUpdate: i, className: s, input
|
|
|
442
429
|
left: P.left,
|
|
443
430
|
top: P.top
|
|
444
431
|
},
|
|
445
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ l(I, {
|
|
446
433
|
mode: "single",
|
|
447
434
|
month: M,
|
|
448
435
|
onMonthChange: N,
|
|
@@ -452,42 +439,38 @@ function E({ id: e, value: n, onChange: r, onValueUpdate: i, className: s, input
|
|
|
452
439
|
R(null), j(!1);
|
|
453
440
|
return;
|
|
454
441
|
}
|
|
455
|
-
let t =
|
|
456
|
-
(!n || t.getTime() !==
|
|
442
|
+
let t = v(e);
|
|
443
|
+
(!n || t.getTime() !== v(n).getTime()) && R(t), j(!1);
|
|
457
444
|
},
|
|
458
|
-
...
|
|
445
|
+
...S
|
|
459
446
|
})
|
|
460
447
|
}) });
|
|
461
|
-
return typeof document > "u" ? e :
|
|
448
|
+
return typeof document > "u" ? e : d(e, document.body);
|
|
462
449
|
})()]
|
|
463
450
|
});
|
|
464
451
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
dayPickerProps: h,
|
|
486
|
-
"data-testid": g,
|
|
487
|
-
"data-hydrated": x
|
|
488
|
-
}), n[2] = c, n[3] = m, n[4] = h, n[5] = f, n[6] = r, n[7] = l, n[8] = o, n[9] = y, n[10] = s, n[11] = v, n[12] = b, n[13] = p, n[14] = x, n[15] = g, n[16] = a, n[17] = S) : S = n[17], S;
|
|
452
|
+
function T(t) {
|
|
453
|
+
if (e()) return /* @__PURE__ */ l(w, { ...t });
|
|
454
|
+
let { id: n, value: r, onChange: i, onValueUpdate: a, className: o, inputClassName: s, placeholder: c = "DD/MM/YYYY", disabled: u, readOnly: d, dayPickerComponent: f, dayPickerProps: p, triggerTestId: m, isHydrated: h, open: g, onOpenChange: _ } = t;
|
|
455
|
+
return /* @__PURE__ */ l(C, {
|
|
456
|
+
id: n,
|
|
457
|
+
value: r,
|
|
458
|
+
onChange: i,
|
|
459
|
+
onValueUpdate: a,
|
|
460
|
+
className: o,
|
|
461
|
+
inputClassName: s,
|
|
462
|
+
placeholder: c,
|
|
463
|
+
disabled: u,
|
|
464
|
+
readOnly: d,
|
|
465
|
+
open: g,
|
|
466
|
+
onOpenChange: _,
|
|
467
|
+
dayPickerComponent: f,
|
|
468
|
+
dayPickerProps: p,
|
|
469
|
+
"data-testid": m,
|
|
470
|
+
"data-hydrated": h ? "true" : void 0
|
|
471
|
+
});
|
|
489
472
|
}
|
|
490
473
|
//#endregion
|
|
491
|
-
export {
|
|
474
|
+
export { g as DayPicker, T as DayPickerField, C as DayPickerInput };
|
|
492
475
|
|
|
493
476
|
//# sourceMappingURL=index182.js.map
|