@openproject/primer-view-components 0.34.0 → 0.35.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/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +27 -0
- 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_menu/action_menu_element.js +13 -43
- package/app/components/primer/alpha/tab_nav.css +1 -1
- package/app/components/primer/alpha/tab_nav.css.json +2 -0
- package/app/components/primer/alpha/underline_nav.css +1 -1
- package/app/components/primer/alpha/underline_nav.css.json +2 -0
- package/app/components/primer/alpha/underline_panels.css +1 -0
- package/app/components/primer/alpha/underline_panels.css.json +6 -0
- package/lib/primer/forms/primer_text_field.d.ts +27 -0
- package/lib/primer/forms/primer_text_field.js +17 -5
- package/package.json +6 -6
- package/static/arguments.json +12 -12
- package/static/constants.json +1 -0
- package/static/info_arch.json +78 -13
- package/static/previews.json +65 -0
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
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
16
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
17
|
};
|
|
18
|
-
var _ActionMenuElement_instances, _ActionMenuElement_abortController, _ActionMenuElement_originalLabel, _ActionMenuElement_inputName, _ActionMenuElement_invokerBeingClicked, _ActionMenuElement_softDisableItems, _ActionMenuElement_potentiallyDisallowActivation,
|
|
18
|
+
var _ActionMenuElement_instances, _ActionMenuElement_abortController, _ActionMenuElement_originalLabel, _ActionMenuElement_inputName, _ActionMenuElement_invokerBeingClicked, _ActionMenuElement_softDisableItems, _ActionMenuElement_potentiallyDisallowActivation, _ActionMenuElement_isAnchorActivationViaSpace, _ActionMenuElement_isActivation, _ActionMenuElement_handleInvokerActivated, _ActionMenuElement_handleDialogItemActivated, _ActionMenuElement_handleItemActivated, _ActionMenuElement_handleIncludeFragmentReplaced, _ActionMenuElement_handleFocusOut, _ActionMenuElement_show, _ActionMenuElement_hide, _ActionMenuElement_isOpen, _ActionMenuElement_setDynamicLabel, _ActionMenuElement_updateInput, _ActionMenuElement_firstItem_get;
|
|
19
19
|
import { controller, target } from '@github/catalyst';
|
|
20
20
|
import '@oddbird/popover-polyfill';
|
|
21
21
|
const validSelectors = ['[role="menuitem"]', '[role="menuitemcheckbox"]', '[role="menuitemradio"]'];
|
|
@@ -152,18 +152,13 @@ let ActionMenuElement = class ActionMenuElement extends HTMLElement {
|
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
// is called. While calling preventDefault() appears to have no effect on link navigation, it skips
|
|
159
|
-
// form submission. The code below therefore only calls preventDefault() if the button has been
|
|
160
|
-
// activated by the space key, and manually submits the form if the button is a submit button.
|
|
161
|
-
if (__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_isKeyboardActivationViaSpace).call(this, event)) {
|
|
155
|
+
// Pressing the space key on a link will cause the page to scroll unless preventDefault() is called.
|
|
156
|
+
// We then click it manually to navigate.
|
|
157
|
+
if (__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_isAnchorActivationViaSpace).call(this, event)) {
|
|
162
158
|
event.preventDefault();
|
|
163
|
-
|
|
164
|
-
item.closest('form')?.submit();
|
|
165
|
-
}
|
|
159
|
+
item.click();
|
|
166
160
|
}
|
|
161
|
+
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_handleItemActivated).call(this, item);
|
|
167
162
|
return;
|
|
168
163
|
}
|
|
169
164
|
if (event.type === 'include-fragment-replaced') {
|
|
@@ -269,26 +264,18 @@ _ActionMenuElement_potentiallyDisallowActivation = function _ActionMenuElement_p
|
|
|
269
264
|
}
|
|
270
265
|
return false;
|
|
271
266
|
};
|
|
272
|
-
|
|
273
|
-
return
|
|
274
|
-
|
|
275
|
-
_ActionMenuElement_isKeyboardActivationViaEnter = function _ActionMenuElement_isKeyboardActivationViaEnter(event) {
|
|
276
|
-
return (event instanceof KeyboardEvent &&
|
|
277
|
-
event.type === 'keydown' &&
|
|
278
|
-
!(event.ctrlKey || event.altKey || event.metaKey || event.shiftKey) &&
|
|
279
|
-
event.key === 'Enter');
|
|
280
|
-
};
|
|
281
|
-
_ActionMenuElement_isKeyboardActivationViaSpace = function _ActionMenuElement_isKeyboardActivationViaSpace(event) {
|
|
282
|
-
return (event instanceof KeyboardEvent &&
|
|
267
|
+
_ActionMenuElement_isAnchorActivationViaSpace = function _ActionMenuElement_isAnchorActivationViaSpace(event) {
|
|
268
|
+
return (event.target instanceof HTMLAnchorElement &&
|
|
269
|
+
event instanceof KeyboardEvent &&
|
|
283
270
|
event.type === 'keydown' &&
|
|
284
271
|
!(event.ctrlKey || event.altKey || event.metaKey || event.shiftKey) &&
|
|
285
272
|
event.key === ' ');
|
|
286
273
|
};
|
|
287
|
-
_ActionMenuElement_isMouseActivation = function _ActionMenuElement_isMouseActivation(event) {
|
|
288
|
-
return event instanceof MouseEvent && event.type === 'click';
|
|
289
|
-
};
|
|
290
274
|
_ActionMenuElement_isActivation = function _ActionMenuElement_isActivation(event) {
|
|
291
|
-
|
|
275
|
+
// Some browsers fire MouseEvents (Firefox) and others fire PointerEvents (Chrome). Activating an item via
|
|
276
|
+
// enter or space counterintuitively fires one of these rather than a KeyboardEvent. Since PointerEvent
|
|
277
|
+
// inherits from MouseEvent, it is enough to check for MouseEvent here.
|
|
278
|
+
return (event instanceof MouseEvent && event.type === 'click') || __classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_isAnchorActivationViaSpace).call(this, event);
|
|
292
279
|
};
|
|
293
280
|
_ActionMenuElement_handleInvokerActivated = function _ActionMenuElement_handleInvokerActivated(event) {
|
|
294
281
|
event.preventDefault();
|
|
@@ -363,23 +350,6 @@ _ActionMenuElement_handleItemActivated = function _ActionMenuElement_handleItemA
|
|
|
363
350
|
detail: { item: item.parentElement, checked: this.isItemChecked(item.parentElement) },
|
|
364
351
|
}));
|
|
365
352
|
};
|
|
366
|
-
_ActionMenuElement_activateItem = function _ActionMenuElement_activateItem(event, item) {
|
|
367
|
-
const eventWillActivateByDefault = (event instanceof MouseEvent && event.type === 'click') ||
|
|
368
|
-
(event instanceof KeyboardEvent &&
|
|
369
|
-
event.type === 'keydown' &&
|
|
370
|
-
!(event.ctrlKey || event.altKey || event.metaKey || event.shiftKey) &&
|
|
371
|
-
event.key === 'Enter');
|
|
372
|
-
// if the event will result in activating the current item by default, i.e. is a
|
|
373
|
-
// mouse click or keyboard enter, bail out
|
|
374
|
-
if (eventWillActivateByDefault)
|
|
375
|
-
return;
|
|
376
|
-
// otherwise, event will not result in activation by default, so we stop it and
|
|
377
|
-
// simulate a click
|
|
378
|
-
/* eslint-disable-next-line no-restricted-syntax */
|
|
379
|
-
event.stopPropagation();
|
|
380
|
-
const elem = item;
|
|
381
|
-
elem.click();
|
|
382
|
-
};
|
|
383
353
|
_ActionMenuElement_handleIncludeFragmentReplaced = function _ActionMenuElement_handleIncludeFragmentReplaced() {
|
|
384
354
|
if (__classPrivateFieldGet(this, _ActionMenuElement_instances, "a", _ActionMenuElement_firstItem_get))
|
|
385
355
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "a", _ActionMenuElement_firstItem_get).focus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabnav{border-bottom:var(--borderWidth-thin) solid var(--borderColor-default);margin-bottom:var(--stack-gap-normal);margin-top:0}.tabnav-tabs{display:flex;margin-bottom:calc(var(--borderWidth-thin)*-1);overflow:
|
|
1
|
+
.tabnav{border-bottom:var(--borderWidth-thin) solid var(--borderColor-default);margin-bottom:var(--stack-gap-normal);margin-top:0}.tabnav-tabs{display:flex;margin-bottom:calc(var(--borderWidth-thin)*-1);overflow:hidden}.tabnav::part(tablist-wrapper){border-bottom:var(--borderWidth-thin) solid var(--borderColor-default);margin-bottom:var(--stack-gap-normal)}.tabnav-tab{background-color:initial;border:var(--borderWidth-thin) solid #0000;border-bottom:0;color:var(--fgColor-muted);display:inline-block;flex-shrink:0;font-size:var(--text-body-size-medium);line-height:23px;padding:var(--base-size-8) var(--control-medium-paddingInline-spacious);-webkit-text-decoration:none;text-decoration:none;transition:color .2s cubic-bezier(.3,0,.5,1)}.tabnav-tab.selected,.tabnav-tab[aria-current]:not([aria-current=false]),.tabnav-tab[aria-selected=true]{background-color:var(--bgColor-default);border-color:var(--borderColor-default);border-radius:var(--borderRadius-medium) var(--borderRadius-medium) 0 0;color:var(--fgColor-default)}.tabnav-tab.selected .octicon,.tabnav-tab[aria-current]:not([aria-current=false]) .octicon,.tabnav-tab[aria-selected=true] .octicon{color:inherit}.tabnav-tab:hover{color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition-duration:.1s}.tabnav-tab:focus,.tabnav-tab:focus-visible{border-radius:var(--borderRadius-medium) var(--borderRadius-medium) 0 0!important;outline-offset:-6px}.tabnav-tab .octicon,.tabnav-tab:active{color:var(--fgColor-muted)}.tabnav-tab .octicon{margin-right:var(--control-small-gap)}.tabnav-tab .Counter{color:inherit;margin-left:var(--control-small-gap)}tab-container .tabnav-tab{margin-bottom:-1px}.tabnav-extra{color:var(--fgColor-muted);display:inline-block;font-size:var(--text-body-size-small);margin-left:10px;padding-top:10px}.tabnav-extra>.octicon{margin-right:2px}a.tabnav-extra:hover{color:var(--fgColor-accent);-webkit-text-decoration:none;text-decoration:none}.tabnav-btn{margin-left:var(--controlStack-medium-gap-condensed)}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"selectors": [
|
|
4
4
|
".tabnav",
|
|
5
5
|
".tabnav-tabs",
|
|
6
|
+
".tabnav::part(tablist-wrapper)",
|
|
6
7
|
".tabnav-tab",
|
|
7
8
|
".tabnav-tab.selected",
|
|
8
9
|
".tabnav-tab[aria-current]:not([aria-current=false])",
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
".tabnav-tab .octicon",
|
|
17
18
|
".tabnav-tab:active",
|
|
18
19
|
".tabnav-tab .Counter",
|
|
20
|
+
"tab-container .tabnav-tab",
|
|
19
21
|
".tabnav-extra",
|
|
20
22
|
".tabnav-extra>.octicon",
|
|
21
23
|
"a.tabnav-extra:hover",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.UnderlineNav{box-shadow:inset 0 -1px 0 var(--borderColor-muted);display:flex;min-height:var(--base-size-48);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:auto;justify-content:space-between}.UnderlineNav .Counter{background-color:var(--bgColor-neutral-muted,var(--color-neutral-muted));color:var(--fgColor-default);margin-left:var(--control-medium-gap)}.UnderlineNav .Counter--primary{background-color:var(--bgColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.UnderlineNav-body{align-items:center;display:flex;gap:var(--control-medium-gap);list-style:none}.UnderlineNav-item{align-items:center;background-color:initial;border:0;border-radius:var(--borderRadius-medium);color:var(--fgColor-default);cursor:pointer;display:flex;font-size:var(--text-body-size-medium);line-height:30px;padding:0 var(--control-medium-paddingInline-condensed);position:relative;text-align:center;white-space:nowrap}.UnderlineNav-item:focus,.UnderlineNav-item:focus-visible,.UnderlineNav-item:hover{border-bottom-color:var(--borderColor-neutral-muted);color:var(--fgColor-default);outline-offset:-2px;-webkit-text-decoration:none;text-decoration:none;transition:border-bottom-color .12s ease-out}.UnderlineNav-item [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold);height:0;visibility:hidden}.UnderlineNav-item:before{content:"";height:100%;left:50%;min-height:48px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:fine){.UnderlineNav-item:hover{background:var(--control-transparent-bgColor-hover);color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition:background .12s ease-out}}.UnderlineNav-item.selected,.UnderlineNav-item[aria-current]:not([aria-current=false]),.UnderlineNav-item[role=tab][aria-selected=true]{border-bottom-color:var(--underlineNav-borderColor-active);color:var(--fgColor-default);font-weight:var(--base-text-weight-semibold)}.UnderlineNav-item.selected:after,.UnderlineNav-item[aria-current]:not([aria-current=false]):after,.UnderlineNav-item[role=tab][aria-selected=true]:after{background:var(--underlineNav-borderColor-active);border-radius:var(--borderRadius-medium);bottom:calc(50% - 25px);content:"";height:2px;position:absolute;right:50%;transform:translate(50%,-50%);width:100%;z-index:1}.UnderlineNav--right{justify-content:flex-end}.UnderlineNav--right .UnderlineNav-actions{flex:1 1 auto}.UnderlineNav-actions{align-self:center}.UnderlineNav--full{display:block}.UnderlineNav--full .UnderlineNav-body{min-height:var(--base-size-48)}.UnderlineNav-octicon{color:var(--fgColor-muted);display:inline!important;margin-right:var(--control-medium-gap);fill:var(--fgColor-muted)}.UnderlineNav-container{display:flex;justify-content:space-between}
|
|
1
|
+
.UnderlineNav{box-shadow:inset 0 -1px 0 var(--borderColor-muted);display:flex;min-height:var(--base-size-48);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:auto;justify-content:space-between}.UnderlineNav .Counter{background-color:var(--bgColor-neutral-muted,var(--color-neutral-muted));color:var(--fgColor-default);margin-left:var(--control-medium-gap)}.UnderlineNav .Counter--primary{background-color:var(--bgColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.UnderlineNav::part(tablist-wrapper){box-shadow:inset 0 -1px 0 var(--borderColor-muted);padding:var(--control-medium-gap) 0;width:100%}.UnderlineNav-body,.UnderlineNav::part(tablist){align-items:center;display:flex;gap:var(--control-medium-gap);list-style:none}.UnderlineNav-item{align-items:center;background-color:initial;border:0;border-radius:var(--borderRadius-medium);color:var(--fgColor-default);cursor:pointer;display:flex;font-size:var(--text-body-size-medium);line-height:30px;padding:0 var(--control-medium-paddingInline-condensed);position:relative;text-align:center;white-space:nowrap}.UnderlineNav-item:focus,.UnderlineNav-item:focus-visible,.UnderlineNav-item:hover{border-bottom-color:var(--borderColor-neutral-muted);color:var(--fgColor-default);outline-offset:-2px;-webkit-text-decoration:none;text-decoration:none;transition:border-bottom-color .12s ease-out}.UnderlineNav-item [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold);height:0;visibility:hidden}.UnderlineNav-item:before{content:"";height:100%;left:50%;min-height:48px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:fine){.UnderlineNav-item:hover{background:var(--control-transparent-bgColor-hover);color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition:background .12s ease-out}}.UnderlineNav-item.selected,.UnderlineNav-item[aria-current]:not([aria-current=false]),.UnderlineNav-item[role=tab][aria-selected=true]{border-bottom-color:var(--underlineNav-borderColor-active);color:var(--fgColor-default);font-weight:var(--base-text-weight-semibold)}.UnderlineNav-item.selected:after,.UnderlineNav-item[aria-current]:not([aria-current=false]):after,.UnderlineNav-item[role=tab][aria-selected=true]:after{background:var(--underlineNav-borderColor-active);border-radius:var(--borderRadius-medium);bottom:calc(50% - 25px);content:"";height:2px;position:absolute;right:50%;transform:translate(50%,-50%);width:100%;z-index:1}.UnderlineNav--right{justify-content:flex-end}.UnderlineNav--right .UnderlineNav-actions{flex:1 1 auto}.UnderlineNav-actions{align-self:center}.UnderlineNav--full{display:block}.UnderlineNav--full .UnderlineNav-body{min-height:var(--base-size-48)}.UnderlineNav-octicon{color:var(--fgColor-muted);display:inline!important;margin-right:var(--control-medium-gap);fill:var(--fgColor-muted)}.UnderlineNav-container{display:flex;justify-content:space-between}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
".UnderlineNav",
|
|
5
5
|
".UnderlineNav .Counter",
|
|
6
6
|
".UnderlineNav .Counter--primary",
|
|
7
|
+
".UnderlineNav::part(tablist-wrapper)",
|
|
7
8
|
".UnderlineNav-body",
|
|
9
|
+
".UnderlineNav::part(tablist)",
|
|
8
10
|
".UnderlineNav-item",
|
|
9
11
|
".UnderlineNav-item:focus",
|
|
10
12
|
".UnderlineNav-item:focus-visible",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tab-container.UnderlineNav{box-shadow:none;flex-direction:column}
|
|
@@ -1 +1,28 @@
|
|
|
1
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
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable custom-elements/expose-class-on-global */
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -18,10 +19,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
18
19
|
var _PrimerTextFieldElement_abortController;
|
|
19
20
|
import '@github/auto-check-element';
|
|
20
21
|
import { controller, target } from '@github/catalyst';
|
|
21
|
-
|
|
22
|
-
let PrimerTextFieldElement =
|
|
23
|
-
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
24
|
-
class PrimerTextFieldElement extends HTMLElement {
|
|
22
|
+
let PrimerTextFieldElement = class PrimerTextFieldElement extends HTMLElement {
|
|
25
23
|
constructor() {
|
|
26
24
|
super(...arguments);
|
|
27
25
|
_PrimerTextFieldElement_abortController.set(this, void 0);
|
|
@@ -83,6 +81,14 @@ class PrimerTextFieldElement extends HTMLElement {
|
|
|
83
81
|
this.setValidationMessage(message);
|
|
84
82
|
this.validationElement.hidden = false;
|
|
85
83
|
}
|
|
84
|
+
showLeadingSpinner() {
|
|
85
|
+
this.leadingSpinner?.removeAttribute('hidden');
|
|
86
|
+
this.leadingVisual?.setAttribute('hidden', '');
|
|
87
|
+
}
|
|
88
|
+
hideLeadingSpinner() {
|
|
89
|
+
this.leadingSpinner?.setAttribute('hidden', '');
|
|
90
|
+
this.leadingVisual?.removeAttribute('hidden');
|
|
91
|
+
}
|
|
86
92
|
};
|
|
87
93
|
_PrimerTextFieldElement_abortController = new WeakMap();
|
|
88
94
|
__decorate([
|
|
@@ -100,7 +106,13 @@ __decorate([
|
|
|
100
106
|
__decorate([
|
|
101
107
|
target
|
|
102
108
|
], PrimerTextFieldElement.prototype, "validationErrorIcon", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
target
|
|
111
|
+
], PrimerTextFieldElement.prototype, "leadingVisual", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
target
|
|
114
|
+
], PrimerTextFieldElement.prototype, "leadingSpinner", void 0);
|
|
103
115
|
PrimerTextFieldElement = __decorate([
|
|
104
116
|
controller
|
|
105
|
-
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
106
117
|
], PrimerTextFieldElement);
|
|
118
|
+
export { PrimerTextFieldElement };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openproject/primer-view-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "ViewComponents of the Primer Design System for OpenProject",
|
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
|
6
6
|
"module": "app/components/primer/primer.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@github/image-crop-element": "^5.0.0",
|
|
51
51
|
"@github/include-fragment-element": "^6.1.1",
|
|
52
52
|
"@github/relative-time-element": "^4.0.0",
|
|
53
|
-
"@github/tab-container-element": "^
|
|
53
|
+
"@github/tab-container-element": "^4.5.0",
|
|
54
54
|
"@oddbird/popover-polyfill": "^0.4.0",
|
|
55
55
|
"@primer/behaviors": "^1.3.4"
|
|
56
56
|
},
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"@primer/stylelint-config": "^12.7.2",
|
|
68
68
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
69
69
|
"@rollup/plugin-typescript": "^8.3.3",
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^7.0.
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
71
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
72
72
|
"axe-core": "^4.7.1",
|
|
73
73
|
"chokidar-cli": "^3.0.0",
|
|
74
74
|
"cssnano": "^7.0.1",
|
|
75
75
|
"eslint": "^8.23.1",
|
|
76
76
|
"eslint-plugin-custom-elements": "^0.0.8",
|
|
77
|
-
"eslint-plugin-github": "^
|
|
77
|
+
"eslint-plugin-github": "^5.0.1",
|
|
78
78
|
"eslint-plugin-prettier": "^5.0.0",
|
|
79
79
|
"markdownlint-cli2": "^0.13.0",
|
|
80
80
|
"mocha": "^10.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"postcss-import": "^16.0.0",
|
|
85
85
|
"postcss-mixins": "^10.0.0",
|
|
86
86
|
"postcss-preset-env": "^9.3.0",
|
|
87
|
-
"prettier": "3.2
|
|
87
|
+
"prettier": "^3.3.2",
|
|
88
88
|
"rollup": "^2.79.1",
|
|
89
89
|
"rollup-plugin-terser": "^7.0.2",
|
|
90
90
|
"stylelint": "^16.1.0",
|
package/static/arguments.json
CHANGED
|
@@ -2462,18 +2462,6 @@
|
|
|
2462
2462
|
"default": "N/A",
|
|
2463
2463
|
"description": "One of `:left` or `:right`. - Defaults to left"
|
|
2464
2464
|
},
|
|
2465
|
-
{
|
|
2466
|
-
"name": "body_arguments",
|
|
2467
|
-
"type": "Hash",
|
|
2468
|
-
"default": "`{}`",
|
|
2469
|
-
"description": "[System arguments](/system-arguments) for the body wrapper."
|
|
2470
|
-
},
|
|
2471
|
-
{
|
|
2472
|
-
"name": "wrapper_arguments",
|
|
2473
|
-
"type": "Hash",
|
|
2474
|
-
"default": "`{}`",
|
|
2475
|
-
"description": "[System arguments](/system-arguments) for the `TabContainer` wrapper."
|
|
2476
|
-
},
|
|
2477
2465
|
{
|
|
2478
2466
|
"name": "system_arguments",
|
|
2479
2467
|
"type": "Hash",
|
|
@@ -2764,6 +2752,12 @@
|
|
|
2764
2752
|
"default": "N/A",
|
|
2765
2753
|
"description": "Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's [Octicon](/components/beta/octicon) component."
|
|
2766
2754
|
},
|
|
2755
|
+
{
|
|
2756
|
+
"name": "leading_spinner",
|
|
2757
|
+
"type": "Boolean",
|
|
2758
|
+
"default": "N/A",
|
|
2759
|
+
"description": "If `true`, a leading spinner will be included in the markup. The spinner can be shown via the `showLeadingSpinner()` JavaScript method, and hidden via `hideLeadingSpinner()`. If this argument is `true`, a leading visual must also be provided."
|
|
2760
|
+
},
|
|
2767
2761
|
{
|
|
2768
2762
|
"name": "show_clear_button",
|
|
2769
2763
|
"type": "Boolean",
|
|
@@ -4254,6 +4248,12 @@
|
|
|
4254
4248
|
"default": "`nil`",
|
|
4255
4249
|
"description": "Provide a custom title to the element."
|
|
4256
4250
|
},
|
|
4251
|
+
{
|
|
4252
|
+
"name": "no_title",
|
|
4253
|
+
"type": "Boolean",
|
|
4254
|
+
"default": "`false`",
|
|
4255
|
+
"description": "Removes the `title` attribute provided on the element by default."
|
|
4256
|
+
},
|
|
4257
4257
|
{
|
|
4258
4258
|
"name": "system_arguments",
|
|
4259
4259
|
"type": "Hash",
|
package/static/constants.json
CHANGED
package/static/info_arch.json
CHANGED
|
@@ -7628,18 +7628,6 @@
|
|
|
7628
7628
|
"default": "N/A",
|
|
7629
7629
|
"description": "One of `:left` or `:right`. - Defaults to left"
|
|
7630
7630
|
},
|
|
7631
|
-
{
|
|
7632
|
-
"name": "body_arguments",
|
|
7633
|
-
"type": "Hash",
|
|
7634
|
-
"default": "`{}`",
|
|
7635
|
-
"description": "{{link_to_system_arguments_docs}} for the body wrapper."
|
|
7636
|
-
},
|
|
7637
|
-
{
|
|
7638
|
-
"name": "wrapper_arguments",
|
|
7639
|
-
"type": "Hash",
|
|
7640
|
-
"default": "`{}`",
|
|
7641
|
-
"description": "{{link_to_system_arguments_docs}} for the `TabContainer` wrapper."
|
|
7642
|
-
},
|
|
7643
7631
|
{
|
|
7644
7632
|
"name": "system_arguments",
|
|
7645
7633
|
"type": "Hash",
|
|
@@ -8155,6 +8143,12 @@
|
|
|
8155
8143
|
"default": "N/A",
|
|
8156
8144
|
"description": "Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}} component."
|
|
8157
8145
|
},
|
|
8146
|
+
{
|
|
8147
|
+
"name": "leading_spinner",
|
|
8148
|
+
"type": "Boolean",
|
|
8149
|
+
"default": "N/A",
|
|
8150
|
+
"description": "If `true`, a leading spinner will be included in the markup. The spinner can be shown via the `showLeadingSpinner()` JavaScript method, and hidden via `hideLeadingSpinner()`. If this argument is `true`, a leading visual must also be provided."
|
|
8151
|
+
},
|
|
8158
8152
|
{
|
|
8159
8153
|
"name": "show_clear_button",
|
|
8160
8154
|
"type": "Boolean",
|
|
@@ -10947,6 +10941,19 @@
|
|
|
10947
10941
|
"color-contrast"
|
|
10948
10942
|
]
|
|
10949
10943
|
}
|
|
10944
|
+
},
|
|
10945
|
+
{
|
|
10946
|
+
"preview_path": "primer/beta/breadcrumbs/with_link_target",
|
|
10947
|
+
"name": "with_link_target",
|
|
10948
|
+
"snapshot": "false",
|
|
10949
|
+
"skip_rules": {
|
|
10950
|
+
"wont_fix": [
|
|
10951
|
+
"region"
|
|
10952
|
+
],
|
|
10953
|
+
"will_fix": [
|
|
10954
|
+
"color-contrast"
|
|
10955
|
+
]
|
|
10956
|
+
}
|
|
10950
10957
|
}
|
|
10951
10958
|
],
|
|
10952
10959
|
"subcomponents": [
|
|
@@ -12640,7 +12647,7 @@
|
|
|
12640
12647
|
{
|
|
12641
12648
|
"fully_qualified_name": "Primer::Beta::IconButton",
|
|
12642
12649
|
"description": "Use `IconButton` to render Icon-only buttons without the default button styles.\n\n`IconButton` will always render with a tooltip unless the tag is `:summary`.",
|
|
12643
|
-
"accessibility_docs": "`IconButton` requires an `aria-label`, which will provide assistive technologies with an accessible label.\nThe `aria-label` should describe the action to be invoked rather than the icon itself. For instance,\nif your `IconButton` renders a magnifying glass icon and invokes a search action, the `aria-label` should be\n`\"Search\"` instead of `\"Magnifying glass\"`.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\n[Learn more about best functional image practices (WAI Images)](https://www.w3.org/WAI/tutorials/images/functional)",
|
|
12650
|
+
"accessibility_docs": "`IconButton` requires an `aria-label`, which will provide assistive technologies with an accessible label.\nThe `aria-label` should describe the action to be invoked rather than the icon itself. For instance,\nif your `IconButton` renders a magnifying glass icon and invokes a search action, the `aria-label` should be\n`\"Search\"` instead of `\"Magnifying glass\"`.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\n[Learn more about best functional image practices (WAI Images)](https://www.w3.org/WAI/tutorials/images/functional)\n\nAdditional markup is required if setting the `tag` argument to either `:a` or `:summary`.\n\n* `:a` requires you to pass in an `href` attribute\n* `:summary` requires you to wrap the component in a `<details>` element",
|
|
12644
12651
|
"is_form_component": false,
|
|
12645
12652
|
"is_published": true,
|
|
12646
12653
|
"requires_js": false,
|
|
@@ -12789,6 +12796,32 @@
|
|
|
12789
12796
|
"color-contrast"
|
|
12790
12797
|
]
|
|
12791
12798
|
}
|
|
12799
|
+
},
|
|
12800
|
+
{
|
|
12801
|
+
"preview_path": "primer/beta/icon_button/link_as_button",
|
|
12802
|
+
"name": "link_as_button",
|
|
12803
|
+
"snapshot": "true",
|
|
12804
|
+
"skip_rules": {
|
|
12805
|
+
"wont_fix": [
|
|
12806
|
+
"region"
|
|
12807
|
+
],
|
|
12808
|
+
"will_fix": [
|
|
12809
|
+
"color-contrast"
|
|
12810
|
+
]
|
|
12811
|
+
}
|
|
12812
|
+
},
|
|
12813
|
+
{
|
|
12814
|
+
"preview_path": "primer/beta/icon_button/summary_as_button",
|
|
12815
|
+
"name": "summary_as_button",
|
|
12816
|
+
"snapshot": "true",
|
|
12817
|
+
"skip_rules": {
|
|
12818
|
+
"wont_fix": [
|
|
12819
|
+
"region"
|
|
12820
|
+
],
|
|
12821
|
+
"will_fix": [
|
|
12822
|
+
"color-contrast"
|
|
12823
|
+
]
|
|
12824
|
+
}
|
|
12792
12825
|
}
|
|
12793
12826
|
],
|
|
12794
12827
|
"subcomponents": [
|
|
@@ -14496,6 +14529,12 @@
|
|
|
14496
14529
|
"default": "`nil`",
|
|
14497
14530
|
"description": "Provide a custom title to the element."
|
|
14498
14531
|
},
|
|
14532
|
+
{
|
|
14533
|
+
"name": "no_title",
|
|
14534
|
+
"type": "Boolean",
|
|
14535
|
+
"default": "`false`",
|
|
14536
|
+
"description": "Removes the `title` attribute provided on the element by default."
|
|
14537
|
+
},
|
|
14499
14538
|
{
|
|
14500
14539
|
"name": "system_arguments",
|
|
14501
14540
|
"type": "Hash",
|
|
@@ -14574,6 +14613,32 @@
|
|
|
14574
14613
|
"color-contrast"
|
|
14575
14614
|
]
|
|
14576
14615
|
}
|
|
14616
|
+
},
|
|
14617
|
+
{
|
|
14618
|
+
"preview_path": "primer/beta/relative_time/no_title_attribute",
|
|
14619
|
+
"name": "no_title_attribute",
|
|
14620
|
+
"snapshot": "true",
|
|
14621
|
+
"skip_rules": {
|
|
14622
|
+
"wont_fix": [
|
|
14623
|
+
"region"
|
|
14624
|
+
],
|
|
14625
|
+
"will_fix": [
|
|
14626
|
+
"color-contrast"
|
|
14627
|
+
]
|
|
14628
|
+
}
|
|
14629
|
+
},
|
|
14630
|
+
{
|
|
14631
|
+
"preview_path": "primer/beta/relative_time/link_with_tooltip",
|
|
14632
|
+
"name": "link_with_tooltip",
|
|
14633
|
+
"snapshot": "true",
|
|
14634
|
+
"skip_rules": {
|
|
14635
|
+
"wont_fix": [
|
|
14636
|
+
"region"
|
|
14637
|
+
],
|
|
14638
|
+
"will_fix": [
|
|
14639
|
+
"color-contrast"
|
|
14640
|
+
]
|
|
14641
|
+
}
|
|
14577
14642
|
}
|
|
14578
14643
|
],
|
|
14579
14644
|
"subcomponents": [
|
package/static/previews.json
CHANGED
|
@@ -2084,6 +2084,19 @@
|
|
|
2084
2084
|
"color-contrast"
|
|
2085
2085
|
]
|
|
2086
2086
|
}
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"preview_path": "primer/beta/breadcrumbs/with_link_target",
|
|
2090
|
+
"name": "with_link_target",
|
|
2091
|
+
"snapshot": "false",
|
|
2092
|
+
"skip_rules": {
|
|
2093
|
+
"wont_fix": [
|
|
2094
|
+
"region"
|
|
2095
|
+
],
|
|
2096
|
+
"will_fix": [
|
|
2097
|
+
"color-contrast"
|
|
2098
|
+
]
|
|
2099
|
+
}
|
|
2087
2100
|
}
|
|
2088
2101
|
]
|
|
2089
2102
|
},
|
|
@@ -4111,6 +4124,32 @@
|
|
|
4111
4124
|
"color-contrast"
|
|
4112
4125
|
]
|
|
4113
4126
|
}
|
|
4127
|
+
},
|
|
4128
|
+
{
|
|
4129
|
+
"preview_path": "primer/beta/icon_button/link_as_button",
|
|
4130
|
+
"name": "link_as_button",
|
|
4131
|
+
"snapshot": "true",
|
|
4132
|
+
"skip_rules": {
|
|
4133
|
+
"wont_fix": [
|
|
4134
|
+
"region"
|
|
4135
|
+
],
|
|
4136
|
+
"will_fix": [
|
|
4137
|
+
"color-contrast"
|
|
4138
|
+
]
|
|
4139
|
+
}
|
|
4140
|
+
},
|
|
4141
|
+
{
|
|
4142
|
+
"preview_path": "primer/beta/icon_button/summary_as_button",
|
|
4143
|
+
"name": "summary_as_button",
|
|
4144
|
+
"snapshot": "true",
|
|
4145
|
+
"skip_rules": {
|
|
4146
|
+
"wont_fix": [
|
|
4147
|
+
"region"
|
|
4148
|
+
],
|
|
4149
|
+
"will_fix": [
|
|
4150
|
+
"color-contrast"
|
|
4151
|
+
]
|
|
4152
|
+
}
|
|
4114
4153
|
}
|
|
4115
4154
|
]
|
|
4116
4155
|
},
|
|
@@ -5885,6 +5924,32 @@
|
|
|
5885
5924
|
"color-contrast"
|
|
5886
5925
|
]
|
|
5887
5926
|
}
|
|
5927
|
+
},
|
|
5928
|
+
{
|
|
5929
|
+
"preview_path": "primer/beta/relative_time/no_title_attribute",
|
|
5930
|
+
"name": "no_title_attribute",
|
|
5931
|
+
"snapshot": "true",
|
|
5932
|
+
"skip_rules": {
|
|
5933
|
+
"wont_fix": [
|
|
5934
|
+
"region"
|
|
5935
|
+
],
|
|
5936
|
+
"will_fix": [
|
|
5937
|
+
"color-contrast"
|
|
5938
|
+
]
|
|
5939
|
+
}
|
|
5940
|
+
},
|
|
5941
|
+
{
|
|
5942
|
+
"preview_path": "primer/beta/relative_time/link_with_tooltip",
|
|
5943
|
+
"name": "link_with_tooltip",
|
|
5944
|
+
"snapshot": "true",
|
|
5945
|
+
"skip_rules": {
|
|
5946
|
+
"wont_fix": [
|
|
5947
|
+
"region"
|
|
5948
|
+
],
|
|
5949
|
+
"will_fix": [
|
|
5950
|
+
"color-contrast"
|
|
5951
|
+
]
|
|
5952
|
+
}
|
|
5888
5953
|
}
|
|
5889
5954
|
]
|
|
5890
5955
|
},
|