@chekinapp/ui 0.2.2 → 0.2.5

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
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  AccordionItem: () => AccordionItem,
37
37
  AccordionTrigger: () => AccordionTrigger,
38
38
  AirbnbDatePicker: () => AirbnbDatePicker,
39
+ AirbnbFieldHelperText: () => AirbnbFieldHelperText,
39
40
  AirbnbFieldTrigger: () => AirbnbFieldTrigger,
40
41
  AirbnbInput: () => AirbnbInput,
41
42
  AirbnbPhoneField: () => AirbnbPhoneField,
@@ -5862,7 +5863,6 @@ var translation_default = {
5862
5863
  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
5864
  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
5865
  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
5866
  camera_errors: {
5867
5867
  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
5868
  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 +5886,8 @@ var translation_default = {
5886
5886
  hide_password: "\u0421\u043A\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u0430\u0442\u0430",
5887
5887
  increment: "\u0423\u0432\u0435\u043B\u0438\u0447\u0430\u0432\u0430\u043D\u0435 \u043D\u0430",
5888
5888
  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}}"'
5889
+ create_option: '\u0421\u044A\u0437\u0434\u0430\u0432\u0430\u043D\u0435 \u043D\u0430 "{{input}}"',
5890
+ 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
5891
  };
5891
5892
 
5892
5893
  // src/locales/ca/translation.json
