@openproject/primer-view-components 0.41.1 → 0.42.0-rc.f2ac5817

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.
@@ -1 +1 @@
1
- .SegmentedControl{--segmentedControl-item-padding:var(--control-small-paddingBlock);--overlay-offset:0.5rem;background-color:var(--controlTrack-bgColor-rest,var(--color-segmented-control-bg));border-radius:var(--borderRadius-medium);display:inline-flex;list-style:none}.SegmentedControl--iconOnly .Button--iconOnly.Button--medium,.SegmentedControl--iconOnly .Button--iconOnly.Button--small{padding-inline:0!important;width:100%}.SegmentedControl--small{--segmentedControl-item-padding:var(--control-xsmall-paddingBlock)}.SegmentedControl--small .SegmentedControl-item{height:var(--control-small-size)}.SegmentedControl--small .SegmentedControl-item .Button{padding-inline:calc(var(--control-xsmall-paddingInline-normal) - var(--segmentedControl-item-padding))}.SegmentedControl--small.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-small-size)}.SegmentedControl--medium .SegmentedControl-item{height:var(--control-medium-size)}.SegmentedControl--medium.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-medium-size)}.SegmentedControl-item{border:var(--borderWidth-thin) solid #0000;border-radius:var(--borderRadius-medium);display:inline-flex;height:var(--control-medium-size);justify-content:center;padding:var(--segmentedControl-item-padding);position:relative}.SegmentedControl-item .Button--invisible:hover:not(:disabled){background-color:var(--controlTrack-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.SegmentedControl-item .Button--invisible:active:not(:disabled){background-color:var(--controlTrack-bgColor-active,var(--color-action-list-item-default-active-bg))}.SegmentedControl-item.SegmentedControl-item--selected{background-color:var(--controlKnob-bgColor-rest,var(--color-segmented-control-button-bg));border-color:var(--controlKnob-borderColor-rest,var(--color-segmented-control-button-selected-border))}.SegmentedControl-item.SegmentedControl-item--selected .Button{font-weight:var(--base-text-weight-semibold)}.SegmentedControl-item.SegmentedControl-item--selected .Button:hover{background-color:initial}.SegmentedControl-item.SegmentedControl-item--selected:before{border-color:#0000!important}.SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before{border-color:#0000}.SegmentedControl-item .Button-label[data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold);height:0;visibility:hidden}.SegmentedControl-item:not(:first-child):before{border-left:var(--borderWidth-thin) solid var(--borderColor-default);content:"";inset:0 0 0 -1px;margin-bottom:var(--control-medium-paddingBlock);margin-top:var(--control-medium-paddingBlock);position:absolute}.SegmentedControl-item .Button{border:0;border-radius:calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding)/2);font-weight:var(--base-text-weight-normal);height:100%;min-width:-moz-fit-content;min-width:fit-content;padding-inline:calc(var(--control-medium-paddingInline-normal) - var(--segmentedControl-item-padding));width:100%}.SegmentedControl-item .Button:focus-visible{border-radius:calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding)/1);outline-offset:calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin))}.SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--button-default-fgColor-rest)}.SegmentedControl-item .Button-content{align-self:stretch;flex:1 1 auto}.SegmentedControl-item .Button-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.SegmentedControl--fullWidth{display:flex}.SegmentedControl--fullWidth .SegmentedControl-item{flex:1;justify-content:center}
1
+ .SegmentedControl{--segmentedControl-item-padding:var(--control-small-paddingBlock);--overlay-offset:0.5rem;background-color:var(--controlTrack-bgColor-rest,var(--color-segmented-control-bg));border-color:var(--controlTrack-borderColor-rest,#0000);border-radius:var(--borderRadius-medium);display:inline-flex;list-style:none}.SegmentedControl--iconOnly .Button--iconOnly.Button--medium,.SegmentedControl--iconOnly .Button--iconOnly.Button--small{padding-inline:0!important;width:100%}.SegmentedControl--small{--segmentedControl-item-padding:var(--control-xsmall-paddingBlock)}.SegmentedControl--small .SegmentedControl-item{height:var(--control-small-size)}.SegmentedControl--small .SegmentedControl-item .Button{padding-inline:calc(var(--control-xsmall-paddingInline-normal) - var(--segmentedControl-item-padding))}.SegmentedControl--small.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-small-size)}.SegmentedControl--medium .SegmentedControl-item{height:var(--control-medium-size)}.SegmentedControl--medium.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-medium-size)}.SegmentedControl-item{border:var(--borderWidth-thin) solid #0000;border-radius:var(--borderRadius-medium);display:inline-flex;height:var(--control-medium-size);justify-content:center;padding:var(--segmentedControl-item-padding);position:relative}.SegmentedControl-item .Button--invisible:hover:not(:disabled){background-color:var(--controlTrack-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.SegmentedControl-item .Button--invisible:active:not(:disabled){background-color:var(--controlTrack-bgColor-active,var(--color-action-list-item-default-active-bg))}.SegmentedControl-item.SegmentedControl-item--selected{background-color:var(--controlKnob-bgColor-rest,var(--color-segmented-control-button-bg));border-color:var(--controlKnob-borderColor-rest,var(--color-segmented-control-button-selected-border))}.SegmentedControl-item.SegmentedControl-item--selected .Button{font-weight:var(--base-text-weight-semibold)}.SegmentedControl-item.SegmentedControl-item--selected .Button:hover{background-color:initial}.SegmentedControl-item.SegmentedControl-item--selected:before{border-color:#0000!important}.SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before{border-color:#0000}.SegmentedControl-item .Button-label[data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold);height:0;visibility:hidden}.SegmentedControl-item:not(:first-child):before{border-left:var(--borderWidth-thin) solid var(--borderColor-default);content:"";inset:0 0 0 -1px;margin-bottom:var(--control-medium-paddingBlock);margin-top:var(--control-medium-paddingBlock);position:absolute}.SegmentedControl-item .Button{border:0;border-radius:calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding)/2);font-weight:var(--base-text-weight-normal);height:100%;min-width:-moz-fit-content;min-width:fit-content;padding-inline:calc(var(--control-medium-paddingInline-normal) - var(--segmentedControl-item-padding));width:100%}.SegmentedControl-item .Button:focus-visible{border-radius:calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding)/1);outline-offset:calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin))}.SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--button-default-fgColor-rest)}.SegmentedControl-item .Button-content{align-self:stretch;flex:1 1 auto}.SegmentedControl-item .Button-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.SegmentedControl--fullWidth{display:flex}.SegmentedControl--fullWidth .SegmentedControl-item{flex:1;justify-content:center}
@@ -6,7 +6,6 @@ type SelectedItem = {
6
6
  label: string | null | undefined;
7
7
  value: string | null | undefined;
8
8
  inputName: string | null | undefined;
9
- element: SelectPanelItem;
10
9
  };
11
10
  export type SelectPanelItem = HTMLLIElement;
12
11
  export type FilterFn = (item: SelectPanelItem, query: string) => boolean;
@@ -15,7 +15,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
15
15
  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");
16
16
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17
17
  };
18
- var _SelectPanelElement_instances, _SelectPanelElement_dialogIntersectionObserver, _SelectPanelElement_abortController, _SelectPanelElement_originalLabel, _SelectPanelElement_inputName, _SelectPanelElement_selectedItems, _SelectPanelElement_loadingDelayTimeoutId, _SelectPanelElement_loadingAnnouncementTimeoutId, _SelectPanelElement_waitForCondition, _SelectPanelElement_softDisableItems, _SelectPanelElement_updateTabIndices, _SelectPanelElement_potentiallyDisallowActivation, _SelectPanelElement_isAnchorActivationViaSpace, _SelectPanelElement_isActivation, _SelectPanelElement_checkSelectedItems, _SelectPanelElement_addSelectedItem, _SelectPanelElement_removeSelectedItem, _SelectPanelElement_setTextFieldLoadingSpinnerTimer, _SelectPanelElement_handleIncludeFragmentEvent, _SelectPanelElement_toggleIncludeFragmentElements, _SelectPanelElement_handleRemoteInputEvent, _SelectPanelElement_defaultFilterFn, _SelectPanelElement_handleSearchFieldEvent, _SelectPanelElement_updateItemVisibility, _SelectPanelElement_inErrorState, _SelectPanelElement_setErrorState, _SelectPanelElement_clearErrorState, _SelectPanelElement_maybeAnnounce, _SelectPanelElement_fetchStrategy_get, _SelectPanelElement_filterInputTextFieldElement_get, _SelectPanelElement_performFilteringLocally, _SelectPanelElement_handleInvokerActivated, _SelectPanelElement_handleDialogItemActivated, _SelectPanelElement_handleItemActivated, _SelectPanelElement_setDynamicLabel, _SelectPanelElement_updateInput, _SelectPanelElement_firstItem_get, _SelectPanelElement_hideItem, _SelectPanelElement_showItem, _SelectPanelElement_getItemContent;
18
+ var _SelectPanelElement_instances, _SelectPanelElement_dialogIntersectionObserver, _SelectPanelElement_abortController, _SelectPanelElement_originalLabel, _SelectPanelElement_inputName, _SelectPanelElement_selectedItems, _SelectPanelElement_loadingDelayTimeoutId, _SelectPanelElement_loadingAnnouncementTimeoutId, _SelectPanelElement_hasLoadedData, _SelectPanelElement_waitForCondition, _SelectPanelElement_softDisableItems, _SelectPanelElement_updateTabIndices, _SelectPanelElement_potentiallyDisallowActivation, _SelectPanelElement_isAnchorActivationViaSpace, _SelectPanelElement_isActivation, _SelectPanelElement_checkSelectedItems, _SelectPanelElement_addSelectedItem, _SelectPanelElement_removeSelectedItem, _SelectPanelElement_setTextFieldLoadingSpinnerTimer, _SelectPanelElement_handleIncludeFragmentEvent, _SelectPanelElement_toggleIncludeFragmentElements, _SelectPanelElement_handleRemoteInputEvent, _SelectPanelElement_defaultFilterFn, _SelectPanelElement_handleSearchFieldEvent, _SelectPanelElement_updateItemVisibility, _SelectPanelElement_inErrorState, _SelectPanelElement_setErrorState, _SelectPanelElement_clearErrorState, _SelectPanelElement_maybeAnnounce, _SelectPanelElement_fetchStrategy_get, _SelectPanelElement_filterInputTextFieldElement_get, _SelectPanelElement_performFilteringLocally, _SelectPanelElement_handleInvokerActivated, _SelectPanelElement_handleDialogItemActivated, _SelectPanelElement_handleItemActivated, _SelectPanelElement_setDynamicLabel, _SelectPanelElement_updateInput, _SelectPanelElement_firstItem_get, _SelectPanelElement_hideItem, _SelectPanelElement_showItem, _SelectPanelElement_getItemContent;
19
19
  import { getAnchoredPosition } from '@primer/behaviors';
20
20
  import { controller, target } from '@github/catalyst';
21
21
  import { announceFromElement, announce } from '../aria_live';
@@ -55,6 +55,7 @@ const updateWhenVisible = (() => {
55
55
  }));
56
56
  resizeObserver.observe(el.ownerDocument.documentElement);
57
57
  el.addEventListener('dialog:close', () => {
58
+ el.invokerElement?.setAttribute('aria-expanded', 'false');
58
59
  anchors.delete(el);
59
60
  });
60
61
  el.addEventListener('dialog:open', () => {
@@ -73,6 +74,7 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
73
74
  _SelectPanelElement_selectedItems.set(this, new Map());
74
75
  _SelectPanelElement_loadingDelayTimeoutId.set(this, null);
75
76
  _SelectPanelElement_loadingAnnouncementTimeoutId.set(this, null);
77
+ _SelectPanelElement_hasLoadedData.set(this, false);
76
78
  }
77
79
  get open() {
78
80
  return this.dialog.open;
@@ -251,6 +253,7 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
251
253
  if (event.target === this.dialog && event.type === 'close') {
252
254
  // Remove data-ready so it can be set the next time the panel is opened
253
255
  this.dialog.removeAttribute('data-ready');
256
+ this.invokerElement?.setAttribute('aria-expanded', 'false');
254
257
  this.dispatchEvent(new CustomEvent('panelClosed', {
255
258
  detail: { panel: this },
256
259
  bubbles: true,
@@ -300,6 +303,7 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
300
303
  show() {
301
304
  this.updateAnchorPosition();
302
305
  this.dialog.showModal();
306
+ this.invokerElement?.setAttribute('aria-expanded', 'true');
303
307
  const event = new CustomEvent('dialog:open', {
304
308
  detail: { dialog: this.dialog },
305
309
  });
@@ -385,6 +389,7 @@ _SelectPanelElement_inputName = new WeakMap();
385
389
  _SelectPanelElement_selectedItems = new WeakMap();
386
390
  _SelectPanelElement_loadingDelayTimeoutId = new WeakMap();
387
391
  _SelectPanelElement_loadingAnnouncementTimeoutId = new WeakMap();
392
+ _SelectPanelElement_hasLoadedData = new WeakMap();
388
393
  _SelectPanelElement_instances = new WeakSet();
389
394
  _SelectPanelElement_waitForCondition = function _SelectPanelElement_waitForCondition(condition, body) {
390
395
  if (condition()) {
@@ -422,7 +427,7 @@ _SelectPanelElement_updateTabIndices = function _SelectPanelElement_updateTabInd
422
427
  itemContent.setAttribute('tabindex', '-1');
423
428
  }
424
429
  // <li> elements should not themselves be tabbable
425
- item.setAttribute('tabindex', '-1');
430
+ item.removeAttribute('tabindex');
426
431
  }
427
432
  }
428
433
  else {
@@ -437,7 +442,7 @@ _SelectPanelElement_updateTabIndices = function _SelectPanelElement_updateTabInd
437
442
  itemContent.setAttribute('tabindex', '-1');
438
443
  }
439
444
  // <li> elements should not themselves be tabbable
440
- item.setAttribute('tabindex', '-1');
445
+ item.removeAttribute('tabindex');
441
446
  }
442
447
  }
443
448
  if (!setZeroTabIndex && __classPrivateFieldGet(this, _SelectPanelElement_instances, "a", _SelectPanelElement_firstItem_get)) {
@@ -497,12 +502,14 @@ _SelectPanelElement_addSelectedItem = function _SelectPanelElement_addSelectedIt
497
502
  value,
498
503
  label: itemContent.querySelector('.ActionListItem-label')?.textContent?.trim(),
499
504
  inputName: itemContent.getAttribute('data-input-name'),
500
- element: item,
501
505
  });
502
506
  }
503
507
  };
504
508
  _SelectPanelElement_removeSelectedItem = function _SelectPanelElement_removeSelectedItem(item) {
505
- const value = item.getAttribute('data-value');
509
+ const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
510
+ if (!itemContent)
511
+ return;
512
+ const value = itemContent.getAttribute('data-value');
506
513
  if (value) {
507
514
  __classPrivateFieldGet(this, _SelectPanelElement_selectedItems, "f").delete(value);
508
515
  }
@@ -604,27 +611,33 @@ _SelectPanelElement_handleSearchFieldEvent = function _SelectPanelElement_handle
604
611
  if (key === 'Enter') {
605
612
  const item = this.visibleItems[0];
606
613
  if (item) {
607
- __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_handleItemActivated).call(this, item, false);
614
+ const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
615
+ if (itemContent)
616
+ itemContent.click();
608
617
  }
609
618
  }
610
619
  else if (key === 'ArrowDown') {
611
- const item = (this.focusableItem || this.visibleItems[0]);
620
+ const item = (this.focusableItem || __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, this.visibleItems[0]));
612
621
  if (item) {
613
- __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item).focus();
622
+ item.focus();
614
623
  event.preventDefault();
615
624
  }
616
625
  }
