@primer/view-components 0.43.3-rc.7688a81a → 0.43.3-rc.79335f32
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/components/primer/beta/details_toggle_element.d.ts +4 -3
- 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_list.js +0 -2
- package/app/components/primer/alpha/toggle_switch.js +1 -0
- package/app/components/primer/beta/breadcrumbs.css +1 -1
- package/app/components/primer/beta/details_toggle_element.d.ts +4 -3
- package/app/components/primer/beta/details_toggle_element.js +12 -7
- package/app/components/primer/beta/nav_list.js +0 -1
- package/app/components/primer/beta/nav_list_group_element.js +1 -0
- package/package.json +3 -6
- package/static/info_arch.json +26 -0
- package/static/previews.json +26 -0
@@ -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
|
7
|
-
*
|
8
|
-
*
|
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
|
14
|
-
*
|
15
|
-
*
|
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')
|
41
|
-
|
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')
|
46
|
-
|
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": "@primer/view-components",
|
3
|
-
"version": "0.43.3-rc.
|
3
|
+
"version": "0.43.3-rc.79335f32",
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
6
6
|
"module": "app/components/primer/primer.js",
|
@@ -72,15 +72,12 @@
|
|
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": "^
|
81
|
-
"eslint-plugin-custom-elements": "^0.0.8",
|
78
|
+
"eslint": "^9.10.0",
|
82
79
|
"eslint-plugin-github": "^6.0.0",
|
83
|
-
"
|
80
|
+
"glob": "^11.0.2",
|
84
81
|
"markdownlint-cli2": "^0.18.1",
|
85
82
|
"mocha": "^11.0.1",
|
86
83
|
"playwright": "^1.49.1",
|
package/static/info_arch.json
CHANGED
@@ -11683,6 +11683,19 @@
|
|
11683
11683
|
"color-contrast"
|
11684
11684
|
]
|
11685
11685
|
}
|
11686
|
+
},
|
11687
|
+
{
|
11688
|
+
"preview_path": "primer/beta/breadcrumbs/with_long_items",
|
11689
|
+
"name": "with_long_items",
|
11690
|
+
"snapshot": "true",
|
11691
|
+
"skip_rules": {
|
11692
|
+
"wont_fix": [
|
11693
|
+
"region"
|
11694
|
+
],
|
11695
|
+
"will_fix": [
|
11696
|
+
"color-contrast"
|
11697
|
+
]
|
11698
|
+
}
|
11686
11699
|
}
|
11687
11700
|
],
|
11688
11701
|
"subcomponents": [
|
@@ -13108,6 +13121,19 @@
|
|
13108
13121
|
"color-contrast"
|
13109
13122
|
]
|
13110
13123
|
}
|
13124
|
+
},
|
13125
|
+
{
|
13126
|
+
"preview_path": "primer/beta/details/with_aria_labels",
|
13127
|
+
"name": "with_aria_labels",
|
13128
|
+
"snapshot": "false",
|
13129
|
+
"skip_rules": {
|
13130
|
+
"wont_fix": [
|
13131
|
+
"region"
|
13132
|
+
],
|
13133
|
+
"will_fix": [
|
13134
|
+
"color-contrast"
|
13135
|
+
]
|
13136
|
+
}
|
13111
13137
|
}
|
13112
13138
|
],
|
13113
13139
|
"subcomponents": []
|
package/static/previews.json
CHANGED
@@ -2089,6 +2089,19 @@
|
|
2089
2089
|
"color-contrast"
|
2090
2090
|
]
|
2091
2091
|
}
|
2092
|
+
},
|
2093
|
+
{
|
2094
|
+
"preview_path": "primer/beta/breadcrumbs/with_long_items",
|
2095
|
+
"name": "with_long_items",
|
2096
|
+
"snapshot": "true",
|
2097
|
+
"skip_rules": {
|
2098
|
+
"wont_fix": [
|
2099
|
+
"region"
|
2100
|
+
],
|
2101
|
+
"will_fix": [
|
2102
|
+
"color-contrast"
|
2103
|
+
]
|
2104
|
+
}
|
2092
2105
|
}
|
2093
2106
|
]
|
2094
2107
|
},
|
@@ -3157,6 +3170,19 @@
|
|
3157
3170
|
"color-contrast"
|
3158
3171
|
]
|
3159
3172
|
}
|
3173
|
+
},
|
3174
|
+
{
|
3175
|
+
"preview_path": "primer/beta/details/with_aria_labels",
|
3176
|
+
"name": "with_aria_labels",
|
3177
|
+
"snapshot": "false",
|
3178
|
+
"skip_rules": {
|
3179
|
+
"wont_fix": [
|
3180
|
+
"region"
|
3181
|
+
],
|
3182
|
+
"will_fix": [
|
3183
|
+
"color-contrast"
|
3184
|
+
]
|
3185
|
+
}
|
3160
3186
|
}
|
3161
3187
|
]
|
3162
3188
|
},
|