-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore: wip * chore: decouples combobox * chore: updated tests * chore: update tests * chore: formatting * Use FormAssociated * Increase coverage --------- Co-authored-by: Richard Helm <[email protected]>
- Loading branch information
1 parent
db952b1
commit 032c6b2
Showing
5 changed files
with
989 additions
and
8 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
libs/components/src/lib/combobox/combobox.form-associated.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Listbox } from '../../shared/foundation/listbox/listbox'; | ||
import { FormAssociated } from '../../shared/foundation/form-associated/form-associated'; | ||
|
||
class _Combobox extends Listbox {} | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
interface _Combobox extends FormAssociated {} | ||
|
||
/** | ||
* A form-associated base class for the {@link (Combobox:class)} component. | ||
* | ||
* @internal | ||
*/ | ||
export class FormAssociatedCombobox extends FormAssociated(_Combobox) { | ||
proxy = document.createElement('input'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Autocomplete values for combobox. | ||
* @public | ||
*/ | ||
export const ComboboxAutocomplete = { | ||
inline: 'inline', | ||
list: 'list', | ||
both: 'both', | ||
none: 'none', | ||
} as const; | ||
|
||
/** | ||
* Autocomplete type for combobox. | ||
* @public | ||
*/ | ||
export type ComboboxAutocomplete = | ||
typeof ComboboxAutocomplete[keyof typeof ComboboxAutocomplete]; |
Oops, something went wrong.