617
626
  else if (key === 'Home') {
618
627
  const item = this.visibleItems[0];
619
628
  if (item) {
620
- __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item).focus();
629
+ const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
630
+ if (itemContent)
631
+ itemContent.focus();
621
632
  event.preventDefault();
622
633
  }
623
634
  }
624
635
  else if (key === 'End') {
625
636
  if (this.visibleItems.length > 0) {
626
637
  const item = this.visibleItems[this.visibleItems.length - 1];
627
- __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item).focus();
638
+ const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
639
+ if (itemContent)
640
+ itemContent.focus();
628
641
  event.preventDefault();
629
642
  }
630
643
  }
@@ -672,7 +685,13 @@ _SelectPanelElement_updateItemVisibility = function _SelectPanelElement_updateIt
672
685
  if (!itemContent)
673
686
  continue;
674
687
  const value = itemContent.getAttribute('data-value');
675
- if (value && !__classPrivateFieldGet(this, _SelectPanelElement_selectedItems, "f").has(value) && this.isItemChecked(item)) {
688
+ if (__classPrivateFieldGet(this, _SelectPanelElement_hasLoadedData, "f")) {
689
+ if (value && !__classPrivateFieldGet(this, _SelectPanelElement_selectedItems, "f").has(value)) {
690
+ itemContent.setAttribute(this.ariaSelectionType, 'false');
691
+ }
692
+ }
693
+ else if (value && !__classPrivateFieldGet(this, _SelectPanelElement_selectedItems, "f").has(value) && this.isItemChecked(item)) {
694
+ __classPrivateFieldSet(this, _SelectPanelElement_hasLoadedData, true, "f");
676
695
  __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_addSelectedItem).call(this, item);
677
696
  }
