@chekinapp/ui 0.2.2 → 0.2.3

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/index.cjs CHANGED
@@ -5862,7 +5862,6 @@ var translation_default = {
5862
5862
  close_other_application_that_may_be_using_your_camera: "\u0417\u0430\u0442\u0432\u0430\u0440\u044F\u043D\u0435 \u043D\u0430 \u0434\u0440\u0443\u0433\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u043A\u043E\u0438\u0442\u043E \u043C\u043E\u0436\u0435 \u0434\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0442 \u043A\u0430\u043C\u0435\u0440\u0430\u0442\u0430",
5863
5863
  if_you_use_external_camera_disconnect_and_reconnect: "\u0410\u043A\u043E \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0442\u0435 \u0432\u044A\u043D\u0448\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430, \u0438\u0437\u043A\u043B\u044E\u0447\u0435\u0442\u0435 \u044F \u0438 \u044F \u0441\u0432\u044A\u0440\u0436\u0435\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E",
5864
5864
  close_the_browser_re_open_it: "\u0417\u0430\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u044A\u0440\u0430 \u0438 \u0433\u043E \u043E\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E",
5865
- camera_permissions_denied: "\u041A\u0430\u043C\u0435\u0440\u0430\u0442\u0430 \u043D\u0435 \u0441\u0435 \u043E\u0442\u0432\u0430\u0440\u044F? \u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0441\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043B\u0438 \u043D\u0430 \u0431\u0440\u0430\u0443\u0437\u044A\u0440\u0430 \u0434\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430 \u043A\u0430\u043C\u0435\u0440\u0430\u0442\u0430.",
5866
5865
  camera_errors: {
5867
5866
  experiencing_camera_issues: "\u0418\u043C\u0430\u0442\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0438 \u0441 \u043A\u0430\u043C\u0435\u0440\u0430\u0442\u0430?",
5868
5867
  chekin_cant_use_your_camera: "Chekin \u043D\u0435 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043A\u0430\u043C\u0435\u0440\u0430",
@@ -5886,7 +5885,8 @@ var translation_default = {
5886
5885
  hide_password: "\u0421\u043A\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u0430\u0442\u0430",
5887
5886
  increment: "\u0423\u0432\u0435\u043B\u0438\u0447\u0430\u0432\u0430\u043D\u0435 \u043D\u0430",
5888
5887
  decrement: "\u041D\u0430\u043C\u0430\u043B\u0435\u043D\u0438\u0435",
5889
- create_option: '\u0421\u044A\u0437\u0434\u0430\u0432\u0430\u043D\u0435 \u043D\u0430 "{{input}}"'
5888
+ create_option: '\u0421\u044A\u0437\u0434\u0430\u0432\u0430\u043D\u0435 \u043D\u0430 "{{input}}"',
5889
+ year_out_of_range: "\u0413\u043E\u0434\u0438\u043D\u0430\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0435\u0436\u0434\u0443 {{min}} \u0438 {{max}}"
5890
5890
  };
5891
5891
 
5892
5892
  // src/locales/ca/translation.json
@@ -5994,7 +5994,6 @@ var translation_default3 = {
5994
5994
  close_other_application_that_may_be_using_your_camera: "Zav\u0159en\xED dal\u0161\xEDch aplikac\xED, kter\xE9 mohou pou\u017E\xEDvat fotoapar\xE1t",
5995
5995
  if_you_use_external_camera_disconnect_and_reconnect: "Pokud pou\u017E\xEDv\xE1te extern\xED kameru, odpojte ji a znovu p\u0159ipojte.",
5996
5996
  close_the_browser_re_open_it: "Zav\u0159ete prohl\xED\u017Ee\u010D a znovu jej otev\u0159ete",
5997
- camera_permissions_denied: "Fotoapar\xE1t se neotev\u0159e? Ujist\u011Bte se, \u017Ee jste prohl\xED\u017Ee\u010Di povolili pou\u017E\xEDvat kameru.",
5998
5997
  camera_errors: {
5999
5998
  experiencing_camera_issues: "M\xE1te probl\xE9my s fotoapar\xE1tem?",
6000
5999
  chekin_cant_use_your_camera: "Chekin nem\u016F\u017Ee pou\u017E\xEDvat v\xE1\u0161 fotoapar\xE1t",
@@ -6018,7 +6017,8 @@ var translation_default3 = {
6018
6017
  hide_password: "Skr\xFDt heslo",
6019
6018
  increment: "P\u0159\xEDr\u016Fstek",
6020
6019
  decrement: "Sn\xED\u017Een\xED",
6021
- create_option: 'Vytvo\u0159it "{{input}}"'
6020
+ create_option: 'Vytvo\u0159it "{{input}}"',
6021
+ year_out_of_range: "Rok mus\xED b\xFDt mezi {{min}} a {{max}}."
6022
6022
  };
6023
6023
 
6024
6024
  // src/locales/de/translation.json
@@ -6123,7 +6123,6 @@ var translation_default4 = {
6123
6123
  close_other_application_that_may_be_using_your_camera: "Schlie\xDFen Sie andere Anwendungen, die m\xF6glicherweise Ihre Kamera verwenden",
6124
6124
  if_you_use_external_camera_disconnect_and_reconnect: "Wenn Sie eine externe Kamera verwenden, trennen Sie sie ab und schlie\xDFen Sie sie wieder an.",
6125
6125
  close_the_browser_re_open_it: "Schlie\xDFen Sie den Browser und \xF6ffnen Sie ihn erneut",
6126
- camera_permissions_denied: "Die Kamera l\xE4sst sich nicht \xF6ffnen? Stellen Sie sicher, dass Sie dem Browser die Verwendung der Kamera erlauben.",
6127
6126
  camera_errors: {
6128
6127
  experiencing_camera_issues: "Haben Sie Probleme mit der Kamera?",
6129
6128
  chekin_cant_use_your_camera: "Chekin kann deine Kamera nicht benutzen",
@@ -6147,7 +6146,8 @@ var translation_default4 = {
6147
6146
  hide_password: "Passwort verstecken",
6148
6147
  increment: "Inkrement",
6149
6148
  decrement: "Verkleinern",
6150
- create_option: 'Erstellen Sie "{{input}}".'
6149
+ create_option: 'Erstellen Sie "{{input}}".',
6150
+ year_out_of_range: "Das Jahr muss zwischen {{min}} und {{max}} liegen"
6151
6151
  };
6152
6152
 
6153
6153
  // src/locales/el/translation.json
@@ -6252,7 +6252,6 @@ var translation_default5 = {
6252
6252
  close_other_application_that_may_be_using_your_camera: "\u039A\u03BB\u03B5\u03AF\u03C3\u03C4\u03B5 \u03AC\u03BB\u03BB\u03B5\u03C2 \u03B5\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03AD\u03C2 \u03C0\u03BF\u03C5 \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03BF\u03CD\u03BD \u03C4\u03B7\u03BD \u03BA\u03AC\u03BC\u03B5\u03C1\u03AC \u03C3\u03B1\u03C2",
6253
6253
  if_you_use_external_camera_disconnect_and_reconnect: "\u0395\u03AC\u03BD \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF\u03C4\u03B5 \u03B5\u03BE\u03C9\u03C4\u03B5\u03C1\u03B9\u03BA\u03AE \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1, \u03B1\u03C0\u03BF\u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03C4\u03B5 \u03BA\u03B1\u03B9 \u03B5\u03C0\u03B1\u03BD\u03B1\u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03C4\u03B5 \u03C4\u03B7\u03BD.",
6254
6254
  close_the_browser_re_open_it: "\u039A\u03BB\u03B5\u03AF\u03C3\u03C4\u03B5 \u03C4\u03BF \u03C0\u03C1\u03CC\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AE\u03B3\u03B7\u03C3\u03B7\u03C2 \u03BA\u03B1\u03B9 \u03B1\u03BD\u03BF\u03AF\u03BE\u03C4\u03B5 \u03C4\u03BF \u03BE\u03B1\u03BD\u03AC",
6255
- camera_permissions_denied: "\u0397 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1 \u03B4\u03B5\u03BD \u03B1\u03BD\u03BF\u03AF\u03B3\u03B5\u03B9; \u0392\u03B5\u03B2\u03B1\u03B9\u03C9\u03B8\u03B5\u03AF\u03C4\u03B5 \u03CC\u03C4\u03B9 \u03B5\u03C0\u03B9\u03C4\u03C1\u03AD\u03C0\u03B5\u03C4\u03B5 \u03C3\u03C4\u03BF \u03C0\u03C1\u03CC\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AE\u03B3\u03B7\u03C3\u03B7\u03C2 \u03C4\u03B7\u03BD \u03AC\u03B4\u03B5\u03B9\u03B1 \u03C7\u03C1\u03AE\u03C3\u03B7\u03C2 \u03C4\u03B7\u03C2 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1\u03C2.",
6256
6255
  camera_errors: {
6257
6256
  experiencing_camera_issues: "\u0391\u03BD\u03C4\u03B9\u03BC\u03B5\u03C4\u03C9\u03C0\u03AF\u03B6\u03B5\u03C4\u03B5 \u03C0\u03C1\u03BF\u03B2\u03BB\u03AE\u03BC\u03B1\u03C4\u03B1 \u03BC\u03B5 \u03C4\u03B7\u03BD \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1;",
6258
6257
  chekin_cant_use_your_camera: "\u039F \u03A4\u03C3\u03AD\u03BA\u03B9\u03BD \u03B4\u03B5\u03BD \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9 \u03C4\u03B7\u03BD \u03BA\u03AC\u03BC\u03B5\u03C1\u03AC \u03C3\u03B1\u03C2",
@@ -6276,7 +6275,8 @@ var translation_default5 = {
6276
6275
  hide_password: "\u0391\u03C0\u03CC\u03BA\u03C1\u03C5\u03C8\u03B7 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2",
6277
6276
  increment: "\u0391\u03CD\u03BE\u03B7\u03C3\u03B7",
6278
6277
  decrement: "\u039C\u03B5\u03AF\u03C9\u03C3\u03B7",
6279
- create_option: '\u0394\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03AE\u03C3\u03C4\u03B5 \u03C4\u03BF "{{input}}__"'
6278
+ create_option: '\u0394\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03AE\u03C3\u03C4\u03B5 \u03C4\u03BF "{{input}}__"',
6279
+ year_out_of_range: "\u03A4\u03BF \u03AD\u03C4\u03BF\u03C2 \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BC\u03B5\u03C4\u03B1\u03BE\u03CD {{min}} \u03BA\u03B1\u03B9 {{max}}"
6280
6280
  };
6281
6281
 
6282
6282
  // src/locales/en/translation.json
@@ -6375,13 +6375,13 @@ var translation_default6 = {
6375
6375
  date_range_min_days_error_other: "Range must be at least {{count}} days",
6376
6376
  past_dates: "Date cannot be before {{minDate}}",
6377
6377
  future_dates: "Date cannot be after {{maxDate}}",
6378
+ year_out_of_range: "Year must be between {{min}} and {{max}}",
6378
6379
  signature_placeholder_text: "Sign inside this box.<br/> Use your finger.<br/> Tap to start.",
6379
6380
  open_devices_camera: "Open device's camera",
6380
6381
  place_document_inside_frame: "Place your document inside the frame",
6381
6382
  close_other_application_that_may_be_using_your_camera: "Close other applications that may be using your camera",
6382
6383
  if_you_use_external_camera_disconnect_and_reconnect: "If you use an external camera, disconnect and reconnect it",
6383
6384
  close_the_browser_re_open_it: "Close the browser and reopen it",
6384
- camera_permissions_denied: "The camera doesn't open? Make sure to allow the browser permission to use the camera.",
6385
6385
  camera_errors: {
6386
6386
  experiencing_camera_issues: "Experiencing camera issues?",
6387
6387
  chekin_cant_use_your_camera: "Chekin can't use your camera",
@@ -6510,7 +6510,6 @@ var translation_default7 = {
6510
6510
  close_other_application_that_may_be_using_your_camera: "Cierra otras aplicaciones que puedan estar utilizando tu c\xE1mara",
6511
6511
  if_you_use_external_camera_disconnect_and_reconnect: "Si utilizas una c\xE1mara externa, descon\xE9ctala y vuelve a conectarla",
6512
6512
  close_the_browser_re_open_it: "Cierre el navegador y vuelva a abrirlo",
6513
- camera_permissions_denied: "\xBFLa c\xE1mara no se abre? Aseg\xFArate de dar permiso al navegador para usar la c\xE1mara.",
6514
6513
  camera_errors: {
6515
6514
  experiencing_camera_issues: "\xBFTienes problemas con la c\xE1mara?",
6516
6515
  chekin_cant_use_your_camera: "Chekin no puede usar tu c\xE1mara",
@@ -6534,7 +6533,8 @@ var translation_default7 = {
6534
6533
  hide_password: "Ocultar contrase\xF1a",
6535
6534
  increment: "Incremento",
6536
6535
  decrement: "Disminuci\xF3n",
6537
- create_option: 'Crear "{{input}}"'
6536
+ create_option: 'Crear "{{input}}"',
6537
+ year_out_of_range: "El a\xF1o debe estar comprendido entre {{min}} y {{max}}."
6538
6538
  };
6539
6539
 
6540
6540
  // src/locales/et/translation.json
@@ -6639,7 +6639,6 @@ var translation_default8 = {
6639
6639
  close_other_application_that_may_be_using_your_camera: "Sulgege muud rakendused, mis v\xF5ivad kasutada teie kaamerat",
6640
6640
  if_you_use_external_camera_disconnect_and_reconnect: "Kui kasutate v\xE4list kaamerat, \xFChendage see lahti ja \xFChendage uuesti.",
6641
6641
  close_the_browser_re_open_it: "Sulgege brauser ja avage see uuesti",
6642
- camera_permissions_denied: "Kaamera ei avane? Veenduge, et lubate brauserile kaamera kasutamise loa.",
6643
6642
  camera_errors: {
6644
6643
  experiencing_camera_issues: "Kas teil on probleeme kaameraga?",
6645
6644
  chekin_cant_use_your_camera: "Chekin ei saa oma kaamerat kasutada",
@@ -6663,7 +6662,8 @@ var translation_default8 = {
6663
6662
  hide_password: "Peida parool",
6664
6663
  increment: "Inkrement",
6665
6664
  decrement: "V\xE4hendamine",
6666
- create_option: 'Loo "{{input}}".'
6665
+ create_option: 'Loo "{{input}}".',
6666
+ year_out_of_range: "Aasta peab olema {{min}} ja {{max}} vahel."
6667
6667
  };
6668
6668
 
6669
6669
  // src/locales/fr/translation.json
@@ -6768,7 +6768,6 @@ var translation_default9 = {
6768
6768
  close_other_application_that_may_be_using_your_camera: "Fermez les autres applications qui peuvent utiliser votre appareil photo",
6769
6769
  if_you_use_external_camera_disconnect_and_reconnect: "Si vous utilisez un appareil photo externe, d\xE9connectez-le et reconnectez-le",
6770
6770
  close_the_browser_re_open_it: "Fermer le navigateur et le rouvrir",
6771
- camera_permissions_denied: "L'appareil photo ne s'ouvre pas ? Veillez \xE0 autoriser le navigateur \xE0 utiliser l'appareil photo.",
6772
6771
  camera_errors: {
6773
6772
  experiencing_camera_issues: "Vous avez des probl\xE8mes avec l'appareil photo ?",
6774
6773
  chekin_cant_use_your_camera: "Chekin ne peut pas utiliser votre appareil photo",
@@ -6792,7 +6791,8 @@ var translation_default9 = {
6792
6791
  hide_password: "Cacher le mot de passe",
6793
6792
  increment: "Incr\xE9ment",
6794
6793
  decrement: "D\xE9croissance",
6795
- create_option: 'Cr\xE9er "{{input}}"'
6794
+ create_option: 'Cr\xE9er "{{input}}"',
6795
+ year_out_of_range: "L'ann\xE9e doit \xEAtre comprise entre {{min}} et {{max}}."
6796
6796
  };
6797
6797
 
6798
6798
  // src/locales/hu/translation.json
@@ -6897,7 +6897,6 @@ var translation_default10 = {
6897
6897
  close_other_application_that_may_be_using_your_camera: "Z\xE1rjon be m\xE1s alkalmaz\xE1sokat, amelyek esetleg a kamer\xE1t haszn\xE1lj\xE1k",
6898
6898
  if_you_use_external_camera_disconnect_and_reconnect: "Ha k\xFCls\u0151 kamer\xE1t haszn\xE1l, v\xE1lassza ki \xE9s csatlakoztassa \xFAjra.",
6899
6899
  close_the_browser_re_open_it: "Z\xE1rja be a b\xF6ng\xE9sz\u0151t, majd nyissa meg \xFAjra",
6900
- camera_permissions_denied: "A kamera nem ny\xEDlik ki? Gy\u0151z\u0151dj\xF6n meg r\xF3la, hogy enged\xE9lyezi a b\xF6ng\xE9sz\u0151 sz\xE1m\xE1ra a kamera haszn\xE1lat\xE1t.",
6901
6900
  camera_errors: {
6902
6901
  experiencing_camera_issues: "Kameraprobl\xE9m\xE1k?",
6903
6902
  chekin_cant_use_your_camera: "Chekin nem tudja haszn\xE1lni a kamer\xE1t",
@@ -6921,7 +6920,8 @@ var translation_default10 = {
6921
6920
  hide_password: "Jelsz\xF3 elrejt\xE9se",
6922
6921
  increment: "Inkrement\xE1l\xE1s",
6923
6922
  decrement: "Cs\xF6kkent\xE9s",
6924
- create_option: 'Hozzon l\xE9tre "{{input}}__"'
6923
+ create_option: 'Hozzon l\xE9tre "{{input}}__"',
6924
+ year_out_of_range: "Az \xE9vnek {{min}} \xE9s {{max}} k\xF6z\xF6tt kell lennie."
6925
6925
  };
6926
6926
 
6927
6927
  // src/locales/it/translation.json
@@ -7026,7 +7026,6 @@ var translation_default11 = {
7026
7026
  close_other_application_that_may_be_using_your_camera: "Chiudere altre applicazioni che potrebbero utilizzare la fotocamera",
7027
7027
  if_you_use_external_camera_disconnect_and_reconnect: "Se si utilizza una telecamera esterna, scollegarla e ricollegarla.",
7028
7028
  close_the_browser_re_open_it: "Chiudere il browser e riaprirlo",
7029
- camera_permissions_denied: "La fotocamera non si apre? Assicurarsi di autorizzare il browser a utilizzare la fotocamera.",
7030
7029
  camera_errors: {
7031
7030
  experiencing_camera_issues: "Problemi con la fotocamera?",
7032
7031
  chekin_cant_use_your_camera: "Chekin non pu\xF2 usare la macchina fotografica",
@@ -7050,7 +7049,8 @@ var translation_default11 = {
7050
7049
  hide_password: "Nascondere la password",
7051
7050
  increment: "Incremento",
7052
7051
  decrement: "Decremento",
7053
- create_option: 'Creare "{{input}}"'
7052
+ create_option: 'Creare "{{input}}"',
7053
+ year_out_of_range: "L'anno deve essere compreso tra {{min}} e {{max}}"
7054
7054
  };
7055
7055
 
7056
7056
  // src/locales/ko/translation.json
@@ -7155,7 +7155,6 @@ var translation_default12 = {
7155
7155
  close_other_application_that_may_be_using_your_camera: "\uCE74\uBA54\uB77C\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uB2E4\uB978 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC744 \uB2EB\uC2B5\uB2C8\uB2E4.",
7156
7156
  if_you_use_external_camera_disconnect_and_reconnect: "\uC678\uBD80 \uCE74\uBA54\uB77C\uB97C \uC0AC\uC6A9\uD558\uB294 \uACBD\uC6B0 \uC5F0\uACB0\uC744 \uB04A\uC5C8\uB2E4\uAC00 \uB2E4\uC2DC \uC5F0\uACB0\uD558\uC138\uC694.",
7157
7157
  close_the_browser_re_open_it: "\uBE0C\uB77C\uC6B0\uC800\uB97C \uB2EB\uC558\uB2E4\uAC00 \uB2E4\uC2DC \uC5F4\uAE30",
7158
- camera_permissions_denied: "\uCE74\uBA54\uB77C\uAC00 \uC5F4\uB9AC\uC9C0 \uC54A\uB098\uC694? \uBE0C\uB77C\uC6B0\uC800\uC5D0\uC11C \uCE74\uBA54\uB77C \uC0AC\uC6A9 \uAD8C\uD55C\uC744 \uD5C8\uC6A9\uD588\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.",
7159
7158
  camera_errors: {
7160
7159
  experiencing_camera_issues: "\uCE74\uBA54\uB77C \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uB098\uC694?",
7161
7160
  chekin_cant_use_your_camera: "Chekin\uC774 \uCE74\uBA54\uB77C\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
@@ -7179,7 +7178,8 @@ var translation_default12 = {
7179
7178
  hide_password: "\uBE44\uBC00\uBC88\uD638 \uC228\uAE30\uAE30",
7180
7179
  increment: "\uC99D\uBD84",
7181
7180
  decrement: "\uAC10\uC18C",
7182
- create_option: '"{{input}}" \uB9CC\uB4E4\uAE30'
7181
+ create_option: '"{{input}}" \uB9CC\uB4E4\uAE30',
7182
+ year_out_of_range: "\uC5F0\uB3C4\uB294 {{min}}\uC5D0\uC11C {{max}} \uC0AC\uC774\uC5EC\uC57C \uD569\uB2C8\uB2E4."
7183
7183
  };
7184
7184
 
7185
7185
  // src/locales/nl/translation.json
@@ -7284,7 +7284,6 @@ var translation_default13 = {
7284
7284
  close_other_application_that_may_be_using_your_camera: "Sluit andere toepassingen die mogelijk gebruikmaken van uw camera",
7285
7285
  if_you_use_external_camera_disconnect_and_reconnect: "Als u een externe camera gebruikt, koppelt u deze los en sluit u deze weer aan.",
7286
7286
  close_the_browser_re_open_it: "Sluit de browser en open deze opnieuw",
7287
- camera_permissions_denied: "De camera opent niet? Zorg ervoor dat de browser toestemming geeft om de camera te gebruiken.",
7288
7287
  camera_errors: {
7289
7288
  experiencing_camera_issues: "Problemen met de camera?",
7290
7289
  chekin_cant_use_your_camera: "Chekin kan je camera niet gebruiken",
@@ -7308,7 +7307,8 @@ var translation_default13 = {
7308
7307
  hide_password: "Wachtwoord verbergen",
7309
7308
  increment: "Verhoging",
7310
7309
  decrement: "Afname",
7311
- create_option: 'Maak "{{input}}" aan.'
7310
+ create_option: 'Maak "{{input}}" aan.',
7311
+ year_out_of_range: "Het jaar moet liggen tussen {{min}} en {{max}}"
7312
7312
  };
7313
7313
 
7314
7314
  // src/locales/pl/translation.json
@@ -7413,7 +7413,6 @@ var translation_default14 = {
7413
7413
  close_other_application_that_may_be_using_your_camera: "Zamknij inne aplikacje, kt\xF3re mog\u0105 korzysta\u0107 z kamery",
7414
7414
  if_you_use_external_camera_disconnect_and_reconnect: "Je\u015Bli u\u017Cywasz kamery zewn\u0119trznej, od\u0142\u0105cz j\u0105 i pod\u0142\u0105cz ponownie",
7415
7415
  close_the_browser_re_open_it: "Zamknij przegl\u0105dark\u0119 i otw\xF3rz j\u0105 ponownie",
7416
- camera_permissions_denied: "Kamera nie otwiera si\u0119? Upewnij si\u0119, \u017Ce zezwolono przegl\u0105darce na korzystanie z kamery.",
7417
7416
  camera_errors: {
7418
7417
  experiencing_camera_issues: "Problemy z kamer\u0105?",
7419
7418
  chekin_cant_use_your_camera: "Chekin nie mo\u017Ce u\u017Cywa\u0107 kamery",
@@ -7437,7 +7436,8 @@ var translation_default14 = {
7437
7436
  hide_password: "Ukryj has\u0142o",
7438
7437
  increment: "Przyrost",
7439
7438
  decrement: "Spadek",
7440
- create_option: 'Utw\xF3rz "{{input}}"'
7439
+ create_option: 'Utw\xF3rz "{{input}}"',
7440
+ year_out_of_range: "Rok musi zawiera\u0107 si\u0119 w przedziale od {{min}} do {{max}}."
7441
7441
  };
7442
7442
 
7443
7443
  // src/locales/pt/translation.json
@@ -7542,7 +7542,6 @@ var translation_default15 = {
7542
7542
  close_other_application_that_may_be_using_your_camera: "Fechar outras aplica\xE7\xF5es que possam estar a utilizar a sua c\xE2mara",
7543
7543
  if_you_use_external_camera_disconnect_and_reconnect: "Se utilizar uma c\xE2mara externa, desligue-a e volte a lig\xE1-la",
7544
7544
  close_the_browser_re_open_it: "Fechar o browser e voltar a abri-lo",
7545
- camera_permissions_denied: "A c\xE2mara n\xE3o abre? Certifique-se de que d\xE1 permiss\xE3o ao browser para utilizar a c\xE2mara.",
7546
7545
  camera_errors: {
7547
7546
  experiencing_camera_issues: "Est\xE1 a ter problemas com a c\xE2mara?",
7548
7547
  chekin_cant_use_your_camera: "Chekin n\xE3o pode usar a sua c\xE2mara",
@@ -7566,7 +7565,8 @@ var translation_default15 = {
7566
7565
  hide_password: "Ocultar palavra-passe",
7567
7566
  increment: "Incremento",
7568
7567
  decrement: "Diminui\xE7\xE3o",
7569
- create_option: 'Criar "{{input}}"'
7568
+ create_option: 'Criar "{{input}}"',
7569
+ year_out_of_range: "O ano deve estar compreendido entre {{min}} e {{max}}"
7570
7570
  };
7571
7571
 
7572
7572
  // src/locales/ro/translation.json
@@ -7671,7 +7671,6 @@ var translation_default16 = {
7671
7671
  close_other_application_that_may_be_using_your_camera: "\xCEnchide\u021Bi alte aplica\u021Bii care pot utiliza camera dvs.",
7672
7672
  if_you_use_external_camera_disconnect_and_reconnect: "Dac\u0103 utiliza\u021Bi o camer\u0103 extern\u0103, deconecta\u021Bi-o \u0219i reconecta\u021Bi-o",
7673
7673
  close_the_browser_re_open_it: "\xCEnchide\u021Bi browserul \u0219i redeschide\u021Bi-l",
7674
- camera_permissions_denied: "Camera nu se deschide? Asigura\u021Bi-v\u0103 c\u0103 acorda\u021Bi browserului permisiunea de a utiliza camera.",
7675
7674
  camera_errors: {
7676
7675
  experiencing_camera_issues: "Ave\u021Bi probleme cu camera foto?",
7677
7676
  chekin_cant_use_your_camera: "Chekin nu-\u021Bi poate folosi camera",
@@ -7695,7 +7694,8 @@ var translation_default16 = {
7695
7694
  hide_password: "Ascunde\u021Bi parola",
7696
7695
  increment: "Increment",
7697
7696
  decrement: "Diminuare",
7698
- create_option: 'Crea\u021Bi "{{input}}"'
7697
+ create_option: 'Crea\u021Bi "{{input}}"',
7698
+ year_out_of_range: "Anul trebuie s\u0103 fie \xEEntre {{min}} \u0219i {{max}}"
7699
7699
  };
7700
7700
 
7701
7701
  // src/locales/ru/translation.json
@@ -7800,7 +7800,6 @@ var translation_default17 = {
7800
7800
  close_other_application_that_may_be_using_your_camera: "\u0417\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0433\u0443\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u0430\u0448\u0443 \u043A\u0430\u043C\u0435\u0440\u0443",
7801
7801
  if_you_use_external_camera_disconnect_and_reconnect: "\u0415\u0441\u043B\u0438 \u0432\u044B \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0435 \u0432\u043D\u0435\u0448\u043D\u044E\u044E \u043A\u0430\u043C\u0435\u0440\u0443, \u043E\u0442\u0441\u043E\u0435\u0434\u0438\u043D\u0438\u0442\u0435 \u0438 \u0441\u043D\u043E\u0432\u0430 \u043F\u043E\u0434\u0441\u043E\u0435\u0434\u0438\u043D\u0438\u0442\u0435 \u0435\u0435",
7802
7802
  close_the_browser_re_open_it: "\u0417\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0433\u043E \u0441\u043D\u043E\u0432\u0430",
7803
- camera_permissions_denied: "\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F? \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043B\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u0430\u043C\u0435\u0440\u0443.",
7804
7803
  camera_errors: {
7805
7804
  experiencing_camera_issues: "\u0418\u0441\u043F\u044B\u0442\u044B\u0432\u0430\u0435\u0442\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u0441 \u043A\u0430\u043C\u0435\u0440\u043E\u0439?",
7806
7805
  chekin_cant_use_your_camera: "\u0427\u0435\u043A\u0438\u043D \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u0430\u0448\u0435\u0439 \u043A\u0430\u043C\u0435\u0440\u043E\u0439",
@@ -7824,7 +7823,8 @@ var translation_default17 = {
7824
7823
  hide_password: "\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C",
7825
7824
  increment: "\u0418\u043D\u043A\u0440\u0435\u043C\u0435\u043D\u0442",
7826
7825
  decrement: "\u0423\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435",
7827
- create_option: '\u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 "{{input}}"'
7826
+ create_option: '\u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 "{{input}}"',
7827
+ year_out_of_range: "\u0413\u043E\u0434 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043C\u0435\u0436\u0434\u0443 {{min}} \u0438 {{max}}"
7828
7828
  };
7829
7829
 
7830
7830
  // src/locales/uk/translation.json
@@ -7929,7 +7929,6 @@ var translation_default18 = {
7929
7929
  close_other_application_that_may_be_using_your_camera: "\u0417\u0430\u043A\u0440\u0438\u0439\u0442\u0435 \u0456\u043D\u0448\u0456 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0438, \u044F\u043A\u0456 \u043C\u043E\u0436\u0443\u0442\u044C \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u043A\u0430\u043C\u0435\u0440\u0443",
7930
7930
  if_you_use_external_camera_disconnect_and_reconnect: "\u042F\u043A\u0449\u043E \u0432\u0438 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454\u0442\u0435 \u0437\u043E\u0432\u043D\u0456\u0448\u043D\u044E \u043A\u0430\u043C\u0435\u0440\u0443, \u0432\u0456\u0434'\u0454\u0434\u043D\u0430\u0439\u0442\u0435 \u0442\u0430 \u0437\u043D\u043E\u0432\u0443 \u043F\u0456\u0434'\u0454\u0434\u043D\u0430\u0439\u0442\u0435 \u0457\u0457",
7931
7931
  close_the_browser_re_open_it: "\u0417\u0430\u043A\u0440\u0438\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0456 \u0432\u0456\u0434\u043A\u0440\u0438\u0439\u0442\u0435 \u0439\u043E\u0433\u043E \u0437\u043D\u043E\u0432\u0443",
7932
- camera_permissions_denied: "\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0435 \u0432\u0456\u0434\u043A\u0440\u0438\u0432\u0430\u0454\u0442\u044C\u0441\u044F? \u041F\u0435\u0440\u0435\u043A\u043E\u043D\u0430\u0439\u0442\u0435\u0441\u044F, \u0449\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043C\u0430\u0454 \u0434\u043E\u0437\u0432\u0456\u043B \u043D\u0430 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u043D\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0438.",
7933
7932
  camera_errors: {
7934
7933
  experiencing_camera_issues: "\u0412\u0438\u043D\u0438\u043A\u0430\u044E\u0442\u044C \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0438 \u0437 \u043A\u0430\u043C\u0435\u0440\u043E\u044E?",
7935
7934
  chekin_cant_use_your_camera: "\u0427\u0435\u043A\u0456\u043D \u043D\u0435 \u043C\u043E\u0436\u0435 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u0442\u0432\u043E\u0454\u044E \u043A\u0430\u043C\u0435\u0440\u043E\u044E",
@@ -7953,7 +7952,8 @@ var translation_default18 = {
7953
7952
  hide_password: "\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438 \u043F\u0430\u0440\u043E\u043B\u044C",
7954
7953
  increment: "\u041F\u0440\u0438\u0440\u0456\u0441\u0442",
7955
7954
  decrement: "\u0414\u0435\u043A\u0440\u0435\u0442",
7956
- create_option: '\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C "{{input}}"'
7955
+ create_option: '\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C "{{input}}"',
7956
+ year_out_of_range: "\u0420\u0456\u043A \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0431\u0443\u0442\u0438 \u043C\u0456\u0436 {{min}} \u0442\u0430 {{max}}."
7957
7957
  };
7958
7958
 
7959
7959
  // src/i18n/resources.ts
@@ -17496,7 +17496,7 @@ var Textarea = React61.forwardRef(function Textarea2({
17496
17496
  });
17497
17497
 
17498
17498
  // src/fields/datepicker/Datepicker.tsx
17499
- var React63 = __toESM(require("react"), 1);
17499
+ var React64 = __toESM(require("react"), 1);
17500
17500
  var import_lucide_react50 = require("lucide-react");
17501
17501
  var import_react_i18next38 = require("react-i18next");
17502
17502
 
@@ -18144,6 +18144,142 @@ function AirbnbDatePickerContent({
18144
18144
  ) });
18145
18145
  }
18146
18146
 
18147
+ // src/fields/datepicker/useMonthCombobox.ts
18148
+ var React63 = __toESM(require("react"), 1);
18149
+ function useMonthCombobox({
18150
+ monthLabels,
18151
+ monthIndex,
18152
+ isFieldFocused,
18153
+ disabled,
18154
+ onSelect,
18155
+ onCommit,
18156
+ onClear
18157
+ }) {
18158
+ const [isOpen, setIsOpen] = React63.useState(false);
18159
+ const [inputValue, setInputValue] = React63.useState("");
18160
+ const [highlightIndex, setHighlightIndex] = React63.useState(-1);
18161
+ const labelFor = React63.useCallback(
18162
+ (index) => index !== null ? monthLabels[index] ?? "" : "",
18163
+ [monthLabels]
18164
+ );
18165
+ React63.useEffect(() => {
18166
+ if (isFieldFocused) return;
18167
+ setInputValue(labelFor(monthIndex));
18168
+ }, [monthIndex, labelFor, isFieldFocused]);
18169
+ const filteredMonths = React63.useMemo(() => {
18170
+ const all = monthLabels.map((label, index) => ({ label, index }));
18171
+ const query = inputValue.trim().toLowerCase();
18172
+ if (!query || inputValue === labelFor(monthIndex)) return all;
18173
+ return all.filter((option) => option.label.toLowerCase().includes(query));
18174
+ }, [inputValue, monthIndex, monthLabels, labelFor]);
18175
+ React63.useEffect(() => {
18176
+ if (!isOpen) {
18177
+ setHighlightIndex(-1);
18178
+ return;
18179
+ }
18180
+ if (monthIndex !== null) {
18181
+ const index = filteredMonths.findIndex((option) => option.index === monthIndex);
18182
+ if (index >= 0) {
18183
+ setHighlightIndex(index);
18184
+ return;
18185
+ }
18186
+ }
18187
+ setHighlightIndex(filteredMonths.length > 0 ? 0 : -1);
18188
+ }, [isOpen, filteredMonths.length]);
18189
+ const selectMonth = React63.useCallback(
18190
+ (index) => {
18191
+ setInputValue(labelFor(index));
18192
+ setIsOpen(false);
18193
+ onSelect(index);
18194
+ },
18195
+ [labelFor, onSelect]
18196
+ );
18197
+ const commitInput = React63.useCallback(() => {
18198
+ const query = inputValue.trim().toLowerCase();
18199
+ if (!query) {
18200
+ if (monthIndex !== null) onClear();
18201
+ setInputValue("");
18202
+ return;
18203
+ }
18204
+ const exactMatch = monthLabels.findIndex((label) => label.toLowerCase() === query);
18205
+ if (exactMatch >= 0) {
18206
+ if (exactMatch !== monthIndex) onCommit(exactMatch);
18207
+ setInputValue(labelFor(exactMatch));
18208
+ return;
18209
+ }
18210
+ setInputValue(labelFor(monthIndex));
18211
+ }, [inputValue, monthIndex, monthLabels, labelFor, onClear, onCommit]);
18212
+ const handleInputChange = React63.useCallback(
18213
+ (event) => {
18214
+ setInputValue(event.target.value);
18215
+ setIsOpen(true);
18216
+ setHighlightIndex(0);
18217
+ },
18218
+ []
18219
+ );
18220
+ const handleInputKeyDown = React63.useCallback(
18221
+ (event) => {
18222
+ if (disabled) return;
18223
+ if (event.key === "ArrowDown") {
18224
+ event.preventDefault();
18225
+ setIsOpen(true);
18226
+ setHighlightIndex(
18227
+ (prev) => filteredMonths.length === 0 ? -1 : Math.min(prev + 1, filteredMonths.length - 1)
18228
+ );
18229
+ return;
18230
+ }
18231
+ if (event.key === "ArrowUp") {
18232
+ event.preventDefault();
18233
+ setIsOpen(true);
18234
+ setHighlightIndex((prev) => Math.max(prev - 1, 0));
18235
+ return;
18236
+ }
18237
+ if (event.key === "Enter") {
18238
+ if (!isOpen) return;
18239
+ event.preventDefault();
18240
+ const target = filteredMonths[highlightIndex];
18241
+ if (target) {
18242
+ selectMonth(target.index);
18243
+ } else {
18244
+ commitInput();
18245
+ }
18246
+ return;
18247
+ }
18248
+ if (event.key === "Escape") {
18249
+ event.preventDefault();
18250
+ setIsOpen(false);
18251
+ setInputValue(labelFor(monthIndex));
18252
+ return;
18253
+ }
18254
+ if (event.key === "Tab") {
18255
+ setIsOpen(false);
18256
+ }
18257
+ },
18258
+ [
18259
+ commitInput,
18260
+ disabled,
18261
+ filteredMonths,
18262
+ highlightIndex,
18263
+ isOpen,
18264
+ labelFor,
18265
+ monthIndex,
18266
+ selectMonth
18267
+ ]
18268
+ );
18269
+ return {
18270
+ isOpen,
18271
+ setIsOpen,
18272
+ inputValue,
18273
+ highlightIndex,
18274
+ setHighlightIndex,
18275
+ filteredMonths,
18276
+ selectMonth,
18277
+ commitInput,
18278
+ handleInputChange,
18279
+ handleInputKeyDown
18280
+ };
18281
+ }
18282
+
18147
18283
  // src/fields/datepicker/Datepicker.tsx
18148
18284
  var import_jsx_runtime174 = require("react/jsx-runtime");
18149
18285
  var MONTHS_IN_YEAR2 = 12;
@@ -18155,13 +18291,33 @@ function getMonthLabels2(locale) {
18155
18291
  );
18156
18292
  }
18157
18293
  var DAY_PATTERN = /^([1-9]|[12]\d|3[01])$/;
18158
- var PARTIAL_DAY_PATTERN = /^[0-9]{0,2}$/;
18294
+ var PARTIAL_DAY_PATTERN = /^([0-9]|0[1-9]|[12]\d|3[01])?$/;
18159
18295
  var PARTIAL_YEAR_PATTERN = /^[0-9]{0,4}$/;
18160
- var FULL_YEAR_PATTERN = /^(19|20)\d{2}$/;
18296
+ var COMPLETE_YEAR_PATTERN = /^\d{4}$/;
18297
+ var MIN_YEAR_OFFSET = 120;
18298
+ var MAX_YEAR_OFFSET = 50;
18299
+ function getYearBounds() {
18300
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
18301
+ return {
18302
+ minYear: currentYear - MIN_YEAR_OFFSET,
18303
+ maxYear: currentYear + MAX_YEAR_OFFSET
18304
+ };
18305
+ }
18161
18306
  function isValidCalendarDate(year, monthIndex, day) {
18162
18307
  const date = new Date(year, monthIndex, day);
18163
18308
  return date.getFullYear() === year && date.getMonth() === monthIndex && date.getDate() === day;
18164
18309
  }
18310
+ function getDaysInMonth2(monthIndex, year) {
18311
+ const yearNum = COMPLETE_YEAR_PATTERN.test(year) ? parseInt(year, 10) : 2024;
18312
+ return new Date(yearNum, monthIndex + 1, 0).getDate();
18313
+ }
18314
+ function clampDayToMonth(day, monthIndex, year) {
18315
+ if (!day || monthIndex === null) return day;
18316
+ const dayNum = parseInt(day, 10);
18317
+ if (Number.isNaN(dayNum)) return day;
18318
+ const max = getDaysInMonth2(monthIndex, year);
18319
+ return dayNum > max ? String(max) : day;
18320
+ }
18165
18321
  function partsFromDate(date) {
18166
18322
  if (!date) return { day: "", monthIndex: null, year: "" };
18167
18323
  return {
@@ -18170,15 +18326,23 @@ function partsFromDate(date) {
18170
18326
  year: String(date.getFullYear())
18171
18327
  };
18172
18328
  }
18173
- function dateFromParts(day, monthIndex, year) {
18329
+ function datepickerDatesEqual(a, b) {
18330
+ if (a === null || b === null) return a === b;
18331
+ return a.getTime() === b.getTime();
18332
+ }
18333
+ function isYearInRange(yearNum, minYear, maxYear) {
18334
+ return yearNum >= minYear && yearNum <= maxYear;
18335
+ }
18336
+ function dateFromParts(day, monthIndex, year, minYear, maxYear) {
18174
18337
  if (!day || monthIndex === null || !year) return null;
18175
- if (!DAY_PATTERN.test(day) || !FULL_YEAR_PATTERN.test(year)) return null;
18338
+ if (!DAY_PATTERN.test(day) || !COMPLETE_YEAR_PATTERN.test(year)) return null;
18176
18339
  const dayNum = parseInt(day, 10);
18177
18340
  const yearNum = parseInt(year, 10);
18341
+ if (!isYearInRange(yearNum, minYear, maxYear)) return null;
18178
18342
  if (!isValidCalendarDate(yearNum, monthIndex, dayNum)) return null;
18179
18343
  return new Date(yearNum, monthIndex, dayNum);
18180
18344
  }
18181
- var Datepicker = React63.forwardRef(
18345
+ var Datepicker = React64.forwardRef(
18182
18346
  function Datepicker2({
18183
18347
  label,
18184
18348
  value,
@@ -18211,133 +18375,154 @@ var Datepicker = React63.forwardRef(
18211
18375
  maxDate,
18212
18376
  formatValue
18213
18377
  }, ref) {
18214
- const containerRef = React63.useRef(null);
18215
- const dayInputRef = React63.useRef(null);
18216
- const monthInputRef = React63.useRef(null);
18217
- const monthListRef = React63.useRef(null);
18218
- const yearInputRef = React63.useRef(null);
18219
- const mobileTriggerRef = React63.useRef(null);
18220
- const wheelBaseId = React63.useId();
18221
- const reactId = React63.useId();
18378
+ const containerRef = React64.useRef(null);
18379
+ const dayInputRef = React64.useRef(null);
18380
+ const monthInputRef = React64.useRef(null);
18381
+ const yearInputRef = React64.useRef(null);
18382
+ const mobileTriggerRef = React64.useRef(null);
18383
+ const reactId = React64.useId();
18222
18384
  const baseId = name ?? `dash-datepicker-${reactId}`;
18223
18385
  const dayId = `${baseId}-day`;
18224
18386
  const monthId = `${baseId}-month`;
18225
18387
  const yearId = `${baseId}-year`;
18226
18388
  const labelId = `${baseId}-label`;
18227
18389
  const errorId = `${baseId}-error`;
18390
+ const wheelBaseId = `${baseId}-wheel`;
18228
18391
  const { t, i18n } = (0, import_react_i18next38.useTranslation)();
18229
18392
  const resolvedLocale = locale ?? i18n.resolvedLanguage ?? i18n.language ?? "en-US";
18230
- const resolvedMonthLabels = React63.useMemo(
18393
+ const resolvedMonthLabels = React64.useMemo(
18231
18394
  () => monthLabels ?? getMonthLabels2(resolvedLocale),
18232
18395
  [resolvedLocale, monthLabels]
18233
18396
  );
18234
18397
  const resolvedMonthPlaceholder = monthPlaceholder ?? t("month");
18235
18398
  const resolvedDoneLabel = doneLabel ?? t("done");
18236
18399
  const isControlled = value !== void 0;
18237
- const initialParts = React63.useMemo(
18400
+ const initialParts = React64.useMemo(
18238
18401
  () => partsFromDate(value ?? defaultValue ?? null),
18239
18402
  // eslint-disable-next-line react-hooks/exhaustive-deps
18240
18403
  []
18241
18404
  );
18242
- const [day, setDay] = React63.useState(initialParts.day);
18243
- const [monthIndex, setMonthIndex] = React63.useState(
18405
+ const [day, setDay] = React64.useState(initialParts.day);
18406
+ const [monthIndex, setMonthIndex] = React64.useState(
18244
18407
  initialParts.monthIndex
18245
18408
  );
18246
- const [year, setYear] = React63.useState(initialParts.year);
18247
- const [isMonthOpen, setIsMonthOpen] = React63.useState(false);
18248
- const [isWheelOpen, setIsWheelOpen] = React63.useState(false);
18249
- const [focusedField, setFocusedField] = React63.useState(null);
18250
- const [monthInputValue, setMonthInputValue] = React63.useState("");
18251
- const [monthHighlightIndex, setMonthHighlightIndex] = React63.useState(-1);
18409
+ const [year, setYear] = React64.useState(initialParts.year);
18410
+ const [isWheelOpen, setIsWheelOpen] = React64.useState(false);
18411
+ const [focusedField, setFocusedField] = React64.useState(null);
18252
18412
  const isMobile3 = useIsMobile();
18253
- const emitChangeRef = React63.useRef(() => {
18413
+ const emitChangeRef = React64.useRef(() => {
18254
18414
  });
18255
- const dayStateRef = React63.useRef(day);
18256
- const yearStateRef = React63.useRef(year);
18257
- const monthIndexRef = React63.useRef(monthIndex);
18415
+ const lastEmittedRef = React64.useRef(value ?? null);
18416
+ const dayStateRef = React64.useRef(day);
18417
+ const yearStateRef = React64.useRef(year);
18418
+ const monthIndexRef = React64.useRef(monthIndex);
18258
18419
  dayStateRef.current = day;
18259
18420
  yearStateRef.current = year;
18260
18421
  monthIndexRef.current = monthIndex;
18261
- React63.useImperativeHandle(
18422
+ React64.useImperativeHandle(
18262
18423
  ref,
18263
18424
  () => ({
18264
18425
  getDayValue: () => dayStateRef.current,
18265
18426
  getYearValue: () => yearStateRef.current,
18266
18427
  setDayValue: (next) => {
18267
18428
  if (!PARTIAL_DAY_PATTERN.test(next)) return;
18429
+ const month = monthIndexRef.current;
18430
+ if (month !== null && next && parseInt(next, 10) > getDaysInMonth2(month, yearStateRef.current)) {
18431
+ return;
18432
+ }
18268
18433
  setDay(next);
18269
- emitChangeRef.current(next, monthIndexRef.current, yearStateRef.current);
18434
+ emitChangeRef.current(next, month, yearStateRef.current);
18270
18435
  },
18271
18436
  setYearValue: (next) => {
18272
18437
  if (!PARTIAL_YEAR_PATTERN.test(next)) return;
18438
+ const clampedDay = clampDayToMonth(
18439
+ dayStateRef.current,
18440
+ monthIndexRef.current,
18441
+ next
18442
+ );
18443
+ if (clampedDay !== dayStateRef.current) setDay(clampedDay);
18273
18444
  setYear(next);
18274
- emitChangeRef.current(dayStateRef.current, monthIndexRef.current, next);
18445
+ emitChangeRef.current(clampedDay, monthIndexRef.current, next);
18275
18446
  }
18276
18447
  }),
18277
18448
  []
18278
18449
  );
18279
- React63.useEffect(() => {
18450
+ React64.useEffect(() => {
18280
18451
  if (!isControlled) return;
18281
- const next = partsFromDate(value ?? null);
18452
+ const incoming = value ?? null;
18453
+ if (datepickerDatesEqual(incoming, lastEmittedRef.current)) return;
18454
+ lastEmittedRef.current = incoming;
18455
+ const next = partsFromDate(incoming);
18282
18456
  setDay(next.day);
18283
18457
  setMonthIndex(next.monthIndex);
18284
18458
  setYear(next.year);
18285
18459
  }, [isControlled, value]);
18286
- React63.useEffect(() => {
18287
- if (focusedField === "month") return;
18288
- setMonthInputValue(
18289
- monthIndex !== null ? resolvedMonthLabels[monthIndex] ?? "" : ""
18290
- );
18291
- }, [monthIndex, resolvedMonthLabels, focusedField]);
18292
- const filteredMonths = React63.useMemo(() => {
18293
- const all = resolvedMonthLabels.map((label2, index) => ({ label: label2, index }));
18294
- const query = monthInputValue.trim().toLowerCase();
18295
- const currentLabel = monthIndex !== null ? resolvedMonthLabels[monthIndex] ?? "" : "";
18296
- if (!query || monthInputValue === currentLabel) return all;
18297
- return all.filter((opt) => opt.label.toLowerCase().includes(query));
18298
- }, [monthInputValue, monthIndex, resolvedMonthLabels]);
18299
- React63.useEffect(() => {
18300
- if (!isMonthOpen) {
18301
- setMonthHighlightIndex(-1);
18302
- return;
18303
- }
18304
- if (monthIndex !== null) {
18305
- const currentLabel = resolvedMonthLabels[monthIndex];
18306
- const index = filteredMonths.findIndex((o) => o.label === currentLabel);
18307
- if (index >= 0) {
18308
- setMonthHighlightIndex(index);
18309
- return;
18310
- }
18460
+ const { minYear, maxYear } = React64.useMemo(() => getYearBounds(), []);
18461
+ const yearError = React64.useMemo(() => {
18462
+ if (year.length < 4) return null;
18463
+ const yearNum = parseInt(year, 10);
18464
+ if (!isYearInRange(yearNum, minYear, maxYear)) {
18465
+ return t("year_out_of_range", { min: minYear, max: maxYear });
18311
18466
  }
18312
- setMonthHighlightIndex(filteredMonths.length > 0 ? 0 : -1);
18313
- }, [isMonthOpen, filteredMonths.length]);
18314
- const hasAnyValue = Boolean(day) || monthIndex !== null || Boolean(year);
18315
- const isEmpty = !hasAnyValue;
18467
+ return null;
18468
+ }, [year, minYear, maxYear, t]);
18469
+ const resolvedError = error || yearError || void 0;
18470
+ const isEmpty = !day && monthIndex === null && !year;
18316
18471
  const isBlocked = Boolean(disabled) || Boolean(loading);
18317
- const isFocused = focusedField !== null || isMonthOpen || isWheelOpen;
18318
- const isInvalid = Boolean(invalid || error);
18472
+ const isInvalid = Boolean(invalid || resolvedError);
18319
18473
  const wrapperWidth = toCssSize(width);
18320
- const currentDate = React63.useMemo(
18321
- () => dateFromParts(day, monthIndex, year),
18322
- [day, monthIndex, year]
18474
+ const errorDescribedBy = resolvedError && !hideErrorMessage ? errorId : void 0;
18475
+ const currentDate = React64.useMemo(
18476
+ () => dateFromParts(day, monthIndex, year, minYear, maxYear),
18477
+ [day, monthIndex, year, minYear, maxYear]
18323
18478
  );
18324
- useOutsideClick({
18325
- elementRef: containerRef,
18326
- onOutsideClick: () => setIsMonthOpen(false),
18327
- isDisabled: !isMonthOpen || isMobile3
18328
- });
18329
- const emitChange = React63.useCallback(
18479
+ const emitChange = React64.useCallback(
18330
18480
  (nextDay, nextMonth, nextYear) => {
18331
- if (!onChange) return;
18332
- const date = dateFromParts(nextDay, nextMonth, nextYear);
18333
- onChange(date, name);
18481
+ const date = dateFromParts(nextDay, nextMonth, nextYear, minYear, maxYear);
18482
+ lastEmittedRef.current = date;
18483
+ onChange?.(date, name);
18334
18484
  },
18335
- [name, onChange]
18485
+ [name, onChange, minYear, maxYear]
18336
18486
  );
18337
18487
  emitChangeRef.current = emitChange;
18488
+ const commitMonth = React64.useCallback(
18489
+ (index) => {
18490
+ const clampedDay = clampDayToMonth(day, index, year);
18491
+ if (clampedDay !== day) setDay(clampedDay);
18492
+ setMonthIndex(index);
18493
+ emitChange(clampedDay, index, year);
18494
+ },
18495
+ [day, emitChange, year]
18496
+ );
18497
+ const handleMonthSelect = React64.useCallback(
18498
+ (index) => {
18499
+ commitMonth(index);
18500
+ yearInputRef.current?.focus();
18501
+ },
18502
+ [commitMonth]
18503
+ );
18504
+ const handleMonthClear = React64.useCallback(() => commitMonth(null), [commitMonth]);
18505
+ const monthCombobox = useMonthCombobox({
18506
+ monthLabels: resolvedMonthLabels,
18507
+ monthIndex,
18508
+ isFieldFocused: focusedField === "month",
18509
+ disabled: isBlocked,
18510
+ onSelect: handleMonthSelect,
18511
+ onCommit: commitMonth,
18512
+ onClear: handleMonthClear
18513
+ });
18514
+ const isFocused = focusedField !== null || monthCombobox.isOpen || isWheelOpen;
18515
+ useOutsideClick({
18516
+ elementRef: containerRef,
18517
+ onOutsideClick: () => monthCombobox.setIsOpen(false),
18518
+ isDisabled: !monthCombobox.isOpen || isMobile3
18519
+ });
18338
18520
  const handleDayChange = (event) => {
18339
18521
  const next = event.target.value;
18340
18522
  if (!PARTIAL_DAY_PATTERN.test(next)) return;
18523
+ if (monthIndex !== null && next && parseInt(next, 10) > getDaysInMonth2(monthIndex, year)) {
18524
+ return;
18525
+ }
18341
18526
  setDay(next);
18342
18527
  emitChange(next, monthIndex, year);
18343
18528
  if (next.length === 2 && DAY_PATTERN.test(next)) {
@@ -18347,90 +18532,20 @@ var Datepicker = React63.forwardRef(
18347
18532
  const handleYearChange = (event) => {
18348
18533
  const next = event.target.value;
18349
18534
  if (!PARTIAL_YEAR_PATTERN.test(next)) return;
18535
+ const clampedDay = clampDayToMonth(day, monthIndex, next);
18536
+ if (clampedDay !== day) setDay(clampedDay);
18350
18537
  setYear(next);
18351
- emitChange(day, monthIndex, next);
18352
- };
18353
- const handleMonthSelect = (index) => {
18354
- setMonthIndex(index);
18355
- setMonthInputValue(resolvedMonthLabels[index] ?? "");
18356
- setIsMonthOpen(false);
18357
- emitChange(day, index, year);
18358
- yearInputRef.current?.focus();
18359
- };
18360
- const handleMonthInputChange = (event) => {
18361
- setMonthInputValue(event.target.value);
18362
- setIsMonthOpen(true);
18363
- setMonthHighlightIndex(0);
18364
- };
18365
- const commitMonthInput = React63.useCallback(() => {
18366
- const query = monthInputValue.trim().toLowerCase();
18367
- if (!query) {
18368
- if (monthIndex !== null) {
18369
- setMonthIndex(null);
18370
- emitChange(day, null, year);
18371
- }
18372
- setMonthInputValue("");
18373
- return;
18374
- }
18375
- const exactMatch = resolvedMonthLabels.findIndex(
18376
- (label2) => label2.toLowerCase() === query
18377
- );
18378
- if (exactMatch >= 0) {
18379
- if (exactMatch !== monthIndex) {
18380
- setMonthIndex(exactMatch);
18381
- emitChange(day, exactMatch, year);
18382
- }
18383
- setMonthInputValue(resolvedMonthLabels[exactMatch]);
18384
- return;
18385
- }
18386
- setMonthInputValue(monthIndex !== null ? resolvedMonthLabels[monthIndex] : "");
18387
- }, [day, emitChange, monthIndex, monthInputValue, resolvedMonthLabels, year]);
18388
- const handleMonthInputKeyDown = (event) => {
18389
- if (isBlocked) return;
18390
- if (event.key === "ArrowDown") {
18391
- event.preventDefault();
18392
- setIsMonthOpen(true);
18393
- setMonthHighlightIndex(
18394
- (prev) => filteredMonths.length === 0 ? -1 : Math.min(prev + 1, filteredMonths.length - 1)
18395
- );
18396
- return;
18397
- }
18398
- if (event.key === "ArrowUp") {
18399
- event.preventDefault();
18400
- setIsMonthOpen(true);
18401
- setMonthHighlightIndex((prev) => Math.max(prev - 1, 0));
18402
- return;
18403
- }
18404
- if (event.key === "Enter") {
18405
- if (!isMonthOpen) return;
18406
- event.preventDefault();
18407
- const target = filteredMonths[monthHighlightIndex];
18408
- if (target) {
18409
- handleMonthSelect(target.index);
18410
- } else {
18411
- commitMonthInput();
18412
- }
18413
- return;
18414
- }
18415
- if (event.key === "Escape") {
18416
- event.preventDefault();
18417
- setIsMonthOpen(false);
18418
- setMonthInputValue(monthIndex !== null ? resolvedMonthLabels[monthIndex] : "");
18419
- return;
18420
- }
18421
- if (event.key === "Tab") {
18422
- setIsMonthOpen(false);
18423
- }
18538
+ emitChange(clampedDay, monthIndex, next);
18424
18539
  };
18425
- const focusDayInput = React63.useCallback(() => {
18540
+ const focusDayInput = React64.useCallback(() => {
18426
18541
  if (isBlocked || readOnly) return;
18427
18542
  dayInputRef.current?.focus();
18428
18543
  }, [isBlocked, readOnly]);
18429
- const openWheel = React63.useCallback(() => {
18544
+ const openWheel = React64.useCallback(() => {
18430
18545
  if (isBlocked || readOnly) return;
18431
18546
  setIsWheelOpen(true);
18432
18547
  }, [isBlocked, readOnly]);
18433
- const closeWheel = React63.useCallback(() => {
18548
+ const closeWheel = React64.useCallback(() => {
18434
18549
  setIsWheelOpen(false);
18435
18550
  mobileTriggerRef.current?.focus();
18436
18551
  }, []);
@@ -18442,33 +18557,33 @@ var Datepicker = React63.forwardRef(
18442
18557
  minDate,
18443
18558
  maxDate
18444
18559
  });
18445
- const handleWheelDone = React63.useCallback(() => {
18560
+ const handleWheelDone = React64.useCallback(() => {
18446
18561
  const next = wheel.draftDate;
18447
18562
  setDay(String(next.getDate()));
18448
18563
  setMonthIndex(next.getMonth());
18449
18564
  setYear(String(next.getFullYear()));
18565
+ lastEmittedRef.current = next;
18450
18566
  onChange?.(next, name);
18451
18567
  setIsWheelOpen(false);
18452
18568
  mobileTriggerRef.current?.focus();
18453
18569
  }, [name, onChange, wheel.draftDate]);
18454
- const defaultFormatValue = React63.useCallback(
18570
+ const defaultFormatValue = React64.useCallback(
18455
18571
  (date) => `${date.getDate()} ${resolvedMonthLabels[date.getMonth()]} ${date.getFullYear()}`,
18456
18572
  [resolvedMonthLabels]
18457
18573
  );
18458
18574
  const triggerText = currentDate ? (formatValue ?? defaultFormatValue)(currentDate) : void 0;
18459
18575
  const monthListboxId = `${monthId}-listbox`;
18460
18576
  const getMonthOptionId = (index) => `${monthId}-option-${index}`;
18461
- const monthPanelContent = filteredMonths.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "px-4 py-3 text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: t("no_options") }) : /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18577
+ const monthPanelContent = monthCombobox.filteredMonths.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "px-4 py-3 text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: t("no_options") }) : /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18462
18578
  "ul",
18463
18579
  {
18464
- ref: monthListRef,
18465
18580
  id: monthListboxId,
18466
18581
  role: "listbox",
18467
18582
  "aria-labelledby": labelId,
18468
18583
  className: "m-0 max-h-[260px] list-none overflow-y-auto p-1",
18469
- children: filteredMonths.map((option, position) => {
18584
+ children: monthCombobox.filteredMonths.map((option, position) => {
18470
18585
  const isSelected = option.index === monthIndex;
18471
- const isHighlighted = position === monthHighlightIndex;
18586
+ const isHighlighted = position === monthCombobox.highlightIndex;
18472
18587
  return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("li", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18473
18588
  "button",
18474
18589
  {
@@ -18478,8 +18593,8 @@ var Datepicker = React63.forwardRef(
18478
18593
  "aria-selected": isSelected,
18479
18594
  tabIndex: -1,
18480
18595
  onMouseDown: (event) => event.preventDefault(),
18481
- onMouseMove: () => setMonthHighlightIndex(position),
18482
- onClick: () => handleMonthSelect(option.index),
18596
+ onMouseMove: () => monthCombobox.setHighlightIndex(position),
18597
+ onClick: () => monthCombobox.selectMonth(option.index),
18483
18598
  className: cn(
18484
18599
  "flex w-full items-center justify-start rounded-md border-0 bg-transparent px-3 py-[10px] text-left text-[16px] font-medium text-[var(--chekin-color-brand-navy)] outline-none transition-colors",
18485
18600
  isHighlighted && "bg-[var(--chekin-color-surface-pressed)] text-[var(--chekin-color-brand-blue)]",
@@ -18519,6 +18634,7 @@ var Datepicker = React63.forwardRef(
18519
18634
  "aria-expanded": isWheelOpen,
18520
18635
  "aria-labelledby": labelId,
18521
18636
  "aria-invalid": isInvalid,
18637
+ "aria-describedby": errorDescribedBy,
18522
18638
  "aria-busy": loading,
18523
18639
  disabled: isBlocked || readOnly,
18524
18640
  onClick: openWheel,
@@ -18563,6 +18679,7 @@ var Datepicker = React63.forwardRef(
18563
18679
  disabled: isBlocked,
18564
18680
  readOnly,
18565
18681
  "aria-invalid": isInvalid,
18682
+ "aria-describedby": errorDescribedBy,
18566
18683
  "aria-labelledby": labelId,
18567
18684
  onChange: handleDayChange,
18568
18685
  onFocus: (event) => {
@@ -18588,36 +18705,39 @@ var Datepicker = React63.forwardRef(
18588
18705
  role: "combobox",
18589
18706
  autoComplete: "off",
18590
18707
  "aria-haspopup": "listbox",
18591
- "aria-expanded": isMonthOpen,
18708
+ "aria-expanded": monthCombobox.isOpen,
18592
18709
  "aria-controls": monthListboxId,
18593
18710
  "aria-autocomplete": "list",
18594
- "aria-activedescendant": monthHighlightIndex >= 0 && filteredMonths[monthHighlightIndex] ? getMonthOptionId(filteredMonths[monthHighlightIndex].index) : void 0,
18711
+ "aria-activedescendant": monthCombobox.highlightIndex >= 0 && monthCombobox.filteredMonths[monthCombobox.highlightIndex] ? getMonthOptionId(
18712
+ monthCombobox.filteredMonths[monthCombobox.highlightIndex].index
18713
+ ) : void 0,
18595
18714
  "aria-labelledby": labelId,
18596
18715
  "aria-invalid": isInvalid,
18716
+ "aria-describedby": errorDescribedBy,
18597
18717
  name: name ? `${name}-month` : void 0,
18598
- value: monthInputValue,
18718
+ value: monthCombobox.inputValue,
18599
18719
  placeholder: resolvedMonthPlaceholder,
18600
18720
  disabled: isBlocked,
18601
18721
  readOnly,
18602
- onChange: handleMonthInputChange,
18722
+ onChange: monthCombobox.handleInputChange,
18603
18723
  onFocus: (event) => {
18604
18724
  onFocus?.(event);
18605
18725
  onFieldFocus?.("month");
18606
18726
  setFocusedField("month");
18607
18727
  if (!isBlocked && !readOnly) {
18608
- setIsMonthOpen(true);
18728
+ monthCombobox.setIsOpen(true);
18609
18729
  monthInputRef.current?.select();
18610
18730
  }
18611
18731
  },
18612
18732
  onBlur: () => {
18613
18733
  onFieldBlur?.("month");
18614
18734
  setFocusedField(null);
18615
- commitMonthInput();
18735
+ monthCombobox.commitInput();
18616
18736
  },
18617
18737
  onClick: () => {
18618
- if (!isBlocked && !readOnly) setIsMonthOpen(true);
18738
+ if (!isBlocked && !readOnly) monthCombobox.setIsOpen(true);
18619
18739
  },
18620
- onKeyDown: handleMonthInputKeyDown,
18740
+ onKeyDown: monthCombobox.handleInputKeyDown,
18621
18741
  className: cn(
18622
18742
  "m-0 box-border h-full w-full min-w-0 border-0 bg-transparent text-center text-[16px] font-medium leading-5 outline-none placeholder:text-[length:var(--field-placeholder-font-size)] placeholder:font-[var(--field-placeholder-font-weight)] placeholder:text-[var(--chekin-color-gray-1)]",
18623
18743
  monthIndex !== null ? "text-[var(--chekin-color-brand-navy)]" : "text-[var(--chekin-color-gray-1)]",
@@ -18632,12 +18752,12 @@ var Datepicker = React63.forwardRef(
18632
18752
  onMouseDown: (event) => {
18633
18753
  event.preventDefault();
18634
18754
  if (isBlocked || readOnly) return;
18635
- setIsMonthOpen((prev) => !prev);
18755
+ monthCombobox.setIsOpen((prev) => !prev);
18636
18756
  monthInputRef.current?.focus();
18637
18757
  },
18638
18758
  className: cn(
18639
18759
  "shrink-0 cursor-pointer text-[var(--chekin-color-gray-2)] transition-transform duration-200",
18640
- isMonthOpen && "rotate-180 text-[var(--chekin-color-brand-blue)]"
18760
+ monthCombobox.isOpen && "rotate-180 text-[var(--chekin-color-brand-blue)]"
18641
18761
  )
18642
18762
  }
18643
18763
  )
@@ -18656,6 +18776,7 @@ var Datepicker = React63.forwardRef(
18656
18776
  disabled: isBlocked,
18657
18777
  readOnly,
18658
18778
  "aria-invalid": isInvalid,
18779
+ "aria-describedby": errorDescribedBy,
18659
18780
  "aria-labelledby": labelId,
18660
18781
  onChange: handleYearChange,
18661
18782
  onFocus: (event) => {
@@ -18700,7 +18821,7 @@ var Datepicker = React63.forwardRef(
18700
18821
  onClick: isMobile3 ? openWheel : showCoverage ? focusDayInput : void 0
18701
18822
  }
18702
18823
  ),
18703
- isMonthOpen && !isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "absolute left-0 right-0 top-full z-30 mx-auto mt-1 w-full max-w-[260px] overflow-hidden rounded-md bg-white shadow-[0_30px_30px_0_rgba(33,72,255,0.2)] sm:left-1/2 sm:right-auto sm:-translate-x-1/2", children: monthPanelContent })
18824
+ monthCombobox.isOpen && !isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "absolute left-0 right-0 top-full z-30 mx-auto mt-1 w-full max-w-[260px] overflow-hidden rounded-md bg-white shadow-[0_30px_30px_0_rgba(33,72,255,0.2)] sm:left-1/2 sm:right-auto sm:-translate-x-1/2", children: monthPanelContent })
18704
18825
  ] }),
18705
18826
  isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18706
18827
  AirbnbDatePickerContent,
@@ -18730,13 +18851,13 @@ var Datepicker = React63.forwardRef(
18730
18851
  onOptionSelect: wheel.handleOptionSelect
18731
18852
  }
18732
18853
  ),
18733
- !error && optional && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
18734
- !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
18735
- error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18854
+ !resolvedError && optional && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
18855
+ !resolvedError && helperText && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
18856
+ resolvedError && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18736
18857
  FieldErrorMessage,
18737
18858
  {
18738
18859
  id: errorId,
18739
- message: error,
18860
+ message: resolvedError,
18740
18861
  className: "mt-[1px] text-[14px]"
18741
18862
  }
18742
18863
  )
@@ -18747,7 +18868,7 @@ var Datepicker = React63.forwardRef(
18747
18868
  );
18748
18869
 
18749
18870
  // src/fields/date-range-picker/DateRangePicker.tsx
18750
- var React67 = __toESM(require("react"), 1);
18871
+ var React68 = __toESM(require("react"), 1);
18751
18872
  var import_react_i18next39 = require("react-i18next");
18752
18873
 
18753
18874
  // src/fields/date-range-picker/isDayBlocked.ts
@@ -18826,7 +18947,7 @@ var createDisabledMatchers = ({
18826
18947
  };
18827
18948
 
18828
18949
  // src/fields/date-range-picker/hooks/useRangeValue.ts
18829
- var React64 = __toESM(require("react"), 1);
18950
+ var React65 = __toESM(require("react"), 1);
18830
18951
  var getRangeKey = (range) => `${range?.from?.getTime() ?? ""}-${range?.to?.getTime() ?? ""}`;
18831
18952
  function useRangeValue({
18832
18953
  value: externalValue,
@@ -18835,10 +18956,10 @@ function useRangeValue({
18835
18956
  name
18836
18957
  }) {
18837
18958
  const isControlled = externalValue !== void 0;
18838
- const [draft, setDraft] = React64.useState(
18959
+ const [draft, setDraft] = React65.useState(
18839
18960
  isControlled ? externalValue : defaultValue
18840
18961
  );
18841
- const lastExternalKeyRef = React64.useRef(getRangeKey(externalValue));
18962
+ const lastExternalKeyRef = React65.useRef(getRangeKey(externalValue));
18842
18963
  if (isControlled) {
18843
18964
  const externalKey = getRangeKey(externalValue);
18844
18965
  if (externalKey !== lastExternalKeyRef.current) {
@@ -18846,7 +18967,7 @@ function useRangeValue({
18846
18967
  setDraft(externalValue);
18847
18968
  }
18848
18969
  }
18849
- const commit = React64.useCallback(
18970
+ const commit = React65.useCallback(
18850
18971
  (next) => {
18851
18972
  setDraft(next);
18852
18973
  if (next === void 0) {
@@ -18861,7 +18982,7 @@ function useRangeValue({
18861
18982
  }
18862
18983
 
18863
18984
  // src/fields/date-range-picker/hooks/useRangeTextInputs.ts
18864
- var React65 = __toESM(require("react"), 1);
18985
+ var React66 = __toESM(require("react"), 1);
18865
18986
 
18866
18987
  // src/fields/date-range-picker/utils/inputFormat.ts
18867
18988
  function parseDateInputFormat(format2) {
@@ -18951,18 +19072,18 @@ function useRangeTextInputs({
18951
19072
  onFromComplete,
18952
19073
  onToComplete
18953
19074
  }) {
18954
- const tokens = React65.useMemo(
19075
+ const tokens = React66.useMemo(
18955
19076
  () => parseDateInputFormat(displayFormat),
18956
19077
  [displayFormat]
18957
19078
  );
18958
- const maxDigits = React65.useMemo(() => getMaxDigits(tokens), [tokens]);
18959
- const [fromText, setFromText] = React65.useState(value?.from ? format2(value.from) : "");
18960
- const [toText, setToText] = React65.useState(value?.to ? format2(value.to) : "");
18961
- React65.useEffect(() => {
19079
+ const maxDigits = React66.useMemo(() => getMaxDigits(tokens), [tokens]);
19080
+ const [fromText, setFromText] = React66.useState(value?.from ? format2(value.from) : "");
19081
+ const [toText, setToText] = React66.useState(value?.to ? format2(value.to) : "");
19082
+ React66.useEffect(() => {
18962
19083
  setFromText(value?.from ? format2(value.from) : "");
18963
19084
  setToText(value?.to ? format2(value.to) : "");
18964
19085
  }, [format2, value?.from, value?.to]);
18965
- const handleFromChange = React65.useCallback(
19086
+ const handleFromChange = React66.useCallback(
18966
19087
  (raw) => {
18967
19088
  const formatted = autoFormatDateInput(raw, tokens);
18968
19089
  const wasComplete = countDigits(fromText) === maxDigits;
@@ -18974,7 +19095,7 @@ function useRangeTextInputs({
18974
19095
  },
18975
19096
  [fromText, maxDigits, onFromComplete, parse3, tokens]
18976
19097
  );
18977
- const handleToChange = React65.useCallback(
19098
+ const handleToChange = React66.useCallback(
18978
19099
  (raw) => {
18979
19100
  const formatted = autoFormatDateInput(raw, tokens);
18980
19101
  const wasComplete = countDigits(toText) === maxDigits;
@@ -18986,7 +19107,7 @@ function useRangeTextInputs({
18986
19107
  },
18987
19108
  [maxDigits, onToComplete, parse3, toText, tokens]
18988
19109
  );
18989
- const handleFromBlur = React65.useCallback(() => {
19110
+ const handleFromBlur = React66.useCallback(() => {
18990
19111
  if (!fromText) {
18991
19112
  const next = { from: void 0, to: value?.to };
18992
19113
  onCommit(next);
@@ -19003,7 +19124,7 @@ function useRangeTextInputs({
19003
19124
  setFromText(value?.from ? format2(value.from) : "");
19004
19125
  return void 0;
19005
19126
  }, [format2, fromText, onBlur, onCommit, parse3, value]);
19006
- const handleToBlur = React65.useCallback(() => {
19127
+ const handleToBlur = React66.useCallback(() => {
19007
19128
  if (!toText) {
19008
19129
  const next = { from: value?.from, to: void 0 };
19009
19130
  onCommit(next);
@@ -19032,21 +19153,21 @@ function useRangeTextInputs({
19032
19153
  }
19033
19154
 
19034
19155
  // src/fields/date-range-picker/hooks/useRangeMonthSync.ts
19035
- var React66 = __toESM(require("react"), 1);
19156
+ var React67 = __toESM(require("react"), 1);
19036
19157
  function useRangeMonthSync(value) {
19037
- const isPreloadedRef = React66.useRef(false);
19038
- const [month, setMonth] = React66.useState(value?.from ?? /* @__PURE__ */ new Date());
19039
- React66.useEffect(() => {
19158
+ const isPreloadedRef = React67.useRef(false);
19159
+ const [month, setMonth] = React67.useState(value?.from ?? /* @__PURE__ */ new Date());
19160
+ React67.useEffect(() => {
19040
19161
  if (value?.from && !isPreloadedRef.current) {
19041
19162
  setMonth(value.from);
19042
19163
  isPreloadedRef.current = true;
19043
19164
  }
19044
19165
  }, [value?.from]);
19045
- const syncMonthToValue = React66.useCallback((next) => {
19166
+ const syncMonthToValue = React67.useCallback((next) => {
19046
19167
  isPreloadedRef.current = true;
19047
19168
  if (next?.from) setMonth(next.from);
19048
19169
  }, []);
19049
- const resetPreload = React66.useCallback(() => {
19170
+ const resetPreload = React67.useCallback(() => {
19050
19171
  isPreloadedRef.current = false;
19051
19172
  }, []);
19052
19173
  return { month, setMonth, syncMonthToValue, resetPreload };
@@ -19314,7 +19435,7 @@ function DateRangePopover({
19314
19435
 
19315
19436
  // src/fields/date-range-picker/DateRangePicker.tsx
19316
19437
  var import_jsx_runtime178 = require("react/jsx-runtime");
19317
- var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19438
+ var DateRangePicker = React68.forwardRef(function DateRangePicker2({
19318
19439
  label,
19319
19440
  value: externalValue,
19320
19441
  defaultValue,
@@ -19349,20 +19470,20 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19349
19470
  components: customComponents,
19350
19471
  ...dayPickerProps
19351
19472
  }, ref) {
19352
- const containerRef = React67.useRef(null);
19353
- const fromInputRef = React67.useRef(null);
19354
- const toInputRef = React67.useRef(null);
19355
- const reactId = React67.useId();
19473
+ const containerRef = React68.useRef(null);
19474
+ const fromInputRef = React68.useRef(null);
19475
+ const toInputRef = React68.useRef(null);
19476
+ const reactId = React68.useId();
19356
19477
  const baseId = name ?? `dash-daterange-${reactId}`;
19357
19478
  const fromId = `${baseId}-from`;
19358
19479
  const toId = `${baseId}-to`;
19359
19480
  const labelId = `${baseId}-label`;
19360
19481
  const errorId = `${baseId}-error`;
19361
- const normalizedValue = React67.useMemo(() => {
19482
+ const normalizedValue = React68.useMemo(() => {
19362
19483
  if (externalValue === void 0) return void 0;
19363
19484
  return { from: toDate(externalValue?.from), to: toDate(externalValue?.to) };
19364
19485
  }, [externalValue]);
19365
- const normalizedDefaultValue = React67.useMemo(() => {
19486
+ const normalizedDefaultValue = React68.useMemo(() => {
19366
19487
  if (defaultValue === void 0) return void 0;
19367
19488
  return { from: toDate(defaultValue?.from), to: toDate(defaultValue?.to) };
19368
19489
  }, [defaultValue]);
@@ -19372,16 +19493,16 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19372
19493
  onChange,
19373
19494
  name
19374
19495
  });
19375
- const normalizedMinDate = React67.useMemo(() => toDate(minDate), [minDate]);
19376
- const normalizedMaxDate = React67.useMemo(() => toDate(maxDate), [maxDate]);
19377
- const formatter = React67.useMemo(() => formatDate(displayFormat), [displayFormat]);
19378
- const parser = React67.useMemo(() => parseDate(displayFormat), [displayFormat]);
19379
- const closeCalendarRef = React67.useRef(() => {
19496
+ const normalizedMinDate = React68.useMemo(() => toDate(minDate), [minDate]);
19497
+ const normalizedMaxDate = React68.useMemo(() => toDate(maxDate), [maxDate]);
19498
+ const formatter = React68.useMemo(() => formatDate(displayFormat), [displayFormat]);
19499
+ const parser = React68.useMemo(() => parseDate(displayFormat), [displayFormat]);
19500
+ const closeCalendarRef = React68.useRef(() => {
19380
19501
  });
19381
- const handleFromComplete = React67.useCallback(() => {
19502
+ const handleFromComplete = React68.useCallback(() => {
19382
19503
  toInputRef.current?.focus();
19383
19504
  }, []);
19384
- const handleToComplete = React67.useCallback(() => {
19505
+ const handleToComplete = React68.useCallback(() => {
19385
19506
  toInputRef.current?.blur();
19386
19507
  closeCalendarRef.current();
19387
19508
  }, []);
@@ -19405,9 +19526,9 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19405
19526
  onToComplete: handleToComplete
19406
19527
  });
19407
19528
  const { month, setMonth, syncMonthToValue } = useRangeMonthSync(value);
19408
- const [isOpen, setIsOpen] = React67.useState(false);
19409
- const [focusedInput, setFocusedInput] = React67.useState(null);
19410
- const [autoFocus, setAutoFocus] = React67.useState(false);
19529
+ const [isOpen, setIsOpen] = React68.useState(false);
19530
+ const [focusedInput, setFocusedInput] = React68.useState(null);
19531
+ const [autoFocus, setAutoFocus] = React68.useState(false);
19411
19532
  const isMobile3 = useIsMobile();
19412
19533
  const { t } = (0, import_react_i18next39.useTranslation)();
19413
19534
  const drawerTitle = label ?? t("select_dates");
@@ -19418,14 +19539,14 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19418
19539
  const isFocused = focusedInput !== null || isOpen;
19419
19540
  const wrapperWidth = toCssSize(width);
19420
19541
  const monthsToShow = numberOfMonths ?? (isMobile3 ? 1 : 2);
19421
- const closeCalendar = React67.useCallback(() => {
19542
+ const closeCalendar = React68.useCallback(() => {
19422
19543
  setIsOpen(false);
19423
19544
  setFocusedInput(null);
19424
19545
  setAutoFocus(false);
19425
19546
  if (value?.from) setMonth(value.from);
19426
19547
  }, [setMonth, value?.from]);
19427
19548
  closeCalendarRef.current = closeCalendar;
19428
- const openCalendar = React67.useCallback(() => {
19549
+ const openCalendar = React68.useCallback(() => {
19429
19550
  if (isBlocked || readOnly) return;
19430
19551
  setIsOpen(true);
19431
19552
  }, [isBlocked, readOnly]);
@@ -19434,7 +19555,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19434
19555
  onOutsideClick: closeCalendar,
19435
19556
  isDisabled: !isOpen || isMobile3
19436
19557
  });
19437
- const handlePickerChange = React67.useCallback(
19558
+ const handlePickerChange = React68.useCallback(
19438
19559
  (range, pickedDate) => {
19439
19560
  const { next, shouldClose } = resolveRangeSelection({
19440
19561
  previous: value,
@@ -19455,7 +19576,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19455
19576
  setToText("");
19456
19577
  setMonth(/* @__PURE__ */ new Date());
19457
19578
  };
19458
- const disabledMatchers = React67.useMemo(
19579
+ const disabledMatchers = React68.useMemo(
19459
19580
  () => createDisabledMatchers({
19460
19581
  minDate: normalizedMinDate,
19461
19582
  maxDate: normalizedMaxDate,
@@ -19474,7 +19595,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19474
19595
  openCalendar();
19475
19596
  if (autoFocusOnOpen) setAutoFocus(true);
19476
19597
  };
19477
- React67.useImperativeHandle(
19598
+ React68.useImperativeHandle(
19478
19599
  ref,
19479
19600
  () => ({
19480
19601
  setDateRange: (range) => {
@@ -19655,7 +19776,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19655
19776
  });
19656
19777
 
19657
19778
  // src/fields/date-range-picker/useValidateDates.ts
19658
- var React68 = __toESM(require("react"), 1);
19779
+ var React69 = __toESM(require("react"), 1);
19659
19780
  var import_react_i18next40 = require("react-i18next");
19660
19781
  var import_date_fns4 = require("date-fns");
19661
19782
  var import_react_day_picker2 = require("react-day-picker");
@@ -19678,11 +19799,11 @@ function useValidateDates({
19678
19799
  const { t } = (0, import_react_i18next40.useTranslation)();
19679
19800
  const handleError = useEvent(onError);
19680
19801
  const handleSuccess = useEvent(onSuccess);
19681
- const errorFormatter = React68.useMemo(
19802
+ const errorFormatter = React69.useMemo(
19682
19803
  () => formatDate(displayFormat ?? DEFAULT_DISPLAY_FORMAT),
19683
19804
  [displayFormat]
19684
19805
  );
19685
- const validateDates = React68.useCallback(
19806
+ const validateDates = React69.useCallback(
19686
19807
  (dates) => {
19687
19808
  const startDate = dates?.from;
19688
19809
  const endDate = dates?.to;
@@ -19732,7 +19853,7 @@ function useValidateDates({
19732
19853
  }
19733
19854
 
19734
19855
  // src/fields/time-picker/TimePicker.tsx
19735
- var React69 = __toESM(require("react"), 1);
19856
+ var React70 = __toESM(require("react"), 1);
19736
19857
  var import_date_fns5 = require("date-fns");
19737
19858
  var import_jsx_runtime179 = require("react/jsx-runtime");
19738
19859
  var SHORT_TIME_FORMAT = "HH:mm";
@@ -19776,8 +19897,8 @@ var FORMAT_SETTINGS = {
19776
19897
  },
19777
19898
  hours: { interval_unit: "H", interval: 1, min_time: "00:00", max_time: "23:00" }
19778
19899
  };
19779
- var TimePicker = React69.forwardRef(function TimePicker2({ format: formatName = "time", timeSettings, options, ...selectProps }, ref) {
19780
- const resolvedOptions = React69.useMemo(() => {
19900
+ var TimePicker = React70.forwardRef(function TimePicker2({ format: formatName = "time", timeSettings, options, ...selectProps }, ref) {
19901
+ const resolvedOptions = React70.useMemo(() => {
19781
19902
  if (options) return options;
19782
19903
  const settings = timeSettings ?? FORMAT_SETTINGS[formatName];
19783
19904
  return buildOptions(settings);
@@ -19786,14 +19907,14 @@ var TimePicker = React69.forwardRef(function TimePicker2({ format: formatName =
19786
19907
  });
19787
19908
 
19788
19909
  // src/fields/file-input/FileInput.tsx
19789
- var React70 = __toESM(require("react"), 1);
19910
+ var React71 = __toESM(require("react"), 1);
19790
19911
  var import_lucide_react52 = require("lucide-react");
19791
19912
  var import_react_i18next41 = require("react-i18next");
19792
19913
  var import_jsx_runtime180 = require("react/jsx-runtime");
19793
19914
  function defaultDownload(url) {
19794
19915
  window.open(url, "_blank", "noopener,noreferrer");
19795
19916
  }
19796
- var FileInput = React70.forwardRef(function FileInput2({
19917
+ var FileInput = React71.forwardRef(function FileInput2({
19797
19918
  label,
19798
19919
  value,
19799
19920
  onChange,
@@ -19816,12 +19937,12 @@ var FileInput = React70.forwardRef(function FileInput2({
19816
19937
  width,
19817
19938
  downloadLabel
19818
19939
  }, ref) {
19819
- const internalRef = React70.useRef(null);
19940
+ const internalRef = React71.useRef(null);
19820
19941
  const inputRef = useCombinedRef(ref, internalRef);
19821
19942
  const { t } = (0, import_react_i18next41.useTranslation)();
19822
19943
  const resolvedLabel = label ?? t("upload_file");
19823
19944
  const resolvedDownloadLabel = downloadLabel ?? t("download_attachment");
19824
- const reactId = React70.useId();
19945
+ const reactId = React71.useId();
19825
19946
  const inputId = `${name || "dash-file"}-${reactId}`;
19826
19947
  const labelId = `${inputId}-label`;
19827
19948
  const errorId = `${inputId}-error`;
@@ -19966,10 +20087,10 @@ var FileInput = React70.forwardRef(function FileInput2({
19966
20087
  });
19967
20088
 
19968
20089
  // src/fields/select-icons-box/SelectIconsBox.tsx
19969
- var React71 = __toESM(require("react"), 1);
20090
+ var React72 = __toESM(require("react"), 1);
19970
20091
  var import_jsx_runtime181 = require("react/jsx-runtime");
19971
20092
  var FOCUSABLE_TRIGGER_SELECTOR2 = 'input:not([type="hidden"]):not([disabled]):not([readonly]), button:not([disabled])';
19972
- var SelectIconsBox = React71.forwardRef(
20093
+ var SelectIconsBox = React72.forwardRef(
19973
20094
  function SelectIconsBox2({
19974
20095
  children,
19975
20096
  icons,
@@ -19985,10 +20106,10 @@ var SelectIconsBox = React71.forwardRef(
19985
20106
  className,
19986
20107
  boxClassName
19987
20108
  }, ref) {
19988
- const containerRef = React71.useRef(null);
20109
+ const containerRef = React72.useRef(null);
19989
20110
  const combinedContainerRef = useCombinedRef(containerRef, ref);
19990
20111
  const isControlled = controlledOpen !== void 0;
19991
- const [internalOpen, setInternalOpen] = React71.useState(defaultOpen);
20112
+ const [internalOpen, setInternalOpen] = React72.useState(defaultOpen);
19992
20113
  const isOpen = isControlled ? controlledOpen : internalOpen;
19993
20114
  const setOpen = (next) => {
19994
20115
  if (!isControlled) setInternalOpen(next);
@@ -20181,15 +20302,15 @@ var LegacyTextarea = (0, import_react89.forwardRef)(
20181
20302
  LegacyTextarea.displayName = "LegacyTextarea";
20182
20303
 
20183
20304
  // src/airbnb-fields/datepicker/DatePicker.tsx
20184
- var React73 = __toESM(require("react"), 1);
20305
+ var React74 = __toESM(require("react"), 1);
20185
20306
  var import_lucide_react54 = require("lucide-react");
20186
20307
 
20187
20308
  // src/airbnb-fields/field-trigger/FieldTrigger.tsx
20188
- var React72 = __toESM(require("react"), 1);
20309
+ var React73 = __toESM(require("react"), 1);
20189
20310
  var import_lucide_react53 = require("lucide-react");
20190
20311
  var import_react_i18next42 = require("react-i18next");
20191
20312
  var import_jsx_runtime184 = require("react/jsx-runtime");
20192
- var AirbnbFieldTrigger = React72.forwardRef(
20313
+ var AirbnbFieldTrigger = React73.forwardRef(
20193
20314
  ({
20194
20315
  as = "button",
20195
20316
  id,
@@ -20357,7 +20478,7 @@ AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
20357
20478
  // src/airbnb-fields/datepicker/DatePicker.tsx
20358
20479
  var import_jsx_runtime185 = require("react/jsx-runtime");
20359
20480
  var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
20360
- var AirbnbDatePicker = React73.forwardRef(
20481
+ var AirbnbDatePicker = React74.forwardRef(
20361
20482
  ({
20362
20483
  label,
20363
20484
  topLabel,
@@ -20382,24 +20503,24 @@ var AirbnbDatePicker = React73.forwardRef(
20382
20503
  formatValue = formatDateValue
20383
20504
  }, ref) => {
20384
20505
  const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
20385
- const [isOpen, setIsOpen] = React73.useState(false);
20386
- const triggerId = React73.useId();
20387
- const pickerId = React73.useId();
20388
- const labelId = React73.useId();
20389
- const valueId = React73.useId();
20390
- const helperTextId = React73.useId();
20391
- const errorId = React73.useId();
20392
- const internalRef = React73.useRef(null);
20506
+ const [isOpen, setIsOpen] = React74.useState(false);
20507
+ const triggerId = React74.useId();
20508
+ const pickerId = React74.useId();
20509
+ const labelId = React74.useId();
20510
+ const valueId = React74.useId();
20511
+ const helperTextId = React74.useId();
20512
+ const errorId = React74.useId();
20513
+ const internalRef = React74.useRef(null);
20393
20514
  const combinedRef = useCombinedRef(ref, internalRef);
20394
- const monthLabels = React73.useMemo(() => getMonthLabels(locale), [locale]);
20395
- const resolvedMinDate = React73.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
20396
- const resolvedMaxDate = React73.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
20397
- const normalizedValue = React73.useMemo(() => normalizeDateValue(value), [value]);
20398
- const normalizedDefaultValue = React73.useMemo(
20515
+ const monthLabels = React74.useMemo(() => getMonthLabels(locale), [locale]);
20516
+ const resolvedMinDate = React74.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
20517
+ const resolvedMaxDate = React74.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
20518
+ const normalizedValue = React74.useMemo(() => normalizeDateValue(value), [value]);
20519
+ const normalizedDefaultValue = React74.useMemo(
20399
20520
  () => normalizeDateValue(defaultValue),
20400
20521
  [defaultValue]
20401
20522
  );
20402
- const resolvedValue = React73.useMemo(
20523
+ const resolvedValue = React74.useMemo(
20403
20524
  () => normalizedValue ? clampDate(normalizedValue, resolvedMinDate, resolvedMaxDate) : null,
20404
20525
  [normalizedValue, resolvedMaxDate, resolvedMinDate]
20405
20526
  );
@@ -20430,7 +20551,7 @@ var AirbnbDatePicker = React73.forwardRef(
20430
20551
  minDate: resolvedMinDate,
20431
20552
  maxDate: resolvedMaxDate
20432
20553
  });
20433
- const handleOpenChange = React73.useCallback(
20554
+ const handleOpenChange = React74.useCallback(
20434
20555
  (nextOpen) => {
20435
20556
  if (isBlocked && nextOpen) return;
20436
20557
  setIsOpen(nextOpen);
@@ -20440,7 +20561,7 @@ var AirbnbDatePicker = React73.forwardRef(
20440
20561
  },
20441
20562
  [isBlocked]
20442
20563
  );
20443
- const handleDone = React73.useCallback(() => {
20564
+ const handleDone = React74.useCallback(() => {
20444
20565
  if (isBlocked) return;
20445
20566
  onChange(clampDate(draftDate, resolvedMinDate, resolvedMaxDate));
20446
20567
  handleOpenChange(false);
@@ -20452,11 +20573,11 @@ var AirbnbDatePicker = React73.forwardRef(
20452
20573
  resolvedMaxDate,
20453
20574
  resolvedMinDate
20454
20575
  ]);
20455
- const handleTriggerClick = React73.useCallback(() => {
20576
+ const handleTriggerClick = React74.useCallback(() => {
20456
20577
  if (isBlocked) return;
20457
20578
  setIsOpen(true);
20458
20579
  }, [isBlocked]);
20459
- const handleTriggerKeyDown = React73.useCallback(
20580
+ const handleTriggerKeyDown = React74.useCallback(
20460
20581
  (event) => {
20461
20582
  if (isBlocked) return;
20462
20583
  if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
@@ -20466,7 +20587,7 @@ var AirbnbDatePicker = React73.forwardRef(
20466
20587
  },
20467
20588
  [isBlocked]
20468
20589
  );
20469
- React73.useEffect(() => {
20590
+ React74.useEffect(() => {
20470
20591
  if (isBlocked) {
20471
20592
  setIsOpen(false);
20472
20593
  }
@@ -20549,12 +20670,12 @@ var AirbnbDatePicker = React73.forwardRef(
20549
20670
  AirbnbDatePicker.displayName = "AirbnbDatePicker";
20550
20671
 
20551
20672
  // src/airbnb-fields/input/Input.tsx
20552
- var React74 = __toESM(require("react"), 1);
20673
+ var React75 = __toESM(require("react"), 1);
20553
20674
  var import_lucide_react55 = require("lucide-react");
20554
20675
  var import_react_i18next43 = require("react-i18next");
20555
20676
  var import_jsx_runtime186 = require("react/jsx-runtime");
20556
20677
  var getInputValue = (value) => value != null ? String(value) : "";
20557
- var AirbnbInput = React74.forwardRef(
20678
+ var AirbnbInput = React75.forwardRef(
20558
20679
  ({
20559
20680
  label,
20560
20681
  topLabel,
@@ -20583,16 +20704,16 @@ var AirbnbInput = React74.forwardRef(
20583
20704
  ...props
20584
20705
  }, ref) => {
20585
20706
  const { t } = (0, import_react_i18next43.useTranslation)();
20586
- const generatedId = React74.useId();
20587
- const inputRef = React74.useRef(null);
20707
+ const generatedId = React75.useId();
20708
+ const inputRef = React75.useRef(null);
20588
20709
  const inputId = id ?? generatedId;
20589
20710
  const fieldId = `${inputId}-field`;
20590
20711
  const labelId = `${inputId}-label`;
20591
20712
  const errorId = `${inputId}-error`;
20592
20713
  const accessibleLabel = placeholder ?? label;
20593
- const [isFocused, setIsFocused] = React74.useState(false);
20594
- const [isPasswordRevealed, setIsPasswordRevealed] = React74.useState(false);
20595
- const [currentValue, setCurrentValue] = React74.useState(
20714
+ const [isFocused, setIsFocused] = React75.useState(false);
20715
+ const [isPasswordRevealed, setIsPasswordRevealed] = React75.useState(false);
20716
+ const [currentValue, setCurrentValue] = React75.useState(
20596
20717
  () => value != null ? getInputValue(value) : getInputValue(defaultValue)
20597
20718
  );
20598
20719
  const resolvedValue = value != null ? getInputValue(value) : currentValue;
@@ -20605,16 +20726,16 @@ var AirbnbInput = React74.forwardRef(
20605
20726
  const triggerError = error ?? invalid;
20606
20727
  const hasLabelMeta = Boolean(optional) || Boolean(tooltip);
20607
20728
  const isBlocked = Boolean(disabled) || Boolean(loading);
20608
- React74.useLayoutEffect(() => {
20729
+ React75.useLayoutEffect(() => {
20609
20730
  const nextValue = value != null ? getInputValue(value) : getInputValue(inputRef.current?.value);
20610
20731
  setCurrentValue((prevValue) => prevValue === nextValue ? prevValue : nextValue);
20611
20732
  }, [value]);
20612
- React74.useEffect(() => {
20733
+ React75.useEffect(() => {
20613
20734
  if (!isPasswordInput) {
20614
20735
  setIsPasswordRevealed(false);
20615
20736
  }
20616
20737
  }, [isPasswordInput]);
20617
- const setRefs = React74.useCallback(
20738
+ const setRefs = React75.useCallback(
20618
20739
  (node) => {
20619
20740
  inputRef.current = node;
20620
20741
  if (node && value == null) {
@@ -20647,6 +20768,12 @@ var AirbnbInput = React74.forwardRef(
20647
20768
  const togglePasswordReveal = () => {
20648
20769
  setIsPasswordRevealed((isRevealed) => !isRevealed);
20649
20770
  };
20771
+ const focusInput = () => {
20772
+ if (isBlocked) {
20773
+ return;
20774
+ }
20775
+ inputRef.current?.focus();
20776
+ };
20650
20777
  return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
20651
20778
  AirbnbFieldTrigger,
20652
20779
  {
@@ -20664,6 +20791,7 @@ var AirbnbInput = React74.forwardRef(
20664
20791
  loading,
20665
20792
  optional,
20666
20793
  tooltip,
20794
+ onClick: focusInput,
20667
20795
  describedBy: error && renderErrorMessage ? errorId : void 0,
20668
20796
  className: cn(
20669
20797
  "px-4 focus-within:ring-2 focus-within:ring-[var(--chekin-airbnb-ink)] focus-within:ring-offset-2",
@@ -20734,11 +20862,11 @@ var AirbnbInput = React74.forwardRef(
20734
20862
  AirbnbInput.displayName = "AirbnbInput";
20735
20863
 
20736
20864
  // src/airbnb-fields/phone-field/PhoneField.tsx
20737
- var React80 = __toESM(require("react"), 1);
20865
+ var React81 = __toESM(require("react"), 1);
20738
20866
  var import_lucide_react57 = require("lucide-react");
20739
20867
 
20740
20868
  // src/airbnb-fields/select/Select.tsx
20741
- var React79 = __toESM(require("react"), 1);
20869
+ var React80 = __toESM(require("react"), 1);
20742
20870
 
20743
20871
  // src/airbnb-fields/select/SelectDesktopMenu.tsx
20744
20872
  var import_jsx_runtime187 = require("react/jsx-runtime");
@@ -21083,10 +21211,10 @@ function AirbnbSelectMobileContent({
21083
21211
  }
21084
21212
 
21085
21213
  // src/airbnb-fields/select/SelectTrigger.tsx
21086
- var React75 = __toESM(require("react"), 1);
21214
+ var React76 = __toESM(require("react"), 1);
21087
21215
  var import_lucide_react56 = require("lucide-react");
21088
21216
  var import_jsx_runtime191 = require("react/jsx-runtime");
21089
- var AirbnbSelectTrigger = React75.forwardRef(
21217
+ var AirbnbSelectTrigger = React76.forwardRef(
21090
21218
  ({
21091
21219
  id,
21092
21220
  open,
@@ -21141,6 +21269,7 @@ var AirbnbSelectTrigger = React75.forwardRef(
21141
21269
  trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21142
21270
  import_lucide_react56.ChevronDown,
21143
21271
  {
21272
+ strokeWidth: "1.5",
21144
21273
  className: open ? "h-6 w-6 rotate-180 text-[var(--chekin-airbnb-ink)] transition-transform" : "h-6 w-6 text-[var(--chekin-airbnb-ink)] transition-transform"
21145
21274
  }
21146
21275
  )
@@ -21151,7 +21280,7 @@ var AirbnbSelectTrigger = React75.forwardRef(
21151
21280
  AirbnbSelectTrigger.displayName = "AirbnbSelectTrigger";
21152
21281
 
21153
21282
  // src/airbnb-fields/select/useDesktopSelect.ts
21154
- var React76 = __toESM(require("react"), 1);
21283
+ var React77 = __toESM(require("react"), 1);
21155
21284
  function useDesktopSelect({
21156
21285
  isMobile: isMobile3,
21157
21286
  isOpen,
@@ -21160,12 +21289,12 @@ function useDesktopSelect({
21160
21289
  disabled,
21161
21290
  onChange
21162
21291
  }) {
21163
- const [highlightedIndex, setHighlightedIndex] = React76.useState(-1);
21164
- const triggerRef = React76.useRef(null);
21165
- const listRef = React76.useRef(null);
21166
- const optionRefs = React76.useRef([]);
21292
+ const [highlightedIndex, setHighlightedIndex] = React77.useState(-1);
21293
+ const triggerRef = React77.useRef(null);
21294
+ const listRef = React77.useRef(null);
21295
+ const optionRefs = React77.useRef([]);
21167
21296
  const selectedIndex = getOptionIndex2(options, value);
21168
- React76.useEffect(() => {
21297
+ React77.useEffect(() => {
21169
21298
  if (!isOpen || isMobile3) return;
21170
21299
  setHighlightedIndex((currentIndex) => {
21171
21300
  if (currentIndex >= 0) {
@@ -21180,34 +21309,34 @@ function useDesktopSelect({
21180
21309
  window.cancelAnimationFrame(frameId);
21181
21310
  };
21182
21311
  }, [isMobile3, isOpen, options, selectedIndex]);
21183
- React76.useEffect(() => {
21312
+ React77.useEffect(() => {
21184
21313
  if (!isOpen || isMobile3 || highlightedIndex < 0) return;
21185
21314
  optionRefs.current[highlightedIndex]?.scrollIntoView({
21186
21315
  block: "nearest"
21187
21316
  });
21188
21317
  }, [highlightedIndex, isMobile3, isOpen]);
21189
- React76.useEffect(() => {
21318
+ React77.useEffect(() => {
21190
21319
  if (isOpen) return;
21191
21320
  setHighlightedIndex(-1);
21192
21321
  }, [isOpen]);
21193
- const focusTrigger = React76.useCallback(() => {
21322
+ const focusTrigger = React77.useCallback(() => {
21194
21323
  triggerRef.current?.focus();
21195
21324
  }, []);
21196
- const handleSelect = React76.useCallback(
21325
+ const handleSelect = React77.useCallback(
21197
21326
  (option) => {
21198
21327
  if (option.isDisabled || disabled) return;
21199
21328
  onChange?.(option);
21200
21329
  },
21201
21330
  [disabled, onChange]
21202
21331
  );
21203
- const openMenu = React76.useCallback(
21332
+ const openMenu = React77.useCallback(
21204
21333
  (targetIndex) => {
21205
21334
  const fallbackIndex = selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex2(options);
21206
21335
  setHighlightedIndex(targetIndex ?? fallbackIndex);
21207
21336
  },
21208
21337
  [options, selectedIndex]
21209
21338
  );
21210
- const handleTriggerKeyDown = React76.useCallback(
21339
+ const handleTriggerKeyDown = React77.useCallback(
21211
21340
  (event, onOpen) => {
21212
21341
  if (disabled) return;
21213
21342
  if (event.key === "ArrowDown") {
@@ -21232,7 +21361,7 @@ function useDesktopSelect({
21232
21361
  },
21233
21362
  [disabled, openMenu, options, selectedIndex]
21234
21363
  );
21235
- const handleMenuKeyDown = React76.useCallback(
21364
+ const handleMenuKeyDown = React77.useCallback(
21236
21365
  (event, onClose) => {
21237
21366
  if (event.key === "Escape") {
21238
21367
  event.preventDefault();
@@ -21282,7 +21411,7 @@ function useDesktopSelect({
21282
21411
  },
21283
21412
  [focusTrigger, highlightedIndex, onChange, options]
21284
21413
  );
21285
- const setOptionRef = React76.useCallback(
21414
+ const setOptionRef = React77.useCallback(
21286
21415
  (index, node) => {
21287
21416
  optionRefs.current[index] = node;
21288
21417
  },
@@ -21302,23 +21431,23 @@ function useDesktopSelect({
21302
21431
  }
21303
21432
 
21304
21433
  // src/airbnb-fields/select/useMobileSelectWheel.ts
21305
- var React77 = __toESM(require("react"), 1);
21434
+ var React78 = __toESM(require("react"), 1);
21306
21435
  function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, disabled }) {
21307
- const [pendingValue, setPendingValue] = React77.useState(
21436
+ const [pendingValue, setPendingValue] = React78.useState(
21308
21437
  value ?? null
21309
21438
  );
21310
- const [mobileScrollTop, setMobileScrollTop] = React77.useState(0);
21311
- const mobileListRef = React77.useRef(null);
21312
- const scrollSettleTimeoutRef = React77.useRef(null);
21313
- const scrollAnimationFrameRef = React77.useRef(null);
21314
- const getTargetIndex = React77.useCallback(
21439
+ const [mobileScrollTop, setMobileScrollTop] = React78.useState(0);
21440
+ const mobileListRef = React78.useRef(null);
21441
+ const scrollSettleTimeoutRef = React78.useRef(null);
21442
+ const scrollAnimationFrameRef = React78.useRef(null);
21443
+ const getTargetIndex = React78.useCallback(
21315
21444
  (targetValue) => {
21316
21445
  const selectedIndex = getOptionIndex2(options, targetValue);
21317
21446
  return selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex2(options);
21318
21447
  },
21319
21448
  [options]
21320
21449
  );
21321
- const syncScrollPosition = React77.useCallback(
21450
+ const syncScrollPosition = React78.useCallback(
21322
21451
  (targetValue, behavior = "instant") => {
21323
21452
  const targetIndex = getTargetIndex(targetValue);
21324
21453
  if (targetIndex < 0) return;
@@ -21337,27 +21466,27 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21337
21466
  },
21338
21467
  [getTargetIndex, options]
21339
21468
  );
21340
- const clearScrollSettleTimeout = React77.useCallback(() => {
21469
+ const clearScrollSettleTimeout = React78.useCallback(() => {
21341
21470
  if (scrollSettleTimeoutRef.current === null) return;
21342
21471
  window.clearTimeout(scrollSettleTimeoutRef.current);
21343
21472
  scrollSettleTimeoutRef.current = null;
21344
21473
  }, []);
21345
- const clearScrollAnimationFrame = React77.useCallback(() => {
21474
+ const clearScrollAnimationFrame = React78.useCallback(() => {
21346
21475
  if (scrollAnimationFrameRef.current === null) return;
21347
21476
  window.cancelAnimationFrame(scrollAnimationFrameRef.current);
21348
21477
  scrollAnimationFrameRef.current = null;
21349
21478
  }, []);
21350
- React77.useEffect(
21479
+ React78.useEffect(
21351
21480
  () => () => {
21352
21481
  clearScrollSettleTimeout();
21353
21482
  clearScrollAnimationFrame();
21354
21483
  },
21355
21484
  [clearScrollAnimationFrame, clearScrollSettleTimeout]
21356
21485
  );
21357
- React77.useEffect(() => {
21486
+ React78.useEffect(() => {
21358
21487
  setPendingValue(value ?? null);
21359
21488
  }, [value]);
21360
- React77.useLayoutEffect(() => {
21489
+ React78.useLayoutEffect(() => {
21361
21490
  if (!isMobile3 || !isOpen) return;
21362
21491
  const frameId = window.requestAnimationFrame(() => {
21363
21492
  syncScrollPosition(value ?? null, "instant");
@@ -21366,7 +21495,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21366
21495
  window.cancelAnimationFrame(frameId);
21367
21496
  };
21368
21497
  }, [isMobile3, isOpen, syncScrollPosition, value]);
21369
- const settleScroll = React77.useCallback(() => {
21498
+ const settleScroll = React78.useCallback(() => {
21370
21499
  if (!mobileListRef.current) return;
21371
21500
  const nextIndex = Math.round(mobileListRef.current.scrollTop / MOBILE_OPTION_HEIGHT);
21372
21501
  const nextOption = options[nextIndex];
@@ -21378,13 +21507,13 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21378
21507
  }
21379
21508
  setPendingValue(nextOption);
21380
21509
  }, [options, pendingValue]);
21381
- const scheduleScrollSettle = React77.useCallback(() => {
21510
+ const scheduleScrollSettle = React78.useCallback(() => {
21382
21511
  clearScrollSettleTimeout();
21383
21512
  scrollSettleTimeoutRef.current = window.setTimeout(() => {
21384
21513
  settleScroll();
21385
21514
  }, MOBILE_SCROLL_SETTLE_DELAY);
21386
21515
  }, [clearScrollSettleTimeout, settleScroll]);
21387
- const handleScroll = React77.useCallback(() => {
21516
+ const handleScroll = React78.useCallback(() => {
21388
21517
  if (!mobileListRef.current) return;
21389
21518
  const nextScrollTop = mobileListRef.current.scrollTop;
21390
21519
  clearScrollAnimationFrame();
@@ -21394,7 +21523,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21394
21523
  });
21395
21524
  scheduleScrollSettle();
21396
21525
  }, [clearScrollAnimationFrame, scheduleScrollSettle]);
21397
- const focusOptionByIndex = React77.useCallback(
21526
+ const focusOptionByIndex = React78.useCallback(
21398
21527
  (index, behavior = "instant", updatePendingImmediately = behavior === "instant") => {
21399
21528
  if (!mobileListRef.current || index < 0 || index >= options.length) return;
21400
21529
  const option = options[index];
@@ -21412,7 +21541,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21412
21541
  },
21413
21542
  [options, scheduleScrollSettle]
21414
21543
  );
21415
- const handleOptionClick = React77.useCallback(
21544
+ const handleOptionClick = React78.useCallback(
21416
21545
  (option) => {
21417
21546
  if (!mobileListRef.current || disabled || option.isDisabled) return;
21418
21547
  const optionIndex = getOptionIndex2(options, option);
@@ -21421,7 +21550,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21421
21550
  },
21422
21551
  [disabled, focusOptionByIndex, options]
21423
21552
  );
21424
- const moveByStep = React77.useCallback(
21553
+ const moveByStep = React78.useCallback(
21425
21554
  (step) => {
21426
21555
  const currentIndex = getOptionIndex2(options, pendingValue);
21427
21556
  const fallbackIndex = step === 1 ? getFirstEnabledOptionIndex2(options) : getLastEnabledOptionIndex2(options);
@@ -21433,7 +21562,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21433
21562
  },
21434
21563
  [focusOptionByIndex, options, pendingValue]
21435
21564
  );
21436
- const moveToBoundary = React77.useCallback(
21565
+ const moveToBoundary = React78.useCallback(
21437
21566
  (boundary) => {
21438
21567
  const targetIndex = boundary === "start" ? getFirstEnabledOptionIndex2(options) : getLastEnabledOptionIndex2(options);
21439
21568
  if (targetIndex >= 0) {
@@ -21442,7 +21571,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21442
21571
  },
21443
21572
  [focusOptionByIndex, options]
21444
21573
  );
21445
- const syncPendingValue = React77.useCallback(
21574
+ const syncPendingValue = React78.useCallback(
21446
21575
  (nextValue) => {
21447
21576
  const normalizedValue = nextValue ?? null;
21448
21577
  const matchedIndex = getOptionIndex2(options, normalizedValue);
@@ -21470,9 +21599,9 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21470
21599
  }
21471
21600
 
21472
21601
  // src/airbnb-fields/select/useSelectIds.ts
21473
- var React78 = __toESM(require("react"), 1);
21602
+ var React79 = __toESM(require("react"), 1);
21474
21603
  function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21475
- const reactId = React78.useId().replace(/:/g, "");
21604
+ const reactId = React79.useId().replace(/:/g, "");
21476
21605
  const baseId = name ? `select-${name}` : `select-${reactId}`;
21477
21606
  const triggerId = `${baseId}-trigger`;
21478
21607
  const labelId = `${baseId}-label`;
@@ -21482,7 +21611,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21482
21611
  const listboxId = `${baseId}-listbox`;
21483
21612
  const describedErrorId = error && !hideErrorMessage ? errorId : void 0;
21484
21613
  const describedBy = [!hasValue ? helperTextId : null, describedErrorId].filter(Boolean).join(" ") || void 0;
21485
- const getOptionId2 = React78.useCallback(
21614
+ const getOptionId2 = React79.useCallback(
21486
21615
  (index) => `${baseId}-option-${index}`,
21487
21616
  [baseId]
21488
21617
  );
@@ -21501,7 +21630,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21501
21630
 
21502
21631
  // src/airbnb-fields/select/Select.tsx
21503
21632
  var import_jsx_runtime192 = require("react/jsx-runtime");
21504
- var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21633
+ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21505
21634
  options = [],
21506
21635
  value,
21507
21636
  onChange,
@@ -21528,8 +21657,8 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21528
21657
  filterOption
21529
21658
  }, ref) {
21530
21659
  const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
21531
- const [isOpen, setIsOpen] = React79.useState(false);
21532
- const containerRef = React79.useRef(null);
21660
+ const [isOpen, setIsOpen] = React80.useState(false);
21661
+ const containerRef = React80.useRef(null);
21533
21662
  const filteredOptions = filterOption ? options.filter(filterOption) : options;
21534
21663
  const hasValue = Boolean(value);
21535
21664
  const helperText = placeholder ?? label;
@@ -21591,12 +21720,12 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21591
21720
  onOutsideClick: () => setIsOpen(false),
21592
21721
  isDisabled: !isOpen || isMobile3
21593
21722
  });
21594
- React79.useEffect(() => {
21723
+ React80.useEffect(() => {
21595
21724
  if (isBlocked) {
21596
21725
  setIsOpen(false);
21597
21726
  }
21598
21727
  }, [isBlocked]);
21599
- React79.useEffect(
21728
+ React80.useEffect(
21600
21729
  function setCorrectOptionIfThereIsOnlyValue() {
21601
21730
  if (value?.value === void 0 || value.value === null || value.label !== "") {
21602
21731
  return;
@@ -21608,7 +21737,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21608
21737
  },
21609
21738
  [onChange, filteredOptions, value]
21610
21739
  );
21611
- const handleMobileOpenChange = React79.useCallback(
21740
+ const handleMobileOpenChange = React80.useCallback(
21612
21741
  (nextOpen) => {
21613
21742
  if (isBlocked && nextOpen) return;
21614
21743
  setIsOpen(nextOpen);
@@ -21619,7 +21748,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21619
21748
  },
21620
21749
  [focusTrigger, isBlocked, syncPendingValue, value]
21621
21750
  );
21622
- const handleMobileDone = React79.useCallback(() => {
21751
+ const handleMobileDone = React80.useCallback(() => {
21623
21752
  if (isBlocked) return;
21624
21753
  const finalOption = pendingValue;
21625
21754
  if (finalOption && finalOption.value !== value?.value) {
@@ -21628,7 +21757,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21628
21757
  setIsOpen(false);
21629
21758
  focusTrigger();
21630
21759
  }, [focusTrigger, isBlocked, onChange, pendingValue, value]);
21631
- const handleTriggerClick = React79.useCallback(() => {
21760
+ const handleTriggerClick = React80.useCallback(() => {
21632
21761
  if (isBlocked) return;
21633
21762
  setIsOpen((prev) => {
21634
21763
  const nextOpen = !prev;
@@ -21800,7 +21929,7 @@ function formatPhoneCodeOptionLabel2(option) {
21800
21929
  const value = String(option.value);
21801
21930
  return label.includes(value) ? label : `${label} (${value})`;
21802
21931
  }
21803
- var AirbnbPhoneField = React80.forwardRef(
21932
+ var AirbnbPhoneField = React81.forwardRef(
21804
21933
  ({
21805
21934
  label,
21806
21935
  topLabel,
@@ -21824,9 +21953,9 @@ var AirbnbPhoneField = React80.forwardRef(
21824
21953
  codePlaceholder = "+00",
21825
21954
  defaultCode
21826
21955
  }, ref) => {
21827
- const inputId = React80.useId();
21956
+ const inputId = React81.useId();
21828
21957
  const effectiveCode = value?.code || defaultCode || "";
21829
- const codeOptions = React80.useMemo(
21958
+ const codeOptions = React81.useMemo(
21830
21959
  () => options.map((option) => ({
21831
21960
  value: option.value,
21832
21961
  label: formatPhoneCodeOptionLabel2(option),
@@ -21834,7 +21963,7 @@ var AirbnbPhoneField = React80.forwardRef(
21834
21963
  })),
21835
21964
  [options]
21836
21965
  );
21837
- const selectedCodeOption = React80.useMemo(
21966
+ const selectedCodeOption = React81.useMemo(
21838
21967
  () => codeOptions.find((option) => option.value === effectiveCode) ?? null,
21839
21968
  [codeOptions, effectiveCode]
21840
21969
  );
@@ -21970,7 +22099,7 @@ var AirbnbPhoneField = React80.forwardRef(
21970
22099
  AirbnbPhoneField.displayName = "AirbnbPhoneField";
21971
22100
 
21972
22101
  // src/airbnb-fields/searchable-select/SearchableSelect.tsx
21973
- var React81 = __toESM(require("react"), 1);
22102
+ var React82 = __toESM(require("react"), 1);
21974
22103
  var import_lucide_react58 = require("lucide-react");
21975
22104
  var import_react_virtual3 = require("@tanstack/react-virtual");
21976
22105
  var import_react90 = require("react");
@@ -22014,13 +22143,13 @@ var AirbnbSearchableSelectInternal = ({
22014
22143
  loadingMessage
22015
22144
  }, ref) => {
22016
22145
  const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
22017
- const reactId = React81.useId();
22018
- const [open, setOpen] = React81.useState(false);
22019
- const [internalSearchValue, setInternalSearchValue] = React81.useState("");
22020
- const [highlightedIndex, setHighlightedIndex] = React81.useState(-1);
22021
- const containerRef = React81.useRef(null);
22022
- const triggerRef = React81.useRef(null);
22023
- const inputRef = React81.useRef(null);
22146
+ const reactId = React82.useId();
22147
+ const [open, setOpen] = React82.useState(false);
22148
+ const [internalSearchValue, setInternalSearchValue] = React82.useState("");
22149
+ const [highlightedIndex, setHighlightedIndex] = React82.useState(-1);
22150
+ const containerRef = React82.useRef(null);
22151
+ const triggerRef = React82.useRef(null);
22152
+ const inputRef = React82.useRef(null);
22024
22153
  const listboxId = `${reactId}-listbox`;
22025
22154
  const labelId = `${reactId}-label`;
22026
22155
  const valueId = `${reactId}-value`;
@@ -22029,13 +22158,13 @@ var AirbnbSearchableSelectInternal = ({
22029
22158
  const searchInputId = `${reactId}-search`;
22030
22159
  const effectiveSearchValue = searchValue ?? internalSearchValue;
22031
22160
  const shouldFilterLocally = !onSearchChange && filterOption !== null;
22032
- const visibleOptions = React81.useMemo(() => {
22161
+ const visibleOptions = React82.useMemo(() => {
22033
22162
  if (!shouldFilterLocally || !effectiveSearchValue) {
22034
22163
  return options;
22035
22164
  }
22036
22165
  return options.filter((option) => filterOption(option, effectiveSearchValue));
22037
22166
  }, [effectiveSearchValue, filterOption, options, shouldFilterLocally]);
22038
- const selectedIndex = React81.useMemo(
22167
+ const selectedIndex = React82.useMemo(
22039
22168
  () => visibleOptions.findIndex((option) => option.value === value?.value),
22040
22169
  [value?.value, visibleOptions]
22041
22170
  );
@@ -22061,7 +22190,7 @@ var AirbnbSearchableSelectInternal = ({
22061
22190
  },
22062
22191
  [handleOnOpenChange]
22063
22192
  );
22064
- React81.useEffect(() => {
22193
+ React82.useEffect(() => {
22065
22194
  if (isBlocked) {
22066
22195
  setSelectOpen(false);
22067
22196
  return;
@@ -22074,7 +22203,7 @@ var AirbnbSearchableSelectInternal = ({
22074
22203
  window.cancelAnimationFrame(frameId);
22075
22204
  };
22076
22205
  }, [isBlocked, open, setSelectOpen]);
22077
- React81.useEffect(() => {
22206
+ React82.useEffect(() => {
22078
22207
  if (!open) {
22079
22208
  setHighlightedIndex(-1);
22080
22209
  return;
@@ -22169,7 +22298,7 @@ var AirbnbSearchableSelectInternal = ({
22169
22298
  onOptionHover: setHighlightedIndex
22170
22299
  }
22171
22300
  );
22172
- React81.useImperativeHandle(ref, () => triggerRef.current, []);
22301
+ React82.useImperativeHandle(ref, () => triggerRef.current, []);
22173
22302
  return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
22174
22303
  name && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
22175
22304
  /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
@@ -22247,7 +22376,7 @@ var AirbnbSearchableSelectInternal = ({
22247
22376
  ) : null
22248
22377
  ] });
22249
22378
  };
22250
- var AirbnbSearchableSelect = React81.forwardRef(
22379
+ var AirbnbSearchableSelect = React82.forwardRef(
22251
22380
  AirbnbSearchableSelectInternal
22252
22381
  );
22253
22382
  function AirbnbSearchableSelectContent({
@@ -22274,9 +22403,9 @@ function AirbnbSearchableSelectContent({
22274
22403
  onOptionClick,
22275
22404
  onOptionHover
22276
22405
  }) {
22277
- const listRef = React81.useRef(null);
22278
- const lastLoadMoreOptionsLengthRef = React81.useRef(null);
22279
- const previousHighlightedIndexRef = React81.useRef(highlightedIndex);
22406
+ const listRef = React82.useRef(null);
22407
+ const lastLoadMoreOptionsLengthRef = React82.useRef(null);
22408
+ const previousHighlightedIndexRef = React82.useRef(highlightedIndex);
22280
22409
  const rowCount = options.length + (loading && options.length > 0 ? 1 : 0);
22281
22410
  const virtualizer = (0, import_react_virtual3.useVirtualizer)({
22282
22411
  count: rowCount,
@@ -22287,7 +22416,7 @@ function AirbnbSearchableSelectContent({
22287
22416
  const virtualItems = virtualizer.getVirtualItems();
22288
22417
  const emptyMessage = noOptionsMessage?.() ?? "No matches found";
22289
22418
  const loadingText = loadingMessage?.() ?? "Loading...";
22290
- React81.useEffect(() => {
22419
+ React82.useEffect(() => {
22291
22420
  const lastItem = virtualItems[virtualItems.length - 1];
22292
22421
  const shouldLoadMore = !!lastItem && hasNextPage && !loading && lastItem.index >= options.length - LOAD_MORE_THRESHOLD;
22293
22422
  if (shouldLoadMore && lastLoadMoreOptionsLengthRef.current !== options.length) {
@@ -22295,7 +22424,7 @@ function AirbnbSearchableSelectContent({
22295
22424
  onLoadMore?.();
22296
22425
  }
22297
22426
  }, [hasNextPage, loading, onLoadMore, options.length, virtualItems]);
22298
- React81.useEffect(() => {
22427
+ React82.useEffect(() => {
22299
22428
  const hasHighlightedIndexChanged = previousHighlightedIndexRef.current !== highlightedIndex;
22300
22429
  previousHighlightedIndexRef.current = highlightedIndex;
22301
22430
  if (highlightedIndex >= 0 && hasHighlightedIndexChanged) {
@@ -22413,11 +22542,11 @@ function getNextEnabledIndex(options, startIndex, step) {
22413
22542
  }
22414
22543
 
22415
22544
  // src/airbnb-fields/search-input/SearchInput.tsx
22416
- var React82 = __toESM(require("react"), 1);
22545
+ var React83 = __toESM(require("react"), 1);
22417
22546
  var import_react_i18next44 = require("react-i18next");
22418
22547
  var import_lucide_react59 = require("lucide-react");
22419
22548
  var import_jsx_runtime195 = require("react/jsx-runtime");
22420
- var AirbnbSearchInput = React82.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
22549
+ var AirbnbSearchInput = React83.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
22421
22550
  const { t } = (0, import_react_i18next44.useTranslation)();
22422
22551
  const placeholderText = placeholder || t("search_property") + "...";
22423
22552
  return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
@@ -22455,11 +22584,11 @@ var AirbnbSearchInput = React82.forwardRef(({ onReset, placeholder, wrapperClass
22455
22584
  AirbnbSearchInput.displayName = "AirbnbSearchInput";
22456
22585
 
22457
22586
  // src/airbnb-fields/switch/Switch.tsx
22458
- var React83 = __toESM(require("react"), 1);
22587
+ var React84 = __toESM(require("react"), 1);
22459
22588
  var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
22460
22589
  var import_lucide_react60 = require("lucide-react");
22461
22590
  var import_jsx_runtime196 = require("react/jsx-runtime");
22462
- var AirbnbSwitch = React83.forwardRef(
22591
+ var AirbnbSwitch = React84.forwardRef(
22463
22592
  ({
22464
22593
  className,
22465
22594
  value,
@@ -22473,7 +22602,7 @@ var AirbnbSwitch = React83.forwardRef(
22473
22602
  wrapperClassName,
22474
22603
  ...props
22475
22604
  }, ref) => {
22476
- const generatedId = React83.useId();
22605
+ const generatedId = React84.useId();
22477
22606
  const fieldId = id || generatedId;
22478
22607
  const switchElement = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22479
22608
  SwitchPrimitives2.Root,