@@ -5994,7 +5995,6 @@ var translation_default3 = {
5994
5995
  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
5996
  if_you_use_external_camera_disconnect_and_reconnect: "Pokud pou\u017E\xEDv\xE1te extern\xED kameru, odpojte ji a znovu p\u0159ipojte.",
5996
5997
  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
5998
  camera_errors: {
5999
5999
  experiencing_camera_issues: "M\xE1te probl\xE9my s fotoapar\xE1tem?",
6000
6000
  chekin_cant_use_your_camera: "Chekin nem\u016F\u017Ee pou\u017E\xEDvat v\xE1\u0161 fotoapar\xE1t",
@@ -6018,7 +6018,8 @@ var translation_default3 = {
6018
6018
  hide_password: "Skr\xFDt heslo",
6019
6019
  increment: "P\u0159\xEDr\u016Fstek",
6020
6020
  decrement: "Sn\xED\u017Een\xED",
6021
- create_option: 'Vytvo\u0159it "{{input}}"'
6021
+ create_option: 'Vytvo\u0159it "{{input}}"',
6022
+ year_out_of_range: "Rok mus\xED b\xFDt mezi {{min}} a {{max}}."
6022
6023
  };
6023
6024
 
6024
6025
  // src/locales/de/translation.json
@@ -6123,7 +6124,6 @@ var translation_default4 = {
6123
6124
  close_other_application_that_may_be_using_your_camera: "Schlie\xDFen Sie andere Anwendungen, die m\xF6glicherweise Ihre Kamera verwenden",
6124
6125
  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
6126
  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
6127
  camera_errors: {
6128
6128
  experiencing_camera_issues: "Haben Sie Probleme mit der Kamera?",
6129
6129
  chekin_cant_use_your_camera: "Chekin kann deine Kamera nicht benutzen",
@@ -6147,7 +6147,8 @@ var translation_default4 = {
6147
6147
  hide_password: "Passwort verstecken",
6148
6148
  increment: "Inkrement",
6149
6149
  decrement: "Verkleinern",
6150
- create_option: 'Erstellen Sie "{{input}}".'
6150
+ create_option: 'Erstellen Sie "{{input}}".',
6151
+ year_out_of_range: "Das Jahr muss zwischen {{min}} und {{max}} liegen"
6151
6152
  };
6152
6153
 
6153
6154
  // src/locales/el/translation.json
@@ -6252,7 +6253,6 @@ var translation_default5 = {
6252
6253
  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
6254
  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
6255
  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
6256
  camera_errors: {
6257
6257
  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
6258
  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 +6276,8 @@ var translation_default5 = {
6276
6276
  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
6277
  increment: "\u0391\u03CD\u03BE\u03B7\u03C3\u03B7",
6278
6278
  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}}__"'
6279
+ create_option: '\u0394\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03AE\u03C3\u03C4\u03B5 \u03C4\u03BF "{{input}}__"',
6280
+ 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
6281
  };
6281
6282
 
6282
6283
  // src/locales/en/translation.json
@@ -6375,13 +6376,13 @@ var translation_default6 = {
6375
6376
  date_range_min_days_error_other: "Range must be at least {{count}} days",
6376
6377
  past_dates: "Date cannot be before {{minDate}}",
6377
6378
  future_dates: "Date cannot be after {{maxDate}}",
6379
+ year_out_of_range: "Year must be between {{min}} and {{max}}",
6378
6380
  signature_placeholder_text: "Sign inside this box.<br/> Use your finger.<br/> Tap to start.",
6379
6381
  open_devices_camera: "Open device's camera",
6380
6382
  place_document_inside_frame: "Place your document inside the frame",
6381
6383
  close_other_application_that_may_be_using_your_camera: "Close other applications that may be using your camera",
6382
6384
  if_you_use_external_camera_disconnect_and_reconnect: "If you use an external camera, disconnect and reconnect it",
6383
6385
  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
6386
  camera_errors: {
6386
6387
  experiencing_camera_issues: "Experiencing camera issues?",
6387
6388
  chekin_cant_use_your_camera: "Chekin can't use your camera",
@@ -6510,7 +6511,6 @@ var translation_default7 = {
6510
6511
  close_other_application_that_may_be_using_your_camera: "Cierra otras aplicaciones que puedan estar utilizando tu c\xE1mara",
6511
6512
  if_you_use_external_camera_disconnect_and_reconnect: "Si utilizas una c\xE1mara externa, descon\xE9ctala y vuelve a conectarla",
6512
6513
  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
6514
  camera_errors: {
6515
6515
  experiencing_camera_issues: "\xBFTienes problemas con la c\xE1mara?",
6516
6516
  chekin_cant_use_your_camera: "Chekin no puede usar tu c\xE1mara",
@@ -6534,7 +6534,8 @@ var translation_default7 = {
6534
6534
  hide_password: "Ocultar contrase\xF1a",
6535
6535
  increment: "Incremento",
6536
6536
  decrement: "Disminuci\xF3n",
6537
- create_option: 'Crear "{{input}}"'
6537
+ create_option: 'Crear "{{input}}"',
6538
+ year_out_of_range: "El a\xF1o debe estar comprendido entre {{min}} y {{max}}."
6538
6539
  };
6539
6540
 
6540
6541
  // src/locales/et/translation.json
@@ -6639,7 +6640,6 @@ var translation_default8 = {
6639
6640
  close_other_application_that_may_be_using_your_camera: "Sulgege muud rakendused, mis v\xF5ivad kasutada teie kaamerat",
6640
6641
  if_you_use_external_camera_disconnect_and_reconnect: "Kui kasutate v\xE4list kaamerat, \xFChendage see lahti ja \xFChendage uuesti.",
6641
6642
  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
6643
  camera_errors: {
6644
6644
  experiencing_camera_issues: "Kas teil on probleeme kaameraga?",
6645
6645
  chekin_cant_use_your_camera: "Chekin ei saa oma kaamerat kasutada",
@@ -6663,7 +6663,8 @@ var translation_default8 = {
6663
6663
  hide_password: "Peida parool",
6664
6664
  increment: "Inkrement",
6665
6665
  decrement: "V\xE4hendamine",
6666
- create_option: 'Loo "{{input}}".'
6666
+ create_option: 'Loo "{{input}}".',
6667
+ year_out_of_range: "Aasta peab olema {{min}} ja {{max}} vahel."
6667
6668
  };
6668
6669
 
6669
6670
  // src/locales/fr/translation.json
@@ -6768,7 +6769,6 @@ var translation_default9 = {
6768
6769
  close_other_application_that_may_be_using_your_camera: "Fermez les autres applications qui peuvent utiliser votre appareil photo",
6769
6770
  if_you_use_external_camera_disconnect_and_reconnect: "Si vous utilisez un appareil photo externe, d\xE9connectez-le et reconnectez-le",
6770
6771
  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
6772
  camera_errors: {
6773
6773
  experiencing_camera_issues: "Vous avez des probl\xE8mes avec l'appareil photo ?",
6774
6774
  chekin_cant_use_your_camera: "Chekin ne peut pas utiliser votre appareil photo",
@@ -6792,7 +6792,8 @@ var translation_default9 = {
6792
6792
  hide_password: "Cacher le mot de passe",
6793
6793
  increment: "Incr\xE9ment",
6794
6794
  decrement: "D\xE9croissance",
6795
- create_option: 'Cr\xE9er "{{input}}"'
6795
+ create_option: 'Cr\xE9er "{{input}}"',
6796
+ year_out_of_range: "L'ann\xE9e doit \xEAtre comprise entre {{min}} et {{max}}."
6796
6797
  };
6797
6798
 
6798
6799
  // src/locales/hu/translation.json
@@ -6897,7 +6898,6 @@ var translation_default10 = {
6897
6898
  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
6899
  if_you_use_external_camera_disconnect_and_reconnect: "Ha k\xFCls\u0151 kamer\xE1t haszn\xE1l, v\xE1lassza ki \xE9s csatlakoztassa \xFAjra.",
6899
6900
  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
6901
  camera_errors: {
6902
6902
  experiencing_camera_issues: "Kameraprobl\xE9m\xE1k?",
6903
6903
  chekin_cant_use_your_camera: "Chekin nem tudja haszn\xE1lni a kamer\xE1t",
@@ -6921,7 +6921,8 @@ var translation_default10 = {
6921
6921
  hide_password: "Jelsz\xF3 elrejt\xE9se",
6922
6922
  increment: "Inkrement\xE1l\xE1s",
6923
6923
  decrement: "Cs\xF6kkent\xE9s",
6924
- create_option: 'Hozzon l\xE9tre "{{input}}__"'
6924
+ create_option: 'Hozzon l\xE9tre "{{input}}__"',
6925
+ year_out_of_range: "Az \xE9vnek {{min}} \xE9s {{max}} k\xF6z\xF6tt kell lennie."
6925
6926
  };
6926
6927
 
6927
6928
  // src/locales/it/translation.json
@@ -7026,7 +7027,6 @@ var translation_default11 = {
7026
7027
  close_other_application_that_may_be_using_your_camera: "Chiudere altre applicazioni che potrebbero utilizzare la fotocamera",
7027
7028
  if_you_use_external_camera_disconnect_and_reconnect: "Se si utilizza una telecamera esterna, scollegarla e ricollegarla.",
7028
7029
  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
7030
  camera_errors: {
7031
7031
  experiencing_camera_issues: "Problemi con la fotocamera?",
7032
7032
  chekin_cant_use_your_camera: "Chekin non pu\xF2 usare la macchina fotografica",
@@ -7050,7 +7050,8 @@ var translation_default11 = {
7050
7050
  hide_password: "Nascondere la password",
7051
7051
  increment: "Incremento",
7052
7052
  decrement: "Decremento",
7053
- create_option: 'Creare "{{input}}"'
7053
+ create_option: 'Creare "{{input}}"',
7054
+ year_out_of_range: "L'anno deve essere compreso tra {{min}} e {{max}}"
7054
7055
  };
7055
7056
 
7056
7057
  // src/locales/ko/translation.json
@@ -7155,7 +7156,6 @@ var translation_default12 = {
7155
7156
  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
7157
  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
7158
  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
7159
  camera_errors: {
7160
7160
  experiencing_camera_issues: "\uCE74\uBA54\uB77C \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uB098\uC694?",
7161
7161
  chekin_cant_use_your_camera: "Chekin\uC774 \uCE74\uBA54\uB77C\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
@@ -7179,7 +7179,8 @@ var translation_default12 = {
7179
7179
  hide_password: "\uBE44\uBC00\uBC88\uD638 \uC228\uAE30\uAE30",
7180
7180
  increment: "\uC99D\uBD84",
7181
7181
  decrement: "\uAC10\uC18C",
7182
- create_option: '"{{input}}" \uB9CC\uB4E4\uAE30'
7182
+ create_option: '"{{input}}" \uB9CC\uB4E4\uAE30',
7183
+ year_out_of_range: "\uC5F0\uB3C4\uB294 {{min}}\uC5D0\uC11C {{max}} \uC0AC\uC774\uC5EC\uC57C \uD569\uB2C8\uB2E4."
7183
7184
  };
7184
7185
 
7185
7186
  // src/locales/nl/translation.json
@@ -7284,7 +7285,6 @@ var translation_default13 = {
7284
7285
  close_other_application_that_may_be_using_your_camera: "Sluit andere toepassingen die mogelijk gebruikmaken van uw camera",
7285
7286
  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
7287
  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
7288
  camera_errors: {
7289
7289
  experiencing_camera_issues: "Problemen met de camera?",
7290
7290
  chekin_cant_use_your_camera: "Chekin kan je camera niet gebruiken",
@@ -7308,7 +7308,8 @@ var translation_default13 = {
7308
7308
  hide_password: "Wachtwoord verbergen",
7309
7309
  increment: "Verhoging",
7310
7310
  decrement: "Afname",
7311
- create_option: 'Maak "{{input}}" aan.'
7311
+ create_option: 'Maak "{{input}}" aan.',
7312
+ year_out_of_range: "Het jaar moet liggen tussen {{min}} en {{max}}"
7312
7313
  };
7313
7314
 
7314
7315
  // src/locales/pl/translation.json
@@ -7413,7 +7414,6 @@ var translation_default14 = {
7413
7414
  close_other_application_that_may_be_using_your_camera: "Zamknij inne aplikacje, kt\xF3re mog\u0105 korzysta\u0107 z kamery",
7414
7415
  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
7416
  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
7417
  camera_errors: {
7418
7418
  experiencing_camera_issues: "Problemy z kamer\u0105?",
7419
7419
  chekin_cant_use_your_camera: "Chekin nie mo\u017Ce u\u017Cywa\u0107 kamery",
@@ -7437,7 +7437,8 @@ var translation_default14 = {
7437
7437
  hide_password: "Ukryj has\u0142o",
7438
7438
  increment: "Przyrost",
7439
7439
  decrement: "Spadek",
7440
- create_option: 'Utw\xF3rz "{{input}}"'
7440
+ create_option: 'Utw\xF3rz "{{input}}"',
7441
+ year_out_of_range: "Rok musi zawiera\u0107 si\u0119 w przedziale od {{min}} do {{max}}."
7441
7442
  };
7442
7443
 
7443
7444
  // src/locales/pt/translation.json
@@ -7542,7 +7543,6 @@ var translation_default15 = {
7542
7543
  close_other_application_that_may_be_using_your_camera: "Fechar outras aplica\xE7\xF5es que possam estar a utilizar a sua c\xE2mara",
7543
7544
  if_you_use_external_camera_disconnect_and_reconnect: "Se utilizar uma c\xE2mara externa, desligue-a e volte a lig\xE1-la",
7544
7545
  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
7546
  camera_errors: {
7547
7547
  experiencing_camera_issues: "Est\xE1 a ter problemas com a c\xE2mara?",
7548
7548
  chekin_cant_use_your_camera: "Chekin n\xE3o pode usar a sua c\xE2mara",
@@ -7566,7 +7566,8 @@ var translation_default15 = {
7566
7566
  hide_password: "Ocultar palavra-passe",
7567
7567
  increment: "Incremento",
7568
7568
  decrement: "Diminui\xE7\xE3o",
7569
- create_option: 'Criar "{{input}}"'
7569
+ create_option: 'Criar "{{input}}"',
7570
+ year_out_of_range: "O ano deve estar compreendido entre {{min}} e {{max}}"
7570
7571
  };
7571
7572
 
7572
7573
  // src/locales/ro/translation.json
@@ -7671,7 +7672,6 @@ var translation_default16 = {
7671
7672
  close_other_application_that_may_be_using_your_camera: "\xCEnchide\u021Bi alte aplica\u021Bii care pot utiliza camera dvs.",
7672
7673
  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
7674
  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
7675
  camera_errors: {
7676
7676
  experiencing_camera_issues: "Ave\u021Bi probleme cu camera foto?",
7677
7677
  chekin_cant_use_your_camera: "Chekin nu-\u021Bi poate folosi camera",
@@ -7695,7 +7695,8 @@ var translation_default16 = {
7695
7695
  hide_password: "Ascunde\u021Bi parola",
7696
7696
  increment: "Increment",
7697
7697
  decrement: "Diminuare",
7698
- create_option: 'Crea\u021Bi "{{input}}"'
7698
+ create_option: 'Crea\u021Bi "{{input}}"',
7699
+ year_out_of_range: "Anul trebuie s\u0103 fie \xEEntre {{min}} \u0219i {{max}}"
7699
7700
  };
7700
7701
 
7701
7702
  // src/locales/ru/translation.json
@@ -7800,7 +7801,6 @@ var translation_default17 = {
7800
7801
  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
7802
  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
7803
  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
7804
  camera_errors: {
7805
7805
  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
7806
  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 +7824,8 @@ var translation_default17 = {
7824
7824
  hide_password: "\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C",
7825
7825
  increment: "\u0418\u043D\u043A\u0440\u0435\u043C\u0435\u043D\u0442",
7826
7826
  decrement: "\u0423\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435",
7827
- create_option: '\u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 "{{input}}"'
7827
+ create_option: '\u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 "{{input}}"',
7828
+ 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
7829
  };
7829
7830
 
7830
7831
  // src/locales/uk/translation.json
@@ -7929,7 +7930,6 @@ var translation_default18 = {
7929
7930
  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
7931
  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
7932
  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
7933
  camera_errors: {
7934
7934
  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
7935
  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 +7953,8 @@ var translation_default18 = {
7953
7953
  hide_password: "\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438 \u043F\u0430\u0440\u043E\u043B\u044C",
7954
7954
  increment: "\u041F\u0440\u0438\u0440\u0456\u0441\u0442",
7955
7955
  decrement: "\u0414\u0435\u043A\u0440\u0435\u0442",
7956
- create_option: '\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C "{{input}}"'
7956
+ create_option: '\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C "{{input}}"',
7957
+ 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
7958
  };
7958
7959
 
7959
7960
  // src/i18n/resources.ts
@@ -9956,7 +9957,7 @@ function TooltipInfo({ content, className }) {
9956
9957
  side: "right",
9957
9958
  content,
9958
9959
  contentClassName: "max-w-64",
9959
- className: cn("text-[var(--chekin-color-gray-1)]", className),
9960
+ className: cn("text-[var(--section-tooltip-color)]", className),
9960
9961
  onClick: (event) => event.stopPropagation(),
9961
9962
  label: typeof content === "string" ? content : "More information"
9962
9963
  }
@@ -9996,19 +9997,19 @@ var Section = (0, import_react68.forwardRef)(
9996
9997
  "div",
9997
9998
  {
9998
9999
  className: cn(
9999
- "flex max-w-[85%] items-center text-lg font-bold text-[var(--chekin-color-brand-navy)] md:max-w-full",
10000
+ "flex max-w-[85%] items-center text-lg font-bold text-[var(--section-title-color)] md:max-w-full",
10000
10001
  size !== 0 /* L */ && "subsection-title",
10001
10002
  titleClassName
10002
10003
  ),
10003
10004
  children: [
10004
10005
  title,
10005
10006
  titleTooltip && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TooltipInfo, { content: titleTooltip }) }),
10006
- linkContent && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--chekin-color-brand-blue)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
10007
+ linkContent && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--section-link-color)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
10007
10008
  ]
10008
10009
  }
10009
10010
  ),
10010
10011
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "w-full max-w-[720px] md:max-w-full", children: [
10011
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "inline text-base font-normal text-[var(--chekin-color-gray-1)]", children: subtitle }),
10012
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "inline text-base font-normal text-[var(--section-subtitle-color)]", children: subtitle }),
10012
10013
  subtitleTooltip && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-1.5 inline-block align-text-top", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TooltipInfo, { content: subtitleTooltip }) })
10013
10014
  ] })
10014
10015
  ] }),
@@ -17496,7 +17497,7 @@ var Textarea = React61.forwardRef(function Textarea2({
17496
17497
  });
17497
17498
 
17498
17499
  // src/fields/datepicker/Datepicker.tsx
17499
- var React63 = __toESM(require("react"), 1);
17500
+ var React64 = __toESM(require("react"), 1);
17500
17501
  var import_lucide_react50 = require("lucide-react");
17501
17502
  var import_react_i18next38 = require("react-i18next");
17502
17503
 
@@ -18144,6 +18145,142 @@ function AirbnbDatePickerContent({
18144
18145
  ) });
18145
18146
  }
18146
18147
 
18148
+ // src/fields/datepicker/useMonthCombobox.ts
18149
+ var React63 = __toESM(require("react"), 1);
18150
+ function useMonthCombobox({
18151
+ monthLabels,
18152
+ monthIndex,
18153
+ isFieldFocused,
18154
+ disabled,
18155
+ onSelect,
18156
+ onCommit,
18157
+ onClear
18158
+ }) {
18159
+ const [isOpen, setIsOpen] = React63.useState(false);
18160
+ const [inputValue, setInputValue] = React63.useState("");
18161
+ const [highlightIndex, setHighlightIndex] = React63.useState(-1);
18162
+ const labelFor = React63.useCallback(
18163
+ (index) => index !== null ? monthLabels[index] ?? "" : "",
18164
+ [monthLabels]
18165
+ );
18166
+ React63.useEffect(() => {
18167
+ if (isFieldFocused) return;
18168
+ setInputValue(labelFor(monthIndex));
18169
+ }, [monthIndex, labelFor, isFieldFocused]);
18170
+ const filteredMonths = React63.useMemo(() => {
18171
+ const all = monthLabels.map((label, index) => ({ label, index }));
18172
+ const query = inputValue.trim().toLowerCase();
18173
+ if (!query || inputValue === labelFor(monthIndex)) return all;
18174
+ return all.filter((option) => option.label.toLowerCase().includes(query));
18175
+ }, [inputValue, monthIndex, monthLabels, labelFor]);
18176
+ React63.useEffect(() => {
18177
+ if (!isOpen) {
18178
+ setHighlightIndex(-1);
18179
+ return;
18180
+ }
18181
+ if (monthIndex !== null) {
18182
+ const index = filteredMonths.findIndex((option) => option.index === monthIndex);
18183
+ if (index >= 0) {
18184
+ setHighlightIndex(index);
18185
+ return;
18186
+ }
18187
+ }
18188
+ setHighlightIndex(filteredMonths.length > 0 ? 0 : -1);
18189
+ }, [isOpen, filteredMonths.length]);
18190
+ const selectMonth = React63.useCallback(
18191
+ (index) => {
18192
+ setInputValue(labelFor(index));
18193
+ setIsOpen(false);
18194
+ onSelect(index);
18195
+ },
18196
+ [labelFor, onSelect]
18197
+ );
18198
+ const commitInput = React63.useCallback(() => {
18199
+ const query = inputValue.trim().toLowerCase();
18200
+ if (!query) {
18201
+ if (monthIndex !== null) onClear();
18202
+ setInputValue("");
18203
+ return;
18204
+ }
18205
+ const exactMatch = monthLabels.findIndex((label) => label.toLowerCase() === query);
18206
+ if (exactMatch >= 0) {
18207
+ if (exactMatch !== monthIndex) onCommit(exactMatch);
18208
+ setInputValue(labelFor(exactMatch));
18209
+ return;
18210
+ }
18211
+ setInputValue(labelFor(monthIndex));
18212
+ }, [inputValue, monthIndex, monthLabels, labelFor, onClear, onCommit]);
18213
+ const handleInputChange = React63.useCallback(
18214
+ (event) => {
18215
+ setInputValue(event.target.value);
18216
+ setIsOpen(true);
18217
+ setHighlightIndex(0);
18218
+ },
18219
+ []
18220
+ );
18221
+ const handleInputKeyDown = React63.useCallback(
18222
+ (event) => {
18223
+ if (disabled) return;
18224
+ if (event.key === "ArrowDown") {
18225
+ event.preventDefault();
18226
+ setIsOpen(true);
18227
+ setHighlightIndex(
18228
+ (prev) => filteredMonths.length === 0 ? -1 : Math.min(prev + 1, filteredMonths.length - 1)
18229
+ );
18230
+ return;
18231
+ }
18232
+ if (event.key === "ArrowUp") {
18233
+ event.preventDefault();
18234
+ setIsOpen(true);
18235
+ setHighlightIndex((prev) => Math.max(prev - 1, 0));
18236
+ return;
18237
+ }
18238
+ if (event.key === "Enter") {
18239
+ if (!isOpen) return;
18240
+ event.preventDefault();
18241
+ const target = filteredMonths[highlightIndex];
18242
+ if (target) {
18243
+ selectMonth(target.index);
18244
+ } else {
18245
+ commitInput();
18246
+ }
18247
+ return;
18248
+ }
18249
+ if (event.key === "Escape") {
18250
+ event.preventDefault();
18251
+ setIsOpen(false);
18252
+ setInputValue(labelFor(monthIndex));
18253
+ return;
18254
+ }
18255
+ if (event.key === "Tab") {
18256
+ setIsOpen(false);
18257
+ }
18258
+ },
18259
+ [
18260
+ commitInput,
18261
+ disabled,
18262
+ filteredMonths,
18263
+ highlightIndex,
18264
+ isOpen,
18265
+ labelFor,
18266
+ monthIndex,
18267
+ selectMonth
18268
+ ]
18269
+ );
18270
+ return {
18271
+ isOpen,
18272
+ setIsOpen,
18273
+ inputValue,
18274
+ highlightIndex,
18275
+ setHighlightIndex,
18276
+ filteredMonths,
18277
+ selectMonth,
18278
+ commitInput,
18279
+ handleInputChange,
18280
+ handleInputKeyDown
18281
+ };
18282
+ }
18283
+
18147
18284
  // src/fields/datepicker/Datepicker.tsx
18148
18285
  var import_jsx_runtime174 = require("react/jsx-runtime");
18149
18286
  var MONTHS_IN_YEAR2 = 12;
@@ -18155,13 +18292,33 @@ function getMonthLabels2(locale) {
18155
18292
  );
18156
18293
  }
18157
18294
  var DAY_PATTERN = /^([1-9]|[12]\d|3[01])$/;
18158
- var PARTIAL_DAY_PATTERN = /^[0-9]{0,2}$/;
18295
+ var PARTIAL_DAY_PATTERN = /^([0-9]|0[1-9]|[12]\d|3[01])?$/;
18159
18296
  var PARTIAL_YEAR_PATTERN = /^[0-9]{0,4}$/;
18160
- var FULL_YEAR_PATTERN = /^(19|20)\d{2}$/;
18297
+ var COMPLETE_YEAR_PATTERN = /^\d{4}$/;
18298
+ var MIN_YEAR_OFFSET = 120;
18299
+ var MAX_YEAR_OFFSET = 50;
18300
+ function getYearBounds() {
18301
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
18302
+ return {
18303
+ minYear: currentYear - MIN_YEAR_OFFSET,
18304
+ maxYear: currentYear + MAX_YEAR_OFFSET
18305
+ };
18306
+ }
18161
18307
  function isValidCalendarDate(year, monthIndex, day) {
18162
18308
  const date = new Date(year, monthIndex, day);
18163
18309
  return date.getFullYear() === year && date.getMonth() === monthIndex && date.getDate() === day;
18164
18310
  }
18311
+ function getDaysInMonth2(monthIndex, year) {
18312
+ const yearNum = COMPLETE_YEAR_PATTERN.test(year) ? parseInt(year, 10) : 2024;
18313
+ return new Date(yearNum, monthIndex + 1, 0).getDate();
18314
+ }
18315
+ function clampDayToMonth(day, monthIndex, year) {
18316
+ if (!day || monthIndex === null) return day;
18317
+ const dayNum = parseInt(day, 10);
18318
+ if (Number.isNaN(dayNum)) return day;
18319
+ const max = getDaysInMonth2(monthIndex, year);
18320
+ return dayNum > max ? String(max) : day;
18321
+ }
18165
18322
  function partsFromDate(date) {
18166
18323
  if (!date) return { day: "", monthIndex: null, year: "" };
18167
18324
  return {
@@ -18170,15 +18327,23 @@ function partsFromDate(date) {
18170
18327
  year: String(date.getFullYear())
18171
18328
  };
18172
18329
  }
18173
- function dateFromParts(day, monthIndex, year) {
18330
+ function datepickerDatesEqual(a, b) {
18331
+ if (a === null || b === null) return a === b;
18332
+ return a.getTime() === b.getTime();
18333
+ }
18334
+ function isYearInRange(yearNum, minYear, maxYear) {
18335
+ return yearNum >= minYear && yearNum <= maxYear;
18336
+ }
18337
+ function dateFromParts(day, monthIndex, year, minYear, maxYear) {
18174
18338
  if (!day || monthIndex === null || !year) return null;
18175
- if (!DAY_PATTERN.test(day) || !FULL_YEAR_PATTERN.test(year)) return null;
18339
+ if (!DAY_PATTERN.test(day) || !COMPLETE_YEAR_PATTERN.test(year)) return null;
18176
18340
  const dayNum = parseInt(day, 10);
18177
18341
  const yearNum = parseInt(year, 10);
18342
+ if (!isYearInRange(yearNum, minYear, maxYear)) return null;
18178
18343
  if (!isValidCalendarDate(yearNum, monthIndex, dayNum)) return null;
18179
18344
  return new Date(yearNum, monthIndex, dayNum);
18180
18345
  }
18181
- var Datepicker = React63.forwardRef(
18346
+ var Datepicker = React64.forwardRef(
18182
18347
  function Datepicker2({
18183
18348
  label,
18184
18349
  value,
@@ -18211,133 +18376,154 @@ var Datepicker = React63.forwardRef(
18211
18376
  maxDate,
18212
18377
  formatValue
18213
18378
  }, 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();
18379
+ const containerRef = React64.useRef(null);
18380
+ const dayInputRef = React64.useRef(null);
18381
+ const monthInputRef = React64.useRef(null);
18382
+ const yearInputRef = React64.useRef(null);
18383
+ const mobileTriggerRef = React64.useRef(null);
18384
+ const reactId = React64.useId();
18222
18385
  const baseId = name ?? `dash-datepicker-${reactId}`;
18223
18386
  const dayId = `${baseId}-day`;
18224
18387
  const monthId = `${baseId}-month`;
18225
18388
  const yearId = `${baseId}-year`;
18226
18389
  const labelId = `${baseId}-label`;
18227
18390
  const errorId = `${baseId}-error`;
18391
+ const wheelBaseId = `${baseId}-wheel`;
18228
18392
  const { t, i18n } = (0, import_react_i18next38.useTranslation)();
18229
18393
  const resolvedLocale = locale ?? i18n.resolvedLanguage ?? i18n.language ?? "en-US";
18230
- const resolvedMonthLabels = React63.useMemo(
18394
+ const resolvedMonthLabels = React64.useMemo(
18231
18395
  () => monthLabels ?? getMonthLabels2(resolvedLocale),
18232
18396
  [resolvedLocale, monthLabels]
18233
18397
  );
18234
18398
  const resolvedMonthPlaceholder = monthPlaceholder ?? t("month");
18235
18399
  const resolvedDoneLabel = doneLabel ?? t("done");
18236
18400
  const isControlled = value !== void 0;
18237
- const initialParts = React63.useMemo(
18401
+ const initialParts = React64.useMemo(
18238
18402
  () => partsFromDate(value ?? defaultValue ?? null),
18239
18403
  // eslint-disable-next-line react-hooks/exhaustive-deps
18240
18404
  []
18241
18405
  );
18242
- const [day, setDay] = React63.useState(initialParts.day);
18243
- const [monthIndex, setMonthIndex] = React63.useState(
18406
+ const [day, setDay] = React64.useState(initialParts.day);
18407
+ const [monthIndex, setMonthIndex] = React64.useState(
18244
18408
  initialParts.monthIndex
18245
18409
  );
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);
18410
+ const [year, setYear] = React64.useState(initialParts.year);
18411
+ const [isWheelOpen, setIsWheelOpen] = React64.useState(false);
18412
+ const [focusedField, setFocusedField] = React64.useState(null);
18252
18413
  const isMobile3 = useIsMobile();
18253
- const emitChangeRef = React63.useRef(() => {
18414
+ const emitChangeRef = React64.useRef(() => {
18254
18415
  });
18255
- const dayStateRef = React63.useRef(day);
18256
- const yearStateRef = React63.useRef(year);
18257
- const monthIndexRef = React63.useRef(monthIndex);
18416
+ const lastEmittedRef = React64.useRef(value ?? null);
18417
+ const dayStateRef = React64.useRef(day);
18418
+ const yearStateRef = React64.useRef(year);
18419
+ const monthIndexRef = React64.useRef(monthIndex);
18258
18420
  dayStateRef.current = day;
18259
18421
  yearStateRef.current = year;
18260
18422
  monthIndexRef.current = monthIndex;
18261
- React63.useImperativeHandle(
18423
+ React64.useImperativeHandle(
18262
18424
  ref,
18263
18425
  () => ({
18264
18426
  getDayValue: () => dayStateRef.current,
18265
18427
  getYearValue: () => yearStateRef.current,
18266
18428
  setDayValue: (next) => {
18267
18429
  if (!PARTIAL_DAY_PATTERN.test(next)) return;
18430
+ const month = monthIndexRef.current;
18431
+ if (month !== null && next && parseInt(next, 10) > getDaysInMonth2(month, yearStateRef.current)) {
18432
+ return;
18433
+ }
18268
18434
  setDay(next);
18269
- emitChangeRef.current(next, monthIndexRef.current, yearStateRef.current);
18435
+ emitChangeRef.current(next, month, yearStateRef.current);
18270
18436
  },
18271
18437
  setYearValue: (next) => {
18272
18438
  if (!PARTIAL_YEAR_PATTERN.test(next)) return;
18439
+ const clampedDay = clampDayToMonth(
18440
+ dayStateRef.current,
18441
+ monthIndexRef.current,
18442
+ next
18443
+ );
18444
+ if (clampedDay !== dayStateRef.current) setDay(clampedDay);
18273
18445
  setYear(next);
18274
- emitChangeRef.current(dayStateRef.current, monthIndexRef.current, next);
18446
+ emitChangeRef.current(clampedDay, monthIndexRef.current, next);
18275
18447
  }
18276
18448
  }),
18277
18449
  []
18278
18450
  );
18279
- React63.useEffect(() => {
18451
+ React64.useEffect(() => {
18280
18452
  if (!isControlled) return;
18281
- const next = partsFromDate(value ?? null);
18453
+ const incoming = value ?? null;
18454
+ if (datepickerDatesEqual(incoming, lastEmittedRef.current)) return;
18455
+ lastEmittedRef.current = incoming;
18456
+ const next = partsFromDate(incoming);
18282
18457
  setDay(next.day);
18283
18458
  setMonthIndex(next.monthIndex);
18284
18459
  setYear(next.year);
18285
18460
  }, [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;
18461
+ const { minYear, maxYear } = React64.useMemo(() => getYearBounds(), []);
18462
+ const yearError = React64.useMemo(() => {
18463
+ if (year.length < 4) return null;
18464
+ const yearNum = parseInt(year, 10);
18465
+ if (!isYearInRange(yearNum, minYear, maxYear)) {
18466
+ return t("year_out_of_range", { min: minYear, max: maxYear });
18303
18467
  }
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
- }
18311
- }
18312
- setMonthHighlightIndex(filteredMonths.length > 0 ? 0 : -1);
18313
- }, [isMonthOpen, filteredMonths.length]);
18314
- const hasAnyValue = Boolean(day) || monthIndex !== null || Boolean(year);
18315
- const isEmpty = !hasAnyValue;
18468
+ return null;
18469
+ }, [year, minYear, maxYear, t]);
18470
+ const resolvedError = error || yearError || void 0;
18471
+ const isEmpty = !day && monthIndex === null && !year;
18316
18472
  const isBlocked = Boolean(disabled) || Boolean(loading);
18317
- const isFocused = focusedField !== null || isMonthOpen || isWheelOpen;
18318
- const isInvalid = Boolean(invalid || error);
18473
+ const isInvalid = Boolean(invalid || resolvedError);
18319
18474
  const wrapperWidth = toCssSize(width);
18320
- const currentDate = React63.useMemo(
18321
- () => dateFromParts(day, monthIndex, year),
18322
- [day, monthIndex, year]
18475
+ const errorDescribedBy = resolvedError && !hideErrorMessage ? errorId : void 0;
18476
+ const currentDate = React64.useMemo(
18477
+ () => dateFromParts(day, monthIndex, year, minYear, maxYear),
18478
+ [day, monthIndex, year, minYear, maxYear]
18323
18479
  );
18324
- useOutsideClick({
18325
- elementRef: containerRef,
18326
- onOutsideClick: () => setIsMonthOpen(false),
18327
- isDisabled: !isMonthOpen || isMobile3
18328
- });
18329
- const emitChange = React63.useCallback(
18480
+ const emitChange = React64.useCallback(
18330
18481
  (nextDay, nextMonth, nextYear) => {
18331
- if (!onChange) return;
18332
- const date = dateFromParts(nextDay, nextMonth, nextYear);
18333
- onChange(date, name);
18482
+ const date = dateFromParts(nextDay, nextMonth, nextYear, minYear, maxYear);
18483
+ lastEmittedRef.current = date;
18484
+ onChange?.(date, name);
18334
18485
  },
18335
- [name, onChange]
18486
+ [name, onChange, minYear, maxYear]
18336
18487
  );
18337
18488
  emitChangeRef.current = emitChange;
18489
+ const commitMonth = React64.useCallback(
18490
+ (index) => {
18491
+ const clampedDay = clampDayToMonth(day, index, year);
18492
+ if (clampedDay !== day) setDay(clampedDay);
18493
+ setMonthIndex(index);
18494
+ emitChange(clampedDay, index, year);
18495
+ },
18496
+ [day, emitChange, year]
18497
+ );
18498
+ const handleMonthSelect = React64.useCallback(
18499
+ (index) => {
18500
+ commitMonth(index);
18501
+ yearInputRef.current?.focus();
18502
+ },
18503
+ [commitMonth]
18504
+ );
18505
+ const handleMonthClear = React64.useCallback(() => commitMonth(null), [commitMonth]);
18506
+ const monthCombobox = useMonthCombobox({
18507
+ monthLabels: resolvedMonthLabels,
18508
+ monthIndex,
18509
+ isFieldFocused: focusedField === "month",
18510
+ disabled: isBlocked,
18511
+ onSelect: handleMonthSelect,
18512
+ onCommit: commitMonth,
18513
+ onClear: handleMonthClear
18514
+ });
18515
+ const isFocused = focusedField !== null || monthCombobox.isOpen || isWheelOpen;
18516
+ useOutsideClick({
18517
+ elementRef: containerRef,
18518
+ onOutsideClick: () => monthCombobox.setIsOpen(false),
18519
+ isDisabled: !monthCombobox.isOpen || isMobile3
18520
+ });
18338
18521
  const handleDayChange = (event) => {
18339
18522
  const next = event.target.value;
18340
18523
  if (!PARTIAL_DAY_PATTERN.test(next)) return;
18524
+ if (monthIndex !== null && next && parseInt(next, 10) > getDaysInMonth2(monthIndex, year)) {
18525
+ return;
18526
+ }
18341
18527
  setDay(next);
18342
18528
  emitChange(next, monthIndex, year);
18343
18529
  if (next.length === 2 && DAY_PATTERN.test(next)) {
@@ -18347,90 +18533,20 @@ var Datepicker = React63.forwardRef(
18347
18533
  const handleYearChange = (event) => {
18348
18534
  const next = event.target.value;
18349
18535
  if (!PARTIAL_YEAR_PATTERN.test(next)) return;
18536
+ const clampedDay = clampDayToMonth(day, monthIndex, next);
18537
+ if (clampedDay !== day) setDay(clampedDay);
18350
18538
  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
- }
18539
+ emitChange(clampedDay, monthIndex, next);
18424
18540
  };
18425
- const focusDayInput = React63.useCallback(() => {
18541
+ const focusDayInput = React64.useCallback(() => {
18426
18542
  if (isBlocked || readOnly) return;
18427
18543
  dayInputRef.current?.focus();
18428
18544
  }, [isBlocked, readOnly]);
18429
- const openWheel = React63.useCallback(() => {
18545
+ const openWheel = React64.useCallback(() => {
18430
18546
  if (isBlocked || readOnly) return;
18431
18547
  setIsWheelOpen(true);
18432
18548
  }, [isBlocked, readOnly]);
18433
- const closeWheel = React63.useCallback(() => {
18549
+ const closeWheel = React64.useCallback(() => {
18434
18550
  setIsWheelOpen(false);
18435
18551
  mobileTriggerRef.current?.focus();
18436
18552
  }, []);
@@ -18442,33 +18558,33 @@ var Datepicker = React63.forwardRef(
18442
18558
  minDate,
18443
18559
  maxDate
18444
18560
  });
18445
- const handleWheelDone = React63.useCallback(() => {
18561
+ const handleWheelDone = React64.useCallback(() => {
18446
18562
  const next = wheel.draftDate;
18447
18563
  setDay(String(next.getDate()));
18448
18564
  setMonthIndex(next.getMonth());
18449
18565
  setYear(String(next.getFullYear()));
18566
+ lastEmittedRef.current = next;
18450
18567
  onChange?.(next, name);
18451
18568
  setIsWheelOpen(false);
18452
18569
  mobileTriggerRef.current?.focus();
18453
18570
  }, [name, onChange, wheel.draftDate]);
18454
- const defaultFormatValue = React63.useCallback(
18571
+ const defaultFormatValue = React64.useCallback(
18455
18572
  (date) => `${date.getDate()} ${resolvedMonthLabels[date.getMonth()]} ${date.getFullYear()}`,
18456
18573
  [resolvedMonthLabels]
18457
18574
  );
18458
18575
  const triggerText = currentDate ? (formatValue ?? defaultFormatValue)(currentDate) : void 0;
18459
18576
  const monthListboxId = `${monthId}-listbox`;
18460
18577
  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)(
18578
+ 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
18579
  "ul",
18463
18580
  {
18464
- ref: monthListRef,
18465
18581
  id: monthListboxId,
18466
18582
  role: "listbox",
18467
18583
  "aria-labelledby": labelId,
18468
18584
  className: "m-0 max-h-[260px] list-none overflow-y-auto p-1",
18469
- children: filteredMonths.map((option, position) => {
18585
+ children: monthCombobox.filteredMonths.map((option, position) => {
18470
18586
  const isSelected = option.index === monthIndex;
18471
- const isHighlighted = position === monthHighlightIndex;
18587
+ const isHighlighted = position === monthCombobox.highlightIndex;
18472
18588
  return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("li", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18473
18589
  "button",
18474
18590
  {
@@ -18478,8 +18594,8 @@ var Datepicker = React63.forwardRef(
18478
18594
  "aria-selected": isSelected,
18479
18595
  tabIndex: -1,
18480
18596
  onMouseDown: (event) => event.preventDefault(),
18481
- onMouseMove: () => setMonthHighlightIndex(position),
18482
- onClick: () => handleMonthSelect(option.index),
18597
+ onMouseMove: () => monthCombobox.setHighlightIndex(position),
18598
+ onClick: () => monthCombobox.selectMonth(option.index),
18483
18599
  className: cn(
18484
18600
  "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
18601
  isHighlighted && "bg-[var(--chekin-color-surface-pressed)] text-[var(--chekin-color-brand-blue)]",
@@ -18519,6 +18635,7 @@ var Datepicker = React63.forwardRef(
18519
18635
  "aria-expanded": isWheelOpen,
18520
18636
  "aria-labelledby": labelId,
18521
18637
  "aria-invalid": isInvalid,
18638
+ "aria-describedby": errorDescribedBy,
18522
18639
  "aria-busy": loading,
18523
18640
  disabled: isBlocked || readOnly,
18524
18641
  onClick: openWheel,
@@ -18563,6 +18680,7 @@ var Datepicker = React63.forwardRef(
18563
18680
  disabled: isBlocked,
18564
18681
  readOnly,
18565
18682
  "aria-invalid": isInvalid,
18683
+ "aria-describedby": errorDescribedBy,
18566
18684
  "aria-labelledby": labelId,
18567
18685
  onChange: handleDayChange,
18568
18686
  onFocus: (event) => {
@@ -18588,36 +18706,39 @@ var Datepicker = React63.forwardRef(
18588
18706
  role: "combobox",
18589
18707
  autoComplete: "off",
18590
18708
  "aria-haspopup": "listbox",
18591
- "aria-expanded": isMonthOpen,
18709
+ "aria-expanded": monthCombobox.isOpen,
18592
18710
  "aria-controls": monthListboxId,
18593
18711
  "aria-autocomplete": "list",
18594
- "aria-activedescendant": monthHighlightIndex >= 0 && filteredMonths[monthHighlightIndex] ? getMonthOptionId(filteredMonths[monthHighlightIndex].index) : void 0,
18712
+ "aria-activedescendant": monthCombobox.highlightIndex >= 0 && monthCombobox.filteredMonths[monthCombobox.highlightIndex] ? getMonthOptionId(
18713
+ monthCombobox.filteredMonths[monthCombobox.highlightIndex].index
18714
+ ) : void 0,
18595
18715
  "aria-labelledby": labelId,
18596
18716
  "aria-invalid": isInvalid,
18717
+ "aria-describedby": errorDescribedBy,
18597
18718
  name: name ? `${name}-month` : void 0,
18598
- value: monthInputValue,
18719
+ value: monthCombobox.inputValue,
18599
18720
  placeholder: resolvedMonthPlaceholder,
18600
18721
  disabled: isBlocked,
18601
18722
  readOnly,
18602
- onChange: handleMonthInputChange,
18723
+ onChange: monthCombobox.handleInputChange,
18603
18724
  onFocus: (event) => {
18604
18725
  onFocus?.(event);
18605
18726
  onFieldFocus?.("month");
18606
18727
  setFocusedField("month");
18607
18728
  if (!isBlocked && !readOnly) {
18608
- setIsMonthOpen(true);
18729
+ monthCombobox.setIsOpen(true);
18609
18730
  monthInputRef.current?.select();
18610
18731
  }
18611
18732
  },
18612
18733
  onBlur: () => {
18613
18734
  onFieldBlur?.("month");
18614
18735
  setFocusedField(null);
18615
- commitMonthInput();
18736
+ monthCombobox.commitInput();
18616
18737
  },
18617
18738
  onClick: () => {
18618
- if (!isBlocked && !readOnly) setIsMonthOpen(true);
18739
+ if (!isBlocked && !readOnly) monthCombobox.setIsOpen(true);
18619
18740
  },
18620
- onKeyDown: handleMonthInputKeyDown,
18741
+ onKeyDown: monthCombobox.handleInputKeyDown,
18621
18742
  className: cn(
18622
18743
  "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
18744
  monthIndex !== null ? "text-[var(--chekin-color-brand-navy)]" : "text-[var(--chekin-color-gray-1)]",
@@ -18632,12 +18753,12 @@ var Datepicker = React63.forwardRef(
18632
18753
  onMouseDown: (event) => {
18633
18754
  event.preventDefault();
18634
18755
  if (isBlocked || readOnly) return;
18635
- setIsMonthOpen((prev) => !prev);
18756
+ monthCombobox.setIsOpen((prev) => !prev);
18636
18757
  monthInputRef.current?.focus();
18637
18758
  },
18638
18759
  className: cn(
18639
18760
  "shrink-0 cursor-pointer text-[var(--chekin-color-gray-2)] transition-transform duration-200",
18640
- isMonthOpen && "rotate-180 text-[var(--chekin-color-brand-blue)]"
18761
+ monthCombobox.isOpen && "rotate-180 text-[var(--chekin-color-brand-blue)]"
18641
18762
  )
18642
18763
  }
18643
18764
  )
@@ -18656,6 +18777,7 @@ var Datepicker = React63.forwardRef(
18656
18777
  disabled: isBlocked,
18657
18778
  readOnly,
18658
18779
  "aria-invalid": isInvalid,
18780
+ "aria-describedby": errorDescribedBy,
18659
18781
  "aria-labelledby": labelId,
18660
18782
  onChange: handleYearChange,
18661
18783
  onFocus: (event) => {
@@ -18700,7 +18822,7 @@ var Datepicker = React63.forwardRef(
18700
18822
  onClick: isMobile3 ? openWheel : showCoverage ? focusDayInput : void 0
18701
18823
  }
18702
18824
  ),
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 })
18825
+ 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
18826
  ] }),
18705
18827
  isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18706
18828
  AirbnbDatePickerContent,
@@ -18730,13 +18852,13 @@ var Datepicker = React63.forwardRef(
18730
18852
  onOptionSelect: wheel.handleOptionSelect
18731
18853
  }
18732
18854
  ),
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)(
18855
+ !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") }),
18856
+ !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 }),
18857
+ resolvedError && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
18736
18858
  FieldErrorMessage,
18737
18859
  {
18738
18860
  id: errorId,
18739
- message: error,
18861
+ message: resolvedError,
18740
18862
  className: "mt-[1px] text-[14px]"
18741
18863
  }
18742
18864
  )
@@ -18747,7 +18869,7 @@ var Datepicker = React63.forwardRef(
18747
18869
  );
18748
18870
 
18749
18871
  // src/fields/date-range-picker/DateRangePicker.tsx
18750
- var React67 = __toESM(require("react"), 1);
18872
+ var React68 = __toESM(require("react"), 1);
18751
18873
  var import_react_i18next39 = require("react-i18next");
18752
18874
 
18753
18875
  // src/fields/date-range-picker/isDayBlocked.ts
@@ -18826,7 +18948,7 @@ var createDisabledMatchers = ({
18826
18948
  };
18827
18949
 
18828
18950
  // src/fields/date-range-picker/hooks/useRangeValue.ts
18829
- var React64 = __toESM(require("react"), 1);
18951
+ var React65 = __toESM(require("react"), 1);
18830
18952
  var getRangeKey = (range) => `${range?.from?.getTime() ?? ""}-${range?.to?.getTime() ?? ""}`;
18831
18953
  function useRangeValue({
18832
18954
  value: externalValue,
@@ -18835,10 +18957,10 @@ function useRangeValue({
18835
18957
  name
18836
18958
  }) {
18837
18959
  const isControlled = externalValue !== void 0;
18838
- const [draft, setDraft] = React64.useState(
18960
+ const [draft, setDraft] = React65.useState(
18839
18961
  isControlled ? externalValue : defaultValue
18840
18962
  );
18841
- const lastExternalKeyRef = React64.useRef(getRangeKey(externalValue));
18963
+ const lastExternalKeyRef = React65.useRef(getRangeKey(externalValue));
18842
18964
  if (isControlled) {
18843
18965
  const externalKey = getRangeKey(externalValue);
18844
18966
  if (externalKey !== lastExternalKeyRef.current) {
@@ -18846,7 +18968,7 @@ function useRangeValue({
18846
18968
  setDraft(externalValue);
18847
18969
  }
18848
18970
  }
18849
- const commit = React64.useCallback(
18971
+ const commit = React65.useCallback(
18850
18972
  (next) => {
18851
18973
  setDraft(next);
18852
18974
  if (next === void 0) {
@@ -18861,7 +18983,7 @@ function useRangeValue({
18861
18983
  }
18862
18984
 
18863
18985
  // src/fields/date-range-picker/hooks/useRangeTextInputs.ts
18864
- var React65 = __toESM(require("react"), 1);
18986
+ var React66 = __toESM(require("react"), 1);
18865
18987
 
18866
18988
  // src/fields/date-range-picker/utils/inputFormat.ts
18867
18989
  function parseDateInputFormat(format2) {
@@ -18951,18 +19073,18 @@ function useRangeTextInputs({
18951
19073
  onFromComplete,
18952
19074
  onToComplete
18953
19075
  }) {
18954
- const tokens = React65.useMemo(
19076
+ const tokens = React66.useMemo(
18955
19077
  () => parseDateInputFormat(displayFormat),
18956
19078
  [displayFormat]
18957
19079
  );
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(() => {
19080
+ const maxDigits = React66.useMemo(() => getMaxDigits(tokens), [tokens]);
19081
+ const [fromText, setFromText] = React66.useState(value?.from ? format2(value.from) : "");
19082
+ const [toText, setToText] = React66.useState(value?.to ? format2(value.to) : "");
19083
+ React66.useEffect(() => {
18962
19084
  setFromText(value?.from ? format2(value.from) : "");
18963
19085
  setToText(value?.to ? format2(value.to) : "");
18964
19086
  }, [format2, value?.from, value?.to]);
18965
- const handleFromChange = React65.useCallback(
19087
+ const handleFromChange = React66.useCallback(
18966
19088
  (raw) => {
18967
19089
  const formatted = autoFormatDateInput(raw, tokens);
18968
19090
  const wasComplete = countDigits(fromText) === maxDigits;
@@ -18974,7 +19096,7 @@ function useRangeTextInputs({
18974
19096
  },
18975
19097
  [fromText, maxDigits, onFromComplete, parse3, tokens]
18976
19098
  );
18977
- const handleToChange = React65.useCallback(
19099
+ const handleToChange = React66.useCallback(
18978
19100
  (raw) => {
18979
19101
  const formatted = autoFormatDateInput(raw, tokens);
18980
19102
  const wasComplete = countDigits(toText) === maxDigits;
@@ -18986,7 +19108,7 @@ function useRangeTextInputs({
18986
19108
  },
18987
19109
  [maxDigits, onToComplete, parse3, toText, tokens]
18988
19110
  );
18989
- const handleFromBlur = React65.useCallback(() => {
19111
+ const handleFromBlur = React66.useCallback(() => {
18990
19112
  if (!fromText) {
18991
19113
  const next = { from: void 0, to: value?.to };
18992
19114
  onCommit(next);
@@ -19003,7 +19125,7 @@ function useRangeTextInputs({
19003
19125
  setFromText(value?.from ? format2(value.from) : "");
19004
19126
  return void 0;
19005
19127
  }, [format2, fromText, onBlur, onCommit, parse3, value]);
19006
- const handleToBlur = React65.useCallback(() => {
19128
+ const handleToBlur = React66.useCallback(() => {
19007
19129
  if (!toText) {
19008
19130
  const next = { from: value?.from, to: void 0 };
19009
19131
  onCommit(next);
@@ -19032,21 +19154,21 @@ function useRangeTextInputs({
19032
19154
  }
19033
19155
 
19034
19156
  // src/fields/date-range-picker/hooks/useRangeMonthSync.ts
19035
- var React66 = __toESM(require("react"), 1);
19157
+ var React67 = __toESM(require("react"), 1);
19036
19158
  function useRangeMonthSync(value) {
19037
- const isPreloadedRef = React66.useRef(false);
19038
- const [month, setMonth] = React66.useState(value?.from ?? /* @__PURE__ */ new Date());
19039
- React66.useEffect(() => {
19159
+ const isPreloadedRef = React67.useRef(false);
19160
+ const [month, setMonth] = React67.useState(value?.from ?? /* @__PURE__ */ new Date());
19161
+ React67.useEffect(() => {
19040
19162
  if (value?.from && !isPreloadedRef.current) {
19041
19163
  setMonth(value.from);
19042
19164
  isPreloadedRef.current = true;
19043
19165
  }
19044
19166
  }, [value?.from]);
19045
- const syncMonthToValue = React66.useCallback((next) => {
19167
+ const syncMonthToValue = React67.useCallback((next) => {
19046
19168
  isPreloadedRef.current = true;
19047
19169
  if (next?.from) setMonth(next.from);
19048
19170
  }, []);
19049
- const resetPreload = React66.useCallback(() => {
19171
+ const resetPreload = React67.useCallback(() => {
19050
19172
  isPreloadedRef.current = false;
19051
19173
  }, []);
19052
19174
  return { month, setMonth, syncMonthToValue, resetPreload };
@@ -19314,7 +19436,7 @@ function DateRangePopover({
19314
19436
 
19315
19437
  // src/fields/date-range-picker/DateRangePicker.tsx
19316
19438
  var import_jsx_runtime178 = require("react/jsx-runtime");
19317
- var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19439
+ var DateRangePicker = React68.forwardRef(function DateRangePicker2({
19318
19440
  label,
19319
19441
  value: externalValue,
19320
19442
  defaultValue,
@@ -19349,20 +19471,20 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19349
19471
  components: customComponents,
19350
19472
  ...dayPickerProps
19351
19473
  }, ref) {
19352
- const containerRef = React67.useRef(null);
19353
- const fromInputRef = React67.useRef(null);
19354
- const toInputRef = React67.useRef(null);
19355
- const reactId = React67.useId();
19474
+ const containerRef = React68.useRef(null);
19475
+ const fromInputRef = React68.useRef(null);
19476
+ const toInputRef = React68.useRef(null);
19477
+ const reactId = React68.useId();
19356
19478
  const baseId = name ?? `dash-daterange-${reactId}`;
19357
19479
  const fromId = `${baseId}-from`;
19358
19480
  const toId = `${baseId}-to`;
19359
19481
  const labelId = `${baseId}-label`;
19360
19482
  const errorId = `${baseId}-error`;
19361
- const normalizedValue = React67.useMemo(() => {
19483
+ const normalizedValue = React68.useMemo(() => {
19362
19484
  if (externalValue === void 0) return void 0;
19363
19485
  return { from: toDate(externalValue?.from), to: toDate(externalValue?.to) };
19364
19486
  }, [externalValue]);
19365
- const normalizedDefaultValue = React67.useMemo(() => {
19487
+ const normalizedDefaultValue = React68.useMemo(() => {
19366
19488
  if (defaultValue === void 0) return void 0;
19367
19489
  return { from: toDate(defaultValue?.from), to: toDate(defaultValue?.to) };
19368
19490
  }, [defaultValue]);
@@ -19372,16 +19494,16 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19372
19494
  onChange,
19373
19495
  name
19374
19496
  });
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(() => {
19497
+ const normalizedMinDate = React68.useMemo(() => toDate(minDate), [minDate]);
19498
+ const normalizedMaxDate = React68.useMemo(() => toDate(maxDate), [maxDate]);
19499
+ const formatter = React68.useMemo(() => formatDate(displayFormat), [displayFormat]);
19500
+ const parser = React68.useMemo(() => parseDate(displayFormat), [displayFormat]);
19501
+ const closeCalendarRef = React68.useRef(() => {
19380
19502
  });
19381
- const handleFromComplete = React67.useCallback(() => {
19503
+ const handleFromComplete = React68.useCallback(() => {
19382
19504
  toInputRef.current?.focus();
19383
19505
  }, []);
19384
- const handleToComplete = React67.useCallback(() => {
19506
+ const handleToComplete = React68.useCallback(() => {
19385
19507
  toInputRef.current?.blur();
19386
19508
  closeCalendarRef.current();
19387
19509
  }, []);
@@ -19405,9 +19527,9 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19405
19527
  onToComplete: handleToComplete
19406
19528
  });
19407
19529
  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);
19530
+ const [isOpen, setIsOpen] = React68.useState(false);
19531
+ const [focusedInput, setFocusedInput] = React68.useState(null);
19532
+ const [autoFocus, setAutoFocus] = React68.useState(false);
19411
19533
  const isMobile3 = useIsMobile();
19412
19534
  const { t } = (0, import_react_i18next39.useTranslation)();
19413
19535
  const drawerTitle = label ?? t("select_dates");
@@ -19418,14 +19540,14 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19418
19540
  const isFocused = focusedInput !== null || isOpen;
19419
19541
  const wrapperWidth = toCssSize(width);
19420
19542
  const monthsToShow = numberOfMonths ?? (isMobile3 ? 1 : 2);
19421
- const closeCalendar = React67.useCallback(() => {
19543
+ const closeCalendar = React68.useCallback(() => {
19422
19544
  setIsOpen(false);
19423
19545
  setFocusedInput(null);
19424
19546
  setAutoFocus(false);
19425
19547
  if (value?.from) setMonth(value.from);
19426
19548
  }, [setMonth, value?.from]);
19427
19549
  closeCalendarRef.current = closeCalendar;
19428
- const openCalendar = React67.useCallback(() => {
19550
+ const openCalendar = React68.useCallback(() => {
19429
19551
  if (isBlocked || readOnly) return;
19430
19552
  setIsOpen(true);
19431
19553
  }, [isBlocked, readOnly]);
@@ -19434,7 +19556,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19434
19556
  onOutsideClick: closeCalendar,
19435
19557
  isDisabled: !isOpen || isMobile3
19436
19558
  });
19437
- const handlePickerChange = React67.useCallback(
19559
+ const handlePickerChange = React68.useCallback(
19438
19560
  (range, pickedDate) => {
19439
19561
  const { next, shouldClose } = resolveRangeSelection({
19440
19562
  previous: value,
@@ -19455,7 +19577,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19455
19577
  setToText("");
19456
19578
  setMonth(/* @__PURE__ */ new Date());
19457
19579
  };
19458
- const disabledMatchers = React67.useMemo(
19580
+ const disabledMatchers = React68.useMemo(
19459
19581
  () => createDisabledMatchers({
19460
19582
  minDate: normalizedMinDate,
19461
19583
  maxDate: normalizedMaxDate,
@@ -19474,7 +19596,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19474
19596
  openCalendar();
19475
19597
  if (autoFocusOnOpen) setAutoFocus(true);
19476
19598
  };
19477
- React67.useImperativeHandle(
19599
+ React68.useImperativeHandle(
19478
19600
  ref,
19479
19601
  () => ({
19480
19602
  setDateRange: (range) => {
@@ -19655,7 +19777,7 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
19655
19777
  });
19656
19778
 
19657
19779
  // src/fields/date-range-picker/useValidateDates.ts
19658
- var React68 = __toESM(require("react"), 1);
19780
+ var React69 = __toESM(require("react"), 1);
19659
19781
  var import_react_i18next40 = require("react-i18next");
19660
19782
  var import_date_fns4 = require("date-fns");
19661
19783
  var import_react_day_picker2 = require("react-day-picker");
@@ -19678,11 +19800,11 @@ function useValidateDates({
19678
19800
  const { t } = (0, import_react_i18next40.useTranslation)();
19679
19801
  const handleError = useEvent(onError);
19680
19802
  const handleSuccess = useEvent(onSuccess);
19681
- const errorFormatter = React68.useMemo(
19803
+ const errorFormatter = React69.useMemo(
19682
19804
  () => formatDate(displayFormat ?? DEFAULT_DISPLAY_FORMAT),
19683
19805
  [displayFormat]
19684
19806
  );
19685
- const validateDates = React68.useCallback(
19807
+ const validateDates = React69.useCallback(
19686
19808
  (dates) => {
19687
19809
  const startDate = dates?.from;
19688
19810
  const endDate = dates?.to;
@@ -19732,7 +19854,7 @@ function useValidateDates({
19732
19854
  }
19733
19855
 
19734
19856
  // src/fields/time-picker/TimePicker.tsx
19735
- var React69 = __toESM(require("react"), 1);
19857
+ var React70 = __toESM(require("react"), 1);
19736
19858
  var import_date_fns5 = require("date-fns");
19737
19859
  var import_jsx_runtime179 = require("react/jsx-runtime");
19738
19860
  var SHORT_TIME_FORMAT = "HH:mm";
@@ -19776,8 +19898,8 @@ var FORMAT_SETTINGS = {
19776
19898
  },
19777
19899
  hours: { interval_unit: "H", interval: 1, min_time: "00:00", max_time: "23:00" }
19778
19900
  };
19779
- var TimePicker = React69.forwardRef(function TimePicker2({ format: formatName = "time", timeSettings, options, ...selectProps }, ref) {
19780
- const resolvedOptions = React69.useMemo(() => {
19901
+ var TimePicker = React70.forwardRef(function TimePicker2({ format: formatName = "time", timeSettings, options, ...selectProps }, ref) {
19902
+ const resolvedOptions = React70.useMemo(() => {
19781
19903
  if (options) return options;
19782
19904
  const settings = timeSettings ?? FORMAT_SETTINGS[formatName];
19783
19905
  return buildOptions(settings);
@@ -19786,14 +19908,14 @@ var TimePicker = React69.forwardRef(function TimePicker2({ format: formatName =
19786
19908
  });
19787
19909
 
19788
19910
  // src/fields/file-input/FileInput.tsx
19789
- var React70 = __toESM(require("react"), 1);
19911
+ var React71 = __toESM(require("react"), 1);
19790
19912
  var import_lucide_react52 = require("lucide-react");
19791
19913
  var import_react_i18next41 = require("react-i18next");
19792
19914
  var import_jsx_runtime180 = require("react/jsx-runtime");
19793
19915
  function defaultDownload(url) {
19794
19916
  window.open(url, "_blank", "noopener,noreferrer");
19795
19917
  }
19796
- var FileInput = React70.forwardRef(function FileInput2({
19918
+ var FileInput = React71.forwardRef(function FileInput2({
19797
19919
  label,
19798
19920
  value,
19799
19921
  onChange,
@@ -19816,12 +19938,12 @@ var FileInput = React70.forwardRef(function FileInput2({
19816
19938
  width,
19817
19939
  downloadLabel
19818
19940
  }, ref) {
19819
- const internalRef = React70.useRef(null);
19941
+ const internalRef = React71.useRef(null);
19820
19942
  const inputRef = useCombinedRef(ref, internalRef);
19821
19943
  const { t } = (0, import_react_i18next41.useTranslation)();
19822
19944
  const resolvedLabel = label ?? t("upload_file");
19823
19945
  const resolvedDownloadLabel = downloadLabel ?? t("download_attachment");
19824
- const reactId = React70.useId();
19946
+ const reactId = React71.useId();
19825
19947
  const inputId = `${name || "dash-file"}-${reactId}`;
19826
19948
  const labelId = `${inputId}-label`;
19827
19949
  const errorId = `${inputId}-error`;
@@ -19966,10 +20088,10 @@ var FileInput = React70.forwardRef(function FileInput2({
19966
20088
  });
19967
20089
 
19968
20090
  // src/fields/select-icons-box/SelectIconsBox.tsx
19969
- var React71 = __toESM(require("react"), 1);
20091
+ var React72 = __toESM(require("react"), 1);
19970
20092
  var import_jsx_runtime181 = require("react/jsx-runtime");
19971
20093
  var FOCUSABLE_TRIGGER_SELECTOR2 = 'input:not([type="hidden"]):not([disabled]):not([readonly]), button:not([disabled])';
19972
- var SelectIconsBox = React71.forwardRef(
20094
+ var SelectIconsBox = React72.forwardRef(
19973
20095
  function SelectIconsBox2({
19974
20096
  children,
19975
20097
  icons,
@@ -19985,10 +20107,10 @@ var SelectIconsBox = React71.forwardRef(
19985
20107
  className,
19986
20108
  boxClassName
19987
20109
  }, ref) {
19988
- const containerRef = React71.useRef(null);
20110
+ const containerRef = React72.useRef(null);
19989
20111
  const combinedContainerRef = useCombinedRef(containerRef, ref);
19990
20112
  const isControlled = controlledOpen !== void 0;
19991
- const [internalOpen, setInternalOpen] = React71.useState(defaultOpen);
20113
+ const [internalOpen, setInternalOpen] = React72.useState(defaultOpen);
19992
20114
  const isOpen = isControlled ? controlledOpen : internalOpen;
19993
20115
  const setOpen = (next) => {
19994
20116
  if (!isControlled) setInternalOpen(next);
@@ -20181,15 +20303,40 @@ var LegacyTextarea = (0, import_react89.forwardRef)(
20181
20303
  LegacyTextarea.displayName = "LegacyTextarea";
20182
20304
 
20183
20305
  // src/airbnb-fields/datepicker/DatePicker.tsx
20184
- var React73 = __toESM(require("react"), 1);
20306
+ var React74 = __toESM(require("react"), 1);
20185
20307
  var import_lucide_react54 = require("lucide-react");
20186
20308
 
20187
20309
  // src/airbnb-fields/field-trigger/FieldTrigger.tsx
20188
- var React72 = __toESM(require("react"), 1);
20310
+ var React73 = __toESM(require("react"), 1);
20189
20311
  var import_lucide_react53 = require("lucide-react");
20190
20312
  var import_react_i18next42 = require("react-i18next");
20313
+
20314
+ // src/airbnb-fields/field-helper-text/FieldHelperText.tsx
20191
20315
  var import_jsx_runtime184 = require("react/jsx-runtime");
20192
- var AirbnbFieldTrigger = React72.forwardRef(
20316
+ function AirbnbFieldHelperText({
20317
+ id,
20318
+ helper,
20319
+ disabled,
20320
+ className
20321
+ }) {
20322
+ if (!helper) return null;
20323
+ return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20324
+ "p",
20325
+ {
20326
+ id,
20327
+ className: cn(
20328
+ "mt-2 text-[12px] font-normal leading-5 text-[var(--chekin-airbnb-gray-text)]",
20329
+ disabled && "opacity-50",
20330
+ className
20331
+ ),
20332
+ children: helper
20333
+ }
20334
+ );
20335
+ }
20336
+
20337
+ // src/airbnb-fields/field-trigger/FieldTrigger.tsx
20338
+ var import_jsx_runtime185 = require("react/jsx-runtime");
20339
+ var AirbnbFieldTrigger = React73.forwardRef(
20193
20340
  ({
20194
20341
  as = "button",
20195
20342
  id,
@@ -20202,6 +20349,7 @@ var AirbnbFieldTrigger = React72.forwardRef(
20202
20349
  labelText,
20203
20350
  valueText,
20204
20351
  placeholder,
20352
+ helper,
20205
20353
  disabled,
20206
20354
  error,
20207
20355
  loading,
@@ -20220,19 +20368,20 @@ var AirbnbFieldTrigger = React72.forwardRef(
20220
20368
  ...props
20221
20369
  }, ref) => {
20222
20370
  const { t } = (0, import_react_i18next42.useTranslation)();
20371
+ const generatedHelperId = React73.useId();
20223
20372
  const hasValue = Boolean(valueText);
20224
20373
  const isRaised = hasValue || forceFloatingLabel;
20225
20374
  const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
20226
20375
  const visibleLabelText = labelText ?? label;
20227
20376
  const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
20228
- const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
20229
- /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
20230
- optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("span", { className: "text-current opacity-70 lowercase", children: [
20377
+ const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
20378
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
20379
+ optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("span", { className: "text-current opacity-70 lowercase", children: [
20231
20380
  "(",
20232
20381
  optionalLabel,
20233
20382
  ")"
20234
20383
  ] }),
20235
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20384
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20236
20385
  HelpTooltip,
20237
20386
  {
20238
20387
  content: tooltip,
@@ -20246,10 +20395,14 @@ var AirbnbFieldTrigger = React72.forwardRef(
20246
20395
  const animatedLabel = forceLabelText ? resolvedLabelText ?? placeholder : isRaised ? resolvedLabelText : label ?? placeholder;
20247
20396
  const hasInvalidState = Boolean(error);
20248
20397
  const errorMessage = typeof error === "string" ? error : void 0;
20398
+ const showErrorMessage = Boolean(errorMessage) && !hideErrorMessage;
20399
+ const showHelper = Boolean(helper) && !showErrorMessage;
20400
+ const helperId = helper ? generatedHelperId : void 0;
20401
+ const describedByValue = [describedBy, showHelper ? helperId : void 0].filter(Boolean).join(" ") || void 0;
20249
20402
  const isBlocked = Boolean(disabled) || Boolean(loading);
20250
- const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("span", { className: "flex items-center gap-2", children: [
20403
+ const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("span", { className: "flex items-center gap-2", children: [
20251
20404
  trailingAdornment,
20252
- loading && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20405
+ loading && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20253
20406
  import_lucide_react53.Loader2,
20254
20407
  {
20255
20408
  "aria-hidden": "true",
@@ -20265,8 +20418,8 @@ var AirbnbFieldTrigger = React72.forwardRef(
20265
20418
  disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : "cursor-pointer",
20266
20419
  className
20267
20420
  );
20268
- const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(import_jsx_runtime184.Fragment, { children: [
20269
- /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(
20421
+ const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_jsx_runtime185.Fragment, { children: [
20422
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
20270
20423
  "span",
20271
20424
  {
20272
20425
  className: cn(
@@ -20275,7 +20428,7 @@ var AirbnbFieldTrigger = React72.forwardRef(
20275
20428
  contentClassName
20276
20429
  ),
20277
20430
  children: [
20278
- /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20431
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20279
20432
  "span",
20280
20433
  {
20281
20434
  id: labelId,
@@ -20288,7 +20441,7 @@ var AirbnbFieldTrigger = React72.forwardRef(
20288
20441
  children: animatedLabel
20289
20442
  }
20290
20443
  ),
20291
- children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20444
+ children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20292
20445
  "span",
20293
20446
  {
20294
20447
  id: valueId,
@@ -20299,11 +20452,11 @@ var AirbnbFieldTrigger = React72.forwardRef(
20299
20452
  ),
20300
20453
  children: valueText
20301
20454
  }
20302
- ) : /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
20455
+ ) : /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
20303
20456
  ]
20304
20457
  }
20305
20458
  ),
20306
- resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20459
+ resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20307
20460
  "span",
20308
20461
  {
20309
20462
  "aria-hidden": "true",
@@ -20312,16 +20465,16 @@ var AirbnbFieldTrigger = React72.forwardRef(
20312
20465
  }
20313
20466
  )
20314
20467
  ] });
20315
- return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("div", { className: "w-full", children: [
20316
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[var(--chekin-airbnb-ink-strong)]", children: topLabel }),
20317
- as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20468
+ return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: "w-full", children: [
20469
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[var(--chekin-airbnb-ink-strong)]", children: topLabel }),
20470
+ as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20318
20471
  "button",
20319
20472
  {
20320
20473
  id,
20321
20474
  ref,
20322
20475
  type: "button",
20323
20476
  "aria-labelledby": hasValue && valueId ? `${labelId} ${valueId}` : labelId,
20324
- "aria-describedby": describedBy,
20477
+ "aria-describedby": describedByValue,
20325
20478
  "aria-invalid": hasInvalidState,
20326
20479
  "aria-busy": loading,
20327
20480
  disabled: isBlocked,
@@ -20331,13 +20484,13 @@ var AirbnbFieldTrigger = React72.forwardRef(
20331
20484
  ...props,
20332
20485
  children: sharedContent
20333
20486
  }
20334
- ) : /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20487
+ ) : /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20335
20488
  "div",
20336
20489
  {
20337
20490
  id,
20338
20491
  ref,
20339
20492
  "aria-labelledby": hasValue && valueId ? `${labelId} ${valueId}` : labelId,
20340
- "aria-describedby": describedBy,
20493
+ "aria-describedby": describedByValue,
20341
20494
  "aria-invalid": hasInvalidState,
20342
20495
  "aria-busy": loading,
20343
20496
  "aria-disabled": isBlocked,
@@ -20348,16 +20501,17 @@ var AirbnbFieldTrigger = React72.forwardRef(
20348
20501
  children: sharedContent
20349
20502
  }
20350
20503
  ),
20351
- errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage })
20504
+ showErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage }),
20505
+ showHelper && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(AirbnbFieldHelperText, { id: helperId, helper, disabled })
20352
20506
  ] });
20353
20507
  }
20354
20508
  );
20355
20509
  AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
20356
20510
 
20357
20511
  // src/airbnb-fields/datepicker/DatePicker.tsx
20358
- var import_jsx_runtime185 = require("react/jsx-runtime");
20512
+ var import_jsx_runtime186 = require("react/jsx-runtime");
20359
20513
  var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
20360
- var AirbnbDatePicker = React73.forwardRef(
20514
+ var AirbnbDatePicker = React74.forwardRef(
20361
20515
  ({
20362
20516
  label,
20363
20517
  topLabel,
@@ -20372,6 +20526,7 @@ var AirbnbDatePicker = React73.forwardRef(
20372
20526
  loading,
20373
20527
  optional,
20374
20528
  tooltip,
20529
+ helper,
20375
20530
  className,
20376
20531
  name,
20377
20532
  minDate,
@@ -20382,24 +20537,24 @@ var AirbnbDatePicker = React73.forwardRef(
20382
20537
  formatValue = formatDateValue
20383
20538
  }, ref) => {
20384
20539
  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);
20540
+ const [isOpen, setIsOpen] = React74.useState(false);
20541
+ const triggerId = React74.useId();
20542
+ const pickerId = React74.useId();
20543
+ const labelId = React74.useId();
20544
+ const valueId = React74.useId();
20545
+ const helperTextId = React74.useId();
20546
+ const errorId = React74.useId();
20547
+ const internalRef = React74.useRef(null);
20393
20548
  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(
20549
+ const monthLabels = React74.useMemo(() => getMonthLabels(locale), [locale]);
20550
+ const resolvedMinDate = React74.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
20551
+ const resolvedMaxDate = React74.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
20552
+ const normalizedValue = React74.useMemo(() => normalizeDateValue(value), [value]);
20553
+ const normalizedDefaultValue = React74.useMemo(
20399
20554
  () => normalizeDateValue(defaultValue),
20400
20555
  [defaultValue]
20401
20556
  );
20402
- const resolvedValue = React73.useMemo(
20557
+ const resolvedValue = React74.useMemo(
20403
20558
  () => normalizedValue ? clampDate(normalizedValue, resolvedMinDate, resolvedMaxDate) : null,
20404
20559
  [normalizedValue, resolvedMaxDate, resolvedMinDate]
20405
20560
  );
@@ -20430,7 +20585,7 @@ var AirbnbDatePicker = React73.forwardRef(
20430
20585
  minDate: resolvedMinDate,
20431
20586
  maxDate: resolvedMaxDate
20432
20587
  });
20433
- const handleOpenChange = React73.useCallback(
20588
+ const handleOpenChange = React74.useCallback(
20434
20589
  (nextOpen) => {
20435
20590
  if (isBlocked && nextOpen) return;
20436
20591
  setIsOpen(nextOpen);
@@ -20440,7 +20595,7 @@ var AirbnbDatePicker = React73.forwardRef(
20440
20595
  },
20441
20596
  [isBlocked]
20442
20597
  );
20443
- const handleDone = React73.useCallback(() => {
20598
+ const handleDone = React74.useCallback(() => {
20444
20599
  if (isBlocked) return;
20445
20600
  onChange(clampDate(draftDate, resolvedMinDate, resolvedMaxDate));
20446
20601
  handleOpenChange(false);
@@ -20452,11 +20607,11 @@ var AirbnbDatePicker = React73.forwardRef(
20452
20607
  resolvedMaxDate,
20453
20608
  resolvedMinDate
20454
20609
  ]);
20455
- const handleTriggerClick = React73.useCallback(() => {
20610
+ const handleTriggerClick = React74.useCallback(() => {
20456
20611
  if (isBlocked) return;
20457
20612
  setIsOpen(true);
20458
20613
  }, [isBlocked]);
20459
- const handleTriggerKeyDown = React73.useCallback(
20614
+ const handleTriggerKeyDown = React74.useCallback(
20460
20615
  (event) => {
20461
20616
  if (isBlocked) return;
20462
20617
  if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
@@ -20466,13 +20621,13 @@ var AirbnbDatePicker = React73.forwardRef(
20466
20621
  },
20467
20622
  [isBlocked]
20468
20623
  );
20469
- React73.useEffect(() => {
20624
+ React74.useEffect(() => {
20470
20625
  if (isBlocked) {
20471
20626
  setIsOpen(false);
20472
20627
  }
20473
20628
  }, [isBlocked]);
20474
- return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
20475
- name && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20629
+ return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
20630
+ name && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20476
20631
  "input",
20477
20632
  {
20478
20633
  type: "hidden",
@@ -20480,7 +20635,7 @@ var AirbnbDatePicker = React73.forwardRef(
20480
20635
  value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
20481
20636
  }
20482
20637
  ),
20483
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20638
+ /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20484
20639
  AirbnbFieldTrigger,
20485
20640
  {
20486
20641
  id: triggerId,
@@ -20500,13 +20655,14 @@ var AirbnbDatePicker = React73.forwardRef(
20500
20655
  loading,
20501
20656
  optional,
20502
20657
  tooltip,
20658
+ helper,
20503
20659
  forceLabelText: Boolean(optional) || Boolean(tooltip),
20504
20660
  "aria-haspopup": "dialog",
20505
20661
  "aria-expanded": isOpen,
20506
20662
  onClick: handleTriggerClick,
20507
20663
  onKeyDown: handleTriggerKeyDown,
20508
20664
  onBlur,
20509
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20665
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20510
20666
  import_lucide_react54.Calendar,
20511
20667
  {
20512
20668
  className: "h-5 w-5 text-[var(--chekin-airbnb-ink)]",
@@ -20515,7 +20671,7 @@ var AirbnbDatePicker = React73.forwardRef(
20515
20671
  )
20516
20672
  }
20517
20673
  ),
20518
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20674
+ /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20519
20675
  AirbnbDatePickerContent,
20520
20676
  {
20521
20677
  baseId: pickerId,
@@ -20549,16 +20705,17 @@ var AirbnbDatePicker = React73.forwardRef(
20549
20705
  AirbnbDatePicker.displayName = "AirbnbDatePicker";
20550
20706
 
20551
20707
  // src/airbnb-fields/input/Input.tsx
20552
- var React74 = __toESM(require("react"), 1);
20708
+ var React75 = __toESM(require("react"), 1);
20553
20709
  var import_lucide_react55 = require("lucide-react");
20554
20710
  var import_react_i18next43 = require("react-i18next");
20555
- var import_jsx_runtime186 = require("react/jsx-runtime");
20711
+ var import_jsx_runtime187 = require("react/jsx-runtime");
20556
20712
  var getInputValue = (value) => value != null ? String(value) : "";
20557
- var AirbnbInput = React74.forwardRef(
20713
+ var AirbnbInput = React75.forwardRef(
20558
20714
  ({
20559
20715
  label,
20560
20716
  topLabel,
20561
20717
  helperText,
20718
+ helper,
20562
20719
  error,
20563
20720
  invalid,
20564
20721
  loading,
@@ -20583,16 +20740,16 @@ var AirbnbInput = React74.forwardRef(
20583
20740
  ...props
20584
20741
  }, ref) => {
20585
20742
  const { t } = (0, import_react_i18next43.useTranslation)();
20586
- const generatedId = React74.useId();
20587
- const inputRef = React74.useRef(null);
20743
+ const generatedId = React75.useId();
20744
+ const inputRef = React75.useRef(null);
20588
20745
  const inputId = id ?? generatedId;
20589
20746
  const fieldId = `${inputId}-field`;
20590
20747
  const labelId = `${inputId}-label`;
20591
20748
  const errorId = `${inputId}-error`;
20592
20749
  const accessibleLabel = placeholder ?? label;
20593
- const [isFocused, setIsFocused] = React74.useState(false);
20594
- const [isPasswordRevealed, setIsPasswordRevealed] = React74.useState(false);
20595
- const [currentValue, setCurrentValue] = React74.useState(
20750
+ const [isFocused, setIsFocused] = React75.useState(false);
20751
+ const [isPasswordRevealed, setIsPasswordRevealed] = React75.useState(false);
20752
+ const [currentValue, setCurrentValue] = React75.useState(
20596
20753
  () => value != null ? getInputValue(value) : getInputValue(defaultValue)
20597
20754
  );
20598
20755
  const resolvedValue = value != null ? getInputValue(value) : currentValue;
@@ -20605,16 +20762,16 @@ var AirbnbInput = React74.forwardRef(
20605
20762
  const triggerError = error ?? invalid;
20606
20763
  const hasLabelMeta = Boolean(optional) || Boolean(tooltip);
20607
20764
  const isBlocked = Boolean(disabled) || Boolean(loading);
20608
- React74.useLayoutEffect(() => {
20765
+ React75.useLayoutEffect(() => {
20609
20766
  const nextValue = value != null ? getInputValue(value) : getInputValue(inputRef.current?.value);
20610
20767
  setCurrentValue((prevValue) => prevValue === nextValue ? prevValue : nextValue);
20611
20768
  }, [value]);
20612
- React74.useEffect(() => {
20769
+ React75.useEffect(() => {
20613
20770
  if (!isPasswordInput) {
20614
20771
  setIsPasswordRevealed(false);
20615
20772
  }
20616
20773
  }, [isPasswordInput]);
20617
- const setRefs = React74.useCallback(
20774
+ const setRefs = React75.useCallback(
20618
20775
  (node) => {
20619
20776
  inputRef.current = node;
20620
20777
  if (node && value == null) {
@@ -20647,7 +20804,13 @@ var AirbnbInput = React74.forwardRef(
20647
20804
  const togglePasswordReveal = () => {
20648
20805
  setIsPasswordRevealed((isRevealed) => !isRevealed);
20649
20806
  };
20650
- 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)(
20807
+ const focusInput = () => {
20808
+ if (isBlocked) {
20809
+ return;
20810
+ }
20811
+ inputRef.current?.focus();
20812
+ };
20813
+ return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
20651
20814
  AirbnbFieldTrigger,
20652
20815
  {
20653
20816
  as: "div",
@@ -20659,11 +20822,13 @@ var AirbnbInput = React74.forwardRef(
20659
20822
  errorId: error ? errorId : void 0,
20660
20823
  labelText: helperText ?? label,
20661
20824
  placeholder: placeholder ?? label,
20825
+ helper,
20662
20826
  disabled,
20663
20827
  error: triggerError,
20664
20828
  loading,
20665
20829
  optional,
20666
20830
  tooltip,
20831
+ onClick: focusInput,
20667
20832
  describedBy: error && renderErrorMessage ? errorId : void 0,
20668
20833
  className: cn(
20669
20834
  "px-4 focus-within:ring-2 focus-within:ring-[var(--chekin-airbnb-ink)] focus-within:ring-offset-2",
@@ -20676,7 +20841,7 @@ var AirbnbInput = React74.forwardRef(
20676
20841
  forceLabelText: hasLabelMeta,
20677
20842
  hideErrorMessage: !renderErrorMessage,
20678
20843
  children: [
20679
- /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20844
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20680
20845
  "input",
20681
20846
  {
20682
20847
  ...props,
@@ -20706,7 +20871,7 @@ var AirbnbInput = React74.forwardRef(
20706
20871
  )
20707
20872
  }
20708
20873
  ),
20709
- shouldShowPasswordReveal && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20874
+ shouldShowPasswordReveal && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20710
20875
  "button",
20711
20876
  {
20712
20877
  type: "button",
@@ -20714,7 +20879,7 @@ var AirbnbInput = React74.forwardRef(
20714
20879
  disabled: isBlocked,
20715
20880
  className: "absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center border-0 bg-transparent p-0 text-[var(--chekin-airbnb-gray-cool)] hover:text-[var(--chekin-airbnb-ink)] hover:opacity-85 disabled:cursor-not-allowed disabled:opacity-50",
20716
20881
  "aria-label": isPasswordRevealed ? t("hide_password") : t("show_password"),
20717
- children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20882
+ children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20718
20883
  import_lucide_react55.Eye,
20719
20884
  {
20720
20885
  size: 18,
@@ -20734,14 +20899,14 @@ var AirbnbInput = React74.forwardRef(
20734
20899
  AirbnbInput.displayName = "AirbnbInput";
20735
20900
 
20736
20901
  // src/airbnb-fields/phone-field/PhoneField.tsx
20737
- var React80 = __toESM(require("react"), 1);
20902
+ var React81 = __toESM(require("react"), 1);
20738
20903
  var import_lucide_react57 = require("lucide-react");
20739
20904
 
20740
20905
  // src/airbnb-fields/select/Select.tsx
20741
- var React79 = __toESM(require("react"), 1);
20906
+ var React80 = __toESM(require("react"), 1);
20742
20907
 
20743
20908
  // src/airbnb-fields/select/SelectDesktopMenu.tsx
20744
- var import_jsx_runtime187 = require("react/jsx-runtime");
20909
+ var import_jsx_runtime188 = require("react/jsx-runtime");
20745
20910
  function AirbnbSelectDesktopMenu({
20746
20911
  id,
20747
20912
  options,
@@ -20760,7 +20925,7 @@ function AirbnbSelectDesktopMenu({
20760
20925
  noOptionsMessage
20761
20926
  }) {
20762
20927
  const emptyMessage = noOptionsMessage?.();
20763
- return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
20928
+ return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(
20764
20929
  "div",
20765
20930
  {
20766
20931
  id,
@@ -20773,12 +20938,12 @@ function AirbnbSelectDesktopMenu({
20773
20938
  onKeyDown,
20774
20939
  className: cn("max-h-[280px] overflow-y-auto p-2 outline-none", menuClassName),
20775
20940
  children: [
20776
- options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
20941
+ options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
20777
20942
  options.map((option, index) => {
20778
20943
  const isSelected = selectedValue?.value === option.value;
20779
20944
  const isHighlighted = index === highlightedIndex;
20780
20945
  const optionKey = `${String(option.value)}-${index}`;
20781
- return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20946
+ return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
20782
20947
  "button",
20783
20948
  {
20784
20949
  id: getOptionId2(index),
@@ -20810,7 +20975,7 @@ function AirbnbSelectDesktopMenu({
20810
20975
  }
20811
20976
 
20812
20977
  // src/airbnb-fields/select/SelectDesktopContent.tsx
20813
- var import_jsx_runtime188 = require("react/jsx-runtime");
20978
+ var import_jsx_runtime189 = require("react/jsx-runtime");
20814
20979
  function AirbnbSelectDesktopContent({
20815
20980
  isOpen,
20816
20981
  listboxId,
@@ -20831,14 +20996,14 @@ function AirbnbSelectDesktopContent({
20831
20996
  noOptionsMessage
20832
20997
  }) {
20833
20998
  if (!isOpen) return null;
20834
- return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
20999
+ return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
20835
21000
  "div",
20836
21001
  {
20837
21002
  className: cn(
20838
21003
  "absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[var(--chekin-airbnb-border)] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
20839
21004
  dropdownClassName
20840
21005
  ),
20841
- children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
21006
+ children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
20842
21007
  AirbnbSelectDesktopMenu,
20843
21008
  {
20844
21009
  id: listboxId,
@@ -20936,7 +21101,7 @@ function getMobileOptionStyles(index, scrollTop) {
20936
21101
  }
20937
21102
 
20938
21103
  // src/airbnb-fields/select/SelectMobileWheel.tsx
20939
- var import_jsx_runtime189 = require("react/jsx-runtime");
21104
+ var import_jsx_runtime190 = require("react/jsx-runtime");
20940
21105
  function AirbnbSelectMobileWheel({
20941
21106
  id,
20942
21107
  options,
@@ -20955,7 +21120,7 @@ function AirbnbSelectMobileWheel({
20955
21120
  }) {
20956
21121
  const spacerHeight2 = getWheelSpacerHeight();
20957
21122
  const emptyMessage = noOptionsMessage?.();
20958
- return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
21123
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
20959
21124
  "div",
20960
21125
  {
20961
21126
  id,
@@ -20967,10 +21132,10 @@ function AirbnbSelectMobileWheel({
20967
21132
  onKeyDown,
20968
21133
  className: cn("relative overflow-hidden outline-none", menuClassName),
20969
21134
  children: [
20970
- options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
20971
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
20972
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
20973
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
21135
+ options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
21136
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
21137
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
21138
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
20974
21139
  "div",
20975
21140
  {
20976
21141
  "aria-hidden": true,
@@ -20980,7 +21145,7 @@ function AirbnbSelectMobileWheel({
20980
21145
  )
20981
21146
  }
20982
21147
  ),
20983
- /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
21148
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
20984
21149
  "div",
20985
21150
  {
20986
21151
  ref: listRef,
@@ -20995,11 +21160,11 @@ function AirbnbSelectMobileWheel({
20995
21160
  WebkitOverflowScrolling: "touch"
20996
21161
  },
20997
21162
  children: [
20998
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
21163
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
20999
21164
  options.map((option, index) => {
21000
21165
  const { distance, style } = getMobileOptionStyles(index, scrollTop);
21001
21166
  const optionKey = `${String(option.value)}-${index}`;
21002
- return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
21167
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
21003
21168
  "button",
21004
21169
  {
21005
21170
  id: getOptionId2(index),
@@ -21020,7 +21185,7 @@ function AirbnbSelectMobileWheel({
21020
21185
  optionKey
21021
21186
  );
21022
21187
  }),
21023
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { style: { height: `${spacerHeight2}px` } })
21188
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { style: { height: `${spacerHeight2}px` } })
21024
21189
  ]
21025
21190
  }
21026
21191
  )
@@ -21030,7 +21195,7 @@ function AirbnbSelectMobileWheel({
21030
21195
  }
21031
21196
 
21032
21197
  // src/airbnb-fields/select/SelectMobileContent.tsx
21033
- var import_jsx_runtime190 = require("react/jsx-runtime");
21198
+ var import_jsx_runtime191 = require("react/jsx-runtime");
21034
21199
  function AirbnbSelectMobileContent({
21035
21200
  open,
21036
21201
  onOpenChange,
@@ -21054,11 +21219,11 @@ function AirbnbSelectMobileContent({
21054
21219
  getOptionId: getOptionId2,
21055
21220
  noOptionsMessage
21056
21221
  }) {
21057
- return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
21058
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
21059
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(DrawerDescription, { className: "sr-only", children: label }),
21060
- /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
21061
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
21222
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
21223
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
21224
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(DrawerDescription, { className: "sr-only", children: label }),
21225
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
21226
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21062
21227
  AirbnbSelectMobileWheel,
21063
21228
  {
21064
21229
  id: listboxId,
@@ -21077,16 +21242,16 @@ function AirbnbSelectMobileContent({
21077
21242
  noOptionsMessage
21078
21243
  }
21079
21244
  ),
21080
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
21245
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
21081
21246
  ] })
21082
21247
  ] }) });
21083
21248
  }
21084
21249
 
21085
21250
  // src/airbnb-fields/select/SelectTrigger.tsx
21086
- var React75 = __toESM(require("react"), 1);
21251
+ var React76 = __toESM(require("react"), 1);
21087
21252
  var import_lucide_react56 = require("lucide-react");
21088
- var import_jsx_runtime191 = require("react/jsx-runtime");
21089
- var AirbnbSelectTrigger = React75.forwardRef(
21253
+ var import_jsx_runtime192 = require("react/jsx-runtime");
21254
+ var AirbnbSelectTrigger = React76.forwardRef(
21090
21255
  ({
21091
21256
  id,
21092
21257
  open,
@@ -21098,6 +21263,7 @@ var AirbnbSelectTrigger = React75.forwardRef(
21098
21263
  loading,
21099
21264
  optional,
21100
21265
  tooltip,
21266
+ helper,
21101
21267
  error,
21102
21268
  hideErrorMessage,
21103
21269
  labelId,
@@ -21110,7 +21276,7 @@ var AirbnbSelectTrigger = React75.forwardRef(
21110
21276
  onKeyDown,
21111
21277
  onBlur
21112
21278
  }, ref) => {
21113
- return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21279
+ return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21114
21280
  AirbnbFieldTrigger,
21115
21281
  {
21116
21282
  id,
@@ -21132,15 +21298,17 @@ var AirbnbSelectTrigger = React75.forwardRef(
21132
21298
  loading,
21133
21299
  optional,
21134
21300
  tooltip,
21301
+ helper,
21135
21302
  forceLabelText: Boolean(optional) || Boolean(tooltip),
21136
21303
  hideErrorMessage,
21137
21304
  disabled,
21138
21305
  onClick,
21139
21306
  onKeyDown,
21140
21307
  onBlur,
21141
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21308
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21142
21309
  import_lucide_react56.ChevronDown,
21143
21310
  {
21311
+ strokeWidth: "1.5",
21144
21312
  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
21313
  }
21146
21314
  )
@@ -21151,7 +21319,7 @@ var AirbnbSelectTrigger = React75.forwardRef(
21151
21319
  AirbnbSelectTrigger.displayName = "AirbnbSelectTrigger";
21152
21320
 
21153
21321
  // src/airbnb-fields/select/useDesktopSelect.ts
21154
- var React76 = __toESM(require("react"), 1);
21322
+ var React77 = __toESM(require("react"), 1);
21155
21323
  function useDesktopSelect({
21156
21324
  isMobile: isMobile3,
21157
21325
  isOpen,
@@ -21160,12 +21328,12 @@ function useDesktopSelect({
21160
21328
  disabled,
21161
21329
  onChange
21162
21330
  }) {
21163
- const [highlightedIndex, setHighlightedIndex] = React76.useState(-1);
21164
- const triggerRef = React76.useRef(null);
21165
- const listRef = React76.useRef(null);
21166
- const optionRefs = React76.useRef([]);
21331
+ const [highlightedIndex, setHighlightedIndex] = React77.useState(-1);
21332
+ const triggerRef = React77.useRef(null);
21333
+ const listRef = React77.useRef(null);
21334
+ const optionRefs = React77.useRef([]);
21167
21335
  const selectedIndex = getOptionIndex2(options, value);
21168
- React76.useEffect(() => {
21336
+ React77.useEffect(() => {
21169
21337
  if (!isOpen || isMobile3) return;
21170
21338
  setHighlightedIndex((currentIndex) => {
21171
21339
  if (currentIndex >= 0) {
@@ -21180,34 +21348,34 @@ function useDesktopSelect({
21180
21348
  window.cancelAnimationFrame(frameId);
21181
21349
  };
21182
21350
  }, [isMobile3, isOpen, options, selectedIndex]);
21183
- React76.useEffect(() => {
21351
+ React77.useEffect(() => {
21184
21352
  if (!isOpen || isMobile3 || highlightedIndex < 0) return;
21185
21353
  optionRefs.current[highlightedIndex]?.scrollIntoView({
21186
21354
  block: "nearest"
21187
21355
  });
21188
21356
  }, [highlightedIndex, isMobile3, isOpen]);
21189
- React76.useEffect(() => {
21357
+ React77.useEffect(() => {
21190
21358
  if (isOpen) return;
21191
21359
  setHighlightedIndex(-1);
21192
21360
  }, [isOpen]);
21193
- const focusTrigger = React76.useCallback(() => {
21361
+ const focusTrigger = React77.useCallback(() => {
21194
21362
  triggerRef.current?.focus();
21195
21363
  }, []);
21196
- const handleSelect = React76.useCallback(
21364
+ const handleSelect = React77.useCallback(
21197
21365
  (option) => {
21198
21366
  if (option.isDisabled || disabled) return;
21199
21367
  onChange?.(option);
21200
21368
  },
21201
21369
  [disabled, onChange]
21202
21370
  );
21203
- const openMenu = React76.useCallback(
21371
+ const openMenu = React77.useCallback(
21204
21372
  (targetIndex) => {
21205
21373
  const fallbackIndex = selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex2(options);
21206
21374
  setHighlightedIndex(targetIndex ?? fallbackIndex);
21207
21375
  },
21208
21376
  [options, selectedIndex]
21209
21377
  );
21210
- const handleTriggerKeyDown = React76.useCallback(
21378
+ const handleTriggerKeyDown = React77.useCallback(
21211
21379
  (event, onOpen) => {
21212
21380
  if (disabled) return;
21213
21381
  if (event.key === "ArrowDown") {
@@ -21232,7 +21400,7 @@ function useDesktopSelect({
21232
21400
  },
21233
21401
  [disabled, openMenu, options, selectedIndex]
21234
21402
  );
21235
- const handleMenuKeyDown = React76.useCallback(
21403
+ const handleMenuKeyDown = React77.useCallback(
21236
21404
  (event, onClose) => {
21237
21405
  if (event.key === "Escape") {
21238
21406
  event.preventDefault();
@@ -21282,7 +21450,7 @@ function useDesktopSelect({
21282
21450
  },
21283
21451
  [focusTrigger, highlightedIndex, onChange, options]
21284
21452
  );
21285
- const setOptionRef = React76.useCallback(
21453
+ const setOptionRef = React77.useCallback(
21286
21454
  (index, node) => {
21287
21455
  optionRefs.current[index] = node;
21288
21456
  },
@@ -21302,23 +21470,23 @@ function useDesktopSelect({
21302
21470
  }
21303
21471
 
21304
21472
  // src/airbnb-fields/select/useMobileSelectWheel.ts
21305
- var React77 = __toESM(require("react"), 1);
21473
+ var React78 = __toESM(require("react"), 1);
21306
21474
  function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, disabled }) {
21307
- const [pendingValue, setPendingValue] = React77.useState(
21475
+ const [pendingValue, setPendingValue] = React78.useState(
21308
21476
  value ?? null
21309
21477
  );
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(
21478
+ const [mobileScrollTop, setMobileScrollTop] = React78.useState(0);
21479
+ const mobileListRef = React78.useRef(null);
21480
+ const scrollSettleTimeoutRef = React78.useRef(null);
21481
+ const scrollAnimationFrameRef = React78.useRef(null);
21482
+ const getTargetIndex = React78.useCallback(
21315
21483
  (targetValue) => {
21316
21484
  const selectedIndex = getOptionIndex2(options, targetValue);
21317
21485
  return selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex2(options);
21318
21486
  },
21319
21487
  [options]
21320
21488
  );
21321
- const syncScrollPosition = React77.useCallback(
21489
+ const syncScrollPosition = React78.useCallback(
21322
21490
  (targetValue, behavior = "instant") => {
21323
21491
  const targetIndex = getTargetIndex(targetValue);
21324
21492
  if (targetIndex < 0) return;
@@ -21337,27 +21505,27 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21337
21505
  },
21338
21506
  [getTargetIndex, options]
21339
21507
  );
21340
- const clearScrollSettleTimeout = React77.useCallback(() => {
21508
+ const clearScrollSettleTimeout = React78.useCallback(() => {
21341
21509
  if (scrollSettleTimeoutRef.current === null) return;
21342
21510
  window.clearTimeout(scrollSettleTimeoutRef.current);
21343
21511
  scrollSettleTimeoutRef.current = null;
21344
21512
  }, []);
21345
- const clearScrollAnimationFrame = React77.useCallback(() => {
21513
+ const clearScrollAnimationFrame = React78.useCallback(() => {
21346
21514
  if (scrollAnimationFrameRef.current === null) return;
21347
21515
  window.cancelAnimationFrame(scrollAnimationFrameRef.current);
21348
21516
  scrollAnimationFrameRef.current = null;
21349
21517
  }, []);
21350
- React77.useEffect(
21518
+ React78.useEffect(
21351
21519
  () => () => {
21352
21520
  clearScrollSettleTimeout();
21353
21521
  clearScrollAnimationFrame();
21354
21522
  },
21355
21523
  [clearScrollAnimationFrame, clearScrollSettleTimeout]
21356
21524
  );
21357
- React77.useEffect(() => {
21525
+ React78.useEffect(() => {
21358
21526
  setPendingValue(value ?? null);
21359
21527
  }, [value]);
21360
- React77.useLayoutEffect(() => {
21528
+ React78.useLayoutEffect(() => {
21361
21529
  if (!isMobile3 || !isOpen) return;
21362
21530
  const frameId = window.requestAnimationFrame(() => {
21363
21531
  syncScrollPosition(value ?? null, "instant");
@@ -21366,7 +21534,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21366
21534
  window.cancelAnimationFrame(frameId);
21367
21535
  };
21368
21536
  }, [isMobile3, isOpen, syncScrollPosition, value]);
21369
- const settleScroll = React77.useCallback(() => {
21537
+ const settleScroll = React78.useCallback(() => {
21370
21538
  if (!mobileListRef.current) return;
21371
21539
  const nextIndex = Math.round(mobileListRef.current.scrollTop / MOBILE_OPTION_HEIGHT);
21372
21540
  const nextOption = options[nextIndex];
@@ -21378,13 +21546,13 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21378
21546
  }
21379
21547
  setPendingValue(nextOption);
21380
21548
  }, [options, pendingValue]);
21381
- const scheduleScrollSettle = React77.useCallback(() => {
21549
+ const scheduleScrollSettle = React78.useCallback(() => {
21382
21550
  clearScrollSettleTimeout();
21383
21551
  scrollSettleTimeoutRef.current = window.setTimeout(() => {
21384
21552
  settleScroll();
21385
21553
  }, MOBILE_SCROLL_SETTLE_DELAY);
21386
21554
  }, [clearScrollSettleTimeout, settleScroll]);
21387
- const handleScroll = React77.useCallback(() => {
21555
+ const handleScroll = React78.useCallback(() => {
21388
21556
  if (!mobileListRef.current) return;
21389
21557
  const nextScrollTop = mobileListRef.current.scrollTop;
21390
21558
  clearScrollAnimationFrame();
@@ -21394,7 +21562,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21394
21562
  });
21395
21563
  scheduleScrollSettle();
21396
21564
  }, [clearScrollAnimationFrame, scheduleScrollSettle]);
21397
- const focusOptionByIndex = React77.useCallback(
21565
+ const focusOptionByIndex = React78.useCallback(
21398
21566
  (index, behavior = "instant", updatePendingImmediately = behavior === "instant") => {
21399
21567
  if (!mobileListRef.current || index < 0 || index >= options.length) return;
21400
21568
  const option = options[index];
@@ -21412,7 +21580,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21412
21580
  },
21413
21581
  [options, scheduleScrollSettle]
21414
21582
  );
21415
- const handleOptionClick = React77.useCallback(
21583
+ const handleOptionClick = React78.useCallback(
21416
21584
  (option) => {
21417
21585
  if (!mobileListRef.current || disabled || option.isDisabled) return;
21418
21586
  const optionIndex = getOptionIndex2(options, option);
@@ -21421,7 +21589,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21421
21589
  },
21422
21590
  [disabled, focusOptionByIndex, options]
21423
21591
  );
21424
- const moveByStep = React77.useCallback(
21592
+ const moveByStep = React78.useCallback(
21425
21593
  (step) => {
21426
21594
  const currentIndex = getOptionIndex2(options, pendingValue);
21427
21595
  const fallbackIndex = step === 1 ? getFirstEnabledOptionIndex2(options) : getLastEnabledOptionIndex2(options);
@@ -21433,7 +21601,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21433
21601
  },
21434
21602
  [focusOptionByIndex, options, pendingValue]
21435
21603
  );
21436
- const moveToBoundary = React77.useCallback(
21604
+ const moveToBoundary = React78.useCallback(
21437
21605
  (boundary) => {
21438
21606
  const targetIndex = boundary === "start" ? getFirstEnabledOptionIndex2(options) : getLastEnabledOptionIndex2(options);
21439
21607
  if (targetIndex >= 0) {
@@ -21442,7 +21610,7 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21442
21610
  },
21443
21611
  [focusOptionByIndex, options]
21444
21612
  );
21445
- const syncPendingValue = React77.useCallback(
21613
+ const syncPendingValue = React78.useCallback(
21446
21614
  (nextValue) => {
21447
21615
  const normalizedValue = nextValue ?? null;
21448
21616
  const matchedIndex = getOptionIndex2(options, normalizedValue);
@@ -21470,9 +21638,9 @@ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, dis
21470
21638
  }
21471
21639
 
21472
21640
  // src/airbnb-fields/select/useSelectIds.ts
21473
- var React78 = __toESM(require("react"), 1);
21641
+ var React79 = __toESM(require("react"), 1);
21474
21642
  function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21475
- const reactId = React78.useId().replace(/:/g, "");
21643
+ const reactId = React79.useId().replace(/:/g, "");
21476
21644
  const baseId = name ? `select-${name}` : `select-${reactId}`;
21477
21645
  const triggerId = `${baseId}-trigger`;
21478
21646
  const labelId = `${baseId}-label`;
@@ -21482,7 +21650,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21482
21650
  const listboxId = `${baseId}-listbox`;
21483
21651
  const describedErrorId = error && !hideErrorMessage ? errorId : void 0;
21484
21652
  const describedBy = [!hasValue ? helperTextId : null, describedErrorId].filter(Boolean).join(" ") || void 0;
21485
- const getOptionId2 = React78.useCallback(
21653
+ const getOptionId2 = React79.useCallback(
21486
21654
  (index) => `${baseId}-option-${index}`,
21487
21655
  [baseId]
21488
21656
  );
@@ -21500,8 +21668,8 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21500
21668
  }
21501
21669
 
21502
21670
  // src/airbnb-fields/select/Select.tsx
21503
- var import_jsx_runtime192 = require("react/jsx-runtime");
21504
- var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21671
+ var import_jsx_runtime193 = require("react/jsx-runtime");
21672
+ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21505
21673
  options = [],
21506
21674
  value,
21507
21675
  onChange,
@@ -21515,6 +21683,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21515
21683
  loading,
21516
21684
  optional,
21517
21685
  tooltip,
21686
+ helper,
21518
21687
  error,
21519
21688
  invalid,
21520
21689
  hideErrorMessage,
@@ -21528,8 +21697,8 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21528
21697
  filterOption
21529
21698
  }, ref) {
21530
21699
  const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
21531
- const [isOpen, setIsOpen] = React79.useState(false);
21532
- const containerRef = React79.useRef(null);
21700
+ const [isOpen, setIsOpen] = React80.useState(false);
21701
+ const containerRef = React80.useRef(null);
21533
21702
  const filteredOptions = filterOption ? options.filter(filterOption) : options;
21534
21703
  const hasValue = Boolean(value);
21535
21704
  const helperText = placeholder ?? label;
@@ -21591,12 +21760,12 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21591
21760
  onOutsideClick: () => setIsOpen(false),
21592
21761
  isDisabled: !isOpen || isMobile3
21593
21762
  });
21594
- React79.useEffect(() => {
21763
+ React80.useEffect(() => {
21595
21764
  if (isBlocked) {
21596
21765
  setIsOpen(false);
21597
21766
  }
21598
21767
  }, [isBlocked]);
21599
- React79.useEffect(
21768
+ React80.useEffect(
21600
21769
  function setCorrectOptionIfThereIsOnlyValue() {
21601
21770
  if (value?.value === void 0 || value.value === null || value.label !== "") {
21602
21771
  return;
@@ -21608,7 +21777,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21608
21777
  },
21609
21778
  [onChange, filteredOptions, value]
21610
21779
  );
21611
- const handleMobileOpenChange = React79.useCallback(
21780
+ const handleMobileOpenChange = React80.useCallback(
21612
21781
  (nextOpen) => {
21613
21782
  if (isBlocked && nextOpen) return;
21614
21783
  setIsOpen(nextOpen);
@@ -21619,7 +21788,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21619
21788
  },
21620
21789
  [focusTrigger, isBlocked, syncPendingValue, value]
21621
21790
  );
21622
- const handleMobileDone = React79.useCallback(() => {
21791
+ const handleMobileDone = React80.useCallback(() => {
21623
21792
  if (isBlocked) return;
21624
21793
  const finalOption = pendingValue;
21625
21794
  if (finalOption && finalOption.value !== value?.value) {
@@ -21628,7 +21797,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21628
21797
  setIsOpen(false);
21629
21798
  focusTrigger();
21630
21799
  }, [focusTrigger, isBlocked, onChange, pendingValue, value]);
21631
- const handleTriggerClick = React79.useCallback(() => {
21800
+ const handleTriggerClick = React80.useCallback(() => {
21632
21801
  if (isBlocked) return;
21633
21802
  setIsOpen((prev) => {
21634
21803
  const nextOpen = !prev;
@@ -21681,13 +21850,13 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21681
21850
  handleMobileOpenChange(false);
21682
21851
  }
21683
21852
  };
21684
- return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
21853
+ return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
21685
21854
  "div",
21686
21855
  {
21687
21856
  ref: containerRef,
21688
21857
  className: cn("relative w-full max-w-[var(--max-field-width)]", className),
21689
21858
  children: [
21690
- name && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
21859
+ name && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
21691
21860
  renderTrigger ? renderTrigger({
21692
21861
  id: triggerId,
21693
21862
  open: isOpen,
@@ -21700,6 +21869,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21700
21869
  loading,
21701
21870
  optional,
21702
21871
  tooltip,
21872
+ helper,
21703
21873
  error,
21704
21874
  invalid,
21705
21875
  listboxId,
@@ -21708,7 +21878,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21708
21878
  onClick: handleTriggerClick,
21709
21879
  onKeyDown: handleRootTriggerKeyDown,
21710
21880
  onBlur
21711
- }) : /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21881
+ }) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
21712
21882
  AirbnbSelectTrigger,
21713
21883
  {
21714
21884
  id: triggerId,
@@ -21722,6 +21892,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21722
21892
  loading,
21723
21893
  optional,
21724
21894
  tooltip,
21895
+ helper,
21725
21896
  error: triggerError,
21726
21897
  hideErrorMessage,
21727
21898
  labelId,
@@ -21735,7 +21906,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21735
21906
  onBlur
21736
21907
  }
21737
21908
  ),
21738
- isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21909
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
21739
21910
  AirbnbSelectMobileContent,
21740
21911
  {
21741
21912
  open: isOpen,
@@ -21760,7 +21931,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21760
21931
  getOptionId: getOptionId2,
21761
21932
  noOptionsMessage
21762
21933
  }
21763
- ) : /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21934
+ ) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
21764
21935
  AirbnbSelectDesktopContent,
21765
21936
  {
21766
21937
  isOpen,
@@ -21794,13 +21965,13 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
21794
21965
  });
21795
21966
 
21796
21967
  // src/airbnb-fields/phone-field/PhoneField.tsx
21797
- var import_jsx_runtime193 = require("react/jsx-runtime");
21968
+ var import_jsx_runtime194 = require("react/jsx-runtime");
21798
21969
  function formatPhoneCodeOptionLabel2(option) {
21799
21970
  const label = String(option.label);
21800
21971
  const value = String(option.value);
21801
21972
  return label.includes(value) ? label : `${label} (${value})`;
21802
21973
  }
21803
- var AirbnbPhoneField = React80.forwardRef(
21974
+ var AirbnbPhoneField = React81.forwardRef(
21804
21975
  ({
21805
21976
  label,
21806
21977
  topLabel,
@@ -21816,6 +21987,7 @@ var AirbnbPhoneField = React80.forwardRef(
21816
21987
  loading,
21817
21988
  optional,
21818
21989
  tooltip,
21990
+ helper,
21819
21991
  className,
21820
21992
  name,
21821
21993
  codeName,
@@ -21824,9 +21996,9 @@ var AirbnbPhoneField = React80.forwardRef(
21824
21996
  codePlaceholder = "+00",
21825
21997
  defaultCode
21826
21998
  }, ref) => {
21827
- const inputId = React80.useId();
21999
+ const inputId = React81.useId();
21828
22000
  const effectiveCode = value?.code || defaultCode || "";
21829
- const codeOptions = React80.useMemo(
22001
+ const codeOptions = React81.useMemo(
21830
22002
  () => options.map((option) => ({
21831
22003
  value: option.value,
21832
22004
  label: formatPhoneCodeOptionLabel2(option),
@@ -21834,7 +22006,7 @@ var AirbnbPhoneField = React80.forwardRef(
21834
22006
  })),
21835
22007
  [options]
21836
22008
  );
21837
- const selectedCodeOption = React80.useMemo(
22009
+ const selectedCodeOption = React81.useMemo(
21838
22010
  () => codeOptions.find((option) => option.value === effectiveCode) ?? null,
21839
22011
  [codeOptions, effectiveCode]
21840
22012
  );
@@ -21842,9 +22014,9 @@ var AirbnbPhoneField = React80.forwardRef(
21842
22014
  const hasInvalidState = Boolean(error) || Boolean(invalid);
21843
22015
  const isBlocked = Boolean(disabled) || Boolean(loading);
21844
22016
  const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
21845
- return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
21846
- name && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
21847
- codeName && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22017
+ return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
22018
+ name && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
22019
+ codeName && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21848
22020
  "input",
21849
22021
  {
21850
22022
  type: "hidden",
@@ -21853,7 +22025,7 @@ var AirbnbPhoneField = React80.forwardRef(
21853
22025
  disabled
21854
22026
  }
21855
22027
  ),
21856
- numberName && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22028
+ numberName && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21857
22029
  "input",
21858
22030
  {
21859
22031
  type: "hidden",
@@ -21862,7 +22034,7 @@ var AirbnbPhoneField = React80.forwardRef(
21862
22034
  disabled
21863
22035
  }
21864
22036
  ),
21865
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22037
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21866
22038
  "label",
21867
22039
  {
21868
22040
  htmlFor: inputId,
@@ -21870,8 +22042,8 @@ var AirbnbPhoneField = React80.forwardRef(
21870
22042
  children: topLabel
21871
22043
  }
21872
22044
  ),
21873
- /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: "flex items-stretch", children: [
21874
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22045
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: "flex items-stretch", children: [
22046
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21875
22047
  AirbnbSelect,
21876
22048
  {
21877
22049
  ref,
@@ -21900,7 +22072,7 @@ var AirbnbPhoneField = React80.forwardRef(
21900
22072
  onClick,
21901
22073
  onKeyDown,
21902
22074
  valueLabel
21903
- }) => /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
22075
+ }) => /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(
21904
22076
  "button",
21905
22077
  {
21906
22078
  id,
@@ -21921,8 +22093,8 @@ var AirbnbPhoneField = React80.forwardRef(
21921
22093
  triggerDisabled ? "cursor-not-allowed opacity-50" : triggerLoading ? "cursor-progress" : "cursor-pointer"
21922
22094
  ),
21923
22095
  children: [
21924
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("span", { children: valueLabel ?? codePlaceholder }),
21925
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22096
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("span", { children: valueLabel ?? codePlaceholder }),
22097
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21926
22098
  import_lucide_react57.ChevronDown,
21927
22099
  {
21928
22100
  className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
@@ -21934,7 +22106,7 @@ var AirbnbPhoneField = React80.forwardRef(
21934
22106
  )
21935
22107
  }
21936
22108
  ),
21937
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22109
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21938
22110
  AirbnbInput,
21939
22111
  {
21940
22112
  id: inputId,
@@ -21963,18 +22135,19 @@ var AirbnbPhoneField = React80.forwardRef(
21963
22135
  }
21964
22136
  )
21965
22137
  ] }),
21966
- error && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(FieldErrorMessage, { message: error })
22138
+ error && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(FieldErrorMessage, { message: error }),
22139
+ !error && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(AirbnbFieldHelperText, { helper, disabled })
21967
22140
  ] });
21968
22141
  }
21969
22142
  );
21970
22143
  AirbnbPhoneField.displayName = "AirbnbPhoneField";
21971
22144
 
21972
22145
  // src/airbnb-fields/searchable-select/SearchableSelect.tsx
21973
- var React81 = __toESM(require("react"), 1);
22146
+ var React82 = __toESM(require("react"), 1);
21974
22147
  var import_lucide_react58 = require("lucide-react");
21975
22148
  var import_react_virtual3 = require("@tanstack/react-virtual");
21976
22149
  var import_react90 = require("react");
21977
- var import_jsx_runtime194 = require("react/jsx-runtime");
22150
+ var import_jsx_runtime195 = require("react/jsx-runtime");
21978
22151
  var ROW_HEIGHT = 48;
21979
22152
  var DESKTOP_LIST_HEIGHT = 280;
21980
22153
  var MOBILE_LIST_HEIGHT = 420;
@@ -22005,6 +22178,7 @@ var AirbnbSearchableSelectInternal = ({
22005
22178
  invalid,
22006
22179
  optional,
22007
22180
  tooltip,
22181
+ helper,
22008
22182
  hideErrorMessage,
22009
22183
  name,
22010
22184
  className,
@@ -22014,13 +22188,13 @@ var AirbnbSearchableSelectInternal = ({
22014
22188
  loadingMessage
22015
22189
  }, ref) => {
22016
22190
  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);
22191
+ const reactId = React82.useId();
22192
+ const [open, setOpen] = React82.useState(false);
22193
+ const [internalSearchValue, setInternalSearchValue] = React82.useState("");
22194
+ const [highlightedIndex, setHighlightedIndex] = React82.useState(-1);
22195
+ const containerRef = React82.useRef(null);
22196
+ const triggerRef = React82.useRef(null);
22197
+ const inputRef = React82.useRef(null);
22024
22198
  const listboxId = `${reactId}-listbox`;
22025
22199
  const labelId = `${reactId}-label`;
22026
22200
  const valueId = `${reactId}-value`;
@@ -22029,13 +22203,13 @@ var AirbnbSearchableSelectInternal = ({
22029
22203
  const searchInputId = `${reactId}-search`;
22030
22204
  const effectiveSearchValue = searchValue ?? internalSearchValue;
22031
22205
  const shouldFilterLocally = !onSearchChange && filterOption !== null;
22032
- const visibleOptions = React81.useMemo(() => {
22206
+ const visibleOptions = React82.useMemo(() => {
22033
22207
  if (!shouldFilterLocally || !effectiveSearchValue) {
22034
22208
  return options;
22035
22209
  }
22036
22210
  return options.filter((option) => filterOption(option, effectiveSearchValue));
22037
22211
  }, [effectiveSearchValue, filterOption, options, shouldFilterLocally]);
22038
- const selectedIndex = React81.useMemo(
22212
+ const selectedIndex = React82.useMemo(
22039
22213
  () => visibleOptions.findIndex((option) => option.value === value?.value),
22040
22214
  [value?.value, visibleOptions]
22041
22215
  );
@@ -22061,7 +22235,7 @@ var AirbnbSearchableSelectInternal = ({
22061
22235
  },
22062
22236
  [handleOnOpenChange]
22063
22237
  );
22064
- React81.useEffect(() => {
22238
+ React82.useEffect(() => {
22065
22239
  if (isBlocked) {
22066
22240
  setSelectOpen(false);
22067
22241
  return;
@@ -22074,7 +22248,7 @@ var AirbnbSearchableSelectInternal = ({
22074
22248
  window.cancelAnimationFrame(frameId);
22075
22249
  };
22076
22250
  }, [isBlocked, open, setSelectOpen]);
22077
- React81.useEffect(() => {
22251
+ React82.useEffect(() => {
22078
22252
  if (!open) {
22079
22253
  setHighlightedIndex(-1);
22080
22254
  return;
@@ -22142,7 +22316,7 @@ var AirbnbSearchableSelectInternal = ({
22142
22316
  }
22143
22317
  }
22144
22318
  }
22145
- const content = /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22319
+ const content = /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22146
22320
  AirbnbSearchableSelectContent,
22147
22321
  {
22148
22322
  inputId: searchInputId,
@@ -22169,10 +22343,10 @@ var AirbnbSearchableSelectInternal = ({
22169
22343
  onOptionHover: setHighlightedIndex
22170
22344
  }
22171
22345
  );
22172
- React81.useImperativeHandle(ref, () => triggerRef.current, []);
22173
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
22174
- name && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
22175
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22346
+ React82.useImperativeHandle(ref, () => triggerRef.current, []);
22347
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
22348
+ name && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
22349
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22176
22350
  AirbnbFieldTrigger,
22177
22351
  {
22178
22352
  id: `${reactId}-trigger`,
@@ -22194,6 +22368,7 @@ var AirbnbSearchableSelectInternal = ({
22194
22368
  loading,
22195
22369
  optional,
22196
22370
  tooltip,
22371
+ helper,
22197
22372
  forceLabelText: Boolean(optional) || Boolean(tooltip),
22198
22373
  hideErrorMessage,
22199
22374
  disabled,
@@ -22206,7 +22381,7 @@ var AirbnbSearchableSelectInternal = ({
22206
22381
  },
22207
22382
  onKeyDown: handleTriggerKeyDown,
22208
22383
  onBlur,
22209
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22384
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22210
22385
  import_lucide_react58.ChevronDown,
22211
22386
  {
22212
22387
  className: cn(
@@ -22217,7 +22392,7 @@ var AirbnbSearchableSelectInternal = ({
22217
22392
  )
22218
22393
  }
22219
22394
  ),
22220
- isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22395
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22221
22396
  Drawer,
22222
22397
  {
22223
22398
  open,
@@ -22229,13 +22404,13 @@ var AirbnbSearchableSelectInternal = ({
22229
22404
  }
22230
22405
  closeSelect();
22231
22406
  },
22232
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
22233
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
22234
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(DrawerDescription, { className: "sr-only", children: label }),
22235
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
22407
+ children: /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
22408
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
22409
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(DrawerDescription, { className: "sr-only", children: label }),
22410
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
22236
22411
  ] })
22237
22412
  }
22238
- ) : open ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22413
+ ) : open ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22239
22414
  "div",
22240
22415
  {
22241
22416
  className: cn(
@@ -22247,7 +22422,7 @@ var AirbnbSearchableSelectInternal = ({
22247
22422
  ) : null
22248
22423
  ] });
22249
22424
  };
22250
- var AirbnbSearchableSelect = React81.forwardRef(
22425
+ var AirbnbSearchableSelect = React82.forwardRef(
22251
22426
  AirbnbSearchableSelectInternal
22252
22427
  );
22253
22428
  function AirbnbSearchableSelectContent({
@@ -22274,9 +22449,9 @@ function AirbnbSearchableSelectContent({
22274
22449
  onOptionClick,
22275
22450
  onOptionHover
22276
22451
  }) {
22277
- const listRef = React81.useRef(null);
22278
- const lastLoadMoreOptionsLengthRef = React81.useRef(null);
22279
- const previousHighlightedIndexRef = React81.useRef(highlightedIndex);
22452
+ const listRef = React82.useRef(null);
22453
+ const lastLoadMoreOptionsLengthRef = React82.useRef(null);
22454
+ const previousHighlightedIndexRef = React82.useRef(highlightedIndex);
22280
22455
  const rowCount = options.length + (loading && options.length > 0 ? 1 : 0);
22281
22456
  const virtualizer = (0, import_react_virtual3.useVirtualizer)({
22282
22457
  count: rowCount,
@@ -22287,7 +22462,7 @@ function AirbnbSearchableSelectContent({
22287
22462
  const virtualItems = virtualizer.getVirtualItems();
22288
22463
  const emptyMessage = noOptionsMessage?.() ?? "No matches found";
22289
22464
  const loadingText = loadingMessage?.() ?? "Loading...";
22290
- React81.useEffect(() => {
22465
+ React82.useEffect(() => {
22291
22466
  const lastItem = virtualItems[virtualItems.length - 1];
22292
22467
  const shouldLoadMore = !!lastItem && hasNextPage && !loading && lastItem.index >= options.length - LOAD_MORE_THRESHOLD;
22293
22468
  if (shouldLoadMore && lastLoadMoreOptionsLengthRef.current !== options.length) {
@@ -22295,23 +22470,23 @@ function AirbnbSearchableSelectContent({
22295
22470
  onLoadMore?.();
22296
22471
  }
22297
22472
  }, [hasNextPage, loading, onLoadMore, options.length, virtualItems]);
22298
- React81.useEffect(() => {
22473
+ React82.useEffect(() => {
22299
22474
  const hasHighlightedIndexChanged = previousHighlightedIndexRef.current !== highlightedIndex;
22300
22475
  previousHighlightedIndexRef.current = highlightedIndex;
22301
22476
  if (highlightedIndex >= 0 && hasHighlightedIndexChanged) {
22302
22477
  virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
22303
22478
  }
22304
22479
  }, [highlightedIndex, virtualizer]);
22305
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: "p-2", children: [
22306
- /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: "relative mb-2", children: [
22307
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22480
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: "p-2", children: [
22481
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: "relative mb-2", children: [
22482
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22308
22483
  import_lucide_react58.Search,
22309
22484
  {
22310
22485
  "aria-hidden": "true",
22311
22486
  className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[var(--chekin-neutral-500)]"
22312
22487
  }
22313
22488
  ),
22314
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22489
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22315
22490
  "input",
22316
22491
  {
22317
22492
  id: inputId,
@@ -22330,7 +22505,7 @@ function AirbnbSearchableSelectContent({
22330
22505
  }
22331
22506
  )
22332
22507
  ] }),
22333
- loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22508
+ loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22334
22509
  "div",
22335
22510
  {
22336
22511
  id: listboxId,
@@ -22339,7 +22514,7 @@ function AirbnbSearchableSelectContent({
22339
22514
  "aria-labelledby": labelId,
22340
22515
  className: cn("overflow-y-auto outline-none", menuClassName),
22341
22516
  style: { height: Math.min(height, rowCount * ROW_HEIGHT) },
22342
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22517
+ children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22343
22518
  "div",
22344
22519
  {
22345
22520
  className: "relative w-full",
@@ -22347,7 +22522,7 @@ function AirbnbSearchableSelectContent({
22347
22522
  children: virtualItems.map((virtualItem) => {
22348
22523
  const option = options[virtualItem.index];
22349
22524
  if (!option) {
22350
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22525
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22351
22526
  "div",
22352
22527
  {
22353
22528
  className: "absolute left-0 top-0 flex w-full items-center px-4 text-base leading-6 text-[var(--chekin-airbnb-gray-text)]",
@@ -22362,7 +22537,7 @@ function AirbnbSearchableSelectContent({
22362
22537
  }
22363
22538
  const isSelected = value?.value === option.value;
22364
22539
  const isHighlighted = virtualItem.index === highlightedIndex;
22365
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22540
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22366
22541
  "button",
22367
22542
  {
22368
22543
  id: getOptionId(idPrefix, virtualItem.index),
@@ -22384,7 +22559,7 @@ function AirbnbSearchableSelectContent({
22384
22559
  height: `${virtualItem.size}px`,
22385
22560
  transform: `translateY(${virtualItem.start}px)`
22386
22561
  },
22387
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("span", { className: "truncate text-center", children: String(option.label) })
22562
+ children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("span", { className: "truncate text-center", children: String(option.label) })
22388
22563
  },
22389
22564
  `${String(option.value)}-${virtualItem.index}`
22390
22565
  );
@@ -22413,16 +22588,18 @@ function getNextEnabledIndex(options, startIndex, step) {
22413
22588
  }
22414
22589
 
22415
22590
  // src/airbnb-fields/search-input/SearchInput.tsx
22416
- var React82 = __toESM(require("react"), 1);
22591
+ var React83 = __toESM(require("react"), 1);
22417
22592
  var import_react_i18next44 = require("react-i18next");
22418
22593
  var import_lucide_react59 = require("lucide-react");
22419
- var import_jsx_runtime195 = require("react/jsx-runtime");
22420
- var AirbnbSearchInput = React82.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
22594
+ var import_jsx_runtime196 = require("react/jsx-runtime");
22595
+ var AirbnbSearchInput = React83.forwardRef(({ onReset, placeholder, helper, wrapperClassName, ...props }, ref) => {
22421
22596
  const { t } = (0, import_react_i18next44.useTranslation)();
22597
+ const generatedId = React83.useId();
22598
+ const helperId = helper ? `${props.id ?? generatedId}-helper` : void 0;
22422
22599
  const placeholderText = placeholder || t("search_property") + "...";
22423
- return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
22424
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_lucide_react59.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[var(--chekin-neutral-500)]" }),
22425
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22600
+ const field = /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
22601
+ /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_lucide_react59.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[var(--chekin-neutral-500)]" }),
22602
+ /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22426
22603
  "input",
22427
22604
  {
22428
22605
  ...props,
@@ -22435,31 +22612,39 @@ var AirbnbSearchInput = React82.forwardRef(({ onReset, placeholder, wrapperClass
22435
22612
  onFocus: props.onFocus,
22436
22613
  onBlur: props.onBlur,
22437
22614
  placeholder: placeholderText,
22615
+ "aria-describedby": helperId ?? props["aria-describedby"],
22438
22616
  className: cn(
22439
22617
  "placeholder-shown:bg-accent flex h-10 w-full rounded-md border border-input bg-background py-3 pl-12 pr-4 text-base text-[#2d3748] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-base placeholder:font-medium placeholder:text-[var(--chekin-neutral-500)] focus:border-gray-300 focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
22440
22618
  props.className
22441
22619
  )
22442
22620
  }
22443
22621
  ),
22444
- onReset && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22622
+ onReset && /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22445
22623
  Button,
22446
22624
  {
22447
22625
  variant: "ghost",
22448
22626
  onClick: onReset,
22449
22627
  className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[var(--chekin-neutral-500)]",
22450
- children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_lucide_react59.X, { className: "h-5 w-5" })
22628
+ children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_lucide_react59.X, { className: "h-5 w-5" })
22451
22629
  }
22452
22630
  )
22453
22631
  ] });
22632
+ if (!helper) {
22633
+ return field;
22634
+ }
22635
+ return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("div", { className: "w-full", children: [
22636
+ field,
22637
+ /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(AirbnbFieldHelperText, { id: helperId, helper, disabled: props.disabled })
22638
+ ] });
22454
22639
  });
22455
22640
  AirbnbSearchInput.displayName = "AirbnbSearchInput";
22456
22641
 
22457
22642
  // src/airbnb-fields/switch/Switch.tsx
22458
- var React83 = __toESM(require("react"), 1);
22643
+ var React84 = __toESM(require("react"), 1);
22459
22644
  var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
22460
22645
  var import_lucide_react60 = require("lucide-react");
22461
- var import_jsx_runtime196 = require("react/jsx-runtime");
22462
- var AirbnbSwitch = React83.forwardRef(
22646
+ var import_jsx_runtime197 = require("react/jsx-runtime");
22647
+ var AirbnbSwitch = React84.forwardRef(
22463
22648
  ({
22464
22649
  className,
22465
22650
  value,
@@ -22470,15 +22655,18 @@ var AirbnbSwitch = React83.forwardRef(
22470
22655
  id,
22471
22656
  label,
22472
22657
  error,
22658
+ helper,
22473
22659
  wrapperClassName,
22474
22660
  ...props
22475
22661
  }, ref) => {
22476
- const generatedId = React83.useId();
22662
+ const generatedId = React84.useId();
22477
22663
  const fieldId = id || generatedId;
22478
- const switchElement = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22664
+ const helperId = `${fieldId}-helper`;
22665
+ const switchElement = /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22479
22666
  SwitchPrimitives2.Root,
22480
22667
  {
22481
22668
  ref,
22669
+ "aria-describedby": helper ? helperId : void 0,
22482
22670
  className: cn(
22483
22671
  "group inline-flex h-[24px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border border-solid border-transparent p-[2px] transition-colors duration-200",
22484
22672
  "focus-visible:outline-none focus-visible:shadow-[var(--chekin-shadow-focus)]",
@@ -22495,14 +22683,14 @@ var AirbnbSwitch = React83.forwardRef(
22495
22683
  "aria-busy": loading,
22496
22684
  "aria-readonly": readOnly,
22497
22685
  ...props,
22498
- children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22686
+ children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22499
22687
  SwitchPrimitives2.Thumb,
22500
22688
  {
22501
22689
  className: cn(
22502
22690
  "flex h-[20px] w-[20px] items-center justify-center rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.22)] transition-transform duration-200",
22503
22691
  "data-[state=checked]:translate-x-[12px] data-[state=unchecked]:translate-x-0"
22504
22692
  ),
22505
- children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22693
+ children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22506
22694
  import_lucide_react60.Check,
22507
22695
  {
22508
22696
  "aria-hidden": "true",
@@ -22514,13 +22702,13 @@ var AirbnbSwitch = React83.forwardRef(
22514
22702
  )
22515
22703
  }
22516
22704
  );
22517
- if (!label && !error) {
22705
+ if (!label && !error && !helper) {
22518
22706
  return switchElement;
22519
22707
  }
22520
- return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(import_jsx_runtime196.Fragment, { children: [
22521
- /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("div", { className: cn("flex items-center gap-x-3 gap-y-1.5", wrapperClassName), children: [
22708
+ return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_jsx_runtime197.Fragment, { children: [
22709
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("div", { className: cn("flex items-center gap-x-3 gap-y-1.5", wrapperClassName), children: [
22522
22710
  switchElement,
22523
- label && /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22711
+ label && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22524
22712
  Label,
22525
22713
  {
22526
22714
  htmlFor: fieldId,
@@ -22532,7 +22720,8 @@ var AirbnbSwitch = React83.forwardRef(
22532
22720
  }
22533
22721
  )
22534
22722
  ] }),
22535
- error && /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(ErrorMessage, { disabled, children: error })
22723
+ error && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(ErrorMessage, { disabled, children: error }),
22724
+ !error && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(AirbnbFieldHelperText, { id: helperId, helper, disabled })
22536
22725
  ] });
22537
22726
  }
22538
22727
  );
@@ -22545,6 +22734,7 @@ AirbnbSwitch.displayName = "AirbnbSwitch";
22545
22734
  AccordionItem,
22546
22735
  AccordionTrigger,
22547
22736
  AirbnbDatePicker,
22737
+ AirbnbFieldHelperText,
22548
22738
  AirbnbFieldTrigger,
22549
22739
  AirbnbInput,
22550
22740
  AirbnbPhoneField,