@digitransit-component/digitransit-component-autosuggest 11.0.16 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -13486,7 +13486,7 @@ function styleInject(css, ref) {
13486
13486
  }
13487
13487
  }
13488
13488
 
13489
- var css_248z$2 = "input[type=text] {\n margin: 0;\n}\n\n.styles_container__YKW96 {\n display: flex;\n width: 100%;\n}\n.styles_container__YKW96 .styles_input__--GRS.styles_favourite__VJm6c {\n padding-left: 47px;\n}\n.styles_container__YKW96 .styles_input__--GRS.styles_thin__dDVH9 {\n height: 34px;\n}\n.styles_container__YKW96 .styles_input__--GRS {\n font-size: 16px;\n font-family: inherit;\n display: flex;\n width: 100%;\n height: 44px;\n border-radius: 5px;\n border: solid 1px #888;\n background-color: #fff;\n padding-left: 50px;\n padding-right: 44px;\n line-height: 1.2;\n letter-spacing: -0.5px;\n color: #333;\n box-sizing: border-box;\n -webkit-appearance: none;\n appearance: none;\n}\n.styles_container__YKW96 .styles_input__--GRS:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color);\n}\n@media screen and (min-width: 768px) {\n .styles_container__YKW96 .styles_input__--GRS {\n font-size: 15px;\n height: 44px;\n padding-left: 49px;\n }\n}\n.styles_container__YKW96 .styles_input__--GRS::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px;\n}\n\n.styles_hasValue__JCbDo {\n color: #333;\n}\n\n.styles_suggestionsContainerOpen__ARBAD {\n width: 100%;\n max-height: 44vh;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: solid 1px rgba(0, 0, 0, 0.1);\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n background-color: white;\n top: calc(2.625rem + 9px);\n z-index: 20;\n}\n\n.styles_suggestionsContainer__FCLTy {\n background-color: white;\n z-index: 20;\n}\n.styles_suggestionsContainer__FCLTy .styles_suggestionsList__uyd8R {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white;\n}\n.styles_suggestionsContainer__FCLTy .styles_suggestionsList__uyd8R li:hover {\n background: #f2f5f7;\n}\n\n.styles_suggestion__yZzst {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n display: block;\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap;\n z-index: 20;\n}\n\n.styles_suggestionHighlighted__4-yqj {\n background-color: #f2f5f7;\n}\n\n.styles_autosuggest-input-container__d7zo4 {\n position: relative;\n width: 100%;\n}\n.styles_autosuggest-input-container__d7zo4.styles_origin__3BSEn {\n z-index: 16;\n}\n.styles_autosuggest-input-container__d7zo4.styles_destination__VSQ-a {\n z-index: 10;\n}\n.styles_autosuggest-input-container__d7zo4.styles_stop-route-station__Gcetf {\n z-index: 9;\n}\n\n.styles_autosuggest-input-icon__4ww0f {\n display: flex;\n position: absolute;\n align-items: center;\n width: 16px;\n height: 100%;\n margin-top: 0;\n margin-left: 19px;\n}\n.styles_autosuggest-input-icon__4ww0f svg {\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_origin__3BSEn svg {\n color: #4ea700;\n fill: #4ea700;\n width: 16px;\n height: 16px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_destination__VSQ-a svg {\n fill: #ec5188;\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_stop-route-station__Gcetf svg, .styles_autosuggest-input-icon__4ww0f.styles_favourite__VJm6c svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_origin-stop-near-you__NhZ-N svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n\nbutton.styles_clear-input__CYTYl {\n display: flex;\n position: absolute;\n padding: 14px 0;\n right: 0;\n width: 44px;\n height: 100%;\n color: var(--color);\n outline: none;\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none;\n}\nbutton.styles_clear-input__CYTYl svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.styles_clear-input__CYTYl:focus {\n background-color: transparent;\n color: inherit;\n /* First apply outline that is used in Edge and Firefox */\n /* Then override outline for webkit browsers like Chrome, this has no effect on other browsers */\n outline: 5px auto -webkit-focus-ring-color;\n}\nbutton.styles_clear-input__CYTYl:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.styles_clear-input__CYTYl:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.styles_sr-only__N8Ha-:not(:focus, :active) {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.styles_hidden__iNw4s {\n visibility: hidden;\n}";
13489
+ var css_248z$2 = "input[type=text] {\n margin: 0;\n}\n\n.styles_container__YKW96 {\n display: flex;\n width: 100%;\n}\n.styles_container__YKW96 .styles_input__--GRS.styles_favourite__VJm6c {\n padding-left: 47px;\n}\n.styles_container__YKW96 .styles_input__--GRS.styles_thin__dDVH9 {\n height: 34px;\n}\n.styles_container__YKW96 .styles_input__--GRS {\n font-size: 16px;\n font-family: inherit;\n display: flex;\n width: 100%;\n height: 44px;\n border-radius: 5px;\n border: solid 1px #888;\n background-color: #fff;\n padding-left: 50px;\n padding-right: 44px;\n line-height: 1.2;\n letter-spacing: -0.5px;\n color: #333;\n box-sizing: border-box;\n -webkit-appearance: none;\n appearance: none;\n}\n.styles_container__YKW96 .styles_input__--GRS:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color);\n}\n@media screen and (min-width: 768px) {\n .styles_container__YKW96 .styles_input__--GRS {\n font-size: 15px;\n height: 44px;\n padding-left: 49px;\n }\n}\n.styles_container__YKW96 .styles_input__--GRS::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px;\n}\n\n.styles_hasValue__JCbDo {\n color: #333;\n}\n\n.styles_suggestionsContainerOpen__ARBAD {\n width: 100%;\n max-height: 44vh;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: solid 1px rgba(0, 0, 0, 0.1);\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n background-color: white;\n top: calc(2.625rem + 9px);\n z-index: 20;\n}\n\n.styles_suggestionsContainer__FCLTy {\n background-color: white;\n z-index: 20;\n}\n.styles_suggestionsContainer__FCLTy .styles_suggestionsList__uyd8R {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white;\n}\n.styles_suggestionsContainer__FCLTy .styles_suggestionsList__uyd8R li:hover {\n background: #f2f5f7;\n}\n\n.styles_suggestion__yZzst {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n display: block;\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap;\n z-index: 20;\n}\n\n.styles_suggestionHighlighted__4-yqj {\n background-color: #f2f5f7;\n outline: 1px solid var(--accessible-primary-color, #000);\n outline-offset: -1px;\n border-radius: 4px;\n}\n\n.styles_autosuggest-input-container__d7zo4 {\n position: relative;\n width: 100%;\n}\n.styles_autosuggest-input-container__d7zo4.styles_origin__3BSEn {\n z-index: 16;\n}\n.styles_autosuggest-input-container__d7zo4.styles_destination__VSQ-a {\n z-index: 10;\n}\n.styles_autosuggest-input-container__d7zo4.styles_stop-route-station__Gcetf {\n z-index: 9;\n}\n\n.styles_autosuggest-input-icon__4ww0f {\n display: flex;\n position: absolute;\n align-items: center;\n width: 16px;\n height: 100%;\n margin-top: 0;\n margin-left: 19px;\n}\n.styles_autosuggest-input-icon__4ww0f svg {\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_origin__3BSEn svg {\n color: #4ea700;\n fill: #4ea700;\n width: 16px;\n height: 16px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_destination__VSQ-a svg {\n fill: #ec5188;\n width: 16px;\n height: 24px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_stop-route-station__Gcetf svg, .styles_autosuggest-input-icon__4ww0f.styles_favourite__VJm6c svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n.styles_autosuggest-input-icon__4ww0f.styles_origin-stop-near-you__NhZ-N svg {\n fill: #888;\n width: 16px;\n height: 16px;\n}\n\nbutton.styles_clear-input__CYTYl {\n display: flex;\n position: absolute;\n padding: 14px 0;\n right: 0;\n width: 44px;\n height: 100%;\n color: var(--color);\n outline: none;\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none;\n}\nbutton.styles_clear-input__CYTYl svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.styles_clear-input__CYTYl:focus {\n background-color: transparent;\n color: inherit;\n /* First apply outline that is used in Edge and Firefox */\n /* Then override outline for webkit browsers like Chrome, this has no effect on other browsers */\n outline: 5px auto -webkit-focus-ring-color;\n}\nbutton.styles_clear-input__CYTYl:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.styles_clear-input__CYTYl:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.styles_sr-only__N8Ha-:not(:focus, :active) {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.styles_hidden__iNw4s {\n visibility: hidden;\n}";
13490
13490
  var styles = {"container":"styles_container__YKW96","input":"styles_input__--GRS","favourite":"styles_favourite__VJm6c","thin":"styles_thin__dDVH9","hasValue":"styles_hasValue__JCbDo","suggestionsContainerOpen":"styles_suggestionsContainerOpen__ARBAD","suggestionsContainer":"styles_suggestionsContainer__FCLTy","suggestionsList":"styles_suggestionsList__uyd8R","suggestion":"styles_suggestion__yZzst","suggestionHighlighted":"styles_suggestionHighlighted__4-yqj","autosuggest-input-container":"styles_autosuggest-input-container__d7zo4","origin":"styles_origin__3BSEn","destination":"styles_destination__VSQ-a","stop-route-station":"styles_stop-route-station__Gcetf","autosuggest-input-icon":"styles_autosuggest-input-icon__4ww0f","origin-stop-near-you":"styles_origin-stop-near-you__NhZ-N","clear-input":"styles_clear-input__CYTYl","sr-only":"styles_sr-only__N8Ha-","hidden":"styles_hidden__iNw4s"};
