@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,70 @@
|
|
|
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
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
16
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
|
+
};
|
|
18
|
+
var _ActionListElement_truncationObserver;
|
|
19
|
+
import { controller } from '@github/catalyst';
|
|
20
|
+
export class ActionListTruncationObserver {
|
|
21
|
+
constructor(el) {
|
|
22
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
23
|
+
for (const entry of entries) {
|
|
24
|
+
const action = entry.target;
|
|
25
|
+
if (action instanceof HTMLElement) {
|
|
26
|
+
this.update(action);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
this.resizeObserver.observe(el);
|
|
31
|
+
}
|
|
32
|
+
unobserve(el) {
|
|
33
|
+
this.resizeObserver.unobserve(el);
|
|
34
|
+
}
|
|
35
|
+
update(el) {
|
|
36
|
+
const items = el.querySelectorAll('li');
|
|
37
|
+
for (const item of items) {
|
|
38
|
+
const label = item.querySelector('.ActionListItem-label');
|
|
39
|
+
if (!label)
|
|
40
|
+
continue;
|
|
41
|
+
const tooltip = item.querySelector('.ActionListItem-truncationTooltip');
|
|
42
|
+
if (!tooltip)
|
|
43
|
+
continue;
|
|
44
|
+
const isTruncated = label.scrollWidth > label.clientWidth;
|
|
45
|
+
if (isTruncated) {
|
|
46
|
+
tooltip.style.display = '';
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
tooltip.style.display = 'none';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let ActionListElement = class ActionListElement extends HTMLElement {
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
_ActionListElement_truncationObserver.set(this, void 0);
|
|
58
|
+
}
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
__classPrivateFieldSet(this, _ActionListElement_truncationObserver, new ActionListTruncationObserver(this), "f");
|
|
61
|
+
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
__classPrivateFieldGet(this, _ActionListElement_truncationObserver, "f").unobserve(this);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
_ActionListElement_truncationObserver = new WeakMap();
|
|
67
|
+
ActionListElement = __decorate([
|
|
68
|
+
controller
|
|
69
|
+
], ActionListElement);
|
|
70
|
+
export { ActionListElement };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import '@oddbird/popover-polyfill';
|
|
2
|
+
import type { IncludeFragmentElement } from '@github/include-fragment-element';
|
|
3
|
+
import AnchoredPositionElement from '../../anchored_position';
|
|
4
|
+
type SelectVariant = 'none' | 'single' | 'multiple' | null;
|
|
5
|
+
type SelectedItem = {
|
|
6
|
+
label: string | null | undefined;
|
|
7
|
+
value: string | null | undefined;
|
|
8
|
+
element: Element;
|
|
9
|
+
};
|
|
10
|
+
export declare class ActionMenuElement extends HTMLElement {
|
|
11
|
+
#private;
|
|
12
|
+
includeFragment: IncludeFragmentElement;
|
|
13
|
+
overlay: AnchoredPositionElement;
|
|
14
|
+
list: HTMLElement;
|
|
15
|
+
static validItemRoles: string[];
|
|
16
|
+
static validSelectors: string[];
|
|
17
|
+
static menuItemSelectors: string[];
|
|
18
|
+
get selectVariant(): SelectVariant;
|
|
19
|
+
set selectVariant(variant: SelectVariant);
|
|
20
|
+
get dynamicLabelPrefix(): string;
|
|
21
|
+
set dynamicLabelPrefix(value: string);
|
|
22
|
+
get dynamicLabel(): boolean;
|
|
23
|
+
set dynamicLabel(value: boolean);
|
|
24
|
+
get popoverElement(): HTMLElement | null;
|
|
25
|
+
get childPopoverElements(): HTMLElement[];
|
|
26
|
+
get invokerElement(): HTMLButtonElement | null;
|
|
27
|
+
get invokerLabel(): HTMLElement | null;
|
|
28
|
+
get selectedItems(): SelectedItem[];
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
handleEvent(event: Event): void;
|
|
32
|
+
get items(): HTMLElement[];
|
|
33
|
+
getItemById(itemId: string): HTMLElement | null;
|
|
34
|
+
isItemDisabled(item: Element | null): boolean;
|
|
35
|
+
disableItem(item: Element | null): void;
|
|
36
|
+
enableItem(item: Element | null): void;
|
|
37
|
+
isItemHidden(item: Element | null): boolean;
|
|
38
|
+
hideItem(item: Element | null): void;
|
|
39
|
+
showItem(item: Element | null): void;
|
|
40
|
+
isItemChecked(item: Element | null): boolean;
|
|
41
|
+
checkItem(item: Element | null): void;
|
|
42
|
+
uncheckItem(item: Element | null): void;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface Window {
|
|
46
|
+
ActionMenuElement: typeof ActionMenuElement;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export {};
|