678
697
  }
@@ -786,7 +805,7 @@ _SelectPanelElement_handleDialogItemActivated = function _SelectPanelElement_han
786
805
  dialog.addEventListener('close', handleDialogClose, { signal });
787
806
  dialog.addEventListener('cancel', handleDialogClose, { signal });
788
807
  };
789
- _SelectPanelElement_handleItemActivated = function _SelectPanelElement_handleItemActivated(item, shouldClose = true) {
808
+ _SelectPanelElement_handleItemActivated = function _SelectPanelElement_handleItemActivated(item) {
790
809
  // Hide popover after current event loop to prevent changes in focus from
791
810
  // altering the target of the event. Not doing this specifically affects
792
811
  // <a> tags. It causes the event to be sent to the currently focused element
@@ -795,7 +814,7 @@ _SelectPanelElement_handleItemActivated = function _SelectPanelElement_handleIte
795
814
  // works fine.
796
815
  if (this.selectVariant !== 'multiple') {
797
816
  setTimeout(() => {
798
- if (this.open && shouldClose) {
817
+ if (this.open) {
799
818
  this.hide();
800
819
  }
801
820
  });
@@ -814,17 +833,17 @@ _SelectPanelElement_handleItemActivated = function _SelectPanelElement_handleIte
814
833
  return;
815
834
  const itemContent = __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, item);
816
835
  if (this.selectVariant === 'single') {
836
+ const value = this.selectedItems[0]?.value;
837
+ const element = this.visibleItems.find(el => __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, el)?.getAttribute('data-value') === value);
838
+ if (element) {
839
+ __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_getItemContent).call(this, element)?.setAttribute(this.ariaSelectionType, 'false');
840
+ }
841
+ __classPrivateFieldGet(this, _SelectPanelElement_selectedItems, "f").clear();
817
842
  // Only check, never uncheck here. Single-select mode does not allow unchecking a checked item.
818
843
  if (checked) {
819
844
  __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_addSelectedItem).call(this, item);
820
845
  itemContent?.setAttribute(this.ariaSelectionType, 'true');
821
846
  }
822
- for (const checkedItem of this.querySelectorAll(`[${this.ariaSelectionType}]`)) {
823
- if (checkedItem !== itemContent) {
824
- __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_removeSelectedItem).call(this, checkedItem);
825
- checkedItem.setAttribute(this.ariaSelectionType, 'false');
826
- }
827
- }
828
847
  __classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_setDynamicLabel).call(this);
