@mixtint/primer-view-components 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +21 -0
- package/README.md +30 -0
- package/app/assets/images/loading_indicator.svg +1 -0
- package/app/assets/javascripts/components/primer/alpha/action_bar_element.d.ts +17 -0
- package/app/assets/javascripts/components/primer/alpha/action_list.d.ts +16 -0
- package/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +49 -0
- package/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
- package/app/assets/javascripts/components/primer/alpha/dropdown/menu.d.ts +1 -0
- package/app/assets/javascripts/components/primer/alpha/dropdown.d.ts +1 -0
- package/app/assets/javascripts/components/primer/alpha/modal_dialog.d.ts +18 -0
- package/app/assets/javascripts/components/primer/alpha/segmented_control.d.ts +12 -0
- package/app/assets/javascripts/components/primer/alpha/select_panel_element.d.ts +65 -0
- package/app/assets/javascripts/components/primer/alpha/tab_container.d.ts +1 -0
- package/app/assets/javascripts/components/primer/alpha/toggle_switch.d.ts +34 -0
- package/app/assets/javascripts/components/primer/alpha/tool_tip.d.ts +27 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view.d.ts +42 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_icon_pair_element.d.ts +15 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_include_fragment_element.d.ts +9 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_roving_tab_index.d.ts +3 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.d.ts +45 -0
- package/app/assets/javascripts/components/primer/alpha/x_banner.d.ts +18 -0
- package/app/assets/javascripts/components/primer/anchored_position.d.ts +27 -0
- package/app/assets/javascripts/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- package/app/assets/javascripts/components/primer/beta/clipboard_copy.d.ts +1 -0
- package/app/assets/javascripts/components/primer/beta/details_toggle_element.d.ts +40 -0
- package/app/assets/javascripts/components/primer/beta/nav_list.d.ts +20 -0
- package/app/assets/javascripts/components/primer/beta/nav_list_group_element.d.ts +19 -0
- package/app/assets/javascripts/components/primer/beta/relative_time.d.ts +1 -0
- package/app/assets/javascripts/components/primer/dialog_helper.d.ts +15 -0
- package/app/assets/javascripts/components/primer/focus_group.d.ts +19 -0
- package/app/assets/javascripts/components/primer/open_project/border_box/collapsible_header.d.ts +11 -0
- package/app/assets/javascripts/components/primer/open_project/collapsible.d.ts +13 -0
- package/app/assets/javascripts/components/primer/open_project/collapsible_section.d.ts +10 -0
- package/app/assets/javascripts/components/primer/open_project/danger_dialog_form_helper.d.ts +14 -0
- package/app/assets/javascripts/components/primer/open_project/filterable_tree_view.d.ts +29 -0
- package/app/assets/javascripts/components/primer/open_project/page_header_element.d.ts +9 -0
- package/app/assets/javascripts/components/primer/open_project/sub_header_element.d.ts +17 -0
- package/app/assets/javascripts/components/primer/open_project/zen_mode_button.d.ts +18 -0
- package/app/assets/javascripts/components/primer/primer.d.ts +40 -0
- package/app/assets/javascripts/components/primer/scrollable_region.d.ts +13 -0
- package/app/assets/javascripts/components/primer/shared_events.d.ts +26 -0
- package/app/assets/javascripts/components/primer/utils.d.ts +1 -0
- package/app/assets/javascripts/lib/primer/forms/primer_multi_input.d.ts +10 -0
- package/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +28 -0
- package/app/assets/javascripts/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- package/app/assets/javascripts/primer_view_components.js +2 -0
- package/app/assets/javascripts/primer_view_components.js.map +1 -0
- package/app/assets/styles/primer_view_components.css +7336 -0
- package/app/assets/styles/primer_view_components.css.map +1 -0
- package/app/components/primer/alpha/action_bar.css +49 -0
- package/app/components/primer/alpha/action_bar.css.json +14 -0
- package/app/components/primer/alpha/action_bar_element.d.ts +17 -0
- package/app/components/primer/alpha/action_bar_element.js +170 -0
- package/app/components/primer/alpha/action_list.css +526 -0
- package/app/components/primer/alpha/action_list.css.json +117 -0
- package/app/components/primer/alpha/action_list.d.ts +16 -0
- package/app/components/primer/alpha/action_list.js +70 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +49 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.js +591 -0
- package/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
- package/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +62 -0
- package/app/components/primer/alpha/auto_complete.css +131 -0
- package/app/components/primer/alpha/auto_complete.css.json +21 -0
- package/app/components/primer/alpha/banner.css +146 -0
- package/app/components/primer/alpha/banner.css.json +26 -0
- package/app/components/primer/alpha/button_marketing.css +183 -0
- package/app/components/primer/alpha/button_marketing.css.json +30 -0
- package/app/components/primer/alpha/dialog.css +377 -0
- package/app/components/primer/alpha/dialog.css.json +66 -0
- package/app/components/primer/alpha/dropdown/menu.d.ts +1 -0
- package/app/components/primer/alpha/dropdown/menu.js +1 -0
- package/app/components/primer/alpha/dropdown.css +296 -0
- package/app/components/primer/alpha/dropdown.css.json +40 -0
- package/app/components/primer/alpha/dropdown.d.ts +1 -0
- package/app/components/primer/alpha/dropdown.js +1 -0
- package/app/components/primer/alpha/layout.css +374 -0
- package/app/components/primer/alpha/layout.css.json +74 -0
- package/app/components/primer/alpha/menu.css +124 -0
- package/app/components/primer/alpha/menu.css.json +26 -0
- package/app/components/primer/alpha/modal_dialog.d.ts +18 -0
- package/app/components/primer/alpha/modal_dialog.js +187 -0
- package/app/components/primer/alpha/overlay.css +25 -0
- package/app/components/primer/alpha/overlay.css.json +12 -0
- package/app/components/primer/alpha/segmented_control.css +161 -0
- package/app/components/primer/alpha/segmented_control.css.json +31 -0
- package/app/components/primer/alpha/segmented_control.d.ts +12 -0
- package/app/components/primer/alpha/segmented_control.js +59 -0
- package/app/components/primer/alpha/select_panel.css +10 -0
- package/app/components/primer/alpha/select_panel.css.json +7 -0
- package/app/components/primer/alpha/select_panel_element.d.ts +65 -0
- package/app/components/primer/alpha/select_panel_element.js +988 -0
- package/app/components/primer/alpha/skeleton_box.css +36 -0
- package/app/components/primer/alpha/skeleton_box.css.json +6 -0
- package/app/components/primer/alpha/stack.css +266 -0
- package/app/components/primer/alpha/stack.css.json +94 -0
- package/app/components/primer/alpha/stack_item.css +27 -0
- package/app/components/primer/alpha/stack_item.css.json +12 -0
- package/app/components/primer/alpha/tab_container.d.ts +1 -0
- package/app/components/primer/alpha/tab_container.js +1 -0
- package/app/components/primer/alpha/tab_nav.css +112 -0
- package/app/components/primer/alpha/tab_nav.css.json +22 -0
- package/app/components/primer/alpha/text_field.css +838 -0
- package/app/components/primer/alpha/text_field.css.json +134 -0
- package/app/components/primer/alpha/toggle_switch.css +230 -0
- package/app/components/primer/alpha/toggle_switch.css.json +40 -0
- package/app/components/primer/alpha/toggle_switch.d.ts +34 -0
- package/app/components/primer/alpha/toggle_switch.js +179 -0
- package/app/components/primer/alpha/tool_tip.d.ts +27 -0
- package/app/components/primer/alpha/tool_tip.js +443 -0
- package/app/components/primer/alpha/tree_view/tree_view.d.ts +42 -0
- package/app/components/primer/alpha/tree_view/tree_view.js +391 -0
- package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.d.ts +15 -0
- package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +62 -0
- package/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.d.ts +9 -0
- package/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.js +28 -0
- package/app/components/primer/alpha/tree_view/tree_view_roving_tab_index.d.ts +3 -0
- package/app/components/primer/alpha/tree_view/tree_view_roving_tab_index.js +130 -0
- package/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.d.ts +45 -0
- package/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.js +429 -0
- package/app/components/primer/alpha/tree_view.css +396 -0
- package/app/components/primer/alpha/tree_view.css.json +52 -0
- package/app/components/primer/alpha/underline_nav.css +150 -0
- package/app/components/primer/alpha/underline_nav.css.json +26 -0
- package/app/components/primer/alpha/x_banner.d.ts +18 -0
- package/app/components/primer/alpha/x_banner.js +51 -0
- package/app/components/primer/anchored_position.d.ts +27 -0
- package/app/components/primer/anchored_position.js +159 -0
- package/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- package/app/components/primer/beta/auto_complete/auto_complete.js +1 -0
- package/app/components/primer/beta/avatar.css +77 -0
- package/app/components/primer/beta/avatar.css.json +17 -0
- package/app/components/primer/beta/avatar_stack.css +145 -0
- package/app/components/primer/beta/avatar_stack.css.json +28 -0
- package/app/components/primer/beta/blankslate.css +168 -0
- package/app/components/primer/beta/blankslate.css.json +23 -0
- package/app/components/primer/beta/border_box.css +218 -0
- package/app/components/primer/beta/border_box.css.json +54 -0
- package/app/components/primer/beta/breadcrumbs.css +29 -0
- package/app/components/primer/beta/breadcrumbs.css.json +9 -0
- package/app/components/primer/beta/button.css +359 -0
- package/app/components/primer/beta/button.css.json +86 -0
- package/app/components/primer/beta/button_group.css +20 -0
- package/app/components/primer/beta/button_group.css.json +12 -0
- package/app/components/primer/beta/clipboard_copy.d.ts +1 -0
- package/app/components/primer/beta/clipboard_copy.js +58 -0
- package/app/components/primer/beta/counter.css +38 -0
- package/app/components/primer/beta/counter.css.json +10 -0
- package/app/components/primer/beta/details_toggle_element.d.ts +40 -0
- package/app/components/primer/beta/details_toggle_element.js +65 -0
- package/app/components/primer/beta/flash.css +152 -0
- package/app/components/primer/beta/flash.css.json +27 -0
- package/app/components/primer/beta/label.css +109 -0
- package/app/components/primer/beta/label.css.json +24 -0
- package/app/components/primer/beta/link.css +79 -0
- package/app/components/primer/beta/link.css.json +19 -0
- package/app/components/primer/beta/nav_list.d.ts +20 -0
- package/app/components/primer/beta/nav_list.js +192 -0
- package/app/components/primer/beta/nav_list_group_element.d.ts +19 -0
- package/app/components/primer/beta/nav_list_group_element.js +111 -0
- package/app/components/primer/beta/popover.css +215 -0
- package/app/components/primer/beta/popover.css.json +33 -0
- package/app/components/primer/beta/progress_bar.css +27 -0
- package/app/components/primer/beta/progress_bar.css.json +10 -0
- package/app/components/primer/beta/relative_time.d.ts +1 -0
- package/app/components/primer/beta/relative_time.js +1 -0
- package/app/components/primer/beta/state.css +59 -0
- package/app/components/primer/beta/state.css.json +13 -0
- package/app/components/primer/beta/subhead.css +64 -0
- package/app/components/primer/beta/subhead.css.json +14 -0
- package/app/components/primer/beta/timeline_item.css +106 -0
- package/app/components/primer/beta/timeline_item.css.json +16 -0
- package/app/components/primer/beta/truncate.css +30 -0
- package/app/components/primer/beta/truncate.css.json +12 -0
- package/app/components/primer/dialog_helper.d.ts +15 -0
- package/app/components/primer/dialog_helper.js +132 -0
- package/app/components/primer/focus_group.d.ts +19 -0
- package/app/components/primer/focus_group.js +163 -0
- package/app/components/primer/open_project/border_box/collapsible_header.css +21 -0
- package/app/components/primer/open_project/border_box/collapsible_header.css.json +11 -0
- package/app/components/primer/open_project/border_box/collapsible_header.d.ts +11 -0
- package/app/components/primer/open_project/border_box/collapsible_header.js +21 -0
- package/app/components/primer/open_project/border_grid.css +35 -0
- package/app/components/primer/open_project/border_grid.css.json +11 -0
- package/app/components/primer/open_project/collapsible.d.ts +13 -0
- package/app/components/primer/open_project/collapsible.js +67 -0
- package/app/components/primer/open_project/collapsible_section.css +5 -0
- package/app/components/primer/open_project/collapsible_section.css.json +6 -0
- package/app/components/primer/open_project/collapsible_section.d.ts +10 -0
- package/app/components/primer/open_project/collapsible_section.js +16 -0
- package/app/components/primer/open_project/danger_dialog_form_helper.d.ts +14 -0
- package/app/components/primer/open_project/danger_dialog_form_helper.js +54 -0
- package/app/components/primer/open_project/drag_handle.css +6 -0
- package/app/components/primer/open_project/drag_handle.css.json +6 -0
- package/app/components/primer/open_project/filterable_tree_view.d.ts +29 -0
- package/app/components/primer/open_project/filterable_tree_view.js +409 -0
- package/app/components/primer/open_project/input_group.css +22 -0
- package/app/components/primer/open_project/input_group.css.json +12 -0
- package/app/components/primer/open_project/page_header.css +87 -0
- package/app/components/primer/open_project/page_header.css.json +20 -0
- package/app/components/primer/open_project/page_header_element.d.ts +9 -0
- package/app/components/primer/open_project/page_header_element.js +23 -0
- package/app/components/primer/open_project/side_panel/section.css +27 -0
- package/app/components/primer/open_project/side_panel/section.css.json +11 -0
- package/app/components/primer/open_project/sub_header.css +80 -0
- package/app/components/primer/open_project/sub_header.css.json +17 -0
- package/app/components/primer/open_project/sub_header_element.d.ts +17 -0
- package/app/components/primer/open_project/sub_header_element.js +76 -0
- package/app/components/primer/open_project/zen_mode_button.d.ts +18 -0
- package/app/components/primer/open_project/zen_mode_button.js +64 -0
- package/app/components/primer/primer.d.ts +40 -0
- package/app/components/primer/primer.js +40 -0
- package/app/components/primer/scrollable_region.d.ts +13 -0
- package/app/components/primer/scrollable_region.js +52 -0
- package/app/components/primer/shared_events.d.ts +26 -0
- package/app/components/primer/shared_events.js +1 -0
- package/app/components/primer/truncate.css +23 -0
- package/app/components/primer/truncate.css.json +13 -0
- package/app/components/primer/utils.d.ts +1 -0
- package/app/components/primer/utils.js +16 -0
- package/app/lib/primer/forms/primer_multi_input.d.ts +10 -0
- package/app/lib/primer/forms/primer_multi_input.js +44 -0
- package/app/lib/primer/forms/primer_text_field.d.ts +28 -0
- package/app/lib/primer/forms/primer_text_field.js +119 -0
- package/app/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- package/app/lib/primer/forms/toggle_switch_input.js +34 -0
- package/package.json +103 -0
- package/static/arguments.json +6472 -0
- package/static/audited_at.json +173 -0
- package/static/classes.json +781 -0
- package/static/constants.json +1972 -0
- package/static/form_previews.json +118 -0
- package/static/info_arch.json +21331 -0
- package/static/previews.json +9436 -0
- package/static/statuses.json +173 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* CSS for SubHeader */
|
|
2
|
+
|
|
3
|
+
.SubHeader {
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-areas: "left middle right" "bottom bottom bottom";
|
|
6
|
+
grid-template-columns: auto 1fr auto;
|
|
7
|
+
align-items: center;
|
|
8
|
+
margin-bottom: var(--base-size-16);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.SubHeader--expandedSearch {
|
|
12
|
+
grid-template-areas: "left left left" "bottom bottom bottom";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.SubHeader-rightPane {
|
|
16
|
+
grid-area: right;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
column-gap: 12px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.SubHeader-middlePane {
|
|
23
|
+
grid-area: middle;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.SubHeader-bottomPane {
|
|
28
|
+
grid-area: bottom;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.SubHeader-leftPane {
|
|
32
|
+
grid-area: left;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
width: 100%;
|
|
36
|
+
|
|
37
|
+
/* Since the container is not full width (due to the grid around it)
|
|
38
|
+
we want it to grow, and then be limited by the max-width of the "FormControl-input-width--xy" class */
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:is(.SubHeader-leftPane [class*='FormControl-input-width--']):not(.FormControl-input-width--auto) {
|
|
42
|
+
width: 100vw;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.SubHeader-filterContainer {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-basis: max-content;
|
|
48
|
+
width: 100%;
|
|
49
|
+
gap: 8px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.SubHeader-filterInput_hiddenClearButton + .FormControl-input-trailingAction {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (max-width: 543.98px) {
|
|
57
|
+
.SubHeader {
|
|
58
|
+
grid-template-areas: "left right" "middle middle" "bottom bottom";
|
|
59
|
+
grid-template-columns: 1fr auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.SubHeader--emptyLeftPane {
|
|
63
|
+
grid-template-areas: "middle middle right" "bottom bottom bottom";
|
|
64
|
+
grid-template-columns: auto 1fr auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.SubHeader--emptyLeftPane .SubHeader-middlePane {
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
text-overflow: ellipsis;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.SubHeader-middlePane {
|
|
74
|
+
text-align: left;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.SubHeader-middlePane:has(> *) {
|
|
78
|
+
margin-top: var(--stack-gap-normal);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "open_project/sub_header",
|
|
3
|
+
"selectors": [
|
|
4
|
+
".SubHeader",
|
|
5
|
+
".SubHeader--expandedSearch",
|
|
6
|
+
".SubHeader-rightPane",
|
|
7
|
+
".SubHeader-middlePane",
|
|
8
|
+
".SubHeader-bottomPane",
|
|
9
|
+
".SubHeader-leftPane",
|
|
10
|
+
":is(.SubHeader-leftPane [class*='FormControl-input-width--']):not(.FormControl-input-width--auto)",
|
|
11
|
+
".SubHeader-filterContainer",
|
|
12
|
+
".SubHeader-filterInput_hiddenClearButton + .FormControl-input-trailingAction",
|
|
13
|
+
".SubHeader--emptyLeftPane",
|
|
14
|
+
".SubHeader--emptyLeftPane .SubHeader-middlePane",
|
|
15
|
+
".SubHeader-middlePane:has(> *)"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare class SubHeaderElement extends HTMLElement {
|
|
2
|
+
filterInput: HTMLInputElement;
|
|
3
|
+
hiddenItemsOnExpandedFilter: HTMLElement[];
|
|
4
|
+
shownItemsOnExpandedFilter: HTMLElement[];
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
setupFilterInputClearButton(): void;
|
|
7
|
+
toggleFilterInputClearButton(): void;
|
|
8
|
+
expandFilterInput(): void;
|
|
9
|
+
collapseFilterInput(): void;
|
|
10
|
+
private waitForCondition;
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface Window {
|
|
14
|
+
SubHeaderElement: typeof SubHeaderElement;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { controller, target, targets } from '@github/catalyst';
|
|
8
|
+
let SubHeaderElement = class SubHeaderElement extends HTMLElement {
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
this.setupFilterInputClearButton();
|
|
11
|
+
}
|
|
12
|
+
setupFilterInputClearButton() {
|
|
13
|
+
this.waitForCondition(() => Boolean(this.filterInput), () => {
|
|
14
|
+
this.toggleFilterInputClearButton();
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
toggleFilterInputClearButton() {
|
|
18
|
+
if (this.filterInput.value.length > 0) {
|
|
19
|
+
this.filterInput.classList.remove('SubHeader-filterInput_hiddenClearButton');
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.filterInput.classList.add('SubHeader-filterInput_hiddenClearButton');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
expandFilterInput() {
|
|
26
|
+
for (const item of this.hiddenItemsOnExpandedFilter) {
|
|
27
|
+
item.classList.add('d-none');
|
|
28
|
+
}
|
|
29
|
+
for (const item of this.shownItemsOnExpandedFilter) {
|
|
30
|
+
item.classList.remove('d-none');
|
|
31
|
+
}
|
|
32
|
+
this.classList.add('SubHeader--expandedSearch');
|
|
33
|
+
this.filterInput.focus();
|
|
34
|
+
}
|
|
35
|
+
collapseFilterInput() {
|
|
36
|
+
for (const item of this.hiddenItemsOnExpandedFilter) {
|
|
37
|
+
item.classList.remove('d-none');
|
|
38
|
+
}
|
|
39
|
+
for (const item of this.shownItemsOnExpandedFilter) {
|
|
40
|
+
item.classList.add('d-none');
|
|
41
|
+
}
|
|
42
|
+
this.classList.remove('SubHeader--expandedSearch');
|
|
43
|
+
}
|
|
44
|
+
// Waits for condition to return true. If it returns false initially, this function creates a
|
|
45
|
+
// MutationObserver that calls body() whenever the contents of the component change.
|
|
46
|
+
waitForCondition(condition, body) {
|
|
47
|
+
if (condition()) {
|
|
48
|
+
body();
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
const mutationObserver = new MutationObserver(() => {
|
|
52
|
+
if (condition()) {
|
|
53
|
+
body();
|
|
54
|
+
mutationObserver.disconnect();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
mutationObserver.observe(this, { childList: true, subtree: true });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
__decorate([
|
|
62
|
+
target
|
|
63
|
+
], SubHeaderElement.prototype, "filterInput", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
targets
|
|
66
|
+
], SubHeaderElement.prototype, "hiddenItemsOnExpandedFilter", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
targets
|
|
69
|
+
], SubHeaderElement.prototype, "shownItemsOnExpandedFilter", void 0);
|
|
70
|
+
SubHeaderElement = __decorate([
|
|
71
|
+
controller
|
|
72
|
+
], SubHeaderElement);
|
|
73
|
+
if (!window.customElements.get('sub-header')) {
|
|
74
|
+
window.SubHeaderElement = SubHeaderElement;
|
|
75
|
+
window.customElements.define('sub-header', SubHeaderElement);
|
|
76
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare class ZenModeButtonElement extends HTMLElement {
|
|
2
|
+
button: HTMLElement;
|
|
3
|
+
inZenMode: boolean;
|
|
4
|
+
constructor();
|
|
5
|
+
disconnectedCallback(): void;
|
|
6
|
+
fullscreenChangeEventHandler(): void;
|
|
7
|
+
dispatchZenModeStatus(): void;
|
|
8
|
+
private deactivateZenMode;
|
|
9
|
+
private activateZenMode;
|
|
10
|
+
changeButtonState(inZenMode: boolean): void;
|
|
11
|
+
performAction(): void;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface Window {
|
|
15
|
+
ZenModeButtonElement: typeof ZenModeButtonElement;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { controller, target } from '@github/catalyst';
|
|
8
|
+
let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
|
9
|
+
// eslint-disable-next-line custom-elements/no-constructor
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.inZenMode = false;
|
|
13
|
+
document.addEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this));
|
|
14
|
+
}
|
|
15
|
+
disconnectedCallback() {
|
|
16
|
+
document.removeEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this));
|
|
17
|
+
}
|
|
18
|
+
fullscreenChangeEventHandler() {
|
|
19
|
+
this.changeButtonState(!this.inZenMode);
|
|
20
|
+
this.dispatchZenModeStatus();
|
|
21
|
+
}
|
|
22
|
+
dispatchZenModeStatus() {
|
|
23
|
+
// Create a new custom event
|
|
24
|
+
const event = new CustomEvent('zenModeToggled', {
|
|
25
|
+
detail: {
|
|
26
|
+
active: this.inZenMode,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
// Dispatch the custom event
|
|
30
|
+
window.dispatchEvent(event);
|
|
31
|
+
}
|
|
32
|
+
deactivateZenMode() {
|
|
33
|
+
if (document.exitFullscreen) {
|
|
34
|
+
void document.exitFullscreen();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
activateZenMode() {
|
|
38
|
+
if (document.documentElement.requestFullscreen) {
|
|
39
|
+
void document.documentElement.requestFullscreen();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
changeButtonState(inZenMode) {
|
|
43
|
+
this.inZenMode = inZenMode;
|
|
44
|
+
this.button.setAttribute('aria-pressed', inZenMode.toString());
|
|
45
|
+
}
|
|
46
|
+
performAction() {
|
|
47
|
+
if (this.inZenMode) {
|
|
48
|
+
this.deactivateZenMode();
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.activateZenMode();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
__decorate([
|
|
56
|
+
target
|
|
57
|
+
], ZenModeButtonElement.prototype, "button", void 0);
|
|
58
|
+
ZenModeButtonElement = __decorate([
|
|
59
|
+
controller
|
|
60
|
+
], ZenModeButtonElement);
|
|
61
|
+
if (!window.customElements.get('zen-mode-button')) {
|
|
62
|
+
window.ZenModeButtonElement = ZenModeButtonElement;
|
|
63
|
+
window.customElements.define('zen-mode-button', ZenModeButtonElement);
|
|
64
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import '@github/include-fragment-element';
|
|
2
|
+
import '@github/remote-input-element';
|
|
3
|
+
import './alpha/action_list';
|
|
4
|
+
import './alpha/action_bar_element';
|
|
5
|
+
import './alpha/dropdown';
|
|
6
|
+
import './anchored_position';
|
|
7
|
+
import './dialog_helper';
|
|
8
|
+
import './focus_group';
|
|
9
|
+
import './scrollable_region';
|
|
10
|
+
import './shared_events';
|
|
11
|
+
import './utils';
|
|
12
|
+
import './alpha/modal_dialog';
|
|
13
|
+
import './beta/nav_list';
|
|
14
|
+
import './beta/nav_list_group_element';
|
|
15
|
+
import './alpha/segmented_control';
|
|
16
|
+
import './alpha/toggle_switch';
|
|
17
|
+
import './alpha/tool_tip';
|
|
18
|
+
import './alpha/x_banner';
|
|
19
|
+
import './beta/auto_complete/auto_complete';
|
|
20
|
+
import './beta/clipboard_copy';
|
|
21
|
+
import './beta/relative_time';
|
|
22
|
+
import './alpha/tab_container';
|
|
23
|
+
import '../../lib/primer/forms/primer_multi_input';
|
|
24
|
+
import '../../lib/primer/forms/primer_text_field';
|
|
25
|
+
import '../../lib/primer/forms/toggle_switch_input';
|
|
26
|
+
import './alpha/action_menu/action_menu_element';
|
|
27
|
+
import './alpha/select_panel_element';
|
|
28
|
+
import './beta/details_toggle_element';
|
|
29
|
+
import './alpha/tree_view/tree_view';
|
|
30
|
+
import './alpha/tree_view/tree_view_icon_pair_element';
|
|
31
|
+
import './alpha/tree_view/tree_view_sub_tree_node_element';
|
|
32
|
+
import './alpha/tree_view/tree_view_include_fragment_element';
|
|
33
|
+
import './open_project/page_header_element';
|
|
34
|
+
import './open_project/zen_mode_button';
|
|
35
|
+
import './open_project/sub_header_element';
|
|
36
|
+
import './open_project/danger_dialog_form_helper';
|
|
37
|
+
import './open_project/collapsible';
|
|
38
|
+
import './open_project/border_box/collapsible_header';
|
|
39
|
+
import './open_project/collapsible_section';
|
|
40
|
+
import './open_project/filterable_tree_view';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import '@github/include-fragment-element';
|
|
2
|
+
import '@github/remote-input-element';
|
|
3
|
+
import './alpha/action_list';
|
|
4
|
+
import './alpha/action_bar_element';
|
|
5
|
+
import './alpha/dropdown';
|
|
6
|
+
import './anchored_position';
|
|
7
|
+
import './dialog_helper';
|
|
8
|
+
import './focus_group';
|
|
9
|
+
import './scrollable_region';
|
|
10
|
+
import './shared_events';
|
|
11
|
+
import './utils';
|
|
12
|
+
import './alpha/modal_dialog';
|
|
13
|
+
import './beta/nav_list';
|
|
14
|
+
import './beta/nav_list_group_element';
|
|
15
|
+
import './alpha/segmented_control';
|
|
16
|
+
import './alpha/toggle_switch';
|
|
17
|
+
import './alpha/tool_tip';
|
|
18
|
+
import './alpha/x_banner';
|
|
19
|
+
import './beta/auto_complete/auto_complete';
|
|
20
|
+
import './beta/clipboard_copy';
|
|
21
|
+
import './beta/relative_time';
|
|
22
|
+
import './alpha/tab_container';
|
|
23
|
+
import '../../lib/primer/forms/primer_multi_input';
|
|
24
|
+
import '../../lib/primer/forms/primer_text_field';
|
|
25
|
+
import '../../lib/primer/forms/toggle_switch_input';
|
|
26
|
+
import './alpha/action_menu/action_menu_element';
|
|
27
|
+
import './alpha/select_panel_element';
|
|
28
|
+
import './beta/details_toggle_element';
|
|
29
|
+
import './alpha/tree_view/tree_view';
|
|
30
|
+
import './alpha/tree_view/tree_view_icon_pair_element';
|
|
31
|
+
import './alpha/tree_view/tree_view_sub_tree_node_element';
|
|
32
|
+
import './alpha/tree_view/tree_view_include_fragment_element';
|
|
33
|
+
import './open_project/page_header_element';
|
|
34
|
+
import './open_project/zen_mode_button';
|
|
35
|
+
import './open_project/sub_header_element';
|
|
36
|
+
import './open_project/danger_dialog_form_helper';
|
|
37
|
+
import './open_project/collapsible';
|
|
38
|
+
import './open_project/border_box/collapsible_header';
|
|
39
|
+
import './open_project/collapsible_section';
|
|
40
|
+
import './open_project/filterable_tree_view';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class ScrollableRegionElement extends HTMLElement {
|
|
2
|
+
hasOverflow: boolean;
|
|
3
|
+
labelledBy: string;
|
|
4
|
+
observer: ResizeObserver;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
attributeChangedCallback(name: string): void;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
ScrollableRegionElement: typeof ScrollableRegionElement;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { controller, attr } from '@github/catalyst';
|
|
8
|
+
let ScrollableRegionElement = class ScrollableRegionElement extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.hasOverflow = false;
|
|
12
|
+
this.labelledBy = '';
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
this.style.overflow = 'auto';
|
|
16
|
+
this.observer = new ResizeObserver(entries => {
|
|
17
|
+
for (const entry of entries) {
|
|
18
|
+
this.hasOverflow =
|
|
19
|
+
entry.target.scrollHeight > entry.target.clientHeight || entry.target.scrollWidth > entry.target.clientWidth;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
this.observer.observe(this);
|
|
23
|
+
}
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.observer.disconnect();
|
|
26
|
+
}
|
|
27
|
+
attributeChangedCallback(name) {
|
|
28
|
+
if (name === 'data-has-overflow') {
|
|
29
|
+
if (this.hasOverflow) {
|
|
30
|
+
this.setAttribute('aria-labelledby', this.labelledBy);
|
|
31
|
+
this.setAttribute('role', 'region');
|
|
32
|
+
this.setAttribute('tabindex', '0');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.removeAttribute('aria-labelledby');
|
|
36
|
+
this.removeAttribute('role');
|
|
37
|
+
this.removeAttribute('tabindex');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
__decorate([
|
|
43
|
+
attr
|
|
44
|
+
], ScrollableRegionElement.prototype, "hasOverflow", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
attr
|
|
47
|
+
], ScrollableRegionElement.prototype, "labelledBy", void 0);
|
|
48
|
+
ScrollableRegionElement = __decorate([
|
|
49
|
+
controller
|
|
50
|
+
], ScrollableRegionElement);
|
|
51
|
+
export { ScrollableRegionElement };
|
|
52
|
+
window.ScrollableRegionElement = ScrollableRegionElement;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type ItemActivatedEvent = {
|
|
2
|
+
item: Element;
|
|
3
|
+
checked: boolean;
|
|
4
|
+
value: string | null;
|
|
5
|
+
};
|
|
6
|
+
export type TreeViewNodeType = 'leaf' | 'sub-tree';
|
|
7
|
+
export type TreeViewCheckedValue = 'true' | 'false' | 'mixed';
|
|
8
|
+
export type TreeViewNodeInfo = {
|
|
9
|
+
node: Element;
|
|
10
|
+
type: TreeViewNodeType;
|
|
11
|
+
path: string[];
|
|
12
|
+
checkedValue: TreeViewCheckedValue;
|
|
13
|
+
previousCheckedValue: TreeViewCheckedValue;
|
|
14
|
+
};
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementEventMap {
|
|
17
|
+
itemActivated: CustomEvent<ItemActivatedEvent>;
|
|
18
|
+
beforeItemActivated: CustomEvent<ItemActivatedEvent>;
|
|
19
|
+
treeViewNodeActivated: CustomEvent<TreeViewNodeInfo>;
|
|
20
|
+
treeViewBeforeNodeActivated: CustomEvent<TreeViewNodeInfo>;
|
|
21
|
+
treeViewNodeExpanded: CustomEvent<TreeViewNodeInfo>;
|
|
22
|
+
treeViewNodeCollapsed: CustomEvent<TreeViewNodeInfo>;
|
|
23
|
+
treeViewNodeChecked: CustomEvent<TreeViewNodeInfo[]>;
|
|
24
|
+
treeViewBeforeNodeChecked: CustomEvent<TreeViewNodeInfo[]>;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* CSS truncate */
|
|
2
|
+
|
|
3
|
+
/* css-truncate will shorten text with an ellipsis. */
|
|
4
|
+
|
|
5
|
+
/* css-truncate-overflow will shorten text with an ellipsis when overflowing */
|
|
6
|
+
|
|
7
|
+
.css-truncate.css-truncate-overflow,.css-truncate .css-truncate-overflow,.css-truncate.css-truncate-target,.css-truncate .css-truncate-target {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
text-overflow: ellipsis;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* css-truncate-target will shorten text with an ellipsis and a max width */
|
|
14
|
+
|
|
15
|
+
.css-truncate.css-truncate-target,.css-truncate .css-truncate-target {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
max-width: 125px;
|
|
18
|
+
vertical-align: top;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target,.css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target,.css-truncate.expandable:hover .css-truncate-target,.css-truncate.expandable.css-truncate-target:hover {
|
|
22
|
+
max-width: 10000px !important;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "truncate",
|
|
3
|
+
"selectors": [
|
|
4
|
+
".css-truncate.css-truncate-overflow",
|
|
5
|
+
".css-truncate .css-truncate-overflow",
|
|
6
|
+
".css-truncate.css-truncate-target",
|
|
7
|
+
".css-truncate .css-truncate-target",
|
|
8
|
+
".css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target",
|
|
9
|
+
".css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target",
|
|
10
|
+
".css-truncate.expandable:hover .css-truncate-target",
|
|
11
|
+
".css-truncate.expandable.css-truncate-target:hover"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const observeMutationsUntilConditionMet: (element: Element, condition: () => boolean, body: () => void) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Waits for condition to return true. If it returns false initially, this function creates a
|
|
2
|
+
// MutationObserver that calls body() whenever the contents of the component change.
|
|
3
|
+
export const observeMutationsUntilConditionMet = (element, condition, body) => {
|
|
4
|
+
if (condition()) {
|
|
5
|
+
body();
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
const mutationObserver = new MutationObserver(() => {
|
|
9
|
+
if (condition()) {
|
|
10
|
+
body();
|
|
11
|
+
mutationObserver.disconnect();
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
mutationObserver.observe(element, { childList: true, subtree: true });
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class PrimerMultiInputElement extends HTMLElement {
|
|
2
|
+
fields: HTMLInputElement[];
|
|
3
|
+
activateField(name: string): void;
|
|
4
|
+
private findField;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
interface Window {
|
|
8
|
+
PrimerMultiInputElement: typeof PrimerMultiInputElement;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/* eslint-disable custom-elements/expose-class-on-global */
|
|
8
|
+
import { controller, targets } from '@github/catalyst';
|
|
9
|
+
let PrimerMultiInputElement = class PrimerMultiInputElement extends HTMLElement {
|
|
10
|
+
activateField(name) {
|
|
11
|
+
const fieldWithName = this.findField(name);
|
|
12
|
+
if (!fieldWithName)
|
|
13
|
+
return;
|
|
14
|
+
for (const field of this.fields) {
|
|
15
|
+
if (field === fieldWithName)
|
|
16
|
+
continue;
|
|
17
|
+
field.setAttribute('disabled', 'disabled');
|
|
18
|
+
field.setAttribute('hidden', 'hidden');
|
|
19
|
+
field.parentElement?.setAttribute('hidden', 'hidden');
|
|
20
|
+
}
|
|
21
|
+
fieldWithName.removeAttribute('disabled');
|
|
22
|
+
fieldWithName.removeAttribute('hidden');
|
|
23
|
+
fieldWithName.parentElement?.removeAttribute('hidden');
|
|
24
|
+
}
|
|
25
|
+
findField(name) {
|
|
26
|
+
for (const field of this.fields) {
|
|
27
|
+
if (field.getAttribute('data-name') === name) {
|
|
28
|
+
return field;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
__decorate([
|
|
35
|
+
targets
|
|
36
|
+
], PrimerMultiInputElement.prototype, "fields", void 0);
|
|
37
|
+
PrimerMultiInputElement = __decorate([
|
|
38
|
+
controller
|
|
39
|
+
], PrimerMultiInputElement);
|
|
40
|
+
export { PrimerMultiInputElement };
|
|
41
|
+
if (!window.customElements.get('primer-multi-input')) {
|
|
42
|
+
Object.assign(window, { PrimerMultiInputElement });
|
|
43
|
+
window.customElements.define('primer-multi-input', PrimerMultiInputElement);
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import '@github/auto-check-element';
|
|
2
|
+
import type { AutoCheckErrorEvent, AutoCheckSuccessEvent } from '@github/auto-check-element';
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementEventMap {
|
|
5
|
+
'auto-check-success': AutoCheckSuccessEvent;
|
|
6
|
+
'auto-check-error': AutoCheckErrorEvent;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare class PrimerTextFieldElement extends HTMLElement {
|
|
10
|
+
#private;
|
|
11
|
+
inputElement: HTMLInputElement;
|
|
12
|
+
validationElement: HTMLElement;
|
|
13
|
+
validationMessageElement: HTMLElement;
|
|
14
|
+
validationSuccessIcon: HTMLElement;
|
|
15
|
+
validationErrorIcon: HTMLElement;
|
|
16
|
+
leadingVisual: HTMLElement;
|
|
17
|
+
leadingSpinner: HTMLElement;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
clearContents(): void;
|
|
21
|
+
clearError(): void;
|
|
22
|
+
setValidationMessage(message: string): void;
|
|
23
|
+
toggleValidationStyling(isError: boolean): void;
|
|
24
|
+
setSuccess(message: string): void;
|
|
25
|
+
setError(message: string): void;
|
|
26
|
+
showLeadingSpinner(): void;
|
|
27
|
+
hideLeadingSpinner(): void;
|
|
28
|
+
}
|