@openproject/primer-view-components 0.82.1 → 0.83.0-rc.ae05103d7

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.
Files changed (29) hide show
  1. package/app/assets/javascripts/primer_view_components.js +1 -1
  2. package/app/assets/javascripts/primer_view_components.js.map +1 -1
  3. package/app/assets/styles/primer_view_components.css +1 -1
  4. package/app/assets/styles/primer_view_components.css.map +1 -1
  5. package/app/components/primer/alpha/action_bar_element.js +1 -1
  6. package/app/components/primer/alpha/action_list.js +1 -1
  7. package/app/components/primer/alpha/action_menu/action_menu_element.js +1 -1
  8. package/app/components/primer/alpha/segmented_control.js +1 -1
  9. package/app/components/primer/alpha/select_panel_element.js +3 -1
  10. package/app/components/primer/alpha/toggle_switch.js +1 -1
  11. package/app/components/primer/alpha/tree_view/tree_view.js +1 -1
  12. package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +1 -1
  13. package/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.js +1 -1
  14. package/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.js +25 -2
  15. package/app/components/primer/alpha/x_banner.js +1 -1
  16. package/app/components/primer/beta/blankslate.css +1 -1
  17. package/app/components/primer/beta/blankslate.css.json +1 -0
  18. package/app/components/primer/beta/details_toggle_element.js +1 -1
  19. package/app/components/primer/beta/nav_list.js +1 -1
  20. package/app/components/primer/beta/nav_list_group_element.js +1 -1
  21. package/app/components/primer/dialog_helper.js +17 -8
  22. package/app/components/primer/scrollable_region.js +1 -1
  23. package/app/lib/primer/forms/primer_multi_input.js +1 -1
  24. package/app/lib/primer/forms/primer_text_area.js +1 -1
  25. package/app/lib/primer/forms/primer_text_field.js +1 -1
  26. package/app/lib/primer/forms/toggle_switch_input.js +1 -1
  27. package/package.json +5 -4
  28. package/static/arguments.json +6 -0
  29. package/static/info_arch.json +8 -2
@@ -165,6 +165,6 @@ __decorate([
165
165
  target
166
166
  ], ActionBarElement.prototype, "moreMenu", void 0);
167
167
  ActionBarElement = __decorate([
168
- controller
168
+ controller('action-bar')
169
169
  ], ActionBarElement);
170
170
  window.ActionBarElement = ActionBarElement;
@@ -65,6 +65,6 @@ let ActionListElement = class ActionListElement extends HTMLElement {
65
65
  };
66
66
  _ActionListElement_truncationObserver = new WeakMap();
67
67
  ActionListElement = __decorate([
68
- controller
68
+ controller('action-list')
69
69
  ], ActionListElement);
70
70
  export { ActionListElement };
@@ -582,7 +582,7 @@ __decorate([
582
582
  target
583
583
  ], ActionMenuElement.prototype, "list", void 0);
584
584
  ActionMenuElement = ActionMenuElement_1 = __decorate([
585
- controller
585
+ controller('action-menu')
586
586
  ], ActionMenuElement);
587
587
  export { ActionMenuElement };
