@openproject/primer-view-components 0.69.4 → 0.69.5-rc.5bd9aa627

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.
@@ -17,7 +17,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
17
17
  };
18
18
  var _ActionListElement_truncationObserver;
19
19
  import { controller } from '@github/catalyst';
20
- // eslint-disable-next-line custom-elements/no-exports-with-element
21
20
  export class ActionListTruncationObserver {
22
21
  constructor(el) {
23
22
  this.resizeObserver = new ResizeObserver(entries => {
@@ -67,6 +66,5 @@ let ActionListElement = class ActionListElement extends HTMLElement {
67
66
  _ActionListElement_truncationObserver = new WeakMap();
68
67
  ActionListElement = __decorate([
69
68
  controller
70
- // eslint-disable-next-line custom-elements/expose-class-on-global
71
69
  ], ActionListElement);
72
70
  export { ActionListElement };
@@ -144,6 +144,7 @@ let ToggleSwitchElement = class ToggleSwitchElement extends HTMLElement {
144
144
  headers: requestHeaders,
145
145
  body,
146
146
  });
147
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
147
148
  }
148
149
  catch (error) {
149
150
  throw new Error('A network error occurred, please try again.');
@@ -1 +1 @@
1
- .breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em}.breadcrumb-item:after{border-right:.1em solid var(--borderColor-neutral-emphasis);content:"";display:inline-block;height:.8em;margin:0 .5em;transform:rotate(15deg) translateY(.0625em)}.breadcrumb-item:first-child{margin-left:0}:is(.breadcrumb-item-selected,.breadcrumb-item[aria-current]:not([aria-current=false])):after{content:none}.breadcrumb-item-selected a{color:var(--fgColor-default);cursor:default!important;-webkit-text-decoration:none!important;text-decoration:none!important}
1
+ .breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em;max-width:100%}.breadcrumb-item:after{border-right:.1em solid var(--borderColor-neutral-emphasis);content:"";display:inline-block;height:.8em;margin:0 .5em;transform:rotate(15deg) translateY(.0625em)}.breadcrumb-item:first-child{margin-left:0}:is(.breadcrumb-item-selected,.breadcrumb-item[aria-current]:not([aria-current=false])):after{content:none}.breadcrumb-item-selected a{color:var(--fgColor-default);cursor:default!important;-webkit-text-decoration:none!important;text-decoration:none!important}
@@ -3,9 +3,10 @@
3
3
  * ensures the <details> and <summary> elements markup is properly accessible by
4
4
  * updating the aria-label and aria-expanded attributes on click.
5
5
  *
6
- * aria-label values default to "Expand" and "Collapse". To override those
7
- * values, use the `data-aria-label-open` and `data-aria-label-closed`
8
- * attributes on the summary target.
6
+ * aria-label values are only set if provided via the `data-aria-label-open` and
7
+ * `data-aria-label-closed` attributes on the summary target. If these attributes
8
+ * are not present, no aria-label will be set, allowing screen readers to use
9
+ * the visible text content.
9
10
  *
10
11
  * @example
11
12
  * ```html
@@ -10,9 +10,10 @@ import { controller, target } from '@github/catalyst';
10
10
  * ensures the <details> and <summary> elements markup is properly accessible by
11
11
  * updating the aria-label and aria-expanded attributes on click.
12
12
  *
13
- * aria-label values default to "Expand" and "Collapse". To override those
14
- * values, use the `data-aria-label-open` and `data-aria-label-closed`
15
- * attributes on the summary target.
13
+ * aria-label values are only set if provided via the `data-aria-label-open` and
14
+ * `data-aria-label-closed` attributes on the summary target. If these attributes
15
+ * are not present, no aria-label will be set, allowing screen readers to use
16
+ * the visible text content.
16
17
  *
17
18
  * @example
18
19
  * ```html
@@ -37,13 +38,17 @@ let DetailsToggleElement = class DetailsToggleElement extends HTMLElement {
37
38
  toggle() {
38
39
  const detailsIsOpen = this.detailsTarget.hasAttribute('open');
39
40
  if (detailsIsOpen) {
40
- const ariaLabelClosed = this.summaryTarget.getAttribute('data-aria-label-closed') || 'Expand';
41
- this.summaryTarget.setAttribute('aria-label', ariaLabelClosed);
41
+ const ariaLabelClosed = this.summaryTarget.getAttribute('data-aria-label-closed');
42
+ if (ariaLabelClosed) {
43
+ this.summaryTarget.setAttribute('aria-label', ariaLabelClosed);
44
+ }
42
45
  this.summaryTarget.setAttribute('aria-expanded', 'false');
43
46
  }
44
47
  else {
45
- const ariaLabelOpen = this.summaryTarget.getAttribute('data-aria-label-open') || 'Collapse';
46
- this.summaryTarget.setAttribute('aria-label', ariaLabelOpen);
48
+ const ariaLabelOpen = this.summaryTarget.getAttribute('data-aria-label-open');
49
+ if (ariaLabelOpen) {
50
+ this.summaryTarget.setAttribute('aria-label', ariaLabelOpen);
51
+ }
47
52
  this.summaryTarget.setAttribute('aria-expanded', 'true');
48
53
  }
49
54
  }
@@ -16,7 +16,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
16
16
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17
17
  };
18
18
  var _NavListElement_instances, _NavListElement_truncationObserver, _NavListElement_findSelectedNavItemById, _NavListElement_findSelectedNavItemByHref, _NavListElement_findSelectedNavItemByCurrentLocation, _NavListElement_select, _NavListElement_deselect, _NavListElement_findParentMenu;
19
- /* eslint-disable custom-elements/expose-class-on-global */
20
19
  import { controller, target, targets } from '@github/catalyst';
21
20
  import { ActionListTruncationObserver } from '../alpha/action_list';
22
21
  let NavListElement = class NavListElement extends HTMLElement {
@@ -62,6 +62,7 @@ let NavListGroupElement = class NavListGroupElement extends HTMLElement {
62
62
  if (this.currentPage === this.totalPages) {
63
63
  this.showMoreItem.hidden = true;
64
64
  }
65
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
65
66
  }
66
67
  catch (err) {
67
68
  // Ignore network errors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openproject/primer-view-components",
3
- "version": "0.69.4",
3
+ "version": "0.69.5-rc.5bd9aa627",
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",
@@ -72,16 +72,13 @@
72
72
  "@primer/stylelint-config": "^13.1.1",
73
73
  "@rollup/plugin-node-resolve": "^16.0.1",
74
74
  "@rollup/plugin-typescript": "^8.3.3",
75
- "@typescript-eslint/eslint-plugin": "^7.0.1",
76
- "@typescript-eslint/parser": "^7.0.1",
77
75
  "axe-core": "^4.7.1",
78
76
  "chokidar-cli": "^3.0.0",
79
77
  "cssnano": "^7.0.1",
80
- "eslint": "^8.23.1",
81
- "eslint-plugin-custom-elements": "^0.0.8",
82
- "eslint-plugin-github": "^5.0.1",
83
- "eslint-plugin-prettier": "^5.0.0",
84
- "markdownlint-cli2": "^0.17.2",
78
+ "eslint": "^9.10.0",
79
+ "eslint-plugin-github": "^6.0.0",
80
+ "glob": "^11.0.2",
81
+ "markdownlint-cli2": "^0.18.1",
85
82
  "mocha": "^11.0.1",
86
83
  "playwright": "^1.49.1",
87
84
  "postcss": "^8.4.16",
@@ -12191,6 +12191,19 @@
12191
12191
  "color-contrast"
12192
12192
  ]
12193
12193
  }
12194
+ },
12195
+ {
12196
+ "preview_path": "primer/beta/breadcrumbs/with_long_items",
12197
+ "name": "with_long_items",
12198
+ "snapshot": "true",
12199
+ "skip_rules": {
12200
+ "wont_fix": [
12201
+ "region"
12202
+ ],
12203
+ "will_fix": [
12204
+ "color-contrast"
12205
+ ]
12206
+ }
12194
12207
  }
12195
12208
  ],
