-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e7a60f
commit 4b3abdb
Showing
39 changed files
with
443 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 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 @@ | ||
import { ActionMenuElement } from './action_menu/action_menu_element'; | ||
declare class ActionBarElement extends HTMLElement { | ||
#private; | ||
items: HTMLElement[]; | ||
itemContainer: HTMLElement; | ||
moreMenu: ActionMenuElement; | ||
connectedCallback(): void; | ||
disconnectedCallback(): void; | ||
menuItemClick(event: Event): void; | ||
update(): void; | ||
} | ||
declare global { | ||
interface Window { | ||
ActionBarElement: typeof ActionBarElement; | ||
} | ||
} | ||
export {}; |
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,16 @@ | ||
export declare class ActionListTruncationObserver { | ||
resizeObserver: ResizeObserver; | ||
constructor(el: HTMLElement); | ||
unobserve(el: HTMLElement): void; | ||
update(el: HTMLElement): void; | ||
} | ||
export declare class ActionListElement extends HTMLElement { | ||
#private; | ||
connectedCallback(): void; | ||
disconnectedCallback(): void; | ||
} | ||
declare global { | ||
interface Window { | ||
ActionListElement: typeof ActionListElement; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
components/primer/alpha/action_menu/action_menu_element.d.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,42 @@ | ||
import '@oddbird/popover-polyfill'; | ||
import type { IncludeFragmentElement } from '@github/include-fragment-element'; | ||
type SelectVariant = 'none' | 'single' | 'multiple' | null; | ||
type SelectedItem = { | ||
label: string | null | undefined; | ||
value: string | null | undefined; | ||
element: Element; | ||
}; | ||
export declare class ActionMenuElement extends HTMLElement { | ||
#private; | ||
includeFragment: IncludeFragmentElement; | ||
get selectVariant(): SelectVariant; | ||
set selectVariant(variant: SelectVariant); | ||
get dynamicLabelPrefix(): string; | ||
set dynamicLabelPrefix(value: string); | ||
get dynamicLabel(): boolean; | ||
set dynamicLabel(value: boolean); | ||
get popoverElement(): HTMLElement | null; | ||
get invokerElement(): HTMLButtonElement | null; | ||
get invokerLabel(): HTMLElement | null; | ||
get selectedItems(): SelectedItem[]; | ||
connectedCallback(): void; | ||
disconnectedCallback(): void; | ||
handleEvent(event: Event): void; | ||
get items(): HTMLElement[]; | ||
getItemById(itemId: string): HTMLElement | null; | ||
isItemDisabled(item: Element | null): boolean; | ||
disableItem(item: Element | null): void; | ||
enableItem(item: Element | null): void; | ||
isItemHidden(item: Element | null): boolean; | ||
hideItem(item: Element | null): void; | ||
showItem(item: Element | null): void; | ||
isItemChecked(item: Element | null): boolean; | ||
checkItem(item: Element | null): void; | ||
uncheckItem(item: Element | null): void; | ||
} | ||
declare global { | ||
interface Window { | ||
ActionMenuElement: typeof ActionMenuElement; | ||
} | ||
} | ||
export {}; |
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 @@ | ||
import './dropdown/menu'; |
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 @@ | ||
import '@github/details-menu-element'; |
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 @@ | ||
import '@github/image-crop-element'; |
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,18 @@ | ||
export declare class ModalDialogElement extends HTMLElement { | ||
#private; | ||
openButton: HTMLButtonElement | null; | ||
get open(): boolean; | ||
set open(value: boolean); | ||
get showButtons(): NodeList; | ||
connectedCallback(): void; | ||
show(): void; | ||
close(closedNotCancelled?: boolean): void; | ||
} | ||
declare global { | ||
interface Window { | ||
ModalDialogElement: typeof ModalDialogElement; | ||
} | ||
interface HTMLElementTagNameMap { | ||
'modal-dialog': ModalDialogElement; | ||
} | ||
} |
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 @@ | ||
declare class SegmentedControlElement extends HTMLElement { | ||
#private; | ||
items: HTMLElement[]; | ||
connectedCallback(): void; | ||
select(event: Event): void; | ||
} | ||
declare global { | ||
interface Window { | ||
SegmentedControlElement: typeof SegmentedControlElement; | ||
} | ||
} | ||
export {}; |
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,63 @@ | ||
import { IncludeFragmentElement } from '@github/include-fragment-element'; | ||
import type { AnchorAlignment, AnchorSide } from '@primer/behaviors'; | ||
import '@oddbird/popover-polyfill'; | ||
type SelectVariant = 'none' | 'single' | 'multiple' | null; | ||
type SelectedItem = { | ||
label: string | null | undefined; | ||
value: string | null | undefined; | ||
inputName: string | null | undefined; | ||
}; | ||
export type SelectPanelItem = HTMLLIElement; | ||
export type FilterFn = (item: SelectPanelItem, query: string) => boolean; | ||
export declare class SelectPanelElement extends HTMLElement { | ||
#private; | ||
includeFragment: IncludeFragmentElement; | ||
dialog: HTMLDialogElement; | ||
filterInputTextField: HTMLInputElement; | ||
remoteInput: HTMLElement; | ||
list: HTMLElement; | ||
ariaLiveContainer: HTMLElement; | ||
noResults: HTMLElement; | ||
fragmentErrorElement: HTMLElement; | ||
bannerErrorElement: HTMLElement; | ||
bodySpinner: HTMLElement; | ||
filterFn?: FilterFn; | ||
get open(): boolean; | ||
get selectVariant(): SelectVariant; | ||
get ariaSelectionType(): string; | ||
set selectVariant(variant: SelectVariant); | ||
get dynamicLabelPrefix(): string; | ||
get dynamicAriaLabelPrefix(): string; | ||
set dynamicLabelPrefix(value: string); | ||
get dynamicLabel(): boolean; | ||
set dynamicLabel(value: boolean); | ||
get invokerElement(): HTMLButtonElement | null; | ||
get closeButton(): HTMLButtonElement | null; | ||
get invokerLabel(): HTMLElement | null; | ||
get selectedItems(): SelectedItem[]; | ||
get align(): AnchorAlignment; | ||
get side(): AnchorSide; | ||
updateAnchorPosition(): void; | ||
connectedCallback(): void; | ||
disconnectedCallback(): void; | ||
handleEvent(event: Event): void; | ||
show(): void; | ||
hide(): void; | ||
get visibleItems(): SelectPanelItem[]; | ||
get items(): SelectPanelItem[]; | ||
get focusableItem(): HTMLElement | undefined; | ||
getItemById(itemId: string): SelectPanelItem | null; | ||
isItemDisabled(item: SelectPanelItem | null): boolean; | ||
disableItem(item: SelectPanelItem | null): void; | ||
enableItem(item: SelectPanelItem | null): void; | ||
isItemHidden(item: SelectPanelItem | null): boolean; | ||
isItemChecked(item: SelectPanelItem | null): boolean; | ||
checkItem(item: SelectPanelItem | null): void; | ||
uncheckItem(item: SelectPanelItem | null): void; | ||
} | ||
declare global { | ||
interface Window { | ||
SelectPanelElement: typeof SelectPanelElement; | ||
} | ||
} | ||
export {}; |
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 @@ | ||
import '@github/tab-container-element'; |
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,34 @@ | ||
declare class ToggleSwitchElement extends HTMLElement { | ||
switch: HTMLElement; | ||
loadingSpinner: HTMLElement; | ||
errorIcon: HTMLElement; | ||
turbo: boolean; | ||
private toggling; | ||
get src(): string | null; | ||
get csrf(): string | null; | ||
get csrfField(): string; | ||
isRemote(): boolean; | ||
toggle(): Promise<void>; | ||
turnOn(): void; | ||
turnOff(): void; | ||
isOn(): boolean; | ||
isOff(): boolean; | ||
isDisabled(): boolean; | ||
disable(): void; | ||
enable(): void; | ||
private performToggle; | ||
private setLoadingState; | ||
private setSuccessState; | ||
private setErrorState; | ||
private setFinishedState; | ||
private submitForm; | ||
} | ||
declare global { | ||
interface Window { | ||
ToggleSwitchElement: typeof ToggleSwitchElement; | ||
Turbo: { | ||
renderStreamMessage: (message: string) => void; | ||
}; | ||
} | ||
} | ||
export {}; |
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,27 @@ | ||
import '@oddbird/popover-polyfill'; | ||
type Direction = 'n' | 's' | 'e' | 'w' | 'ne' | 'se' | 'nw' | 'sw'; | ||
declare class ToolTipElement extends HTMLElement { | ||
#private; | ||
styles(): string; | ||
get showReason(): "focus" | "mouse"; | ||
get htmlFor(): string; | ||
set htmlFor(value: string); | ||
get type(): 'description' | 'label'; | ||
set type(value: 'description' | 'label'); | ||
get direction(): Direction; | ||
set direction(value: Direction); | ||
get control(): HTMLElement | null; | ||
set hiddenFromView(value: true | false); | ||
get hiddenFromView(): true | false; | ||
connectedCallback(): void; | ||
disconnectedCallback(): void; | ||
handleEvent(event: Event): Promise<void>; | ||
static observedAttributes: string[]; | ||
attributeChangedCallback(name: string): void; | ||
} | ||
declare global { | ||
interface Window { | ||
ToolTipElement: typeof ToolTipElement; | ||
} | ||
} | ||
export {}; |
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,18 @@ | ||
declare global { | ||
interface HTMLElementEventMap { | ||
'banner:dismiss': CustomEvent<void>; | ||
} | ||
} | ||
declare class XBannerElement extends HTMLElement { | ||
#private; | ||
titleText: HTMLElement; | ||
dismiss(): void; | ||
show(): void; | ||
hide(): void; | ||
} | ||
declare global { | ||
interface Window { | ||
XBannerElement: typeof XBannerElement; | ||
} | ||
} | ||
export {}; |
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,27 @@ | ||
import type { AnchorAlignment, AnchorSide, PositionSettings } from '@primer/behaviors'; | ||
export default class AnchoredPositionElement extends HTMLElement implements PositionSettings { | ||
#private; | ||
get align(): AnchorAlignment; | ||
set align(value: AnchorAlignment); | ||
get side(): AnchorSide; | ||
set side(value: AnchorSide); | ||
get anchorOffset(): number; | ||
set anchorOffset(value: number | 'normal' | 'spacious'); | ||
get anchor(): string; | ||
set anchor(value: string); | ||
get anchorElement(): HTMLElement | null; | ||
set anchorElement(value: HTMLElement | null); | ||
get alignmentOffset(): number; | ||
set alignmentOffset(value: number); | ||
get allowOutOfBounds(): boolean; | ||
set allowOutOfBounds(value: boolean); | ||
connectedCallback(): void; | ||
static observedAttributes: string[]; | ||
attributeChangedCallback(): void; | ||
update(): void; | ||
} | ||
declare global { | ||
interface Window { | ||
AnchoredPositionElement: typeof AnchoredPositionElement; | ||
} | ||
} |
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,8 @@ | ||
export declare function announceFromElement(el: HTMLElement, options?: { | ||
assertive?: boolean; | ||
element?: HTMLElement; | ||
}): void; | ||
export declare function announce(message: string, options?: { | ||
assertive?: boolean; | ||
element?: HTMLElement; | ||
}): void; |
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 @@ | ||
import '@github/auto-complete-element'; |
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 @@ | ||
import '@github/clipboard-copy-element'; |
Oops, something went wrong.