-
Notifications
You must be signed in to change notification settings - Fork 10
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
Co-authored-by: Gareth Cozens <gareth.cozens@amido.com>
- Loading branch information
1 parent
ab52443
commit 6c53369
Showing
13 changed files
with
238 additions
and
246 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export class Accordion { | ||
$module: HTMLElement; | ||
moduleId: string; | ||
$sections: NodeListOf<HTMLElement>; | ||
$openAllButton: string; | ||
browserSupportsSessionStorage: boolean | undefined; | ||
|
||
controlsClass: string; | ||
openAllClass: string; | ||
iconClass: string; | ||
|
||
sectionHeaderClass: string; | ||
sectionHeaderFocusedClass: string; | ||
sectionHeadingClass: string; | ||
sectionSummaryClass: string; | ||
sectionButtonClass: string; | ||
sectionExpandedClass: string; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
initControls(): void; | ||
initSectionHeaders(): void; | ||
initHeaderAttributes($headerWrapper: HTMLElement, index: number): void; | ||
onSectionToggle($section: HTMLElement): void; | ||
onOpenOrCloseAllToggle(): void; | ||
setExpanded(expanded: boolean, $section: HTMLElement | null): void; | ||
isExpanded(section: HTMLElement | null): boolean; | ||
checkIfAllSectionsOpen(): boolean; | ||
updateOpenAllButton(expanded: boolean): void; | ||
storeState($section: HTMLElement): void; | ||
setInitialState($section: HTMLElement): void; | ||
} | ||
|
||
export default Accordion; |
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,10 @@ | ||
class BackToTop { | ||
$module: HTMLElement; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
checkScrollPosition($element: HTMLElement): void; | ||
} | ||
|
||
export default BackToTop; |
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,12 @@ | ||
class Button { | ||
$module: HTMLElement; | ||
debounceFormSubmitTimer: number | null; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
handleKeyDown(event: KeyboardEvent): void; | ||
debounce(event: MouseEvent): void | false; | ||
init(): void; | ||
} | ||
|
||
export default Button; |
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,21 @@ | ||
class CharacterCount { | ||
$module: HTMLElement; | ||
$textarea: HTMLElement | null; | ||
$countMessage: HTMLElement | null; | ||
|
||
valueChecker: number | null; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
sync(): void; | ||
getDataset(): Record<string, string>; | ||
count(text: string): number; | ||
bindChangeEvents(): void; | ||
checkIfValueChanged(): void; | ||
updateCountMessage(): void; | ||
handleFocus(): void; | ||
handleBlur(): void; | ||
} | ||
|
||
export default CharacterCount; |
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 @@ | ||
class Checkboxes { | ||
$module: HTMLElement; | ||
$inputs: NodeListOf<HTMLInputElement>; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
syncAllConditionalReveals(): void; | ||
syncConditionalRevealWithInputState($input: HTMLInputElement): void; | ||
unCheckAllInputsExcept($input: HTMLInputElement): void; | ||
unCheckExclusiveInputs($input: HTMLInputElement): void; | ||
handleClick(event: MouseEvent): void; | ||
} | ||
|
||
export default Checkboxes; |
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,9 @@ | ||
class Collapsible { | ||
$module: HTMLElement; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
} | ||
|
||
export default Collapsible; |
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,26 @@ | ||
class Map { | ||
$module: HTMLElement; | ||
moduleId: string; | ||
accessToken: string; | ||
markerLat: number | null; | ||
markerLng: number | null; | ||
centreLat: number; | ||
centreLng: number; | ||
maxZoom: number; | ||
minZoom: number; | ||
initialZoom: number; | ||
showZoomControl: boolean; | ||
minLat: number; | ||
maxLat: number; | ||
maxLng: number; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
initLeaflet(): void; | ||
setBounds(): void; | ||
initMapboxTiles(): void; | ||
addMarker(): void; | ||
} | ||
|
||
export default Map; |
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,13 @@ | ||
class CookieBanner { | ||
$module: HTMLElement; | ||
$button: HTMLElement | null; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
checkCookies(): string | null; | ||
showCookieBanner(): void; | ||
bindAcceptButton(): void; | ||
} | ||
|
||
export default CookieBanner; |
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,12 @@ | ||
class Details { | ||
$module: HTMLElement; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
polyfillDetails(): void; | ||
polyfillSetAttributes(): true; | ||
polyfillHandleInputs(node: HTMLElement, callback: Function): void; | ||
} | ||
|
||
export default Details; |
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,13 @@ | ||
class ErrorSummary { | ||
$module: HTMLElement; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
handleClick(event: MouseEvent): void; | ||
focusTarget($target: HTMLElement): boolean; | ||
getFragmentFromUrl(url: string): string | false; | ||
getAssociatedLegendOrLabel($input: HTMLElement): HTMLElement | null; | ||
} | ||
|
||
export default ErrorSummary; |
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,12 @@ | ||
class Radios { | ||
$module: HTMLElement; | ||
$inputs: NodeListOf<HTMLInputElement>; | ||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
syncAllConditionalReveals(): void; | ||
syncConditionalRevealWithInputState(): void; | ||
handleClick(event: MouseEvent): void; | ||
} | ||
|
||
export default Radios; |
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,33 @@ | ||
class Tabs { | ||
$module: HTMLElement; | ||
$tabs: NodeListOf<HTMLElement>; | ||
keys: { left: number; right: number; up: number; down: number }; | ||
jsHiddenClass: string; | ||
|
||
constructor($module: HTMLElement); | ||
|
||
init(): void; | ||
setupResponsiveChecks(): void; | ||
checkMode(): void; | ||
setup(): void; | ||
teardown(): void; | ||
onHashChange(event: HashChangeEvent): void; | ||
hideTab($tab: HTMLElement): void; | ||
showTab($tab: HTMLElement): void; | ||
getTab(hash: string): HTMLElement | null; | ||
setAttributes($tab: HTMLElement): void; | ||
unsetAttributes($tab: HTMLElement): void; | ||
onTabClick(event: MouseEvent): void; | ||
createHistoryEntry($tab: HTMLElement): void; | ||
onTabKeydown(event: KeyboardEvent): void; | ||
activateNextTab(): void; | ||
activatePreviousTab(): void; | ||
getPanel($tab: HTMLElement): HTMLElement | null; | ||
showPanel($tab: HTMLElement): void; | ||
hidePanel($tab: HTMLElement): void; | ||
unhighlightTab($tab: HTMLElement): void; | ||
getCurrentTab(): HTMLElement | null; | ||
getHref($tab: HTMLElement): string; | ||
} | ||
|
||
export default Tabs; |
Oops, something went wrong.