829
848
  }
830
849
  else {
@@ -86,7 +86,7 @@ class ToolTipElement extends HTMLElement {
86
86
  --tooltip-left: var(--tool-tip-position-left, 0);
87
87
  padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;
88
88
  font: var(--text-body-shorthand-small);
89
- color: var(--fgColor-onEmphasis, var(--color-fg-on-emphasis)) !important;
89
+ color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;
90
90
  text-align: center;
91
91
  text-decoration: none;
92
92
  text-shadow: none;
@@ -94,7 +94,7 @@ class ToolTipElement extends HTMLElement {
94
94
  letter-spacing: normal;
95
95
  word-wrap: break-word;
96
96
  white-space: pre;
97
- background: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus)) !important;
97
+ background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;
98
98
  border-radius: var(--borderRadius-medium);
99
99
  border: 0 !important;
100
100
  opacity: 0;
@@ -1 +1 @@
1
- .State,.state{border-radius:2em;display:inline-block;font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-medium);line-height:var(--control-medium-lineBoxHeight);padding:5px var(--control-medium-paddingInline-normal);text-align:center;white-space:nowrap}.State,.State--draft,.state{background-color:var(--bgColor-neutral-emphasis);border:var(--borderWidth-thin) solid #0000;color:var(--fgColor-onEmphasis)}.State--open{background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis))}.State--merged,.State--open{color:var(--fgColor-onEmphasis)}.State--merged{background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis))}.State--closed{background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));color:var(--fgColor-onEmphasis)}.State--small{font-size:var(--text-body-size-small);line-height:var(--base-size-24);padding:0 10px}.State--small .octicon{width:1em}
1
+ .State,.state{border-radius:2em;display:inline-block;font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-medium);line-height:var(--control-medium-lineBoxHeight);padding:5px var(--control-medium-paddingInline-normal);text-align:center;white-space:nowrap}.State,.State--draft,.state{background-color:var(--bgColor-neutral-emphasis);border:var(--borderWidth-thin) solid #0000;box-shadow:var(--boxShadow-thin) var(--borderColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.State--open{background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-open-emphasis)}.State--merged,.State--open{color:var(--fgColor-onEmphasis)}.State--merged{background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-done-emphasis)}.State--closed{background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin) var(--borderColor-closed-emphasis);color:var(--fgColor-onEmphasis)}.State--small{font-size:var(--text-body-size-small);line-height:var(--base-size-24);padding:0 10px}.State--small .octicon{width:1em}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openproject/primer-view-components",
3
- "version": "0.41.1",
3
+ "version": "0.42.0-rc.f2ac5817",
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",
@@ -4336,9 +4336,9 @@
4336
4336
  },
