@primer/view-components 0.27.1-rc.54e32349 → 0.28.0-rc.22557eac
Sign up to get free protection for your applications and to get access to all the features.
- package/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +0 -9
- package/app/assets/javascripts/app/components/primer/alpha/select_panel_element.d.ts +64 -0
- package/app/assets/javascripts/app/components/primer/aria_live.d.ts +8 -0
- package/app/assets/javascripts/app/components/primer/primer.d.ts +4 -0
- package/app/assets/javascripts/app/components/primer/shared_events.d.ts +9 -0
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +0 -9
- package/app/components/primer/alpha/select_panel_element.d.ts +64 -0
- package/app/components/primer/alpha/select_panel_element.js +922 -0
- package/app/components/primer/aria_live.d.ts +8 -0
- package/app/components/primer/aria_live.js +38 -0
- package/app/components/primer/primer.d.ts +4 -0
- package/app/components/primer/primer.js +4 -0
- package/app/components/primer/shared_events.d.ts +9 -0
- package/app/components/primer/shared_events.js +1 -0
- package/package.json +2 -1
- package/static/arguments.json +118 -0
- package/static/audited_at.json +1 -0
- package/static/constants.json +16 -0
- package/static/info_arch.json +897 -116
- package/static/previews.json +294 -0
- package/static/statuses.json +1 -0
package/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts
CHANGED
@@ -6,15 +6,6 @@ type SelectedItem = {
|
|
6
6
|
value: string | null | undefined;
|
7
7
|
element: Element;
|
8
8
|
};
|
9
|
-
export type ItemActivatedEvent = {
|
10
|
-
item: Element;
|
11
|
-
checked: boolean;
|
12
|
-
};
|
13
|
-
declare global {
|
14
|
-
interface HTMLElementEventMap {
|
15
|
-
itemActivated: CustomEvent<ItemActivatedEvent>;
|
16
|
-
}
|
17
|
-
}
|
18
9
|
export declare class ActionMenuElement extends HTMLElement {
|
19
10
|
#private;
|
20
11
|
includeFragment: IncludeFragmentElement;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { IncludeFragmentElement } from '@github/include-fragment-element';
|
2
|
+
import type { AnchorAlignment, AnchorSide } from '@primer/behaviors';
|
3
|
+
import '@oddbird/popover-polyfill';
|
4
|
+
type SelectVariant = 'none' | 'single' | 'multiple' | null;
|
5
|
+
type SelectedItem = {
|
6
|
+
label: string | null | undefined;
|
7
|
+
value: string | null | undefined;
|
8
|
+
inputName: string | null | undefined;
|
9
|
+
element: SelectPanelItem;
|
10
|
+
};
|
11
|
+
export type SelectPanelItem = HTMLLIElement;
|
12
|
+
export type FilterFn = (item: SelectPanelItem, query: string) => boolean;
|
13
|
+
export declare class SelectPanelElement extends HTMLElement {
|
14
|
+
#private;
|
15
|
+
includeFragment: IncludeFragmentElement;
|
16
|
+
dialog: HTMLDialogElement;
|
17
|
+
filterInputTextField: HTMLInputElement;
|
18
|
+
remoteInput: HTMLElement;
|
19
|
+
list: HTMLElement;
|
20
|
+
ariaLiveContainer: HTMLElement;
|
21
|
+
noResults: HTMLElement;
|
22
|
+
fragmentErrorElement: HTMLElement;
|
23
|
+
bannerErrorElement: HTMLElement;
|
24
|
+
bodySpinner: HTMLElement;
|
25
|
+
filterFn?: FilterFn;
|
26
|
+
get open(): boolean;
|
27
|
+
get selectVariant(): SelectVariant;
|
28
|
+
get ariaSelectionType(): string;
|
29
|
+
set selectVariant(variant: SelectVariant);
|
30
|
+
get dynamicLabelPrefix(): string;
|
31
|
+
get dynamicAriaLabelPrefix(): string;
|
32
|
+
set dynamicLabelPrefix(value: string);
|
33
|
+
get dynamicLabel(): boolean;
|
34
|
+
set dynamicLabel(value: boolean);
|
35
|
+
get invokerElement(): HTMLButtonElement | null;
|
36
|
+
get closeButton(): HTMLButtonElement | null;
|
37
|
+
get invokerLabel(): HTMLElement | null;
|
38
|
+
get selectedItems(): SelectedItem[];
|
39
|
+
get align(): AnchorAlignment;
|
40
|
+
get side(): AnchorSide;
|
41
|
+
updateAnchorPosition(): void;
|
42
|
+
connectedCallback(): void;
|
43
|
+
disconnectedCallback(): void;
|
44
|
+
handleEvent(event: Event): void;
|
45
|
+
show(): void;
|
46
|
+
hide(): void;
|
47
|
+
get visibleItems(): SelectPanelItem[];
|
48
|
+
get items(): SelectPanelItem[];
|
49
|
+
get focusableItem(): HTMLElement | undefined;
|
50
|
+
getItemById(itemId: string): SelectPanelItem | null;
|
51
|
+
isItemDisabled(item: SelectPanelItem | null): boolean;
|
52
|
+
disableItem(item: SelectPanelItem | null): void;
|
53
|
+
enableItem(item: SelectPanelItem | null): void;
|
54
|
+
isItemHidden(item: SelectPanelItem | null): boolean;
|
55
|
+
isItemChecked(item: SelectPanelItem | null): boolean;
|
56
|
+
checkItem(item: SelectPanelItem | null): void;
|
57
|
+
uncheckItem(item: SelectPanelItem | null): void;
|
58
|
+
}
|
59
|
+
declare global {
|
60
|
+
interface Window {
|
61
|
+
SelectPanelElement: typeof SelectPanelElement;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
export {};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import '@github/include-fragment-element';
|
2
|
+
import '@github/remote-input-element';
|
2
3
|
import './alpha/action_list';
|
3
4
|
import './alpha/action_bar_element';
|
4
5
|
import './alpha/dropdown';
|
@@ -6,6 +7,8 @@ import './anchored_position';
|
|
6
7
|
import './dialog_helper';
|
7
8
|
import './focus_group';
|
8
9
|
import './scrollable_region';
|
10
|
+
import './aria_live';
|
11
|
+
import './shared_events';
|
9
12
|
import './alpha/image_crop';
|
10
13
|
import './alpha/modal_dialog';
|
11
14
|
import './beta/nav_list';
|
@@ -22,3 +25,4 @@ import '../../../lib/primer/forms/primer_multi_input';
|
|
22
25
|
import '../../../lib/primer/forms/primer_text_field';
|
23
26
|
import '../../../lib/primer/forms/toggle_switch_input';
|
24
27
|
import './alpha/action_menu/action_menu_element';
|
28
|
+
import './alpha/select_panel_element';
|