@primer/view-components 0.35.0-rc.7f9c6e85 → 0.35.0-rc.8c01fa26
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/app/assets/javascripts/{app/components → components}/primer/primer.d.ts +3 -3
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/assets/styles/primer_view_components.css +1 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_bar_element.js +0 -3
- package/app/components/primer/alpha/action_list.css +1 -1
- package/app/components/primer/alpha/auto_complete.css +1 -1
- package/app/components/primer/alpha/banner.css +1 -1
- package/app/components/primer/alpha/dropdown.css +1 -1
- package/app/components/primer/alpha/select_panel_element.js +7 -1
- package/app/components/primer/alpha/tab_nav.css +1 -1
- package/app/components/primer/alpha/text_field.css +1 -1
- package/app/components/primer/alpha/toggle_switch.css +1 -1
- package/app/components/primer/alpha/underline_nav.css +1 -1
- package/app/components/primer/beta/avatar.css +1 -1
- package/app/components/primer/beta/avatar_stack.css +1 -1
- package/app/components/primer/beta/blankslate.css +1 -1
- package/app/components/primer/beta/border_box.css +1 -1
- package/app/components/primer/beta/button.css +1 -1
- package/app/components/primer/beta/counter.css +1 -1
- package/app/components/primer/beta/popover.css +1 -1
- package/app/components/primer/beta/progress_bar.css +1 -1
- package/app/components/primer/beta/state.css +1 -1
- package/app/components/primer/primer.js +3 -3
- package/package.json +4 -5
- package/static/arguments.json +14 -2
- package/static/info_arch.json +41 -3
- package/static/previews.json +26 -0
- package/app/components/primer/alpha/action_bar_element.d.ts +0 -17
- package/app/components/primer/alpha/action_list.d.ts +0 -16
- package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +0 -42
- package/app/components/primer/alpha/dropdown/menu.d.ts +0 -1
- package/app/components/primer/alpha/dropdown.d.ts +0 -1
- package/app/components/primer/alpha/image_crop.d.ts +0 -1
- package/app/components/primer/alpha/modal_dialog.d.ts +0 -18
- package/app/components/primer/alpha/segmented_control.d.ts +0 -12
- package/app/components/primer/alpha/select_panel_element.d.ts +0 -63
- package/app/components/primer/alpha/tab_container.d.ts +0 -1
- package/app/components/primer/alpha/toggle_switch.d.ts +0 -34
- package/app/components/primer/alpha/tool_tip.d.ts +0 -27
- package/app/components/primer/alpha/x_banner.d.ts +0 -18
- package/app/components/primer/anchored_position.d.ts +0 -27
- package/app/components/primer/aria_live.d.ts +0 -8
- package/app/components/primer/beta/auto_complete/auto_complete.d.ts +0 -1
- package/app/components/primer/beta/clipboard_copy.d.ts +0 -1
- package/app/components/primer/beta/nav_list.d.ts +0 -20
- package/app/components/primer/beta/nav_list_group_element.d.ts +0 -19
- package/app/components/primer/beta/relative_time.d.ts +0 -1
- package/app/components/primer/dialog_helper.d.ts +0 -15
- package/app/components/primer/focus_group.d.ts +0 -19
- package/app/components/primer/primer.d.ts +0 -28
- package/app/components/primer/scrollable_region.d.ts +0 -13
- package/app/components/primer/shared_events.d.ts +0 -11
- package/lib/primer/forms/primer_multi_input.js +0 -44
- package/lib/primer/forms/primer_text_field.js +0 -119
- package/lib/primer/forms/toggle_switch_input.js +0 -34
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/action_bar_element.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/action_list.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/action_menu/action_menu_element.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown/menu.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/image_crop.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/modal_dialog.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/segmented_control.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/select_panel_element.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/tab_container.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/toggle_switch.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/tool_tip.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/alpha/x_banner.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/anchored_position.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/aria_live.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/beta/auto_complete/auto_complete.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/beta/clipboard_copy.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/beta/nav_list.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/beta/nav_list_group_element.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/beta/relative_time.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/dialog_helper.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/focus_group.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/scrollable_region.d.ts +0 -0
- /package/app/assets/javascripts/{app/components → components}/primer/shared_events.d.ts +0 -0
@@ -1,119 +0,0 @@
|
|
1
|
-
/* eslint-disable custom-elements/expose-class-on-global */
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
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;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
10
|
-
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");
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
12
|
-
};
|
13
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
14
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
15
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
16
|
-
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");
|
17
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
18
|
-
};
|
19
|
-
var _PrimerTextFieldElement_abortController;
|
20
|
-
import '@github/auto-check-element';
|
21
|
-
import { controller, target } from '@github/catalyst';
|
22
|
-
let PrimerTextFieldElement = class PrimerTextFieldElement extends HTMLElement {
|
23
|
-
constructor() {
|
24
|
-
super(...arguments);
|
25
|
-
_PrimerTextFieldElement_abortController.set(this, void 0);
|
26
|
-
}
|
27
|
-
connectedCallback() {
|
28
|
-
__classPrivateFieldGet(this, _PrimerTextFieldElement_abortController, "f")?.abort();
|
29
|
-
const { signal } = (__classPrivateFieldSet(this, _PrimerTextFieldElement_abortController, new AbortController(), "f"));
|
30
|
-
this.addEventListener('auto-check-success', async (event) => {
|
31
|
-
const message = await event.detail.response.text();
|
32
|
-
if (message && message.length > 0) {
|
33
|
-
this.setSuccess(message);
|
34
|
-
}
|
35
|
-
else {
|
36
|
-
this.clearError();
|
37
|
-
}
|
38
|
-
}, { signal });
|
39
|
-
this.addEventListener('auto-check-error', async (event) => {
|
40
|
-
const errorMessage = await event.detail.response.text();
|
41
|
-
this.setError(errorMessage);
|
42
|
-
}, { signal });
|
43
|
-
}
|
44
|
-
disconnectedCallback() {
|
45
|
-
__classPrivateFieldGet(this, _PrimerTextFieldElement_abortController, "f")?.abort();
|
46
|
-
}
|
47
|
-
clearContents() {
|
48
|
-
this.inputElement.value = '';
|
49
|
-
this.inputElement.focus();
|
50
|
-
this.inputElement.dispatchEvent(new Event('input', { bubbles: true, cancelable: false }));
|
51
|
-
}
|
52
|
-
clearError() {
|
53
|
-
this.inputElement.removeAttribute('invalid');
|
54
|
-
this.validationElement.hidden = true;
|
55
|
-
this.validationMessageElement.replaceChildren();
|
56
|
-
}
|
57
|
-
setValidationMessage(message) {
|
58
|
-
const template = document.createElement('template');
|
59
|
-
// eslint-disable-next-line github/no-inner-html
|
60
|
-
template.innerHTML = message;
|
61
|
-
const fragment = document.importNode(template.content, true);
|
62
|
-
this.validationMessageElement.replaceChildren(fragment);
|
63
|
-
}
|
64
|
-
toggleValidationStyling(isError) {
|
65
|
-
if (isError) {
|
66
|
-
this.validationElement.classList.remove('FormControl-inlineValidation--success');
|
67
|
-
}
|
68
|
-
else {
|
69
|
-
this.validationElement.classList.add('FormControl-inlineValidation--success');
|
70
|
-
}
|
71
|
-
this.validationSuccessIcon.hidden = isError;
|
72
|
-
this.validationErrorIcon.hidden = !isError;
|
73
|
-
this.inputElement.setAttribute('invalid', isError ? 'true' : 'false');
|
74
|
-
}
|
75
|
-
setSuccess(message) {
|
76
|
-
this.toggleValidationStyling(false);
|
77
|
-
this.setValidationMessage(message);
|
78
|
-
this.validationElement.hidden = false;
|
79
|
-
}
|
80
|
-
setError(message) {
|
81
|
-
this.toggleValidationStyling(true);
|
82
|
-
this.setValidationMessage(message);
|
83
|
-
this.validationElement.hidden = false;
|
84
|
-
}
|
85
|
-
showLeadingSpinner() {
|
86
|
-
this.leadingSpinner?.removeAttribute('hidden');
|
87
|
-
this.leadingVisual?.setAttribute('hidden', '');
|
88
|
-
}
|
89
|
-
hideLeadingSpinner() {
|
90
|
-
this.leadingSpinner?.setAttribute('hidden', '');
|
91
|
-
this.leadingVisual?.removeAttribute('hidden');
|
92
|
-
}
|
93
|
-
};
|
94
|
-
_PrimerTextFieldElement_abortController = new WeakMap();
|
95
|
-
__decorate([
|
96
|
-
target
|
97
|
-
], PrimerTextFieldElement.prototype, "inputElement", void 0);
|
98
|
-
__decorate([
|
99
|
-
target
|
100
|
-
], PrimerTextFieldElement.prototype, "validationElement", void 0);
|
101
|
-
__decorate([
|
102
|
-
target
|
103
|
-
], PrimerTextFieldElement.prototype, "validationMessageElement", void 0);
|
104
|
-
__decorate([
|
105
|
-
target
|
106
|
-
], PrimerTextFieldElement.prototype, "validationSuccessIcon", void 0);
|
107
|
-
__decorate([
|
108
|
-
target
|
109
|
-
], PrimerTextFieldElement.prototype, "validationErrorIcon", void 0);
|
110
|
-
__decorate([
|
111
|
-
target
|
112
|
-
], PrimerTextFieldElement.prototype, "leadingVisual", void 0);
|
113
|
-
__decorate([
|
114
|
-
target
|
115
|
-
], PrimerTextFieldElement.prototype, "leadingSpinner", void 0);
|
116
|
-
PrimerTextFieldElement = __decorate([
|
117
|
-
controller
|
118
|
-
], PrimerTextFieldElement);
|
119
|
-
export { PrimerTextFieldElement };
|
@@ -1,34 +0,0 @@
|
|
1
|
-
/* eslint-disable custom-elements/expose-class-on-global */
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
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;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
import { controller, target } from '@github/catalyst';
|
9
|
-
let ToggleSwitchInputElement = class ToggleSwitchInputElement extends HTMLElement {
|
10
|
-
connectedCallback() {
|
11
|
-
this.addEventListener('toggleSwitchError', (event) => {
|
12
|
-
this.validationMessageElement.textContent = event.detail;
|
13
|
-
this.validationElement.removeAttribute('hidden');
|
14
|
-
});
|
15
|
-
this.addEventListener('toggleSwitchSuccess', () => {
|
16
|
-
this.validationMessageElement.textContent = '';
|
17
|
-
this.validationElement.setAttribute('hidden', 'hidden');
|
18
|
-
});
|
19
|
-
this.addEventListener('toggleSwitchLoading', () => {
|
20
|
-
this.validationMessageElement.textContent = '';
|
21
|
-
this.validationElement.setAttribute('hidden', 'hidden');
|
22
|
-
});
|
23
|
-
}
|
24
|
-
};
|
25
|
-
__decorate([
|
26
|
-
target
|
27
|
-
], ToggleSwitchInputElement.prototype, "validationElement", void 0);
|
28
|
-
__decorate([
|
29
|
-
target
|
30
|
-
], ToggleSwitchInputElement.prototype, "validationMessageElement", void 0);
|
31
|
-
ToggleSwitchInputElement = __decorate([
|
32
|
-
controller
|
33
|
-
], ToggleSwitchInputElement);
|
34
|
-
export { ToggleSwitchInputElement };
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/action_bar_element.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown/menu.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/modal_dialog.d.ts
RENAMED
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/segmented_control.d.ts
RENAMED
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/select_panel_element.d.ts
RENAMED
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/tab_container.d.ts
RENAMED
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/alpha/toggle_switch.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/beta/clipboard_copy.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
/package/app/assets/javascripts/{app/components → components}/primer/beta/relative_time.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|