4337
4337
  {
4338
4338
  "name": "prefix",
4339
- "type": "sring",
4339
+ "type": "String",
4340
4340
  "default": "`nil`",
4341
- "description": "What to prefix the relative ime display with."
4341
+ "description": "What to prefix the relative time display with."
4342
4342
  },
4343
4343
  {
4344
4344
  "name": "second",
@@ -4390,7 +4390,7 @@
4390
4390
  },
4391
4391
  {
4392
4392
  "name": "threshold",
4393
- "type": "string",
4393
+ "type": "String",
4394
4394
  "default": "`nil`",
4395
4395
  "description": "The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute."
4396
4396
  },
@@ -4414,13 +4414,13 @@
4414
4414
  },
4415
4415
  {
4416
4416
  "name": "lang",
4417
- "type": "string",
4417
+ "type": "String",
4418
4418
  "default": "`nil`",
4419
4419
  "description": "The language to use."
4420
4420
  },
4421
4421
  {
4422
4422
  "name": "title",
4423
- "type": "string",
4423
+ "type": "String",
4424
4424
  "default": "`nil`",
4425
4425
  "description": "Provide a custom title to the element."
4426
4426
  },
@@ -989,9 +989,20 @@
989
989
  "slots": [
990
990
  {
991
991
  "name": "description",
992
- "description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
992
+ "description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
993
993
  "parameters": [
994
-
994
+ {
995
+ "name": "legacy_content",
996
+ "type": "String",
997
+ "default": "N/A",
998
+ "description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
999
+ },
1000
+ {
1001
+ "name": "test_selector",
1002
+ "type": "String",
1003
+ "default": "N/A",
1004
+ "description": "The value of this argument is set as the value of a `data-test-selector` HTML attribute on the description element."
1005
+ }
995
1006
  ]
996
1007
  },
997
1008
  {
@@ -5547,9 +5558,20 @@
5547
5558
  },
5548
5559
  {
5549
5560
  "name": "description",
5550
- "description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
5561
+ "description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
5551
5562
  "parameters": [
5552
-
5563
+ {
5564
+ "name": "legacy_content",
5565
+ "type": "String",
5566
+ "default": "N/A",
5567
+ "description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
5568
+ },
5569
+ {
5570
+ "name": "test_selector",
5571
+ "type": "String",
5572
+ "default": "N/A",
5573
+ "description": "The value of this argument is set as the value of a `data-test-selector` HTML attribute on the description element."
5574
+ }
5553
5575
  ]
5554
5576
  },
5555
5577
  {
@@ -8083,6 +8105,19 @@
8083
8105
  "color-contrast"
8084
8106
  ]
8085
8107
  }
8108
+ },
8109
+ {
8110
+ "preview_path": "primer/alpha/select_panel/list_of_links",
8111
+ "name": "list_of_links",
8112
+ "snapshot": "interactive",
8113
+ "skip_rules": {
8114
+ "wont_fix": [
8115
+ "region"
8116
+ ],
8117
+ "will_fix": [
8118
+ "color-contrast"
8119
+ ]
8120
+ }
8086
8121
  }
8087
8122
  ],
8088
8123
  "subcomponents": [
@@ -14687,9 +14722,20 @@
14687
14722
  },
14688
14723
  {
14689
14724
  "name": "description",
14690
- "description": "Description content that complements the item's label. See `ActionList`'s `description_scheme` argument\nfor layout options.",
14725
+ "description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
14691
14726
  "parameters": [
14692
-
14727
+ {
14728
+ "name": "legacy_content",
14729
+ "type": "String",
14730
+ "default": "N/A",
14731
+ "description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
14732
+ },
14733
+ {
14734
+ "name": "test_selector",
14735
+ "type": "String",
14736
+ "default": "N/A",
14737
+ "description": "The value of this argument is set as the value of a `data-test-selector` HTML attribute on the description element."
14738
+ }
14693
14739
  ]
14694
14740
  },
14695
14741
  {
@@ -15349,9 +15395,9 @@
15349
15395
  },
