@primer/view-components 0.35.0-rc.dcfdcf4d → 0.35.0-rc.e4cf5dc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/app/assets/javascripts/{app/components → components}/primer/primer.d.ts +3 -3
  2. package/app/assets/javascripts/primer_view_components.js +1 -1
  3. package/app/assets/javascripts/primer_view_components.js.map +1 -1
  4. package/app/assets/styles/primer_view_components.css +1 -1
  5. package/app/assets/styles/primer_view_components.css.map +1 -1
  6. package/app/components/primer/alpha/action_bar_element.js +0 -3
  7. package/app/components/primer/alpha/action_list.css +1 -1
  8. package/app/components/primer/alpha/auto_complete.css +1 -1
  9. package/app/components/primer/alpha/banner.css +1 -1
  10. package/app/components/primer/alpha/dropdown.css +1 -1
  11. package/app/components/primer/alpha/select_panel_element.js +7 -1
  12. package/app/components/primer/alpha/tab_nav.css +1 -1
  13. package/app/components/primer/alpha/text_field.css +1 -1
  14. package/app/components/primer/alpha/toggle_switch.css +1 -1
  15. package/app/components/primer/alpha/underline_nav.css +1 -1
  16. package/app/components/primer/beta/avatar.css +1 -1
  17. package/app/components/primer/beta/avatar_stack.css +1 -1
  18. package/app/components/primer/beta/blankslate.css +1 -1
  19. package/app/components/primer/beta/border_box.css +1 -1
  20. package/app/components/primer/beta/button.css +1 -1
  21. package/app/components/primer/beta/counter.css +1 -1
  22. package/app/components/primer/beta/popover.css +1 -1
  23. package/app/components/primer/beta/progress_bar.css +1 -1
  24. package/app/components/primer/beta/state.css +1 -1
  25. package/app/components/primer/primer.js +3 -3
  26. package/package.json +4 -5
  27. package/static/arguments.json +14 -2
  28. package/static/info_arch.json +41 -3
  29. package/static/previews.json +26 -0
  30. package/app/components/primer/alpha/action_bar_element.d.ts +0 -17
  31. package/app/components/primer/alpha/action_list.d.ts +0 -16
  32. package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +0 -42
  33. package/app/components/primer/alpha/dropdown/menu.d.ts +0 -1
  34. package/app/components/primer/alpha/dropdown.d.ts +0 -1
  35. package/app/components/primer/alpha/image_crop.d.ts +0 -1
  36. package/app/components/primer/alpha/modal_dialog.d.ts +0 -18
  37. package/app/components/primer/alpha/segmented_control.d.ts +0 -12
  38. package/app/components/primer/alpha/select_panel_element.d.ts +0 -63
  39. package/app/components/primer/alpha/tab_container.d.ts +0 -1
  40. package/app/components/primer/alpha/toggle_switch.d.ts +0 -34
  41. package/app/components/primer/alpha/tool_tip.d.ts +0 -27
  42. package/app/components/primer/alpha/x_banner.d.ts +0 -18
  43. package/app/components/primer/anchored_position.d.ts +0 -27
  44. package/app/components/primer/aria_live.d.ts +0 -8
  45. package/app/components/primer/beta/auto_complete/auto_complete.d.ts +0 -1
  46. package/app/components/primer/beta/clipboard_copy.d.ts +0 -1
  47. package/app/components/primer/beta/nav_list.d.ts +0 -20
  48. package/app/components/primer/beta/nav_list_group_element.d.ts +0 -19
  49. package/app/components/primer/beta/relative_time.d.ts +0 -1
  50. package/app/components/primer/dialog_helper.d.ts +0 -15
  51. package/app/components/primer/focus_group.d.ts +0 -19
  52. package/app/components/primer/primer.d.ts +0 -28
  53. package/app/components/primer/scrollable_region.d.ts +0 -13
  54. package/app/components/primer/shared_events.d.ts +0 -11
  55. package/lib/primer/forms/primer_multi_input.js +0 -44
  56. package/lib/primer/forms/primer_text_field.js +0 -119
  57. package/lib/primer/forms/toggle_switch_input.js +0 -34
  58. /package/app/assets/javascripts/{app/components → components}/primer/alpha/action_bar_element.d.ts +0 -0
  59. /package/app/assets/javascripts/{app/components → components}/primer/alpha/action_list.d.ts +0 -0
  60. /package/app/assets/javascripts/{app/components → components}/primer/alpha/action_menu/action_menu_element.d.ts +0 -0
  61. /package/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown/menu.d.ts +0 -0
  62. /package/app/assets/javascripts/{app/components → components}/primer/alpha/dropdown.d.ts +0 -0
  63. /package/app/assets/javascripts/{app/components → components}/primer/alpha/image_crop.d.ts +0 -0
  64. /package/app/assets/javascripts/{app/components → components}/primer/alpha/modal_dialog.d.ts +0 -0
  65. /package/app/assets/javascripts/{app/components → components}/primer/alpha/segmented_control.d.ts +0 -0
  66. /package/app/assets/javascripts/{app/components → components}/primer/alpha/select_panel_element.d.ts +0 -0
  67. /package/app/assets/javascripts/{app/components → components}/primer/alpha/tab_container.d.ts +0 -0
  68. /package/app/assets/javascripts/{app/components → components}/primer/alpha/toggle_switch.d.ts +0 -0
  69. /package/app/assets/javascripts/{app/components → components}/primer/alpha/tool_tip.d.ts +0 -0
  70. /package/app/assets/javascripts/{app/components → components}/primer/alpha/x_banner.d.ts +0 -0
  71. /package/app/assets/javascripts/{app/components → components}/primer/anchored_position.d.ts +0 -0
  72. /package/app/assets/javascripts/{app/components → components}/primer/aria_live.d.ts +0 -0
  73. /package/app/assets/javascripts/{app/components → components}/primer/beta/auto_complete/auto_complete.d.ts +0 -0
  74. /package/app/assets/javascripts/{app/components → components}/primer/beta/clipboard_copy.d.ts +0 -0
  75. /package/app/assets/javascripts/{app/components → components}/primer/beta/nav_list.d.ts +0 -0
  76. /package/app/assets/javascripts/{app/components → components}/primer/beta/nav_list_group_element.d.ts +0 -0
  77. /package/app/assets/javascripts/{app/components → components}/primer/beta/relative_time.d.ts +0 -0
  78. /package/app/assets/javascripts/{app/components → components}/primer/dialog_helper.d.ts +0 -0
  79. /package/app/assets/javascripts/{app/components → components}/primer/focus_group.d.ts +0 -0
  80. /package/app/assets/javascripts/{app/components → components}/primer/scrollable_region.d.ts +0 -0
  81. /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 };