7 changed files with 49 additions and 3 deletions
			
			
		@ -0,0 +1,11 @@ | 
				
			|||||||
 | 
					import { Controller } from "@hotwired/stimulus" | 
				
			||||||
 | 
					import accessibleAutocomplete from "accessible-autocomplete" | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default class extends Controller { | 
				
			||||||
 | 
					  initialize() { | 
				
			||||||
 | 
					    accessibleAutocomplete.enhanceSelectElement({ | 
				
			||||||
 | 
					      defaultValue: '', | 
				
			||||||
 | 
					      selectElement: this.element | 
				
			||||||
 | 
					    }) | 
				
			||||||
 | 
					  } | 
				
			||||||
 | 
					} | 
				
			||||||
@ -0,0 +1,20 @@ | 
				
			|||||||
 | 
					.autocomplete__wrapper, | 
				
			||||||
 | 
					.autocomplete__input, | 
				
			||||||
 | 
					.autocomplete__hint { | 
				
			||||||
 | 
					  font-family: $govuk-font-family; | 
				
			||||||
 | 
					} | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.govuk-form-group--error { | 
				
			||||||
 | 
					  .autocomplete__input { | 
				
			||||||
 | 
					    border-color: $govuk-error-colour; | 
				
			||||||
 | 
					  } | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .autocomplete__input--focused { | 
				
			||||||
 | 
					    border-color: $govuk-input-border-colour; | 
				
			||||||
 | 
					  } | 
				
			||||||
 | 
					} | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.autocomplete__dropdown-arrow-down { | 
				
			||||||
 | 
					  pointer-events: none; | 
				
			||||||
 | 
					  z-index: 0; | 
				
			||||||
 | 
					} | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue