@hashicorp/design-system-components 1.8.0 → 1.8.1
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/CHANGELOG.md +8 -0
- package/addon/components/hds/disclosure/index.js +3 -4
- package/addon/components/hds/side-nav/header.hbs +5 -0
- package/addon/components/hds/side-nav/home-link.hbs +6 -0
- package/addon/components/hds/side-nav/home-link.js +25 -0
- package/addon/components/hds/side-nav/icon-button.hbs +5 -0
- package/addon/components/hds/side-nav/list/back-link.hbs +5 -0
- package/addon/components/hds/side-nav/list/index.hbs +5 -0
- package/addon/components/hds/side-nav/list/item.hbs +5 -0
- package/addon/components/hds/side-nav/list/link.hbs +5 -0
- package/addon/components/hds/side-nav/list/title.hbs +5 -0
- package/addon/components/hds/side-nav/wrapper.hbs +5 -0
- package/app/components/hds/side-nav/header.js +5 -0
- package/app/components/hds/side-nav/home-link.js +5 -0
- package/app/components/hds/side-nav/icon-button.js +5 -0
- package/app/components/hds/side-nav/list/back-link.js +5 -0
- package/app/components/hds/side-nav/list/index.js +5 -0
- package/app/components/hds/side-nav/list/item.js +5 -0
- package/app/components/hds/side-nav/list/link.js +5 -0
- package/app/components/hds/side-nav/list/title.js +5 -0
- package/app/components/hds/side-nav/wrapper.js +5 -0
- package/app/styles/components/side-nav.scss +5 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 1.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1260](https://github.com/hashicorp/design-system/pull/1260) [`8eb0d1ff6`](https://github.com/hashicorp/design-system/commit/8eb0d1ff63248fe049962192190480a7fe6fdef9) Thanks [@didoo](https://github.com/didoo)! - Added `@ember/render-modifiers` as explicit dependency
|
|
8
|
+
|
|
9
|
+
- [#1256](https://github.com/hashicorp/design-system/pull/1256) [`451d98842`](https://github.com/hashicorp/design-system/commit/451d98842474dad2b3f3a6ad38c813e9d92d0f1d) Thanks [@alex-ju](https://github.com/alex-ju)! - Make the `Disclosure` mechanism more resilient
|
|
10
|
+
|
|
3
11
|
## 1.8.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -30,10 +30,9 @@ export default class HdsDisclosureComponent extends Component {
|
|
|
30
30
|
|
|
31
31
|
@action
|
|
32
32
|
onFocusOut(event) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
) {
|
|
33
|
+
// due to inconsitent implementation of relatedTarget across browsers we use the activeElement as a fallback
|
|
34
|
+
// if the related target is not part of the disclosed content we close the disclosed container
|
|
35
|
+
if (!this.element.contains(event.relatedTarget || document.activeElement)) {
|
|
37
36
|
this.close();
|
|
38
37
|
}
|
|
39
38
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
1
6
|
<Hds::Interactive
|
|
2
7
|
class="hds-side-nav__home-link"
|
|
3
8
|
@current-when={{@current-when}}
|
|
@@ -9,6 +14,7 @@
|
|
|
9
14
|
@href={{@href}}
|
|
10
15
|
@isHrefExternal={{@isHrefExternal}}
|
|
11
16
|
...attributes
|
|
17
|
+
aria-label={{this.ariaLabel}}
|
|
12
18
|
>
|
|
13
19
|
<FlightIcon @name={{@icon}} @color={{@color}} @stretched={{true}} />
|
|
14
20
|
</Hds::Interactive>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { assert } from '@ember/debug';
|
|
8
|
+
|
|
9
|
+
export default class HdsSideNavHomeLinkComponent extends Component {
|
|
10
|
+
/**
|
|
11
|
+
* @param ariaLabel
|
|
12
|
+
* @type {string}
|
|
13
|
+
* @description The value of `aria-label`
|
|
14
|
+
*/
|
|
15
|
+
get ariaLabel() {
|
|
16
|
+
let { ariaLabel } = this.args;
|
|
17
|
+
|
|
18
|
+
assert(
|
|
19
|
+
'@ariaLabel for "Hds::SideNav::HomeLink" must have a valid value',
|
|
20
|
+
ariaLabel !== undefined
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return ariaLabel;
|
|
24
|
+
}
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"test:ember:percy": "percy exec ember test"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@ember/render-modifiers": "^2.0.5",
|
|
40
41
|
"@hashicorp/design-system-tokens": "^1.4.1",
|
|
41
42
|
"@hashicorp/ember-flight-icons": "^3.0.2",
|
|
42
43
|
"dialog-polyfill": "^0.5.6",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"@embroider/test-setup": "^2.0.2",
|
|
61
62
|
"@glimmer/component": "^1.1.2",
|
|
62
63
|
"@glimmer/tracking": "^1.1.2",
|
|
63
|
-
"@percy/cli": "^1.
|
|
64
|
+
"@percy/cli": "^1.21.0",
|
|
64
65
|
"@percy/ember": "^4.2.0",
|
|
65
66
|
"babel-eslint": "^10.1.0",
|
|
66
67
|
"broccoli-asset-rev": "^3.0.0",
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
"stylelint": "^14.16.1",
|
|
100
101
|
"stylelint-config-rational-order": "^0.1.2",
|
|
101
102
|
"stylelint-config-standard-scss": "^5.0.0",
|
|
102
|
-
"webpack": "^5.
|
|
103
|
+
"webpack": "^5.76.0"
|
|
103
104
|
},
|
|
104
105
|
"engines": {
|
|
105
106
|
"node": "12.* || 14.* || >= 16"
|