13491
13491
  styleInject(css_248z$2);
13492
13492
 
@@ -13870,12 +13870,12 @@ function requireLib () {
13870
13870
  var libExports = requireLib();
13871
13871
  var hooks = /*@__PURE__*/getDefaultExportFromCjs(libExports);
13872
13872
 
13873
- var css_248z$1 = "input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileSearch_fullscreen-root__-fKuG {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000;\n}\n\n.MobileSearch_combobox-container__UApoj {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between;\n}\n.MobileSearch_combobox-container__UApoj .MobileSearch_right-column__n9ied {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileSearch_combobox-icon__91hHs {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileSearch_combobox-icon__91hHs svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileSearch_combobox-label__TVrz1 {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.2px;\n color: #333;\n}\n\n.MobileSearch_container__fxGZ7 {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileSearch_container__fxGZ7 .MobileSearch_input__bUFhg {\n font-family: inherit;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none;\n}\n.MobileSearch_container__fxGZ7 .MobileSearch_input__bUFhg:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileSearch_clear-input__AaH3X {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none;\n}\nbutton.MobileSearch_clear-input__AaH3X svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileSearch_clear-input__AaH3X:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__AaH3X:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__AaH3X:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_hasValue__1Txox {\n color: #333;\n}\n\n.MobileSearch_suggestion__v2-T8 {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0;\n}\n\n.MobileSearch_suggestionHighlighted__laMbA {\n background-color: #f2f5f7;\n}\n\n.MobileSearch_suggestionsContainerOpen__-ZF8G {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.MobileSearch_suggestionsContainerOpen__-ZF8G .MobileSearch_suggestionsList__zRJY4 {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileSearch_clear-search-history__XpFfN {\n display: flex;\n font-family: inherit;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f2f5f7;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd;\n}\n.MobileSearch_suggestionHighlighted__laMbA .MobileSearch_clear-search-history__XpFfN {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_mobile-modal-overlay__BDcbD {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed;\n}\n\n.MobileSearch_mobile-modal__-gEAQ {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileSearch_mobile-modal__-gEAQ.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileSearch_mobile-modal__-gEAQ.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileSearch_mobile-modal-content__mUUFh {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%);\n}";
13874
- var mobileStyles = {"fullscreen-root":"MobileSearch_fullscreen-root__-fKuG","combobox-container":"MobileSearch_combobox-container__UApoj","right-column":"MobileSearch_right-column__n9ied","combobox-icon":"MobileSearch_combobox-icon__91hHs","combobox-label":"MobileSearch_combobox-label__TVrz1","container":"MobileSearch_container__fxGZ7","input":"MobileSearch_input__bUFhg","clear-input":"MobileSearch_clear-input__AaH3X","hasValue":"MobileSearch_hasValue__1Txox","suggestion":"MobileSearch_suggestion__v2-T8","suggestionHighlighted":"MobileSearch_suggestionHighlighted__laMbA","suggestionsContainerOpen":"MobileSearch_suggestionsContainerOpen__-ZF8G","suggestionsList":"MobileSearch_suggestionsList__zRJY4","clear-search-history":"MobileSearch_clear-search-history__XpFfN","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__BDcbD","mobile-modal":"MobileSearch_mobile-modal__-gEAQ","mobile-modal-content":"MobileSearch_mobile-modal-content__mUUFh"};
13873
+ var css_248z$1 = "input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileSearch_fullscreen-root__-fKuG {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000;\n}\n\n.MobileSearch_combobox-container__UApoj {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between;\n}\n.MobileSearch_combobox-container__UApoj .MobileSearch_right-column__n9ied {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileSearch_combobox-icon__91hHs {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileSearch_combobox-icon__91hHs svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileSearch_sr-only__DenlV:not(:focus, :active) {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.MobileSearch_combobox-label__TVrz1 {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.2px;\n color: #333;\n}\n\n.MobileSearch_container__fxGZ7 {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileSearch_container__fxGZ7 .MobileSearch_input__bUFhg {\n font-family: inherit;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none;\n}\n.MobileSearch_container__fxGZ7 .MobileSearch_input__bUFhg:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileSearch_clear-input__AaH3X {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none;\n}\nbutton.MobileSearch_clear-input__AaH3X svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileSearch_clear-input__AaH3X:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__AaH3X:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileSearch_clear-input__AaH3X:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_hasValue__1Txox {\n color: #333;\n}\n\n.MobileSearch_suggestion__v2-T8 {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0;\n}\n\n.MobileSearch_suggestionHighlighted__laMbA {\n background-color: #f2f5f7;\n}\n\n.MobileSearch_suggestionsContainerOpen__-ZF8G {\n display: flex;\n flex-direction: column;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.MobileSearch_suggestionsContainerOpen__-ZF8G .MobileSearch_suggestionsList__zRJY4 {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileSearch_clear-search-history__XpFfN {\n display: flex;\n font-family: inherit;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f2f5f7;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd;\n}\n.MobileSearch_suggestionHighlighted__laMbA .MobileSearch_clear-search-history__XpFfN {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileSearch_mobile-modal-overlay__BDcbD {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed;\n}\n\n.MobileSearch_mobile-modal__-gEAQ {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileSearch_mobile-modal__-gEAQ.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileSearch_mobile-modal__-gEAQ.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileSearch_mobile-modal-content__mUUFh {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%);\n}";
13874
+ var mobileStyles = {"fullscreen-root":"MobileSearch_fullscreen-root__-fKuG","combobox-container":"MobileSearch_combobox-container__UApoj","right-column":"MobileSearch_right-column__n9ied","combobox-icon":"MobileSearch_combobox-icon__91hHs","sr-only":"MobileSearch_sr-only__DenlV","combobox-label":"MobileSearch_combobox-label__TVrz1","container":"MobileSearch_container__fxGZ7","input":"MobileSearch_input__bUFhg","clear-input":"MobileSearch_clear-input__AaH3X","hasValue":"MobileSearch_hasValue__1Txox","suggestion":"MobileSearch_suggestion__v2-T8","suggestionHighlighted":"MobileSearch_suggestionHighlighted__laMbA","suggestionsContainerOpen":"MobileSearch_suggestionsContainerOpen__-ZF8G","suggestionsList":"MobileSearch_suggestionsList__zRJY4","clear-search-history":"MobileSearch_clear-search-history__XpFfN","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__BDcbD","mobile-modal":"MobileSearch_mobile-modal__-gEAQ","mobile-modal-content":"MobileSearch_mobile-modal-content__mUUFh"};
13875
13875
  styleInject(css_248z$1);
13876
13876
 
13877
- var css_248z = "input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileNoScroll_fullscreen-root__z0ny4 {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000;\n}\n\n.MobileNoScroll_combobox-container__TTtSg {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between;\n}\n.MobileNoScroll_combobox-container__TTtSg .MobileNoScroll_right-column__TS4N7 {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileNoScroll_combobox-icon__-r8Qf {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileNoScroll_combobox-icon__-r8Qf svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileNoScroll_combobox-label__rQ8p- {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.2px;\n color: #333;\n}\n\n.MobileNoScroll_container__XXfFb {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileNoScroll_container__XXfFb .MobileNoScroll_input__Xaj1- {\n font-family: inherit;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none;\n}\n.MobileNoScroll_container__XXfFb .MobileNoScroll_input__Xaj1-:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileNoScroll_clear-input__Jz4Xv {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_hasValue__ftyO6 {\n color: #333;\n}\n\n.MobileNoScroll_suggestion__7L2kI {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0;\n}\n\n.MobileNoScroll_suggestionHighlighted__IKy2t {\n background-color: #f2f5f7;\n}\n\n.MobileNoScroll_suggestionsContainerOpen__ePksf {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.MobileNoScroll_suggestionsContainerOpen__ePksf .MobileNoScroll_suggestionsList__aeQlJ {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileNoScroll_clear-search-history__WrE0K {\n display: flex;\n font-family: inherit;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f2f5f7;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd;\n}\n.MobileNoScroll_suggestionHighlighted__IKy2t .MobileNoScroll_clear-search-history__WrE0K {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_mobile-modal-overlay__k1JdU {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed;\n}\n\n.MobileNoScroll_mobile-modal__x5kKM {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileNoScroll_mobile-modal__x5kKM.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileNoScroll_mobile-modal__x5kKM.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileNoScroll_mobile-modal-content__os7v8 {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%);\n}\n\n.MobileNoScroll_suggestionsContainerOpen__ePksf {\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n scrollbar-width: none; /* Firefox */\n}\n.MobileNoScroll_suggestionsContainerOpen__ePksf::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}";
13878
- var mobileNoScrollStyles = {"fullscreen-root":"MobileNoScroll_fullscreen-root__z0ny4","combobox-container":"MobileNoScroll_combobox-container__TTtSg","right-column":"MobileNoScroll_right-column__TS4N7","combobox-icon":"MobileNoScroll_combobox-icon__-r8Qf","combobox-label":"MobileNoScroll_combobox-label__rQ8p-","container":"MobileNoScroll_container__XXfFb","input":"MobileNoScroll_input__Xaj1-","clear-input":"MobileNoScroll_clear-input__Jz4Xv","hasValue":"MobileNoScroll_hasValue__ftyO6","suggestion":"MobileNoScroll_suggestion__7L2kI","suggestionHighlighted":"MobileNoScroll_suggestionHighlighted__IKy2t","suggestionsContainerOpen":"MobileNoScroll_suggestionsContainerOpen__ePksf","suggestionsList":"MobileNoScroll_suggestionsList__aeQlJ","clear-search-history":"MobileNoScroll_clear-search-history__WrE0K","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__k1JdU","mobile-modal":"MobileNoScroll_mobile-modal__x5kKM","mobile-modal-content":"MobileNoScroll_mobile-modal-content__os7v8"};
13877
+ var css_248z = "input[type=text] {\n margin: 0;\n padding: 0;\n}\n\n.MobileNoScroll_fullscreen-root__z0ny4 {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000;\n}\n\n.MobileNoScroll_combobox-container__TTtSg {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between;\n}\n.MobileNoScroll_combobox-container__TTtSg .MobileNoScroll_right-column__TS4N7 {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px;\n}\n\n.MobileNoScroll_combobox-icon__-r8Qf {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none;\n}\n.MobileNoScroll_combobox-icon__-r8Qf svg {\n width: 14px;\n height: 21px;\n transform: rotate(-180deg);\n}\n\n.MobileNoScroll_sr-only__Vyhlo:not(:focus, :active) {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.MobileNoScroll_combobox-label__rQ8p- {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.2px;\n color: #333;\n}\n\n.MobileNoScroll_container__XXfFb {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.MobileNoScroll_container__XXfFb .MobileNoScroll_input__Xaj1- {\n font-family: inherit;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none;\n}\n.MobileNoScroll_container__XXfFb .MobileNoScroll_input__Xaj1-:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff;\n}\n\nbutton.MobileNoScroll_clear-input__Jz4Xv {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv svg {\n fill: var(--color);\n width: 16px;\n height: 16px;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv:focus {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv:active {\n background-color: transparent;\n color: inherit;\n}\nbutton.MobileNoScroll_clear-input__Jz4Xv:hover {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_hasValue__ftyO6 {\n color: #333;\n}\n\n.MobileNoScroll_suggestion__7L2kI {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0;\n}\n\n.MobileNoScroll_suggestionHighlighted__IKy2t {\n background-color: #f2f5f7;\n}\n\n.MobileNoScroll_suggestionsContainerOpen__ePksf {\n display: flex;\n flex-direction: column;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.MobileNoScroll_suggestionsContainerOpen__ePksf .MobileNoScroll_suggestionsList__aeQlJ {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f2f5f7;\n}\n\n.MobileNoScroll_clear-search-history__WrE0K {\n display: flex;\n font-family: inherit;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f2f5f7;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd;\n}\n.MobileNoScroll_suggestionHighlighted__IKy2t .MobileNoScroll_clear-search-history__WrE0K {\n background-color: transparent;\n color: inherit;\n}\n\n.MobileNoScroll_mobile-modal-overlay__k1JdU {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed;\n}\n\n.MobileNoScroll_mobile-modal__x5kKM {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.MobileNoScroll_mobile-modal__x5kKM.ReactModal__Content--after-open > div {\n transform: translateY(0);\n}\n.MobileNoScroll_mobile-modal__x5kKM.ReactModal__Content--before-close > div {\n transform: translateY(10%);\n}\n\n.MobileNoScroll_mobile-modal-content__os7v8 {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%);\n}\n\n.MobileNoScroll_suggestionsContainerOpen__ePksf {\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n scrollbar-width: none; /* Firefox */\n}\n.MobileNoScroll_suggestionsContainerOpen__ePksf::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}";
13878
+ var mobileNoScrollStyles = {"fullscreen-root":"MobileNoScroll_fullscreen-root__z0ny4","combobox-container":"MobileNoScroll_combobox-container__TTtSg","right-column":"MobileNoScroll_right-column__TS4N7","combobox-icon":"MobileNoScroll_combobox-icon__-r8Qf","sr-only":"MobileNoScroll_sr-only__Vyhlo","combobox-label":"MobileNoScroll_combobox-label__rQ8p-","container":"MobileNoScroll_container__XXfFb","input":"MobileNoScroll_input__Xaj1-","clear-input":"MobileNoScroll_clear-input__Jz4Xv","hasValue":"MobileNoScroll_hasValue__ftyO6","suggestion":"MobileNoScroll_suggestion__7L2kI","suggestionHighlighted":"MobileNoScroll_suggestionHighlighted__IKy2t","suggestionsContainerOpen":"MobileNoScroll_suggestionsContainerOpen__ePksf","suggestionsList":"MobileNoScroll_suggestionsList__aeQlJ","clear-search-history":"MobileNoScroll_clear-search-history__WrE0K","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__k1JdU","mobile-modal":"MobileNoScroll_mobile-modal__x5kKM","mobile-modal-content":"MobileNoScroll_mobile-modal-content__os7v8"};
13879
13879
  styleInject(css_248z);
13880
13880
 
13881
13881
  function _objectWithoutPropertiesLoose(r, e) {
@@ -13901,7 +13901,7 @@ function _objectWithoutProperties(e, t) {
13901
13901
  }
13902
13902
 
13903
13903
  const _excluded = ["item", "lng", "getItemProps", "highlightedIndex", "itemIndex", "styles"],
13904
- _excluded2 = ["suggestions", "getMenuProps", "getItemProps", "lng", "styles", "hidden", "renderClearHistoryButton", "handleClearHistory"];
13904
+ _excluded2 = ["suggestions", "getMenuProps", "label", "labelledBy", "getItemProps", "lng", "styles", "hidden", "renderClearHistoryButton", "handleClearHistory"];
13905
13905
  function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13906
13906
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13907
13907
  const Suggestion = /*#__PURE__*/memo(function Suggestion(_ref) {
@@ -13968,6 +13968,8 @@ const Suggestions = /*#__PURE__*/memo(function Suggestions(_ref2) {
13968
13968
  let {
13969
13969
  suggestions,
13970
13970
  getMenuProps,
13971
+ label,
13972
+ labelledBy,
13971
13973
  getItemProps,
13972
13974
  lng,
13973
13975
  styles,
@@ -13977,12 +13979,16 @@ const Suggestions = /*#__PURE__*/memo(function Suggestions(_ref2) {
13977
13979
  } = _ref2,
13978
13980
  rest = _objectWithoutProperties(_ref2, _excluded2);
13979
13981
  const [t] = useTranslation();
13980
- return /*#__PURE__*/jsx("div", {
13982
+ return /*#__PURE__*/jsxs("div", {
13981
13983
  className: cx(styles.suggestionsContainerOpen, styles.suggestionsContainer, hidden && styles.hidden),
13982
- children: /*#__PURE__*/jsxs("ul", _objectSpread$4(_objectSpread$4({
13984
+ children: [/*#__PURE__*/jsx("ul", _objectSpread$4(_objectSpread$4({
13983
13985
  className: styles.suggestionsList
13984
- }, getMenuProps()), {}, {
13985
- children: [suggestions.map((suggestion, i) => {
13986
+ }, getMenuProps({
13987
+ // Downshift would otherwise reference its own, unrendered label.
13988
+ 'aria-label': label,
13989
+ 'aria-labelledby': labelledBy
13990
+ })), {}, {
13991
+ children: suggestions.map((suggestion, i) => {
13986
13992
  return /*#__PURE__*/jsx(Suggestion, _objectSpread$4({
13987
13993
  getItemProps: getItemProps,
13988
13994
  itemIndex: i,
@@ -13990,26 +13996,22 @@ const Suggestions = /*#__PURE__*/memo(function Suggestions(_ref2) {
13990
13996
  lng: lng,
13991
13997
  styles: styles
13992
13998
  }, rest), `${suggestion.type}-${suggestion.properties.gid || suggestion.properties.gtfsId || JSON.stringify(suggestion.properties)}`);
13993
- }), renderClearHistoryButton &&
13994
- /*#__PURE__*/
13995
- // Not a selectable downshift item, so getItemProps is intentionally
13996
- // not used here (its index would always be out of the items bounds).
13997
- jsx("li", {
13998
- children: /*#__PURE__*/jsx("button", {
13999
- onClick: handleClearHistory,
14000
- type: "button",
14001
- className: styles['clear-search-history'],
14002
- children: t('clear-search-history', {
14003
- lng
14004
- })
14005
- })
14006
- })]
14007
- }))
13999
+ })
14000
+ })), renderClearHistoryButton && /*#__PURE__*/jsx("button", {
14001
+ onClick: handleClearHistory,
14002
+ type: "button",
14003
+ className: styles['clear-search-history'],
14004
+ children: t('clear-search-history', {
14005
+ lng
14006
+ })
14007
+ })]
14008
14008
  });
14009
14009
  });
14010
14010
  process.env.NODE_ENV !== "production" ? Suggestions.propTypes = {
14011
14011
  suggestions: PropTypes.arrayOf(itemShape).isRequired,
14012
14012
  getMenuProps: PropTypes.func.isRequired,
14013
+ label: PropTypes.string,
14014
+ labelledBy: PropTypes.string,
14013
14015
  getItemProps: PropTypes.func.isRequired,
14014
14016
  lng: PropTypes.string.isRequired,
14015
14017
  styles: PropTypes.objectOf(PropTypes.string).isRequired,
@@ -14057,12 +14059,12 @@ function Input({
14057
14059
  placeholder,
14058
14060
  required,
14059
14061
  getInputProps,
14060
- getLabelProps,
14061
14062
  clearInput,
14062
14063
  ariaLabel,
14064
+ ariaDescription,
14065
+ hasLabel = false,
14063
14066
  inputRef,
14064
14067
  styles,
14065
- renderLabel = false,
14066
14068
  isMobile,
14067
14069
  inputClassName,
14068
14070
  transportMode,
@@ -14077,28 +14079,31 @@ function Input({
14077
14079
  // wipes the keystroke and desyncs Android keyboards' composing range.
14078
14080
  onValueChange(e.target.value);
14079
14081
  };
14082
+ const descriptionId = `${id}-description`;
14080
14083
  return /*#__PURE__*/jsxs("div", {
14081
14084
  className: styles.container,
14082
- children: [renderLabel && /*#__PURE__*/jsx("label", _objectSpread$3(_objectSpread$3({}, getLabelProps({
14083
- className: styles['sr-only'],
14084
- htmlFor: id
14085
- })), {}, {
14086
- children: ariaLabel
14087
- })), /*#__PURE__*/jsx("input", _objectSpread$3({
14088
- "aria-label": ariaLabel
14085
+ children: [/*#__PURE__*/jsx("input", _objectSpread$3({
14089
14086
  // eslint-disable-next-line jsx-a11y/no-autofocus
14090
- ,
14091
14087
  autoFocus: autoFocus,
14092
14088
  placeholder: placeholder,
14093
14089
  required: required,
14094
14090
  type: "text",
14095
14091
  className: cx(styles.input, styles[id], inputClassName, isMobile && transportMode && styles.thin, value && styles.hasValue),
14096
- id: id
14097
- }, getInputProps({
14092
+ id: id,
14093
+ "aria-describedby": ariaDescription ? descriptionId : undefined
14094
+ }, getInputProps(_objectSpread$3(_objectSpread$3({
14098
14095
  ref: inputRef,
14099
14096
  onBlur: inputOnBlur,
14100
14097
  onChange: handleChange
14101
- }))), value && /*#__PURE__*/jsx(ClearButton, {
14098
+ }, ariaLabel && {
14099
+ 'aria-label': ariaLabel
14100
+ }), !ariaLabel && !hasLabel && {
14101
+ 'aria-labelledby': undefined
14102
+ })))), ariaDescription && /*#__PURE__*/jsx("span", {
14103
+ id: descriptionId,
14104
+ className: styles['sr-only'],
14105
+ children: ariaDescription
14106
+ }), value && /*#__PURE__*/jsx(ClearButton, {
14102
14107
  lng: lng,
14103
14108
  clearInput: () => clearInput(inputRef),
14104
14109
  styles: styles,
@@ -14114,14 +14119,14 @@ process.env.NODE_ENV !== "production" ? Input.propTypes = {
14114
14119
  required: PropTypes.bool.isRequired,
14115
14120
  value: PropTypes.string.isRequired,
14116
14121
  getInputProps: PropTypes.func.isRequired,
14117
- getLabelProps: PropTypes.func.isRequired,
14118
14122
  clearInput: PropTypes.func.isRequired,
14119
- ariaLabel: PropTypes.string.isRequired,
14123
+ ariaLabel: PropTypes.string,
14124
+ ariaDescription: PropTypes.string,
14125
+ hasLabel: PropTypes.bool,
14120
14126
  inputRef: PropTypes.shape({
14121
14127
  current: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
14122
14128
  }).isRequired,
14123
14129
  styles: PropTypes.objectOf(PropTypes.string).isRequired,
14124
- renderLabel: PropTypes.bool,
14125
14130
  isMobile: PropTypes.bool.isRequired,
14126
14131
  inputClassName: PropTypes.string.isRequired,
14127
14132
  transportMode: PropTypes.string,
@@ -14147,6 +14152,8 @@ function MobileView({
14147
14152
  inputClassName,
14148
14153
  required,
14149
14154
  mobileLabel,
14155
+ extraDescription = '',
14156
+ onAfterClose,
14150
14157
  showScroll,
14151
14158
  state,
14152
14159
  dispatch,
@@ -14271,12 +14278,14 @@ function MobileView({
14271
14278
  SearchBarId,
14272
14279
  ariaCurrentSuggestion
14273
14280
  } = ariaProps;
14274
- const ariaLabel = ariaRequiredText.concat(' ').concat(SearchBarId).concat(' ').concat(ariaCurrentSuggestion);
14281
+ const ariaDescription = ariaRequiredText.concat(' ').concat(SearchBarId).concat(' ').concat(ariaCurrentSuggestion).concat(' ').concat(extraDescription).trim();
14275
14282
  return /*#__PURE__*/jsx(ReactModal, {
14276
14283
  isOpen: state.renderMobile,
14284
+ contentLabel: mobileLabel,
14277
14285
  className: styles['mobile-modal'],
14278
14286
  overlayClassName: styles['mobile-modal-overlay'],
14279
14287
  shouldReturnFocusAfterClose: false,
14288
+ onAfterClose: onAfterClose,
14280
14289
  shouldCloseOnEsc: true,
14281
14290
  children: /*#__PURE__*/jsxs("div", {
14282
14291
  className: styles['mobile-modal-content'],
@@ -14330,12 +14339,11 @@ function MobileView({
14330
14339
  lng: lng,
14331
14340
  value: value,
14332
14341
  getInputProps: getInputProps,
14333
- getLabelProps: getLabelProps,
14334
14342
  clearInput: () => clearInput(inputRef),
14335
- ariaLabel: ariaLabel,
14343
+ ariaDescription: ariaDescription,
14344
+ hasLabel: true,
14336
14345
  inputRef: inputRef,
14337
14346
  styles: styles,
14338
- renderLabel: false,
14339
14347
  clearButtonColor: colors.primary,
14340
14348
  autoFocus: true,
14341
14349
  inputClassName: inputClassName,
@@ -14395,6 +14403,8 @@ process.env.NODE_ENV !== "production" ? MobileView.propTypes = {
14395
14403
  inputClassName: PropTypes.string.isRequired,
14396
14404
  placeholder: PropTypes.string.isRequired,
14397
14405
  mobileLabel: PropTypes.string.isRequired,
14406
+ extraDescription: PropTypes.string,
14407
+ onAfterClose: PropTypes.func,
14398
14408
  required: PropTypes.bool.isRequired,
14399
14409
  showScroll: PropTypes.bool.isRequired,
14400
14410
  lng: PropTypes.string.isRequired,
@@ -14495,7 +14505,8 @@ const getAriaProps = ({
14495
14505
  isMobile,
14496
14506
  suggestions,
14497
14507
  value,
14498
- required
14508
+ required,
14509
+ movesFocusOnSelect
14499
14510
  }) => {
14500
14511
  const ariaBarId = id.replace('searchfield-', '');
14501
14512
  const SearchBarId = ariaLabel || t(ariaBarId, {
@@ -14509,7 +14520,7 @@ const getAriaProps = ({
14509
14520
  }) : t('search-autosuggest-label-instructions-desktop', {
14510
14521
  lng
14511
14522
  });
14512
- const movingToDestinationFieldText = id === 'origin' ? t('search-autosuggest-label-move-to-destination', {
14523
+ const movingToDestinationFieldText = movesFocusOnSelect ? t('search-autosuggest-label-move-to-destination', {
14513
14524
  lng
14514
14525
  }) : '';
14515
14526
  const ariaLabelText = ariaLabelInstructions.concat(' ').concat(movingToDestinationFieldText);
@@ -14680,6 +14691,9 @@ const getNewTargets = ({
14680
14691
  * @property {string} [inputClassName]
14681
14692
  * @property {string} [translatedPlaceholder]
14682
14693
  * @property {boolean} [required]
14694
+ * @property {string} [externalLabelId] id of a visible <label for={id}> that names the input
14695
+ * @property {string} [extraDescription] text appended to the accessible description of the input
14696
+ * @property {boolean} [movesFocusOnSelect] whether the description says that focus moves to the destination field after selecting; defaults to true for the origin field
14683
14697
  * @property {Object} [colors]
14684
14698
  * @property {string} [modeSet]
14685
14699
  * @property {boolean} [showScroll]
@@ -14717,6 +14731,9 @@ function DTAutosuggest({
14717
14731
  inputClassName = '',
14718
14732
  translatedPlaceholder,
14719
14733
  required = false,
14734
+ externalLabelId,
14735
+ extraDescription = '',
14736
+ movesFocusOnSelect = id === 'origin',
14720
14737
  ariaLabel,
14721
14738
  colors = defaultColors,
14722
14739
  modeSet,
@@ -14862,7 +14879,6 @@ function DTAutosuggest({
14862
14879
  const {
14863
14880
  isOpen,
14864
14881
  highlightedIndex,
14865
- getLabelProps,
14866
14882
  getMenuProps,
14867
14883
  getInputProps,
14868
14884
  getItemProps,
@@ -15047,8 +15063,16 @@ function DTAutosuggest({
15047
15063
  ariaLabel,
15048
15064
  suggestions: state.suggestions,
15049
15065
  value: state.value,
15050
- required
15066
+ required,
15067
+ movesFocusOnSelect
15068
+ });
15069
+
15070
+ // Stable name that contains the visible placeholder text, so voice control can target the field.
15071
+ // An external <label for={id}> takes its place when externalLabelId is given.
15072
+ const visiblePlaceholder = translatedPlaceholder || t(placeholder, {
15073
+ lng
15051
15074
  });
15075
+ const accessibleName = externalLabelId ? undefined : ariaRequiredText.concat(' ').concat(ariaLabel || visiblePlaceholder).trim();
15052
15076
  const mobileClearOldSearches = () => {
15053
15077
  const {
15054
15078
  clearOldSearches,
@@ -15071,6 +15095,16 @@ function DTAutosuggest({
15071
15095
  }
15072
15096
  }, [state.renderMobile, isOpen]);
15073
15097
 
15098
+ // The input is hidden while the mobile modal is open, so focus is lost on close.
15099
+ const restoreFocusAfterModal = () => {
15100
+ const {
15101
+ activeElement
15102
+ } = document;
15103
+ if (!activeElement || activeElement === document.body) {
15104
+ inputRef.current?.focus?.();
15105
+ }
15106
+ };
15107
+
15074
15108
  // Downshift keeps highlightedIndex when the suggestions change, and the
15075
15109
  // menu is hidden on mobile, so the highlighted item may not be shown.
15076
15110
  const activeItemHidden = isMobile || highlightedIndex >= state.suggestions.length;
@@ -15092,6 +15126,8 @@ function DTAutosuggest({
15092
15126
  SearchBarId,
15093
15127
  ariaRequiredText
15094
15128
  },
15129
+ extraDescription: extraDescription,
15130
+ onAfterClose: restoreFocusAfterModal,
15095
15131
  id: id,
15096
15132
  lng: lng,
15097
15133
  onSelectedItemChange: onSelectedItemChange,
@@ -15109,6 +15145,7 @@ function DTAutosuggest({
15109
15145
  className: cx(styles['autosuggest-input-container'], styles[id], state.renderMobile && 'hidden'),
15110
15146
  style: {
15111
15147
  '--color': colors.primary,
15148
+ '--accessible-primary-color': colors.accessiblePrimary,
15112
15149
  '--hover-color': colors.hover
15113
15150
  },
15114
15151
  children: [icon && /*#__PURE__*/jsx("div", {
@@ -15119,22 +15156,20 @@ function DTAutosuggest({
15119
15156
  })
15120
15157
  }), /*#__PURE__*/jsx(Input, {
15121
15158
  inputClassName: inputClassName,
15122
- ariaLabel: ariaCurrentSuggestion.concat(' ').concat(ariaRequiredText).concat(' ').concat(SearchBarId).concat(' ').concat(t('search-autosuggest-label', {
15159
+ ariaLabel: accessibleName,
15160
+ ariaDescription: t('search-autosuggest-label', {
15123
15161
  lng
15124
- })).concat(' ').concat(ariaLabelText),
15162
+ }).concat(' ').concat(ariaLabelText).concat(' ').concat(extraDescription).trim(),
15125
15163
  id: id,
15126
15164
  lng: lng,
15127
15165
  getInputProps: getComboboxInputProps,
15128
- getLabelProps: getLabelProps,
15129
15166
  selectItem: selectItem,
15130
15167
  value: state.value,
15131
15168
  clearInput: clearInput,
15132
15169
  inputRef: inputRef,
15133
15170
  styles: styles,
15134
15171
  clearButtonColor: colors.primary,
15135
- placeholder: translatedPlaceholder || t(placeholder, {
15136
- lng
15137
- }),
15172
+ placeholder: visiblePlaceholder,
15138
15173
  required: required,
15139
15174
  transportMode: transportMode,
15140
15175
  isMobile: isMobile,
@@ -15145,6 +15180,8 @@ function DTAutosuggest({
15145
15180
  highlightedIndex: highlightedIndex,
15146
15181
  getItemProps: getItemProps,
15147
15182
  getMenuProps: getMenuProps,
15183
+ label: accessibleName,
15184
+ labelledBy: externalLabelId,
15148
15185
  suggestions: state.suggestions,
15149
15186
  lng: lng,
15150
15187
  styles: styles
@@ -15194,6 +15231,9 @@ process.env.NODE_ENV !== "production" ? DTAutosuggest.propTypes = {
15194
15231
  colors: PropTypes.objectOf(PropTypes.string),
15195
15232
  getAutoSuggestIcons: PropTypes.objectOf(PropTypes.func),
15196
15233
  required: PropTypes.bool,
15234
+ externalLabelId: PropTypes.string,
15235
+ extraDescription: PropTypes.string,
15236
+ movesFocusOnSelect: PropTypes.bool,
15197
15237
  modeSet: PropTypes.string,
15198
15238
  showScroll: PropTypes.bool,
15199
15239
  isEmbedded: PropTypes.bool