588
588
  if (!window.customElements.get('action-menu')) {
@@ -50,7 +50,7 @@ __decorate([
50
50
  targets
51
51
  ], SegmentedControlElement.prototype, "items", void 0);
52
52
  SegmentedControlElement = __decorate([
53
- controller
53
+ controller('segmented-control')
54
54
  ], SegmentedControlElement);
55
55
  export { SegmentedControlElement };
56
56
  if (!window.customElements.get('segmented-control')) {
@@ -775,6 +775,8 @@ _SelectPanelElement_performFilteringLocally = function _SelectPanelElement_perfo
775
775
  return __classPrivateFieldGet(this, _SelectPanelElement_instances, "a", _SelectPanelElement_fetchStrategy_get) === FetchStrategy.LOCAL || __classPrivateFieldGet(this, _SelectPanelElement_instances, "a", _SelectPanelElement_fetchStrategy_get) === FetchStrategy.EVENTUALLY_LOCAL;
776
776
  };
777
777
  _SelectPanelElement_handleInvokerActivated = function _SelectPanelElement_handleInvokerActivated(event) {
778
+ // Let listeners observe the invoker was clicked
779
+ this.invokerElement?.dispatchEvent(new CustomEvent('invokerClicked', { bubbles: true }));
778
780
  event.preventDefault();
779
781
  // eslint-disable-next-line no-restricted-syntax
780
782
  event.stopPropagation();
@@ -987,7 +989,7 @@ __decorate([
987
989
  target
988
990
  ], SelectPanelElement.prototype, "liveRegion", void 0);
989
991
  SelectPanelElement = __decorate([
990
- controller
992
+ controller('select-panel')
991
993
  ], SelectPanelElement);
992
994
  export { SelectPanelElement };
993
995
  if (!window.customElements.get('select-panel')) {
@@ -171,7 +171,7 @@ __decorate([
171
171
  attr
172
172
  ], ToggleSwitchElement.prototype, "turbo", void 0);
173
173
  ToggleSwitchElement = __decorate([
174
- controller
174
+ controller('toggle-switch')
175
175
  ], ToggleSwitchElement);
176
176
  if (!window.customElements.get('toggle-switch')) {
177
177
  window.ToggleSwitchElement = ToggleSwitchElement;
@@ -440,7 +440,7 @@ __decorate([
440
440
  target
441
441
  ], TreeViewElement.prototype, "formInputPrototype", void 0);
442
442
  TreeViewElement = __decorate([
443
- controller
443
+ controller('tree-view')
444
444
  ], TreeViewElement);
445
445
  export { TreeViewElement };
446
446
  if (!window.customElements.get('tree-view')) {
@@ -53,7 +53,7 @@ __decorate([
53
53
  target
54
54
  ], TreeViewIconPairElement.prototype, "collapsedIcon", void 0);
55
55
  TreeViewIconPairElement = __decorate([
56
- controller
56
+ controller('tree-view-icon-pair')
57
57
  ], TreeViewIconPairElement);
58
58
  export { TreeViewIconPairElement };
59
59
  if (!window.customElements.get('tree-view-icon-pair')) {
@@ -19,7 +19,7 @@ let TreeViewIncludeFragmentElement = class TreeViewIncludeFragmentElement extend
19
19
  }
20
20
  };
21
21
  TreeViewIncludeFragmentElement = __decorate([
22
- controller
22
+ controller('tree-view-include-fragment')
23
23
  ], TreeViewIncludeFragmentElement);
24
24
  export { TreeViewIncludeFragmentElement };
25
25
  if (!window.customElements.get('tree-view-include-fragment')) {
@@ -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 _TreeViewSubTreeNodeElement_instances, _TreeViewSubTreeNodeElement_expanded, _TreeViewSubTreeNodeElement_loadingState, _TreeViewSubTreeNodeElement_abortController, _TreeViewSubTreeNodeElement_activeElementIsLoader, _TreeViewSubTreeNodeElement_handleToggleEvent, _TreeViewSubTreeNodeElement_handleIncludeFragmentEvent, _TreeViewSubTreeNodeElement_handleRetryButtonEvent, _TreeViewSubTreeNodeElement_handleKeyboardEvent, _TreeViewSubTreeNodeElement_handleCheckboxEvent, _TreeViewSubTreeNodeElement_update, _TreeViewSubTreeNodeElement_checkboxElement_get;
18
+ var _TreeViewSubTreeNodeElement_instances, _TreeViewSubTreeNodeElement_expanded, _TreeViewSubTreeNodeElement_loadingState, _TreeViewSubTreeNodeElement_abortController, _TreeViewSubTreeNodeElement_activeElementIsLoader, _TreeViewSubTreeNodeElement_handleToggleEvent, _TreeViewSubTreeNodeElement_handleIncludeFragmentEvent, _TreeViewSubTreeNodeElement_handleRetryButtonEvent, _TreeViewSubTreeNodeElement_handleKeyboardEvent, _TreeViewSubTreeNodeElement_handleCheckboxEvent, _TreeViewSubTreeNodeElement_update, _TreeViewSubTreeNodeElement_isIncludeFragment, _TreeViewSubTreeNodeElement_checkboxElement_get;
19
19
  import { controller, target } from '@github/catalyst';
20
20
  import { observeMutationsUntilConditionMet } from '../../utils';
21
21
  let TreeViewSubTreeNodeElement = class TreeViewSubTreeNodeElement extends HTMLElement {
@@ -140,6 +140,10 @@ let TreeViewSubTreeNodeElement = class TreeViewSubTreeNodeElement extends HTMLEl
140
140
  // sub-tree and no node in the entire tree can be focused
141
141
  const previousNode = this.subTree.querySelector("[tabindex='0']");
142
142
  previousNode?.setAttribute('tabindex', '-1');
143
+ // Also check if the subtree element itself is an include-fragment with role="treeitem" and has focus
144
+ if (__classPrivateFieldGet(this, _TreeViewSubTreeNodeElement_instances, "m", _TreeViewSubTreeNodeElement_isIncludeFragment).call(this) && this.subTree.getAttribute('tabindex') === '0') {
145
+ this.subTree.setAttribute('tabindex', '-1');
146
+ }
143
147
  this.node.setAttribute('tabindex', '0');
144
148
  this.treeView.dispatchEvent(new CustomEvent('treeViewNodeCollapsed', {
145
149
  bubbles: true,
@@ -251,6 +255,10 @@ _TreeViewSubTreeNodeElement_handleIncludeFragmentEvent = function _TreeViewSubTr
251
255
  // request succeeded but element has not yet been replaced
252
256
  case 'include-fragment-replace':
253
257
  __classPrivateFieldSet(this, _TreeViewSubTreeNodeElement_activeElementIsLoader, document.activeElement === this.loadingIndicator.closest('[role=treeitem]'), "f");
258
+ // Also check if the include-fragment itself has focus (when it has role="treeitem")
259
+ if (!__classPrivateFieldGet(this, _TreeViewSubTreeNodeElement_activeElementIsLoader, "f") && document.activeElement === this.subTree && __classPrivateFieldGet(this, _TreeViewSubTreeNodeElement_instances, "m", _TreeViewSubTreeNodeElement_isIncludeFragment).call(this)) {
260
+ __classPrivateFieldSet(this, _TreeViewSubTreeNodeElement_activeElementIsLoader, true, "f");
261
+ }
254
262
  this.loadingState = 'success';
255
263
  break;
256
264
  case 'include-fragment-replaced':
@@ -354,6 +362,13 @@ _TreeViewSubTreeNodeElement_update = function _TreeViewSubTreeNodeElement_update
354
362
  if (this.expanded) {
355
363
  if (this.subTree)
356
364
  this.subTree.hidden = false;
365
+ if (__classPrivateFieldGet(this, _TreeViewSubTreeNodeElement_instances, "m", _TreeViewSubTreeNodeElement_isIncludeFragment).call(this)) {
366
+ this.subTree.setAttribute('role', 'treeitem');
367
+ // Ensure the include-fragment can participate in roving tab index
368
+ if (!this.subTree.hasAttribute('tabindex')) {
369
+ this.subTree.setAttribute('tabindex', '-1');
370
+ }
371
+ }
357
372
  this.node.setAttribute('aria-expanded', 'true');
358
373
  this.treeView?.expandAncestorsForNode(this);
359
374
  if (this.iconPair) {
@@ -367,6 +382,11 @@ _TreeViewSubTreeNodeElement_update = function _TreeViewSubTreeNodeElement_update
367
382
  else {
368
383
  if (this.subTree)
369
384
  this.subTree.hidden = true;
385
+ if (__classPrivateFieldGet(this, _TreeViewSubTreeNodeElement_instances, "m", _TreeViewSubTreeNodeElement_isIncludeFragment).call(this)) {
386
+ this.subTree.removeAttribute('role');
387
+ // Remove tabindex when role is removed
388
+ this.subTree.removeAttribute('tabindex');
389
+ }
370
390
  this.node.setAttribute('aria-expanded', 'false');
371
391
  if (this.iconPair) {
372
392
  this.iconPair.showCollapsed();
@@ -397,6 +417,9 @@ _TreeViewSubTreeNodeElement_update = function _TreeViewSubTreeNodeElement_update
397
417
  this.loadingFailureMessage.hidden = true;
398
418
  }
399
419
  };
420
+ _TreeViewSubTreeNodeElement_isIncludeFragment = function _TreeViewSubTreeNodeElement_isIncludeFragment() {
421
+ return this.subTree?.getAttribute('data-target')?.includes('tree-view-sub-tree-node.includeFragment') ?? false;
422
+ };
400
423
  _TreeViewSubTreeNodeElement_checkboxElement_get = function _TreeViewSubTreeNodeElement_checkboxElement_get() {
401
424
  return this.querySelector('.TreeViewItemCheckbox');
402
425
  };
@@ -431,7 +454,7 @@ __decorate([
431
454
  target
432
455
  ], TreeViewSubTreeNodeElement.prototype, "retryButton", void 0);
433
456
  TreeViewSubTreeNodeElement = __decorate([
434
- controller
457
+ controller('tree-view-sub-tree-node')
435
458
  ], TreeViewSubTreeNodeElement);
436
459
  export { TreeViewSubTreeNodeElement };
437
460
  if (!window.customElements.get('tree-view-sub-tree-node')) {
@@ -43,7 +43,7 @@ __decorate([
43
43
  target
44
44
  ], XBannerElement.prototype, "titleText", void 0);
45
45
  XBannerElement = __decorate([
46
- controller
46
+ controller('x-banner')
47
47
  ], XBannerElement);
48
48
  if (!window.customElements.get('x-banner')) {
49
49
  window.XBannerElement = XBannerElement;
@@ -1 +1 @@
1
- .blankslate-container{container-type:inline-size;width:100%}.blankslate{--blankslate-outer-padding-block:var(--base-size-32);--blankslate-outer-padding-inline:var(--base-size-32);padding:var(--blankslate-outer-padding-block) var(--blankslate-outer-padding-inline);position:relative;text-align:center}.blankslate p{color:var(--fgColor-muted);font-size:var(--text-body-size-large);margin:auto;max-width:56rem}.blankslate code{background:var(--bgColor-default);border:var(--borderWidth-thin) solid var(--borderColor-muted);border-radius:var(--borderRadius-medium);font-size:var(--text-body-size-medium);padding:var(--base-size-2) var(--base-size-4) var(--base-size-4)}.blankslate img{height:56px;width:56px}.blankslate-icon{color:var(--fgColor-muted);margin-bottom:var(--stack-gap-condensed);margin-left:var(--control-small-gap);margin-right:var(--control-small-gap)}.blankslate-image{margin-bottom:var(--stack-gap-normal)}.blankslate-heading{font-size:var(--text-title-size-medium);font-weight:var(--text-title-weight-medium);margin-bottom:var(--base-size-4)}.blankslate-action{margin-top:var(--stack-gap-normal)}.blankslate-action:first-of-type{margin-top:var(--stack-gap-spacious)}.blankslate-action:last-of-type{margin-bottom:var(--stack-gap-condensed)}.blankslate-capped{border-radius:0 0 var(--borderRadius-medium) var(--borderRadius-medium)}.blankslate-spacious{--blankslate-outer-padding-block:var(--base-size-80);--blankslate-outer-padding-inline:var(--base-size-40)}.blankslate-narrow{margin:0 auto;max-width:485px}.blankslate-large img{height:80px;width:80px}.blankslate-large h3{font-size:24px;margin:var(--stack-gap-normal) 0}.blankslate-large p{font-size:var(--text-body-size-large)}.blankslate-clean-background{border:0}@container (max-width: 34rem){.blankslate{--blankslate-outer-padding-block:var(--base-size-20);--blankslate-outer-padding-inline:var(--base-size-20)}.blankslate-spacious{--blankslate-outer-padding-block:var(--base-size-44);--blankslate-outer-padding-inline:var(--base-size-28)}.blankslate-icon{margin-bottom:var(--stack-gap-condensed)}.blankslate-heading{font-size:var(--text-title-size-small)}.blankslate p{font-size:var(--text-body-size-medium)}.blankslate-action{margin-top:var(--stack-gap-condensed)}.blankslate-action:first-of-type{margin-top:var(--stack-gap-normal)}.blankslate-action:last-of-type{margin-bottom:calc(var(--stack-gap-condensed)/2)}}
1
+ .blankslate-container{container-type:inline-size;width:100%}.blankslate{--blankslate-outer-padding-block:var(--base-size-32);--blankslate-outer-padding-inline:var(--base-size-32);padding:var(--blankslate-outer-padding-block) var(--blankslate-outer-padding-inline);position:relative;text-align:center}.blankslate p{color:var(--fgColor-muted);font-size:var(--text-body-size-large);margin:auto;max-width:56rem}.blankslate code{background:var(--bgColor-default);border:var(--borderWidth-thin) solid var(--borderColor-muted);border-radius:var(--borderRadius-medium);font-size:var(--text-body-size-medium);padding:var(--base-size-2) var(--base-size-4) var(--base-size-4)}.blankslate img{height:56px;width:56px}.blankslate-icon{color:var(--fgColor-muted);margin-bottom:var(--stack-gap-condensed);margin-left:var(--control-small-gap);margin-right:var(--control-small-gap)}.blankslate-image{margin-bottom:var(--stack-gap-normal)}.blankslate-heading{font-size:var(--text-title-size-medium);font-weight:var(--text-title-weight-medium);margin-bottom:var(--base-size-4);text-wrap:balance}.blankslate-description{text-wrap:balance}.blankslate-action{margin-top:var(--stack-gap-normal)}.blankslate-action:first-of-type{margin-top:var(--stack-gap-spacious)}.blankslate-action:last-of-type{margin-bottom:var(--stack-gap-condensed)}.blankslate-capped{border-radius:0 0 var(--borderRadius-medium) var(--borderRadius-medium)}.blankslate-spacious{--blankslate-outer-padding-block:var(--base-size-80);--blankslate-outer-padding-inline:var(--base-size-40)}.blankslate-narrow{margin:0 auto;max-width:485px}.blankslate-large img{height:80px;width:80px}.blankslate-large h3{font-size:24px;margin:var(--stack-gap-normal) 0}.blankslate-large p{font-size:var(--text-body-size-large)}.blankslate-clean-background{border:0}@container (max-width: 34rem){.blankslate{--blankslate-outer-padding-block:var(--base-size-20);--blankslate-outer-padding-inline:var(--base-size-20)}.blankslate-spacious{--blankslate-outer-padding-block:var(--base-size-44);--blankslate-outer-padding-inline:var(--base-size-28)}.blankslate-icon{margin-bottom:var(--stack-gap-condensed)}.blankslate-heading{font-size:var(--text-title-size-small)}.blankslate p{font-size:var(--text-body-size-medium)}.blankslate-action{margin-top:var(--stack-gap-condensed)}.blankslate-action:first-of-type{margin-top:var(--stack-gap-normal)}.blankslate-action:last-of-type{margin-bottom:calc(var(--stack-gap-condensed)/2)}}
@@ -9,6 +9,7 @@
9
9
  ".blankslate-icon",
10
10
  ".blankslate-image",
11
11
  ".blankslate-heading",
12
+ ".blankslate-description",
12
13
  ".blankslate-action",
13
14
  ".blankslate-action:first-of-type",
14
15
  ".blankslate-action:last-of-type",
@@ -60,6 +60,6 @@ __decorate([
60
60
  target
61
61
  ], DetailsToggleElement.prototype, "summaryTarget", void 0);
62
62
  DetailsToggleElement = __decorate([
63
- controller
63
+ controller('details-toggle')
64
64
  ], DetailsToggleElement);
65
65
  window.DetailsToggleElement = DetailsToggleElement;
@@ -187,6 +187,6 @@ __decorate([
187
187
  target
188
188
  ], NavListElement.prototype, "topLevelList", void 0);
189
189
  NavListElement = __decorate([
190
- controller
190
+ controller('nav-list')
191
191
  ], NavListElement);
192
192
  export { NavListElement };
@@ -105,7 +105,7 @@ __decorate([
105
105
  targets
106
106
  ], NavListGroupElement.prototype, "focusMarkers", void 0);
107
107
  NavListGroupElement = __decorate([
108
- controller
108
+ controller('nav-list-group')
109
109
  ], NavListGroupElement);
110
110
  export { NavListGroupElement };
111
111
  window.NavListGroupElement = NavListGroupElement;
@@ -25,20 +25,29 @@ function dialogInvokerButtonHandler(event) {
25
25
  // If the behaviour is allowed through the dialog will be shown but then
26
26
  // quickly hidden- as if it were never shown. This prevents that.
27
27
  event.preventDefault();
28
- // In some older browsers, such as Chrome 122, when a top layer element (such as a dialog)
29
- // opens from within a popover, the "hide all popovers" internal algorithm runs, hiding
30
- // any popover that is currently open, regardless of whether or not another top layer element,
31
- // such as a <dialog> is nested inside.
32
- // See https://github.com/whatwg/html/issues/9998.
33
- // This is fixed by https://github.com/whatwg/html/pull/10116, but while we still support browsers
34
- // that present this bug, we must undo the work they did to hide ancestral popovers of the dialog:
28
+ // When a <dialog> is opened with showModal() from inside a popover with popover="auto",
29
+ // there are two related issues:
30
+ //
31
+ // 1. In older browsers (e.g. Chrome 122), the "hide all popovers" algorithm runs when a
32
+ // top layer element opens, closing any ancestor popover. We must re-open those popovers.
33
+ // See https://github.com/whatwg/html/issues/9998,
34
+ // fixed by https://github.com/whatwg/html/pull/10116.
35
+ //
36
+ // 2. In newer browsers where the popover stays open, the popover="auto" behavior still
37
+ // interferes with the native <dialog> focus trap, causing focus to escape the dialog
38
+ // when tabbing past the last focusable element. Converting the popover to "manual"
39
+ // prevents this interference.
40
+ //
41
+ // In both cases, the fix is the same: convert ancestor auto popovers to manual.
35
42
  let node = button;
36
43
  let fixed = false;
37
44
  while (node) {
38
- node = node.parentElement?.closest('[popover]:not(:popover-open)');
45
+ node = node.parentElement?.closest('[popover]');
39
46
  if (node && node.popover === 'auto') {
40
47
  node.classList.add('dialog-inside-popover-fix');
41
48
  node.popover = 'manual';
49
+ // Changing popover from "auto" to "manual" closes the popover,
50
+ // so we need to re-show it regardless of whether it was previously open.
42
51
  node.showPopover();
43
52
  fixed = true;
44
53
  }
@@ -46,7 +46,7 @@ __decorate([
46
46
  attr
47
47
  ], ScrollableRegionElement.prototype, "labelledBy", void 0);
48
48
  ScrollableRegionElement = __decorate([
49
- controller
49
+ controller('scrollable-region')
50
50
  ], ScrollableRegionElement);
51
51
  export { ScrollableRegionElement };
52
52
  window.ScrollableRegionElement = ScrollableRegionElement;
@@ -35,7 +35,7 @@ __decorate([
35
35
  targets
36
36
  ], PrimerMultiInputElement.prototype, "fields", void 0);
37
37
  PrimerMultiInputElement = __decorate([
38
- controller
38
+ controller('primer-multi-input')
39
39
  ], PrimerMultiInputElement);
40
40
  export { PrimerMultiInputElement };
41
41
  if (!window.customElements.get('primer-multi-input')) {
@@ -44,7 +44,7 @@ __decorate([
44
44
  target
45
45
  ], PrimerTextAreaElement.prototype, "characterLimitSrElement", void 0);
46
46
  PrimerTextAreaElement = __decorate([
47
- controller
47
+ controller('primer-text-area')
48
48
  ], PrimerTextAreaElement);
49
49
  export { PrimerTextAreaElement };
50
50
  if (!window.customElements.get('primer-text-area')) {
@@ -128,6 +128,6 @@ __decorate([
128
128
  target
129
129
  ], PrimerTextFieldElement.prototype, "characterLimitSrElement", void 0);
130
130
  PrimerTextFieldElement = __decorate([
131
- controller
131
+ controller('primer-text-field')
132
132
  ], PrimerTextFieldElement);
133
133
  export { PrimerTextFieldElement };
@@ -29,6 +29,6 @@ __decorate([
29
29
  target
30
30
  ], ToggleSwitchInputElement.prototype, "validationMessageElement", void 0);
31
31
  ToggleSwitchInputElement = __decorate([
32
- controller
32
+ controller('toggle-switch-input')
33
33
  ], ToggleSwitchInputElement);
34
34
  export { ToggleSwitchInputElement };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openproject/primer-view-components",
3
- "version": "0.82.1",
3
+ "version": "0.83.0-rc.ae05103d7",
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",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@github/auto-check-element": "^6.0.0",
47
47
  "@github/auto-complete-element": "^3.8.0",
48
- "@github/catalyst": "^1.6.0",
48
+ "@github/catalyst": "^1.8.0",
49
49
  "@github/clipboard-copy-element": "^1.3.0",
50
50
  "@github/details-menu-element": "^1.0.12",
51
51
  "@github/image-crop-element": "^5.0.0",
@@ -69,6 +69,7 @@
69
69
  "@github/prettier-config": "0.0.6",
70
70
  "@playwright/test": "^1.57.0",
71
71
  "@primer/css": "22.1.0",
72
+ "@primer/primitives": "^11.4.0",
72
73
  "@primer/stylelint-config": "^13.1.1",
73
74
  "@rollup/plugin-node-resolve": "^16.0.1",
74
75
  "@rollup/plugin-typescript": "^8.3.3",
@@ -78,14 +79,14 @@
78
79
  "eslint": "^9.10.0",
79
80
  "eslint-plugin-github": "^6.0.0",
80
81
  "glob": "^11.0.2",
81
- "markdownlint-cli2": "^0.19.1",
82
+ "markdownlint-cli2": "^0.20.0",
82
83
  "mocha": "^11.0.1",
83
84
  "playwright": "^1.57.0",
84
85
  "postcss": "^8.4.16",
85
86
  "postcss-cli": "^11.0.0",
86
87
  "postcss-import": "^16.0.0",
87
88
  "postcss-mixins": "^12.1.2",
88
- "postcss-preset-env": "^10.0.2",
89
+ "postcss-preset-env": "^11.1.2",
89
90
  "prettier": "^3.3.2",
90
91
  "rollup": "^2.79.1",
91
92
  "rollup-plugin-terser": "^7.0.2",
@@ -3336,6 +3336,12 @@
3336
3336
  "type": "String",
3337
3337
  "default": "`nil`",
3338
3338
  "description": "Custom label to show when the switch is OFF. Defaults to (\"Off\"). Only customize this label if it makes the toggle’s state more meaningful in its specific context. For example, for a \"Show images\" setting, you might use \"Show\" when the switch is OFF."
3339
+ },
3340
+ {
3341
+ "name": "button_type",
3342
+ "type": "Symbol",
3343
+ "default": "`nil`",
3344
+ "description": "The type attribute for the underlying button element. If `nil`, the button will not have a type attribute, which means it will default to \"submit\" if it's inside a form and \"button\" otherwise."
3339
3345
  }
3340
3346
  ]
3341
3347
  },
@@ -5119,7 +5119,7 @@
5119
5119
  {
5120
5120
  "fully_qualified_name": "Primer::Alpha::Layout",
5121
5121
  "description": "`Layout` provides foundational patterns for responsive pages.\n`Layout` can be used for simple two-column pages, or it can be nested to provide flexible 3-column experiences.\n On smaller screens, `Layout` uses vertically stacked rows to display content.\n\n`Layout` flows as both column, when there's enough horizontal space to render both `Main` and `Sidebar`side-by-side (on a desktop of tablet device, per instance);\nor it flows as a row, when `Main` and `Sidebar` are stacked vertically (e.g. on a mobile device).\n`Layout` should always work in any screen size.",
5122
- "accessibility_docs": "Keyboard navigation follows the markup order. Decide carefully how the focus order should be be by deciding whether\n`main` or `sidebar` comes first in code. The code order wont affect the visual position.",
5122
+ "accessibility_docs": "Keyboard navigation follows the markup order. Decide carefully how the focus order should be be by deciding whether\n`main` or `sidebar` comes first in code. The code order won't affect the visual position.\n\nWhen using `row_placement: :none` on the sidebar, the sidebar content will be hidden at narrow viewports.\nThis may cause WCAG 1.4.10 Reflow failures if the sidebar contains essential content. Only use `:none`\nwhen the sidebar content is non-essential or available elsewhere on the page.",
5123
5123
  "is_form_component": false,
5124
5124
  "is_published": true,
5125
5125
  "requires_js": false,
@@ -5194,7 +5194,7 @@
5194
5194
  "name": "row_placement",
5195
5195
  "type": "Symbol",
5196
5196
  "default": "N/A",
5197
- "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`."
5197
+ "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`. **Note:** Using `:none` hides the sidebar at narrow viewports, which may cause WCAG 1.4.10 Reflow issues if the sidebar contains essential content."
5198
5198
  },
5199
5199
  {
5200
5200
  "name": "system_arguments",
@@ -10060,6 +10060,12 @@
10060
10060
  "type": "String",
10061
10061
  "default": "`nil`",
10062
10062
  "description": "Custom label to show when the switch is OFF. Defaults to (\"Off\"). Only customize this label if it makes the toggle’s state more meaningful in its specific context. For example, for a \"Show images\" setting, you might use \"Show\" when the switch is OFF."
10063
+ },
10064
+ {
10065
+ "name": "button_type",
10066
+ "type": "Symbol",
10067
+ "default": "`nil`",
10068
+ "description": "The type attribute for the underlying button element. If `nil`, the button will not have a type attribute, which means it will default to \"submit\" if it's inside a form and \"button\" otherwise."
10063
10069
  }
10064
10070
  ],
10065
10071
  "slots": [],