12196
12209
  "subcomponents": [
@@ -13616,6 +13629,19 @@
13616
13629
  "color-contrast"
13617
13630
  ]
13618
13631
  }
13632
+ },
13633
+ {
13634
+ "preview_path": "primer/beta/details/with_aria_labels",
13635
+ "name": "with_aria_labels",
13636
+ "snapshot": "false",
13637
+ "skip_rules": {
13638
+ "wont_fix": [
13639
+ "region"
13640
+ ],
13641
+ "will_fix": [
13642
+ "color-contrast"
13643
+ ]
13644
+ }
13619
13645
  }
13620
13646
  ],
13621
13647
  "subcomponents": []
@@ -2149,6 +2149,19 @@
2149
2149
  "color-contrast"
2150
2150
  ]
2151
2151
  }
2152
+ },
2153
+ {
2154
+ "preview_path": "primer/beta/breadcrumbs/with_long_items",
2155
+ "name": "with_long_items",
2156
+ "snapshot": "true",
2157
+ "skip_rules": {
2158
+ "wont_fix": [
2159
+ "region"
2160
+ ],
2161
+ "will_fix": [
2162
+ "color-contrast"
2163
+ ]
2164
+ }
2152
2165
  }
2153
2166
  ]
2154
2167
  },
@@ -3488,6 +3501,19 @@
3488
3501
  "color-contrast"
3489
3502
  ]
3490
3503
  }
3504
+ },
3505
+ {
3506
+ "preview_path": "primer/beta/details/with_aria_labels",
3507
+ "name": "with_aria_labels",
3508
+ "snapshot": "false",
3509
+ "skip_rules": {
3510
+ "wont_fix": [
3511
+ "region"
3512
+ ],
3513
+ "will_fix": [
3514
+ "color-contrast"
3515
+ ]
3516
+ }
3491
3517
  }
3492
3518
  ]
3493
3519
  },