@rpcbase/ui 0.279.0 → 0.281.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.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/index300.js
CHANGED
|
@@ -1,32 +1,422 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as e } from "./index12.js";
|
|
2
2
|
import { c as t } from "react/compiler-runtime";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import a, { components as o } from "react-select";
|
|
6
|
+
//#region src/components/I18nField/index.tsx
|
|
7
|
+
var s = n.createContext(null);
|
|
8
|
+
function c(e) {
|
|
9
|
+
let i = t(17), { children: a, value: o, defaultValue: c, onChange: l, locales: u } = e, d = o !== void 0, h;
|
|
10
|
+
i[0] !== c || i[1] !== u ? (h = m([c, ...p()], u), i[0] = c, i[1] = u, i[2] = h) : h = i[2];
|
|
11
|
+
let g = h, [_, v] = n.useState(g), y = o ?? _, b;
|
|
12
|
+
i[3] !== d || i[4] !== l ? (b = (e) => {
|
|
13
|
+
d || v(e), l?.(e);
|
|
14
|
+
}, i[3] = d, i[4] = l, i[5] = b) : b = i[5];
|
|
15
|
+
let x = b, S, C;
|
|
16
|
+
i[6] !== g || i[7] !== d || i[8] !== u ? (S = () => {
|
|
17
|
+
d || v((e) => f(e, u) ? e : g);
|
|
18
|
+
}, C = [
|
|
19
|
+
g,
|
|
20
|
+
d,
|
|
21
|
+
u
|
|
22
|
+
], i[6] = g, i[7] = d, i[8] = u, i[9] = S, i[10] = C) : (S = i[9], C = i[10]), n.useEffect(S, C);
|
|
23
|
+
let w;
|
|
24
|
+
i[11] !== y || i[12] !== x ? (w = {
|
|
25
|
+
locale: y,
|
|
26
|
+
setLocale: x
|
|
27
|
+
}, i[11] = y, i[12] = x, i[13] = w) : w = i[13];
|
|
28
|
+
let T = w, E;
|
|
29
|
+
return i[14] !== a || i[15] !== T ? (E = /* @__PURE__ */ r(s.Provider, {
|
|
30
|
+
value: T,
|
|
31
|
+
children: a
|
|
32
|
+
}), i[14] = a, i[15] = T, i[16] = E) : E = i[16], E;
|
|
28
33
|
}
|
|
34
|
+
var l = "en";
|
|
35
|
+
function u(e) {
|
|
36
|
+
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
37
|
+
}
|
|
38
|
+
function d(e) {
|
|
39
|
+
return u(e).split("-")[0] ?? "";
|
|
40
|
+
}
|
|
41
|
+
function f(e, t) {
|
|
42
|
+
let n = typeof e == "string" ? u(e) : "";
|
|
43
|
+
if (!n) return null;
|
|
44
|
+
let r = (t ?? []).filter((e) => typeof e == "string" && e.length > 0);
|
|
45
|
+
return r.length === 0 ? e?.trim() ?? n : r.find((e) => u(e) === n) ?? r.find((e) => d(e) === d(n)) ?? null;
|
|
46
|
+
}
|
|
47
|
+
function p() {
|
|
48
|
+
let e = [];
|
|
49
|
+
return typeof document < "u" && e.push(document.documentElement.lang), typeof navigator < "u" && e.push(...Array.from(navigator.languages ?? []), navigator.language), e;
|
|
50
|
+
}
|
|
51
|
+
function m(e, t) {
|
|
52
|
+
for (let n of e) {
|
|
53
|
+
let e = f(n, t);
|
|
54
|
+
if (e) return e;
|
|
55
|
+
}
|
|
56
|
+
return f(l, t) || (t?.[0] ?? l);
|
|
57
|
+
}
|
|
58
|
+
function h(e) {
|
|
59
|
+
let t = (e.split("-")[0] ?? "").replace(/[^A-Za-z]/g, "");
|
|
60
|
+
return t ? t.slice(0, 3).toUpperCase() : "?";
|
|
61
|
+
}
|
|
62
|
+
function g(e) {
|
|
63
|
+
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
64
|
+
}
|
|
65
|
+
function _(e) {
|
|
66
|
+
return g(e).toLowerCase();
|
|
67
|
+
}
|
|
68
|
+
function v(e, t) {
|
|
69
|
+
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
70
|
+
let n = t.split("-").filter(Boolean);
|
|
71
|
+
for (; n.length > 1;) {
|
|
72
|
+
n.pop();
|
|
73
|
+
let t = n.join("-");
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function y(e, t) {
|
|
78
|
+
return v(e, t)?.value ?? "";
|
|
79
|
+
}
|
|
80
|
+
function b(e, t) {
|
|
81
|
+
if (typeof Intl > "u" || Intl.DisplayNames === void 0) return null;
|
|
82
|
+
try {
|
|
83
|
+
let n = Array.isArray(e) ? e : e ? [e] : void 0;
|
|
84
|
+
return new Intl.DisplayNames(n, { type: t });
|
|
85
|
+
} catch {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function x(e, t) {
|
|
90
|
+
if (e) try {
|
|
91
|
+
return e.of(t) ?? void 0;
|
|
92
|
+
} catch {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function S(e, t) {
|
|
97
|
+
let n = b(e, "language"), r = b("en", "language");
|
|
98
|
+
return (t ?? []).filter((e) => typeof e == "string" && e.length > 0).map((e) => {
|
|
99
|
+
let t = x(n, e) ?? x(r, e) ?? e;
|
|
100
|
+
return {
|
|
101
|
+
value: e,
|
|
102
|
+
name: t,
|
|
103
|
+
code: e,
|
|
104
|
+
searchable: Array.from(/* @__PURE__ */ new Set([
|
|
105
|
+
t,
|
|
106
|
+
x(r, e) ?? e,
|
|
107
|
+
e.toLowerCase(),
|
|
108
|
+
e.toUpperCase()
|
|
109
|
+
])).map((e) => _(e))
|
|
110
|
+
};
|
|
111
|
+
}).sort((e, t) => e.name.localeCompare(t.name));
|
|
112
|
+
}
|
|
113
|
+
var C = {
|
|
114
|
+
control: () => ({ display: "none" }),
|
|
115
|
+
menu: (e) => ({
|
|
116
|
+
...e,
|
|
117
|
+
marginTop: 4,
|
|
118
|
+
borderRadius: "var(--radius)",
|
|
119
|
+
boxShadow: "0 18px 36px rgba(15, 23, 42, 0.18)",
|
|
120
|
+
backgroundColor: "hsl(var(--popover))",
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
zIndex: 30
|
|
123
|
+
}),
|
|
124
|
+
menuList: (e) => ({
|
|
125
|
+
...e,
|
|
126
|
+
maxHeight: 280,
|
|
127
|
+
padding: 0,
|
|
128
|
+
display: "flex",
|
|
129
|
+
flexDirection: "column",
|
|
130
|
+
overflow: "hidden"
|
|
131
|
+
}),
|
|
132
|
+
option: (e, t) => ({
|
|
133
|
+
...e,
|
|
134
|
+
fontSize: "0.875rem",
|
|
135
|
+
backgroundColor: t.isFocused ? "hsl(var(--muted))" : t.isSelected ? "hsl(var(--accent))" : "transparent",
|
|
136
|
+
color: t.isSelected ? "hsl(var(--accent-foreground))" : "hsl(var(--foreground))",
|
|
137
|
+
cursor: "pointer"
|
|
138
|
+
}),
|
|
139
|
+
noOptionsMessage: (e) => ({
|
|
140
|
+
...e,
|
|
141
|
+
fontSize: "0.875rem",
|
|
142
|
+
color: "hsl(var(--muted-foreground))"
|
|
143
|
+
})
|
|
144
|
+
}, w = () => {
|
|
145
|
+
let e = t(1), n;
|
|
146
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ r("div", { style: { display: "none" } }), e[0] = n) : n = e[0], n;
|
|
147
|
+
}, T = () => null, E = n.createContext(null);
|
|
148
|
+
function ee(e) {
|
|
149
|
+
let t = n.useContext(E), { children: a } = e;
|
|
150
|
+
return /* @__PURE__ */ i(o.MenuList, {
|
|
151
|
+
...e,
|
|
152
|
+
className: "!p-0 flex flex-col overflow-hidden",
|
|
153
|
+
children: [
|
|
154
|
+
t ? /* @__PURE__ */ r("div", {
|
|
155
|
+
className: "border-b border-muted px-2 pb-2 pt-2",
|
|
156
|
+
children: /* @__PURE__ */ r("input", {
|
|
157
|
+
ref: t.searchInputRef,
|
|
158
|
+
value: t.searchTerm,
|
|
159
|
+
onChange: (e) => t.setSearchTerm(e.target.value),
|
|
160
|
+
onKeyDown: t.onSearchKeyDown,
|
|
161
|
+
className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
|
|
162
|
+
placeholder: "Search language…"
|
|
163
|
+
})
|
|
164
|
+
}) : null,
|
|
165
|
+
/* @__PURE__ */ r("div", {
|
|
166
|
+
className: "max-h-60 overflow-y-auto",
|
|
167
|
+
children: a
|
|
168
|
+
}),
|
|
169
|
+
t?.selectFooter ? /* @__PURE__ */ r("div", {
|
|
170
|
+
className: "border-t border-muted bg-muted/60 px-3 py-2 text-xs text-muted-foreground",
|
|
171
|
+
children: t.selectFooter
|
|
172
|
+
}) : null
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function te(n) {
|
|
177
|
+
let a = t(12), { data: o, innerRef: s, innerProps: c, isFocused: l, isSelected: u } = n, d = u ? "bg-accent text-accent-foreground" : l ? "bg-muted text-foreground" : "text-foreground", f;
|
|
178
|
+
a[0] === d ? f = a[1] : (f = e("flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm", d), a[0] = d, a[1] = f);
|
|
179
|
+
let p;
|
|
180
|
+
a[2] === o.name ? p = a[3] : (p = /* @__PURE__ */ r("span", {
|
|
181
|
+
className: "flex min-w-0 items-center gap-2",
|
|
182
|
+
children: /* @__PURE__ */ r("span", {
|
|
183
|
+
className: "truncate",
|
|
184
|
+
children: o.name
|
|
185
|
+
})
|
|
186
|
+
}), a[2] = o.name, a[3] = p);
|
|
187
|
+
let m;
|
|
188
|
+
a[4] === o.code ? m = a[5] : (m = /* @__PURE__ */ r("span", {
|
|
189
|
+
className: "text-xs text-muted-foreground uppercase",
|
|
190
|
+
children: o.code
|
|
191
|
+
}), a[4] = o.code, a[5] = m);
|
|
192
|
+
let h;
|
|
193
|
+
return a[6] !== c || a[7] !== s || a[8] !== f || a[9] !== p || a[10] !== m ? (h = /* @__PURE__ */ i("div", {
|
|
194
|
+
ref: s,
|
|
195
|
+
...c,
|
|
196
|
+
className: f,
|
|
197
|
+
children: [p, m]
|
|
198
|
+
}), a[6] = c, a[7] = s, a[8] = f, a[9] = p, a[10] = m, a[11] = h) : h = a[11], h;
|
|
199
|
+
}
|
|
200
|
+
var D = n.forwardRef(function(t, o) {
|
|
201
|
+
let { value: c, defaultValue: u, locale: d, defaultLocale: f, onChange: g, onLocaleChange: v, locales: b, multiline: x, className: D, inputClassName: ne, selectProps: re, selectFooter: ie, languageSelectTabIndex: ae = -1, disabled: O, ...oe } = t, { rows: se, ...k } = oe, A = n.useMemo(() => c ?? u ?? {}, [u, c]), [ce, j] = n.useState(A), M = c !== void 0, N = M ? c ?? {} : ce, [P, F] = n.useState(""), I = n.useContext(s), L = n.useMemo(() => S(void 0, Array.from(/* @__PURE__ */ new Set([...b ?? [], ...Object.keys(N)]))), [N, b]), le = n.useMemo(() => {
|
|
202
|
+
let e = L.map((e) => e.value);
|
|
203
|
+
return d ?? I?.locale ?? m([
|
|
204
|
+
f,
|
|
205
|
+
...p(),
|
|
206
|
+
Object.keys(N)[0]
|
|
207
|
+
], e);
|
|
208
|
+
}, [
|
|
209
|
+
N,
|
|
210
|
+
f,
|
|
211
|
+
I?.locale,
|
|
212
|
+
L,
|
|
213
|
+
d
|
|
214
|
+
]), [R, z] = n.useState(le), B = d ?? I?.locale ?? R;
|
|
215
|
+
n.useEffect(() => {
|
|
216
|
+
M || j(A);
|
|
217
|
+
}, [A, M]), n.useEffect(() => {
|
|
218
|
+
d && d !== R && z(d);
|
|
219
|
+
}, [R, d]), n.useEffect(() => {
|
|
220
|
+
!d && I?.locale && I.locale !== R && z(I.locale);
|
|
221
|
+
}, [
|
|
222
|
+
R,
|
|
223
|
+
I?.locale,
|
|
224
|
+
d
|
|
225
|
+
]);
|
|
226
|
+
let V = L.find((e) => e.value === B) ?? L.find((e) => e.value === l) ?? L[0] ?? null, [H, U] = n.useState(!1), W = n.useRef(null), G = n.useRef(null), K = n.useRef(null), q = n.useRef(null), J = n.useRef(null), Y = n.useRef(null), ue = n.useRef(null), [de, fe] = n.useState({
|
|
227
|
+
left: 0,
|
|
228
|
+
top: 0
|
|
229
|
+
});
|
|
230
|
+
n.useImperativeHandle(o, () => G.current, []);
|
|
231
|
+
let pe = (e) => {
|
|
232
|
+
if (!e) return;
|
|
233
|
+
let t = e.value;
|
|
234
|
+
M || z(t), v?.(t, e), I?.setLocale(t), Q(!0);
|
|
235
|
+
}, me = (e) => {
|
|
236
|
+
let t = N[B], n = {
|
|
237
|
+
...N,
|
|
238
|
+
[B]: {
|
|
239
|
+
...t ?? {},
|
|
240
|
+
value: e.target.value,
|
|
241
|
+
updatedAt: /* @__PURE__ */ new Date(),
|
|
242
|
+
autoTranslated: !1
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
M || j(n), g?.(n);
|
|
246
|
+
}, he = y(N, B), X = n.useCallback((e) => {
|
|
247
|
+
if (!P) return !0;
|
|
248
|
+
let t = _(P);
|
|
249
|
+
return e.data.searchable.some((e) => e.includes(t));
|
|
250
|
+
}, [P]), ge = x ? "left-2 top-2 -translate-y-0" : "left-3 top-1/2 -translate-y-1/2", Z = n.useCallback(() => {
|
|
251
|
+
let e = K.current, t = q.current;
|
|
252
|
+
if (!e || !t) return;
|
|
253
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
254
|
+
fe({
|
|
255
|
+
left: n.left - r.left,
|
|
256
|
+
top: n.bottom - r.top + 4
|
|
257
|
+
});
|
|
258
|
+
}, []), _e = n.useCallback((e) => !e || !(e instanceof Node) ? !1 : !!W.current?.contains(e), []), ve = n.useCallback(() => {
|
|
259
|
+
let e = G.current;
|
|
260
|
+
if (!e) return;
|
|
261
|
+
e.focus();
|
|
262
|
+
let t = ue.current;
|
|
263
|
+
t && t.start != null && t.end != null && e.setSelectionRange(t.start, t.end);
|
|
264
|
+
}, []);
|
|
265
|
+
n.useEffect(() => {
|
|
266
|
+
if (!H) return;
|
|
267
|
+
let e = Y.current;
|
|
268
|
+
e && requestAnimationFrame(() => {
|
|
269
|
+
if (document.activeElement === e) return;
|
|
270
|
+
e.focus();
|
|
271
|
+
let t = e.value.length;
|
|
272
|
+
try {
|
|
273
|
+
e.setSelectionRange(t, t);
|
|
274
|
+
} catch {}
|
|
275
|
+
});
|
|
276
|
+
}, [H, P]);
|
|
277
|
+
let Q = n.useCallback((e = !0) => {
|
|
278
|
+
U(!1), F(""), e && requestAnimationFrame(() => {
|
|
279
|
+
ve();
|
|
280
|
+
});
|
|
281
|
+
}, [ve]), { components: ye, styles: be, classNamePrefix: xe, placeholder: Se, noOptionsMessage: Ce, ...we } = re ?? {}, Te = n.useMemo(() => {
|
|
282
|
+
let e = _(P), t = (t) => {
|
|
283
|
+
let n = t.code.toLowerCase();
|
|
284
|
+
return e && n === e ? 0 : e && n.startsWith(e) ? 1 : e && t.searchable.some((t) => t.startsWith(e)) ? 2 : e && t.searchable.some((t) => t.includes(e)) ? 3 : 4;
|
|
285
|
+
};
|
|
286
|
+
return L.filter((e) => X({ data: e })).sort((e, n) => {
|
|
287
|
+
let r = t(e) - t(n);
|
|
288
|
+
return r === 0 ? e.name.localeCompare(n.name) : r;
|
|
289
|
+
});
|
|
290
|
+
}, [
|
|
291
|
+
X,
|
|
292
|
+
L,
|
|
293
|
+
P
|
|
294
|
+
]), Ee = {
|
|
295
|
+
searchTerm: P,
|
|
296
|
+
setSearchTerm: F,
|
|
297
|
+
onSearchKeyDown: (e) => {
|
|
298
|
+
if (e.key === "Escape") {
|
|
299
|
+
e.preventDefault(), Q(!0);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (e.key === "Enter") {
|
|
303
|
+
e.preventDefault();
|
|
304
|
+
let t = Te[0];
|
|
305
|
+
t && pe(t);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), J.current?.focus());
|
|
309
|
+
},
|
|
310
|
+
searchInputRef: Y,
|
|
311
|
+
selectFooter: ie
|
|
312
|
+
}, De = n.useMemo(() => ({
|
|
313
|
+
Control: w,
|
|
314
|
+
IndicatorsContainer: T,
|
|
315
|
+
DropdownIndicator: T,
|
|
316
|
+
IndicatorSeparator: T,
|
|
317
|
+
ValueContainer: T,
|
|
318
|
+
MenuList: ee,
|
|
319
|
+
...ye ?? {},
|
|
320
|
+
Option: te
|
|
321
|
+
}), [ye]), Oe = n.useMemo(() => ({
|
|
322
|
+
...C,
|
|
323
|
+
...be ?? {}
|
|
324
|
+
}), [be]);
|
|
325
|
+
n.useLayoutEffect(() => {
|
|
326
|
+
if (!H) return;
|
|
327
|
+
Z();
|
|
328
|
+
let e = () => Z();
|
|
329
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
330
|
+
}, [H, Z]);
|
|
331
|
+
let $ = {
|
|
332
|
+
...k,
|
|
333
|
+
ref: G,
|
|
334
|
+
disabled: O,
|
|
335
|
+
value: he,
|
|
336
|
+
onChange: me,
|
|
337
|
+
onFocus: (e) => {
|
|
338
|
+
H && Q(!1), k.onFocus?.(e);
|
|
339
|
+
},
|
|
340
|
+
onBlur: (e) => {
|
|
341
|
+
_e(e.relatedTarget) || Q(!1), k.onBlur?.(e);
|
|
342
|
+
},
|
|
343
|
+
className: e("w-full rounded-md border border-input bg-background 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", x ? "min-h-24 py-2" : "h-10 py-2", "pl-10 pr-3", ne),
|
|
344
|
+
placeholder: k.placeholder
|
|
345
|
+
};
|
|
346
|
+
return /* @__PURE__ */ i("div", {
|
|
347
|
+
ref: W,
|
|
348
|
+
className: e("relative flex flex-col", D),
|
|
349
|
+
onBlur: (e) => {
|
|
350
|
+
_e(e.relatedTarget) || Q(!1);
|
|
351
|
+
},
|
|
352
|
+
children: [/* @__PURE__ */ i("div", {
|
|
353
|
+
ref: q,
|
|
354
|
+
className: "relative",
|
|
355
|
+
children: [x ? /* @__PURE__ */ r("textarea", {
|
|
356
|
+
rows: se,
|
|
357
|
+
...$
|
|
358
|
+
}) : /* @__PURE__ */ r("input", {
|
|
359
|
+
type: "text",
|
|
360
|
+
...$
|
|
361
|
+
}), /* @__PURE__ */ r("button", {
|
|
362
|
+
type: "button",
|
|
363
|
+
className: e("absolute flex h-6 w-6 items-center justify-center rounded border text-xs font-semibold leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", ge, O ? "cursor-not-allowed opacity-50 pointer-events-none" : "cursor-pointer hover:bg-muted", V ? "border-transparent" : "border-dashed border-border text-muted-foreground"),
|
|
364
|
+
"aria-label": V ? `Select language (${V.code})` : "Select language",
|
|
365
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
366
|
+
onClick: () => {
|
|
367
|
+
if (O) return;
|
|
368
|
+
let e = G.current;
|
|
369
|
+
e && (ue.current = {
|
|
370
|
+
start: e.selectionStart,
|
|
371
|
+
end: e.selectionEnd
|
|
372
|
+
}), F(""), U(!0), requestAnimationFrame(() => {
|
|
373
|
+
Y.current ? (Y.current.focus(), Y.current.select()) : J.current?.focus();
|
|
374
|
+
});
|
|
375
|
+
},
|
|
376
|
+
tabIndex: ae,
|
|
377
|
+
disabled: O,
|
|
378
|
+
ref: K,
|
|
379
|
+
children: /* @__PURE__ */ r("span", {
|
|
380
|
+
"aria-hidden": "true",
|
|
381
|
+
children: V ? h(V.code) : "?"
|
|
382
|
+
})
|
|
383
|
+
})]
|
|
384
|
+
}), /* @__PURE__ */ r("div", {
|
|
385
|
+
className: "absolute left-0 top-full z-30 mt-1",
|
|
386
|
+
style: {
|
|
387
|
+
pointerEvents: H ? "auto" : "none",
|
|
388
|
+
width: "min(260px, 100%)",
|
|
389
|
+
left: de.left,
|
|
390
|
+
top: de.top
|
|
391
|
+
},
|
|
392
|
+
children: /* @__PURE__ */ r(E.Provider, {
|
|
393
|
+
value: Ee,
|
|
394
|
+
children: /* @__PURE__ */ r(a, {
|
|
395
|
+
...we,
|
|
396
|
+
menuIsOpen: H,
|
|
397
|
+
options: Te,
|
|
398
|
+
value: null,
|
|
399
|
+
onChange: pe,
|
|
400
|
+
classNamePrefix: xe ?? "i18n-language-select",
|
|
401
|
+
components: De,
|
|
402
|
+
styles: Oe,
|
|
403
|
+
isClearable: !1,
|
|
404
|
+
isSearchable: !1,
|
|
405
|
+
backspaceRemovesValue: !1,
|
|
406
|
+
tabSelectsValue: !0,
|
|
407
|
+
menuShouldScrollIntoView: !1,
|
|
408
|
+
placeholder: Se ?? "",
|
|
409
|
+
filterOption: X,
|
|
410
|
+
noOptionsMessage: Ce,
|
|
411
|
+
onMenuClose: () => Q(!0),
|
|
412
|
+
ref: J
|
|
413
|
+
})
|
|
414
|
+
})
|
|
415
|
+
})]
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
D.displayName = "I18nField";
|
|
29
419
|
//#endregion
|
|
30
|
-
export {
|
|
420
|
+
export { D as I18nField, c as I18nFieldLocaleProvider };
|
|
31
421
|
|
|
32
422
|
//# sourceMappingURL=index300.js.map
|
package/dist/index300.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index300.js","names":["FilesUploadFieldFile","FilesUploadFieldProps","FilesUploadField","ImagesFieldImage","ToImagesFieldProps","T","Omit","initialImages","onChange","images","ImagesFieldProps","defaultImageAccept","ImagesField","t0","$","_c","props","t1","t2","t3","t4","accept","addButtonAriaLabel","removeButtonAriaLabel","t5","undefined","t6"],"sources":["../src/components/ImagesField/index.tsx"],"sourcesContent":["import type { FilesUploadFieldFile, FilesUploadFieldProps } from \"../FilesUploadField\"\nimport { FilesUploadField } from \"../FilesUploadField\"\n\n\nexport type ImagesFieldImage = FilesUploadFieldFile\n\ntype ToImagesFieldProps<T> = T extends unknown\n ? Omit<T, \"initialFiles\" | \"onChange\"> & {\n initialImages?: ImagesFieldImage[]\n onChange?: (images: ImagesFieldImage[]) => void\n }\n : never\n\nexport type ImagesFieldProps = ToImagesFieldProps<FilesUploadFieldProps>\n\nconst defaultImageAccept = [\"image/*\", \".heic\", \".heif\", \"image/heic\", \"image/heif\", \"image/heic-sequence\", \"image/heif-sequence\"]\n\nexport function ImagesField({\n initialImages = [],\n onChange,\n accept = defaultImageAccept,\n addButtonAriaLabel = \"Ajouter une image\",\n removeButtonAriaLabel = \"Supprimer l'image\",\n ...props\n}: ImagesFieldProps) {\n return (\n <FilesUploadField\n initialFiles={initialImages}\n onChange={onChange}\n accept={accept}\n addButtonAriaLabel={addButtonAriaLabel}\n removeButtonAriaLabel={removeButtonAriaLabel}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AAeA,IAAMW,IAAqB;CAAC;CAAW;CAAS;CAAS;CAAc;CAAc;CAAuB;AAAqB;AAEjI,SAAOC,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GAAAP,GAAAQ,GAAAC,GAAAC,GAAAC,GAAAC;CAAA,AAAAN,EAAA,OAAAD,KAOYL,IAAAM,EAAA,IAAAE,IAAAF,EAAA,IAAAG,IAAAH,EAAA,IAAAI,IAAAJ,EAAA,IAAAK,IAAAL,EAAA,IAAAM,IAAAN,EAAA,OAPS,CAAAP,eAAAU,gBAAAI,QAAAH,GAAAI,oBAAAH,GAAAI,uBAAAH,MAAAJ,KAAAH,GAOTC,EAAA,KAAAD,GAAAC,EAAA,KAAAN,GAAAM,EAAA,KAAAE,GAAAF,EAAA,KAAAG,GAAAH,EAAA,KAAAI,GAAAJ,EAAA,KAAAK,GAAAL,EAAA,KAAAM;CAAA,IAAAI;CAAA,AAAAV,EAAA,OAAAG,IANCO,IAAAV,EAAA,MAAlBU,IAAAP,MAAAQ,KAAAA,IAAA,CAAA,IAAAR,GAAkBH,EAAA,KAAAG,GAAAH,EAAA,KAAAU;CAAlB,IAAAjB,IAAAiB,GAEAH,IAAAH,MAAAO,KAAAA,IAAAd,IAAAO,GACAI,IAAAH,MAAAM,KAAAA,IAAA,sBAAAN,GACAI,IAAAH,MAAAK,KAAAA,IAAA,sBAAAL,GAA2CM;CAWvC,OAXuCZ,EAAA,OAAAO,KAAAP,EAAA,QAAAQ,KAAAR,EAAA,QAAAP,KAAAO,EAAA,QAAAN,KAAAM,EAAA,QAAAE,KAAAF,EAAA,QAAAS,KAIzCG,IAAA,kBAAC,GAAD;EACgBnB,cAAAA;EACJC;EACFa;EACYC;EACGC;EAAqB,GACxCP;CAAK,CAAA,GACTF,EAAA,KAAAO,GAAAP,EAAA,MAAAQ,GAAAR,EAAA,MAAAP,GAAAO,EAAA,MAAAN,GAAAM,EAAA,MAAAE,GAAAF,EAAA,MAAAS,GAAAT,EAAA,MAAAY,KAAAA,IAAAZ,EAAA,KAPFY;AAOE"}
|
|
1
|
+
{"version":3,"file":"index300.js","names":["contextValue","children","innerRef","option","target","query","token","event"],"sources":["../src/components/I18nField/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport Select, {\n type MenuListProps,\n type OptionProps,\n type Props as SelectProps,\n type SelectInstance,\n type SingleValue,\n type StylesConfig,\n components as selectComponents,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nexport type LanguageCode = string\n\nexport type LocalizedStringEntry<TExtra extends Record<string, unknown> = Record<string, unknown>> = {\n value: string\n updatedAt: Date\n autoTranslated?: boolean\n} & TExtra\n\nexport type LocalizedString<TExtra extends Record<string, unknown> = Record<string, unknown>> = Record<\n LanguageCode,\n LocalizedStringEntry<TExtra>\n>\n\nexport type I18nValue<TExtra extends Record<string, unknown> = Record<string, unknown>> = LocalizedString<TExtra>\n\ntype LocaleContextValue = {\n locale: LanguageCode | null\n setLocale: (next: LanguageCode) => void\n}\n\nconst I18nFieldLocaleContext = React.createContext<LocaleContextValue | null>(null)\n\ntype I18nFieldLocaleProviderProps = {\n children: React.ReactNode\n value?: LanguageCode\n defaultValue?: LanguageCode\n onChange?: (locale: LanguageCode) => void\n locales?: LanguageCode[]\n}\n\nexport function I18nFieldLocaleProvider({\n children,\n value,\n defaultValue,\n onChange,\n locales,\n}: I18nFieldLocaleProviderProps) {\n const isControlled = value !== undefined\n const defaultLocale = React.useMemo(\n () => getPreferredLocale([defaultValue, ...getEnvironmentLocales()], locales),\n [defaultValue, locales]\n )\n const [internalLocale, setInternalLocale] = React.useState<LanguageCode>(defaultLocale)\n const activeLocale = (value ?? internalLocale) as LanguageCode\n\n const setLocale = React.useCallback(\n (next: LanguageCode) => {\n if (!isControlled) {\n setInternalLocale(next)\n }\n onChange?.(next)\n },\n [isControlled, onChange]\n )\n\n React.useEffect(() => {\n if (isControlled) return\n setInternalLocale((current) => (resolveLocaleMatch(current, locales) ? current : defaultLocale))\n }, [defaultLocale, isControlled, locales])\n\n const contextValue = React.useMemo<LocaleContextValue>(\n () => ({\n locale: activeLocale,\n setLocale,\n }),\n [activeLocale, setLocale]\n )\n\n return <I18nFieldLocaleContext.Provider value={contextValue}>{children}</I18nFieldLocaleContext.Provider>\n}\n\ntype I18nFieldProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"value\" | \"defaultValue\" | \"onChange\"\n> &\n Omit<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n \"value\" | \"defaultValue\" | \"onChange\"\n > & {\n value?: I18nValue\n defaultValue?: I18nValue\n locale?: LanguageCode\n defaultLocale?: LanguageCode\n onChange?: (value: I18nValue) => void\n onLocaleChange?: (locale: LanguageCode, option: LanguageOption) => void\n locales?: LanguageCode[]\n multiline?: boolean\n inputClassName?: string\n selectProps?: Partial<SelectProps<LanguageOption, false>>\n selectFooter?: React.ReactNode\n languageSelectTabIndex?: number\n }\n\ntype LanguageOption = {\n value: LanguageCode\n name: string\n code: string\n searchable: string[]\n}\n\nconst DEFAULT_LOCALE: LanguageCode = \"en\"\n\nfunction normalizeLocaleCode(code: string) {\n return code.trim().replace(/_/g, \"-\").toLowerCase()\n}\n\nfunction primaryLocaleCode(code: string) {\n return normalizeLocaleCode(code).split(\"-\")[0] ?? \"\"\n}\n\nfunction resolveLocaleMatch(locale: LanguageCode | undefined, locales: LanguageCode[] | undefined) {\n const normalizedLocale = typeof locale === \"string\" ? normalizeLocaleCode(locale) : \"\"\n if (!normalizedLocale) return null\n\n const availableLocales = (locales ?? []).filter(\n (code): code is LanguageCode => typeof code === \"string\" && code.length > 0\n )\n if (availableLocales.length === 0) return locale?.trim() ?? normalizedLocale\n\n return availableLocales.find((code) => normalizeLocaleCode(code) === normalizedLocale) ??\n availableLocales.find((code) => primaryLocaleCode(code) === primaryLocaleCode(normalizedLocale)) ??\n null\n}\n\nfunction getEnvironmentLocales() {\n const candidates: LanguageCode[] = []\n if (typeof document !== \"undefined\") {\n candidates.push(document.documentElement.lang)\n }\n if (typeof navigator !== \"undefined\") {\n candidates.push(...Array.from(navigator.languages ?? []), navigator.language)\n }\n return candidates\n}\n\nfunction getPreferredLocale(candidates: Array<LanguageCode | undefined>, locales?: LanguageCode[]) {\n for (const candidate of candidates) {\n const matchedLocale = resolveLocaleMatch(candidate, locales)\n if (matchedLocale) return matchedLocale\n }\n\n const defaultLocaleMatch = resolveLocaleMatch(DEFAULT_LOCALE, locales)\n if (defaultLocaleMatch) return defaultLocaleMatch\n\n return locales?.[0] ?? DEFAULT_LOCALE\n}\n\nfunction languageCodeToBadge(code: string) {\n const primary = code.split(\"-\")[0] ?? \"\"\n const normalized = primary.replace(/[^A-Za-z]/g, \"\")\n if (!normalized) return \"?\"\n return normalized.slice(0, 3).toUpperCase()\n}\n\nfunction stripDiacritics(value: string) {\n return value.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")\n}\n\nfunction normalize(value: string) {\n return stripDiacritics(value).toLowerCase()\n}\n\nfunction resolveLocalizedEntry(value: I18nValue, locale: LanguageCode) {\n if (Object.prototype.hasOwnProperty.call(value, locale)) {\n return value[locale]\n }\n\n const parts = locale.split(\"-\").filter(Boolean)\n while (parts.length > 1) {\n parts.pop()\n const candidate = parts.join(\"-\")\n if (Object.prototype.hasOwnProperty.call(value, candidate)) {\n return value[candidate]\n }\n }\n\n return undefined\n}\n\nfunction resolveLocalizedValue(value: I18nValue, locale: LanguageCode) {\n return resolveLocalizedEntry(value, locale)?.value ?? \"\"\n}\n\nfunction createDisplayNames(locale: string | string[] | undefined, type: \"language\") {\n if (typeof Intl === \"undefined\" || typeof Intl.DisplayNames === \"undefined\") return null\n try {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : undefined\n return new Intl.DisplayNames(locales, { type })\n } catch {\n return null\n }\n}\n\nfunction safeDisplayName(displayNames: Intl.DisplayNames | null, value: string) {\n if (!displayNames) return undefined\n try {\n return displayNames.of(value) ?? undefined\n } catch {\n return undefined\n }\n}\n\nfunction buildLanguageOptions(locale?: string | string[], allowed?: LanguageCode[]) {\n const displayNames = createDisplayNames(locale, \"language\")\n const englishDisplayNames = createDisplayNames(\"en\", \"language\")\n const pool = (allowed ?? []).filter((code): code is LanguageCode => typeof code === \"string\" && code.length > 0)\n\n return pool\n .map((code) => {\n const name = safeDisplayName(displayNames, code) ?? safeDisplayName(englishDisplayNames, code) ?? code\n return {\n value: code,\n name,\n code,\n searchable: Array.from(\n new Set([\n name,\n safeDisplayName(englishDisplayNames, code) ?? code,\n code.toLowerCase(),\n code.toUpperCase(),\n ])\n ).map((entry) => normalize(entry)),\n }\n })\n .sort((a, b) => a.name.localeCompare(b.name))\n}\n\nconst selectStyles: StylesConfig<LanguageOption, false> = {\n control: () => ({\n display: \"none\",\n }),\n menu: (provided) => ({\n ...provided,\n marginTop: 4,\n borderRadius: \"var(--radius)\",\n boxShadow: \"0 18px 36px rgba(15, 23, 42, 0.18)\",\n backgroundColor: \"hsl(var(--popover))\",\n overflow: \"hidden\",\n zIndex: 30,\n }),\n menuList: (provided) => ({\n ...provided,\n maxHeight: 280,\n padding: 0,\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n }),\n option: (provided, state) => ({\n ...provided,\n fontSize: \"0.875rem\",\n backgroundColor: state.isFocused\n ? \"hsl(var(--muted))\"\n : state.isSelected\n ? \"hsl(var(--accent))\"\n : \"transparent\",\n color: state.isSelected\n ? \"hsl(var(--accent-foreground))\"\n : \"hsl(var(--foreground))\",\n cursor: \"pointer\",\n }),\n noOptionsMessage: (provided) => ({\n ...provided,\n fontSize: \"0.875rem\",\n color: \"hsl(var(--muted-foreground))\",\n }),\n}\n\nconst HiddenControl = () => <div style={{ display: \"none\" }} />\nconst NullComponent = () => null\n\ntype SearchMenuContextValue = {\n searchTerm: string\n setSearchTerm: (next: string) => void\n onSearchKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void\n searchInputRef: React.RefObject<HTMLInputElement | null>\n selectFooter?: React.ReactNode\n}\n\nconst SearchMenuContext = React.createContext<SearchMenuContextValue | null>(null)\n\n// MenuList must keep a stable component identity across renders: an inline component\n// would be remounted on every keystroke, unmounting the focused search input and\n// closing the menu through the root onBlur handler.\nfunction SearchableMenuList(props: MenuListProps<LanguageOption, false>) {\n const search = React.useContext(SearchMenuContext)\n const { children } = props\n return (\n <selectComponents.MenuList {...props} className=\"!p-0 flex flex-col overflow-hidden\">\n {search ? (\n <div className=\"border-b border-muted px-2 pb-2 pt-2\">\n <input\n ref={search.searchInputRef}\n value={search.searchTerm}\n onChange={(event) => search.setSearchTerm(event.target.value)}\n onKeyDown={search.onSearchKeyDown}\n className=\"w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring\"\n placeholder=\"Search language…\"\n />\n </div>\n ) : null}\n <div className=\"max-h-60 overflow-y-auto\">{children}</div>\n {search?.selectFooter ? (\n <div className=\"border-t border-muted bg-muted/60 px-3 py-2 text-xs text-muted-foreground\">\n {search.selectFooter}\n </div>\n ) : null}\n </selectComponents.MenuList>\n )\n}\n\nfunction Option(props: OptionProps<LanguageOption, false>) {\n const { data, innerRef, innerProps, isFocused, isSelected } = props\n return (\n <div\n ref={innerRef}\n {...innerProps}\n className={cn(\n \"flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm\",\n isSelected\n ? \"bg-accent text-accent-foreground\"\n : isFocused\n ? \"bg-muted text-foreground\"\n : \"text-foreground\"\n )}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <span className=\"truncate\">{data.name}</span>\n </span>\n <span className=\"text-xs text-muted-foreground uppercase\">{data.code}</span>\n </div>\n )\n}\n\nexport const I18nField = React.forwardRef<HTMLInputElement | HTMLTextAreaElement, I18nFieldProps>(\n function I18nField(props, forwardedRef) {\n const {\n value: valueProp,\n defaultValue,\n locale: localeProp,\n defaultLocale,\n onChange,\n onLocaleChange,\n locales,\n multiline,\n className,\n inputClassName,\n selectProps,\n selectFooter,\n languageSelectTabIndex = -1,\n disabled,\n ...rest\n } = props\n\n type SharedProps = React.InputHTMLAttributes<HTMLInputElement> &\n React.TextareaHTMLAttributes<HTMLTextAreaElement> & { rows?: number }\n\n const { rows, ...restProps } = rest as SharedProps\n\n const initialValue = React.useMemo<I18nValue>(() => valueProp ?? defaultValue ?? {}, [defaultValue, valueProp])\n const [internalValue, setInternalValue] = React.useState<I18nValue>(initialValue)\n const isControlled = valueProp !== undefined\n const currentValue = isControlled ? valueProp ?? {} : internalValue\n const [searchTerm, setSearchTerm] = React.useState(\"\")\n const localeContext = React.useContext(I18nFieldLocaleContext)\n\n const localePool = React.useMemo(() => {\n const pool = Array.from(new Set([...(locales ?? []), ...Object.keys(currentValue)]))\n return buildLanguageOptions(undefined, pool)\n }, [currentValue, locales])\n\n const initialLocale = React.useMemo(() => {\n const localeValues = localePool.map((option) => option.value)\n return localeProp ??\n localeContext?.locale ??\n getPreferredLocale(\n [defaultLocale, ...getEnvironmentLocales(), Object.keys(currentValue)[0] as LanguageCode | undefined],\n localeValues\n )\n }, [currentValue, defaultLocale, localeContext?.locale, localePool, localeProp])\n\n const [internalLocale, setInternalLocale] = React.useState<LanguageCode>(initialLocale)\n const activeLocale = localeProp ?? localeContext?.locale ?? internalLocale\n\n React.useEffect(() => {\n if (!isControlled) {\n setInternalValue(initialValue)\n }\n }, [initialValue, isControlled])\n\n React.useEffect(() => {\n if (localeProp && localeProp !== internalLocale) {\n setInternalLocale(localeProp)\n }\n }, [internalLocale, localeProp])\n\n React.useEffect(() => {\n if (!localeProp && localeContext?.locale && localeContext.locale !== internalLocale) {\n setInternalLocale(localeContext.locale)\n }\n }, [internalLocale, localeContext?.locale, localeProp])\n\n const selectedOption =\n localePool.find((option) => option.value === activeLocale) ??\n localePool.find((option) => option.value === DEFAULT_LOCALE) ??\n localePool[0] ??\n null\n\n const [menuOpen, setMenuOpen] = React.useState(false)\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const inputRef = React.useRef<HTMLInputElement | HTMLTextAreaElement | null>(null)\n const triggerRef = React.useRef<HTMLButtonElement | null>(null)\n const containerRef = React.useRef<HTMLDivElement | null>(null)\n const selectRef = React.useRef<SelectInstance<LanguageOption, false> | null>(null)\n const searchInputRef = React.useRef<HTMLInputElement | null>(null)\n const selectionSnapshotRef = React.useRef<{ start: number | null; end: number | null } | null>(null)\n const [menuPosition, setMenuPosition] = React.useState<{ left: number; top: number }>({ left: 0, top: 0 })\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement & HTMLTextAreaElement, [])\n\n const handleLocaleSelect = (option: SingleValue<LanguageOption>) => {\n if (!option) return\n const nextLocale = option.value\n if (!isControlled) {\n setInternalLocale(nextLocale)\n }\n onLocaleChange?.(nextLocale, option)\n localeContext?.setLocale(nextLocale)\n closeMenu(true)\n }\n\n const handleTextChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const currentEntry = currentValue[activeLocale]\n const nextValue = {\n ...currentValue,\n [activeLocale]: {\n ...(currentEntry ?? {}),\n value: event.target.value,\n updatedAt: new Date(),\n autoTranslated: false,\n },\n }\n if (!isControlled) {\n setInternalValue(nextValue)\n }\n onChange?.(nextValue)\n }\n\n const currentText = resolveLocalizedValue(currentValue, activeLocale)\n\n const filterOption = React.useCallback(\n (option: { data: LanguageOption }) => {\n if (!searchTerm) return true\n const query = normalize(searchTerm)\n return option.data.searchable.some((token) => token.includes(query))\n },\n [searchTerm]\n )\n\n const buttonPosition = multiline ? \"left-2 top-2 -translate-y-0\" : \"left-3 top-1/2 -translate-y-1/2\"\n const inputPaddingLeft = \"pl-10 pr-3\"\n\n const updateMenuPosition = React.useCallback(() => {\n const trigger = triggerRef.current\n const container = containerRef.current\n if (!trigger || !container) return\n const triggerRect = trigger.getBoundingClientRect()\n const containerRect = container.getBoundingClientRect()\n setMenuPosition({\n left: triggerRect.left - containerRect.left,\n top: triggerRect.bottom - containerRect.top + 4,\n })\n }, [])\n\n const isInsideComponent = React.useCallback((target: EventTarget | null) => {\n if (!target || !(target instanceof Node)) return false\n return Boolean(rootRef.current?.contains(target))\n }, [])\n\n const restoreMainFocus = React.useCallback(() => {\n const target = inputRef.current\n if (!target) return\n target.focus()\n const selection = selectionSnapshotRef.current\n if (selection && selection.start != null && selection.end != null) {\n target.setSelectionRange(selection.start, selection.end)\n }\n }, [])\n\n React.useEffect(() => {\n if (!menuOpen) return\n const target = searchInputRef.current\n if (!target) return\n requestAnimationFrame(() => {\n if (document.activeElement === target) return\n target.focus()\n const end = target.value.length\n try {\n target.setSelectionRange(end, end)\n } catch {\n /* ignore */\n }\n })\n }, [menuOpen, searchTerm])\n\n const closeMenu = React.useCallback(\n (restoreFocus = true) => {\n setMenuOpen(false)\n setSearchTerm(\"\")\n if (restoreFocus) {\n requestAnimationFrame(() => {\n restoreMainFocus()\n })\n }\n },\n [restoreMainFocus]\n )\n\n const {\n components: userSelectComponents,\n styles: userSelectStyles,\n classNamePrefix: userClassNamePrefix,\n placeholder: selectPlaceholder,\n noOptionsMessage,\n ...forwardedSelectProps\n } = selectProps ?? {}\n\n const filteredOptions = React.useMemo(() => {\n const query = normalize(searchTerm)\n const rank = (option: LanguageOption) => {\n const code = option.code.toLowerCase()\n if (query && code === query) return 0\n if (query && code.startsWith(query)) return 1\n if (query && option.searchable.some((token) => token.startsWith(query))) return 2\n if (query && option.searchable.some((token) => token.includes(query))) return 3\n return 4\n }\n return localePool\n .filter((option) => filterOption({ data: option }))\n .sort((a, b) => {\n const diff = rank(a) - rank(b)\n if (diff !== 0) return diff\n return a.name.localeCompare(b.name)\n })\n }, [filterOption, localePool, searchTerm])\n\n const handleSearchKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === \"Escape\") {\n event.preventDefault()\n closeMenu(true)\n return\n }\n if (event.key === \"Enter\") {\n event.preventDefault()\n const first = filteredOptions[0]\n if (first) {\n handleLocaleSelect(first)\n }\n return\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault()\n selectRef.current?.focus()\n }\n }\n\n const searchMenuContextValue: SearchMenuContextValue = {\n searchTerm,\n setSearchTerm,\n onSearchKeyDown: handleSearchKeyDown,\n searchInputRef,\n selectFooter,\n }\n\n const mergedSelectComponents = React.useMemo(\n () => ({\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n MenuList: SearchableMenuList,\n ...(userSelectComponents ?? {}),\n Option,\n }),\n [userSelectComponents]\n )\n\n const mergedSelectStyles = React.useMemo<StylesConfig<LanguageOption, false>>(\n () => ({\n ...selectStyles,\n ...(userSelectStyles ?? {}),\n }),\n [userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (!menuOpen) return\n updateMenuPosition()\n const handleResize = () => updateMenuPosition()\n window.addEventListener(\"resize\", handleResize)\n return () => window.removeEventListener(\"resize\", handleResize)\n }, [menuOpen, updateMenuPosition])\n\n const sharedFieldProps = {\n ...restProps,\n ref: inputRef as React.Ref<any>,\n disabled,\n value: currentText,\n onChange: handleTextChange,\n onFocus: (event: React.FocusEvent<any>) => {\n if (menuOpen) {\n closeMenu(false)\n }\n restProps.onFocus?.(event)\n },\n onBlur: (event: React.FocusEvent<any>) => {\n if (!isInsideComponent(event.relatedTarget)) {\n closeMenu(false)\n }\n restProps.onBlur?.(event)\n },\n className: cn(\n \"w-full rounded-md border border-input bg-background 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\",\n multiline ? \"min-h-24 py-2\" : \"h-10 py-2\",\n inputPaddingLeft,\n inputClassName\n ),\n placeholder: restProps.placeholder,\n }\n\n return (\n <div\n ref={rootRef}\n className={cn(\"relative flex flex-col\", className)}\n onBlur={(event) => {\n if (!isInsideComponent(event.relatedTarget)) {\n closeMenu(false)\n }\n }}\n >\n <div ref={containerRef} className=\"relative\">\n {multiline ? (\n <textarea rows={rows} {...sharedFieldProps} />\n ) : (\n <input type=\"text\" {...sharedFieldProps} />\n )}\n\n <button\n type=\"button\"\n className={cn(\n \"absolute flex h-6 w-6 items-center justify-center rounded border text-xs font-semibold leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n buttonPosition,\n disabled ? \"cursor-not-allowed opacity-50 pointer-events-none\" : \"cursor-pointer hover:bg-muted\",\n selectedOption ? \"border-transparent\" : \"border-dashed border-border text-muted-foreground\"\n )}\n aria-label={selectedOption ? `Select language (${selectedOption.code})` : \"Select language\"}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => {\n if (disabled) return\n const target = inputRef.current\n if (target) {\n selectionSnapshotRef.current = {\n start: target.selectionStart,\n end: target.selectionEnd,\n }\n }\n setSearchTerm(\"\")\n setMenuOpen(true)\n requestAnimationFrame(() => {\n if (searchInputRef.current) {\n searchInputRef.current.focus()\n searchInputRef.current.select()\n } else {\n selectRef.current?.focus()\n }\n })\n }}\n tabIndex={languageSelectTabIndex}\n disabled={disabled}\n ref={triggerRef}\n >\n <span aria-hidden=\"true\">{selectedOption ? languageCodeToBadge(selectedOption.code) : \"?\"}</span>\n </button>\n </div>\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: menuOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n left: menuPosition.left,\n top: menuPosition.top,\n }}\n >\n <SearchMenuContext.Provider value={searchMenuContextValue}>\n <Select<LanguageOption, false>\n {...forwardedSelectProps}\n menuIsOpen={menuOpen}\n options={filteredOptions}\n value={null}\n onChange={handleLocaleSelect}\n classNamePrefix={userClassNamePrefix ?? \"i18n-language-select\"}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue\n menuShouldScrollIntoView={false}\n placeholder={selectPlaceholder ?? \"\"}\n filterOption={filterOption}\n noOptionsMessage={noOptionsMessage}\n onMenuClose={() => closeMenu(true)}\n ref={selectRef}\n />\n </SearchMenuContext.Provider>\n </div>\n </div>\n )\n }\n)\n\nI18nField.displayName = \"I18nField\"\n"],"mappings":";;;;;;AAkCA,IAAM,IAAyB,EAAM,cAAyC,IAAI;AAUlF,SAAO,EAAA,GAAA;CAAA,IAAA,IAAA,EAAA,EAAA,GAAiC,EAAA,aAAA,UAAA,iBAAA,aAAA,eAAA,GAOtC,IAAqB,MAAU,KAAA,GAAS;CAAA,AAAA,EAAA,OAAA,KAAA,EAAA,OAAA,KAEhC,IAAA,EAAmB,CAAC,GAAY,GAAK,EAAsB,CAAC,GAAG,CAAO,GAAC,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,KAAA,IAAA,EAAA;CAD/E,IAAA,IACQ,GAGR,CAAA,GAAA,K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