15350
15396
  {
15351
15397
  "name": "prefix",
15352
- "type": "sring",
15398
+ "type": "String",
15353
15399
  "default": "`nil`",
15354
- "description": "What to prefix the relative ime display with."
15400
+ "description": "What to prefix the relative time display with."
15355
15401
  },
15356
15402
  {
15357
15403
  "name": "second",
@@ -15403,7 +15449,7 @@
15403
15449
  },
15404
15450
  {
15405
15451
  "name": "threshold",
15406
- "type": "string",
15452
+ "type": "String",
15407
15453
  "default": "`nil`",
15408
15454
  "description": "The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute."
15409
15455
  },
@@ -15427,13 +15473,13 @@
15427
15473
  },
15428
15474
  {
15429
15475
  "name": "lang",
15430
- "type": "string",
15476
+ "type": "String",
15431
15477
  "default": "`nil`",
15432
15478
  "description": "The language to use."
15433
15479
  },
15434
15480
  {
15435
15481
  "name": "title",
15436
- "type": "string",
15482
+ "type": "String",
15437
15483
  "default": "`nil`",
15438
15484
  "description": "Provide a custom title to the element."
15439
15485
  },
@@ -6624,6 +6624,19 @@
6624
6624
  "color-contrast"
6625
6625
  ]
6626
6626
  }
6627
+ },
6628
+ {
6629
+ "preview_path": "primer/alpha/select_panel/list_of_links",
6630
+ "name": "list_of_links",
6631
+ "snapshot": "interactive",
6632
+ "skip_rules": {
6633
+ "wont_fix": [
6634
+ "region"
6635
+ ],
6636
+ "will_fix": [
6637
+ "color-contrast"
6638
+ ]
6639
+ }
6627
6640
  }
6628
6641
  ]
6629
6642
  },