@openproject/primer-view-components 0.69.4 → 0.69.5-rc.2c8b35fba

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.2c8b35fba",
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",
@@ -1194,6 +1194,37 @@
1194
1194
  ],
1195
1195
  "slots": [],
1196
1196
  "methods": [
1197
+ {
1198
+ "name": "list",
1199
+ "description": "Returns the value of attribute list.",
1200
+ "parameters": [],
1201
+ "return_types": []
1202
+ },
1203
+ {
1204
+ "name": "preload",
1205
+ "description": "Returns the value of attribute preload.",
1206
+ "parameters": [],
1207
+ "return_types": []
1208
+ },
1209
+ {
1210
+ "name": "preload?",
1211
+ "description": "Returns the value of attribute preload.",
1212
+ "parameters": [],
1213
+ "return_types": []
1214
+ },
1215
+ {
1216
+ "name": "with_show_button",
1217
+ "description": "Button to activate the menu.",
1218
+ "parameters": [
1219
+ {
1220
+ "name": "system_arguments",
1221
+ "type": "Hash",
1222
+ "default": "N/A",
1223
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
1224
+ }
1225
+ ],
1226
+ "return_types": []
1227
+ },
1197
1228
  {
1198
1229
  "name": "with_item",
1199
1230
  "description": "Adds an item to the menu.",
@@ -1207,6 +1238,19 @@
1207
1238
  ],
1208
1239
  "return_types": []
1209
1240
  },
1241
+ {
1242
+ "name": "with_divider",
1243
+ "description": "Adds a divider to the list.",
1244
+ "parameters": [
1245
+ {
1246
+ "name": "system_arguments",
1247
+ "type": "Hash",
1248
+ "default": "N/A",
1249
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `divider` slot."
1250
+ }
1251
+ ],
1252
+ "return_types": []
1253
+ },
1210
1254
  {
1211
1255
  "name": "with_avatar_item",
1212
1256
  "description": "Adds an avatar item to the menu.",
@@ -12191,6 +12235,19 @@
12191
12235
  "color-contrast"
12192
12236
  ]
12193
12237
  }
12238
+ },
12239
+ {
12240
+ "preview_path": "primer/beta/breadcrumbs/with_long_items",
12241
+ "name": "with_long_items",
12242
+ "snapshot": "true",
12243
+ "skip_rules": {
12244
+ "wont_fix": [
12245
+ "region"
12246
+ ],
12247
+ "will_fix": [
12248
+ "color-contrast"
12249
+ ]
12250
+ }
12194
12251
  }
12195
12252
  ],
12196
12253
  "subcomponents": [
@@ -13616,6 +13673,19 @@
13616
13673
  "color-contrast"
13617
13674
  ]
13618
13675
  }
13676
+ },
13677
+ {
13678
+ "preview_path": "primer/beta/details/with_aria_labels",
13679
+ "name": "with_aria_labels",
13680
+ "snapshot": "false",
13681
+ "skip_rules": {
13682
+ "wont_fix": [
13683
+ "region"
13684
+ ],
13685
+ "will_fix": [
13686
+ "color-contrast"
13687
+ ]
13688
+ }
13619
13689
  }
13620
13690
  ],
13621
13691
  "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
  },