-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update USWDS typings to incorporate corrections (#416)
* Update USWDS typings to incorporate corrections * Use export all syntax
- Loading branch information
Showing
5 changed files
with
10 additions
and
81 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,67 +1 @@ | ||
import { | ||
accordion as baseAccordion, | ||
banner as baseBanner, | ||
characterCount as baseCharacterCount, | ||
comboBox as baseComboBox, | ||
datePicker as baseDatePicker, | ||
dateRangePicker as baseDateRangePicker, | ||
fileInput as baseFileInput, | ||
footer as baseFooter, | ||
inPageNavigation as baseInPageNavigation, | ||
inputMask as baseInputMask, | ||
languageSelector as baseLanguageSelector, | ||
modal as baseModal, | ||
navigation as baseNavigation, | ||
password as basePassword, | ||
search as baseSearch, | ||
skipnav as baseSkipnav, | ||
timePicker as baseTimePicker, | ||
table as baseTable, | ||
tooltip as baseTooltip, | ||
validator as baseValidator, | ||
} from '@uswds/uswds'; | ||
|
||
type ComponentLifecycle = (target?: HTMLElement) => any; | ||
|
||
interface BaseComponent { | ||
on: ComponentLifecycle; | ||
off: ComponentLifecycle; | ||
} | ||
|
||
interface Button extends BaseComponent {} | ||
|
||
interface Range extends BaseComponent { | ||
updateCallout(targetRange: HTMLInputElement): void; | ||
} | ||
|
||
type Tooltip = typeof baseTooltip & | ||
BaseComponent & { | ||
show( | ||
tooltipBody: HTMLElement, | ||
tooltipTrigger: Element, | ||
position: 'top' | 'right' | 'left' | 'bottom', | ||
): void; | ||
}; | ||
|
||
export const accordion: typeof baseAccordion & BaseComponent; | ||
export const banner: typeof baseBanner & BaseComponent; | ||
export const button: Button; | ||
export const characterCount: typeof baseCharacterCount & BaseComponent; | ||
export const comboBox: typeof baseComboBox & BaseComponent; | ||
export const datePicker: typeof baseDatePicker & BaseComponent; | ||
export const dateRangePicker: typeof baseDateRangePicker & BaseComponent; | ||
export const fileInput: typeof baseFileInput & BaseComponent; | ||
export const footer: typeof baseFooter & BaseComponent; | ||
export const inPageNavigation: typeof baseInPageNavigation & BaseComponent; | ||
export const inputMask: typeof baseInputMask & BaseComponent; | ||
export const languageSelector: typeof baseLanguageSelector & BaseComponent; | ||
export const modal: typeof baseModal & BaseComponent; | ||
export const navigation: typeof baseNavigation & BaseComponent; | ||
export const password: typeof basePassword & BaseComponent; | ||
export const range: Range; | ||
export const search: typeof baseSearch & BaseComponent; | ||
export const skipnav: typeof baseSkipnav & BaseComponent; | ||
export const timePicker: typeof baseTimePicker & BaseComponent; | ||
export const table: typeof baseTable & BaseComponent; | ||
export const tooltip: Tooltip; | ||
export const validator: typeof baseValidator & BaseComponent; | ||
export * from '@uswds/uswds/js'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.