@hashicorp/design-system-components 0.12.3 → 0.12.6
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 +40 -14
- package/addon/components/hds/disclosure/index.hbs +1 -1
- package/addon/components/hds/disclosure/index.js +3 -3
- package/addon/components/hds/dropdown/index.hbs +2 -1
- package/addon/components/hds/dropdown/list-item/copy-item.js +16 -8
- package/addon/components/hds/dropdown/list-item/interactive.hbs +28 -17
- package/addon/components/hds/link/inline.hbs +1 -2
- package/addon/components/hds/link/standalone.hbs +0 -2
- package/addon/components/hds/yield/index.hbs +2 -3
- package/app/styles/components/dropdown.scss +18 -4
- package/app/styles/components/link/standalone.scss +1 -0
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 0.12.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#399](https://github.com/hashicorp/design-system/pull/399) [`62e3077e`](https://github.com/hashicorp/design-system/commit/62e3077e5cf40e93852e9fa3489d3d1970d45070) Thanks [@alex-ju](https://github.com/alex-ju)! - Enable programmatic close on dropdown component
|
|
8
|
+
|
|
9
|
+
## 0.12.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#391](https://github.com/hashicorp/design-system/pull/391) [`0d8515f0`](https://github.com/hashicorp/design-system/commit/0d8515f06ae15b9955a15e9cafa97dc1d4c87cee) Thanks [@didoo](https://github.com/didoo)! - Fixed bug in `Link::Standalone` and `Link::Inline` components that added `target="_blank"` and `rel="noopener noreferrer”` attributes in any case/condition.
|
|
14
|
+
|
|
15
|
+
* [#354](https://github.com/hashicorp/design-system/pull/354) [`e7997ee6`](https://github.com/hashicorp/design-system/commit/e7997ee68d7d8b104243c8b6129db1030a3cea57) Thanks [@didoo](https://github.com/didoo)! - small update to the `yield` helper component - this is used in `Alert` and `Toast` but the changes should have no impact
|
|
16
|
+
|
|
17
|
+
## 0.12.4
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#343](https://github.com/hashicorp/design-system/pull/343) [`a74711c8`](https://github.com/hashicorp/design-system/commit/a74711c8c0de6843625781488ed94521c7f8cb7c) Thanks [@MelSumner](https://github.com/MelSumner)! - Fixes copy-item bug in FireFox
|
|
22
|
+
|
|
23
|
+
* [#328](https://github.com/hashicorp/design-system/pull/328) [`32b36ab1`](https://github.com/hashicorp/design-system/commit/32b36ab132b3356923ef6d1f3f36c2f7036e852c) Thanks [@didoo](https://github.com/didoo)! - updated `font-weight` to `medium` for `Link::Standalone` component (to be in sync with design specs)
|
|
24
|
+
|
|
25
|
+
- [#319](https://github.com/hashicorp/design-system/pull/319) [`7c96344f`](https://github.com/hashicorp/design-system/commit/7c96344f3c83baecc56daac6dfdddb809c161c1f) Thanks [@didoo](https://github.com/didoo)! - updated the `Hds::Dropdown::ListItem::Interactive` to support the `isLoading` state
|
|
26
|
+
|
|
27
|
+
- Updated dependencies []:
|
|
28
|
+
- @hashicorp/ember-flight-icons@2.0.8
|
|
29
|
+
|
|
3
30
|
## 0.12.3
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -23,7 +50,7 @@
|
|
|
23
50
|
|
|
24
51
|
## 0.12.0
|
|
25
52
|
|
|
26
|
-
### Minor Changes
|
|
53
|
+
### Minor Changes (Some Breaking)
|
|
27
54
|
|
|
28
55
|
- [#217](https://github.com/hashicorp/design-system/pull/217) [`210edd17`](https://github.com/hashicorp/design-system/commit/210edd17431e6e3097260aed0df5a8902f93b7f7) Thanks [@didoo](https://github.com/didoo)! - # Interactive
|
|
29
56
|
|
|
@@ -68,25 +95,24 @@
|
|
|
68
95
|
|
|
69
96
|
## 0.11.0
|
|
70
97
|
|
|
71
|
-
### Minor Changes
|
|
98
|
+
### Minor Changes (Some Breaking)
|
|
72
99
|
|
|
73
100
|
- [#245](https://github.com/hashicorp/design-system/pull/245) [`c6de1018`](https://github.com/hashicorp/design-system/commit/c6de101880ec1c21971e3775e1a21b6cb9e69757) Thanks [@didoo](https://github.com/didoo)! - - Added `Alert` component
|
|
74
101
|
- Added `Toast` component
|
|
102
|
+
- [#259](https://github.com/hashicorp/design-system/pull/259) [`478b3069`](https://github.com/hashicorp/design-system/commit/478b3069e800cf2ccefba9b5475c72b024e25d16) Thanks [@didoo](https://github.com/didoo)! - - removed autofocus on first item for `Disclosure` component (and as a result also for `Breadcrumb` and `Dropdown` components) (🚨 Breaking)
|
|
103
|
+
- updated focus state treatment for `Dropdown` component (🚨 Breaking)
|
|
75
104
|
|
|
76
105
|
### Patch Changes
|
|
77
106
|
|
|
78
|
-
- [#
|
|
79
|
-
- updated focus state treatment for `Dropdown` component
|
|
80
|
-
|
|
81
|
-
* [#225](https://github.com/hashicorp/design-system/pull/225) [`f1f07179`](https://github.com/hashicorp/design-system/commit/f1f0717952b3e6b41676135cf00e77a6e55579ec) Thanks [@Dhaulagiri](https://github.com/Dhaulagiri)! - update to ember-keyboard@8.1.0 in packages/components
|
|
107
|
+
- [#225](https://github.com/hashicorp/design-system/pull/225) [`f1f07179`](https://github.com/hashicorp/design-system/commit/f1f0717952b3e6b41676135cf00e77a6e55579ec) Thanks [@Dhaulagiri](https://github.com/Dhaulagiri)! - update to ember-keyboard@8.1.0 in packages/components
|
|
82
108
|
|
|
83
109
|
- [#265](https://github.com/hashicorp/design-system/pull/265) [`79bc3e99`](https://github.com/hashicorp/design-system/commit/79bc3e99cd5cc6cb60fc82286d5726c0d0ffbd82) Thanks [@Dhaulagiri](https://github.com/Dhaulagiri)! - npx ember-cli-update@4.3.0 dependency updates
|
|
84
110
|
|
|
85
|
-
|
|
111
|
+
- [#253](https://github.com/hashicorp/design-system/pull/253) [`21786983`](https://github.com/hashicorp/design-system/commit/21786983d4ebbb3f38a72d4d105504169bfeda78) Thanks [@MelSumner](https://github.com/MelSumner)! - bugfix for icon size in copy-item component
|
|
86
112
|
|
|
87
113
|
## 0.10.0
|
|
88
114
|
|
|
89
|
-
### Minor Changes
|
|
115
|
+
### Minor Changes (Some Breaking)
|
|
90
116
|
|
|
91
117
|
- [#200](https://github.com/hashicorp/design-system/pull/200) [`a8072537`](https://github.com/hashicorp/design-system/commit/a8072537542791398d375cde4a7a85c2955c66da) Thanks [@didoo](https://github.com/didoo)! - Updated Dropdown component:
|
|
92
118
|
|
|
@@ -94,8 +120,8 @@
|
|
|
94
120
|
- fixed issue with `list-item/interactive` height
|
|
95
121
|
- added handling of dynamic `width` for the list
|
|
96
122
|
- exposed an `onClose` event
|
|
97
|
-
- removed the default icon for `toggle/icon`
|
|
98
|
-
- removed icon requirement from the `critical` list item
|
|
123
|
+
- removed the default icon for `toggle/icon` (🚨 Breaking)
|
|
124
|
+
- removed icon requirement from the `critical` list item (🚨 Breaking)
|
|
99
125
|
- updated the documentation and integration tests
|
|
100
126
|
- some code refactorings, reorganizations and cleanups
|
|
101
127
|
|
|
@@ -137,9 +163,9 @@
|
|
|
137
163
|
|
|
138
164
|
## 0.7.0
|
|
139
165
|
|
|
140
|
-
### Minor Changes
|
|
166
|
+
### Minor Changes (Some Breaking)
|
|
141
167
|
|
|
142
|
-
- [#150](https://github.com/hashicorp/design-system/pull/150) [`c236c159`](https://github.com/hashicorp/design-system/commit/c236c159f7d7ec6edc661710963f5733eb961edf) Thanks [@didoo](https://github.com/didoo)! - removed “box-sizing“ declarations from the components (we assume the consumers codebase already have set it to “border-box“ by default
|
|
168
|
+
- [#150](https://github.com/hashicorp/design-system/pull/150) [`c236c159`](https://github.com/hashicorp/design-system/commit/c236c159f7d7ec6edc661710963f5733eb961edf) Thanks [@didoo](https://github.com/didoo)! - removed “box-sizing“ declarations from the components (we assume the consumers codebase already have set it to “border-box“ by default (🚨 Breaking)
|
|
143
169
|
|
|
144
170
|
## 0.6.0
|
|
145
171
|
|
|
@@ -160,9 +186,9 @@
|
|
|
160
186
|
|
|
161
187
|
## 0.5.0
|
|
162
188
|
|
|
163
|
-
### Minor Changes
|
|
189
|
+
### Minor Changes (Some Breaking)
|
|
164
190
|
|
|
165
|
-
- [#127](https://github.com/hashicorp/design-system/pull/127) [`fa13190f`](https://github.com/hashicorp/design-system/commit/fa13190f1058f172898221aa1e1913965bfa53e9) Thanks [@didoo](https://github.com/didoo)! - removed the “isDisabled“ prop from the “Button” component; added instructions for developers to manually add it themselves if needed.
|
|
191
|
+
- [#127](https://github.com/hashicorp/design-system/pull/127) [`fa13190f`](https://github.com/hashicorp/design-system/commit/fa13190f1058f172898221aa1e1913965bfa53e9) Thanks [@didoo](https://github.com/didoo)! - removed the “isDisabled“ prop from the “Button” component; added instructions for developers to manually add it themselves if needed. (🚨 Breaking)
|
|
166
192
|
|
|
167
193
|
### Patch Changes
|
|
168
194
|
|
|
@@ -29,20 +29,20 @@ export default class HdsDisclosureComponent extends Component {
|
|
|
29
29
|
!event.relatedTarget || // click or tap a non-related target (e.g. outside the element)
|
|
30
30
|
!this.element.contains(event.relatedTarget) // move focus to a target outside the element
|
|
31
31
|
) {
|
|
32
|
-
this.
|
|
32
|
+
this.close();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
@action
|
|
37
37
|
onKeyUp(event) {
|
|
38
38
|
if (event.key === 'Escape') {
|
|
39
|
-
this.
|
|
39
|
+
this.close();
|
|
40
40
|
this.toggleRef.focus();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@action
|
|
45
|
-
|
|
45
|
+
close() {
|
|
46
46
|
if (this.isOpen) {
|
|
47
47
|
this.isOpen = false;
|
|
48
48
|
}
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
)
|
|
8
8
|
}}
|
|
9
9
|
</:toggle>
|
|
10
|
-
<:content
|
|
10
|
+
<:content as |c|>
|
|
11
11
|
<ul class={{this.listClassNames}} {{style width=@width}}>
|
|
12
12
|
{{yield
|
|
13
13
|
(hash
|
|
14
|
+
close=c.close
|
|
14
15
|
CopyItem=(component "hds/dropdown/list-item/copy-item")
|
|
15
16
|
Description=(component "hds/dropdown/list-item/description")
|
|
16
17
|
Generic=(component "hds/dropdown/list-item/generic")
|
|
@@ -40,16 +40,24 @@ export default class HdsDropdownListItemCopyItemComponent extends Component {
|
|
|
40
40
|
async copyCode() {
|
|
41
41
|
// https://developer.mozilla.org/en-US/docs/Web/API/Clipboard
|
|
42
42
|
await navigator.clipboard.writeText(this.args.text);
|
|
43
|
-
const result = await navigator.clipboard.readText();
|
|
44
43
|
|
|
45
|
-
if (
|
|
44
|
+
if (navigator.clipboard.readText) {
|
|
45
|
+
const result = await navigator.clipboard.readText();
|
|
46
|
+
|
|
47
|
+
if (result === this.args.text) {
|
|
48
|
+
this.isSuccess = true;
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
// assume that it works so Firefox can show the success state
|
|
52
|
+
// doesn't confirm that you'll get the correct pasted text
|
|
53
|
+
// but we accept this as a reasonable tradeoff
|
|
54
|
+
// since users can always copy/paste manually.
|
|
46
55
|
this.isSuccess = true;
|
|
47
|
-
// console.log(`result is ${result}`);
|
|
48
|
-
|
|
49
|
-
// make it fade back to the default state
|
|
50
|
-
setTimeout(() => {
|
|
51
|
-
this.isSuccess = false;
|
|
52
|
-
}, 1000);
|
|
53
56
|
}
|
|
57
|
+
|
|
58
|
+
// make it fade back to the default state
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
this.isSuccess = false;
|
|
61
|
+
}, 1000);
|
|
54
62
|
}
|
|
55
63
|
}
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
<li class={{this.classNames}}>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@models={{hds-link-to-models @model @models}}
|
|
5
|
-
@query={{hds-link-to-query @query}}
|
|
6
|
-
@replace={{@replace}}
|
|
7
|
-
@route={{@route}}
|
|
8
|
-
@isRouteExternal={{@isRouteExternal}}
|
|
9
|
-
@href={{@href}}
|
|
10
|
-
@isHrefExternal={{@isHrefExternal}}
|
|
11
|
-
...attributes
|
|
12
|
-
>
|
|
13
|
-
{{#if @icon}}
|
|
2
|
+
{{#if @isLoading}}
|
|
3
|
+
<div class="hds-dropdown-list-item__interactive-loading-wrapper" ...attributes>
|
|
14
4
|
<div class="hds-dropdown-list-item__interactive-icon">
|
|
15
|
-
<FlightIcon @name=
|
|
5
|
+
<FlightIcon @name="loading" @isInlineBlock={{false}} />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="hds-dropdown-list-item__interactive-text hds-typography-body-100 hds-font-weight-regular">
|
|
8
|
+
{{this.text}}
|
|
16
9
|
</div>
|
|
17
|
-
{{/if}}
|
|
18
|
-
<div class="hds-dropdown-list-item__interactive-text hds-typography-body-200 hds-font-weight-medium">
|
|
19
|
-
{{this.text}}
|
|
20
10
|
</div>
|
|
21
|
-
|
|
11
|
+
{{else}}
|
|
12
|
+
<Hds::Interactive
|
|
13
|
+
@current-when={{@current-when}}
|
|
14
|
+
@models={{hds-link-to-models @model @models}}
|
|
15
|
+
@query={{hds-link-to-query @query}}
|
|
16
|
+
@replace={{@replace}}
|
|
17
|
+
@route={{@route}}
|
|
18
|
+
@isRouteExternal={{@isRouteExternal}}
|
|
19
|
+
@href={{@href}}
|
|
20
|
+
@isHrefExternal={{@isHrefExternal}}
|
|
21
|
+
...attributes
|
|
22
|
+
>
|
|
23
|
+
{{#if @icon}}
|
|
24
|
+
<div class="hds-dropdown-list-item__interactive-icon">
|
|
25
|
+
<FlightIcon @name={{@icon}} @isInlineBlock={{false}} />
|
|
26
|
+
</div>
|
|
27
|
+
{{/if}}
|
|
28
|
+
<div class="hds-dropdown-list-item__interactive-text hds-typography-body-200 hds-font-weight-medium">
|
|
29
|
+
{{this.text}}
|
|
30
|
+
</div>
|
|
31
|
+
</Hds::Interactive>
|
|
32
|
+
{{/if}}
|
|
22
33
|
</li>
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
@route={{@route}}
|
|
10
10
|
@isRouteExternal={{@isRouteExternal}}
|
|
11
11
|
@href={{@href}}
|
|
12
|
-
|
|
13
|
-
rel="noopener noreferrer"
|
|
12
|
+
@isHrefExternal={{@isHrefExternal}}
|
|
14
13
|
...attributes
|
|
15
14
|
>{{#if (and @icon (eq this.iconPosition "leading"))~}}
|
|
16
15
|
<span class="hds-link-inline__icon hds-link-inline__icon--leading">
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
</div>
|
|
1
|
+
{{! template-lint-disable no-yield-only }}
|
|
2
|
+
{{yield}}
|
|
@@ -333,14 +333,14 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
.hds-dropdown-list-item__interactive-text {
|
|
337
|
-
text-align: left; // the button element was centering text
|
|
338
|
-
}
|
|
339
|
-
|
|
340
336
|
.hds-dropdown-list-item__interactive-icon {
|
|
341
337
|
margin-right: 8px;
|
|
342
338
|
}
|
|
343
339
|
|
|
340
|
+
.hds-dropdown-list-item__interactive-text {
|
|
341
|
+
text-align: left; // the button element was centering text
|
|
342
|
+
}
|
|
343
|
+
|
|
344
344
|
.hds-dropdown-list-item--color-action {
|
|
345
345
|
a, button {
|
|
346
346
|
color: var(--token-color-foreground-primary);
|
|
@@ -371,6 +371,20 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
.hds-dropdown-list-item__interactive-loading-wrapper {
|
|
375
|
+
align-items: center;
|
|
376
|
+
display: flex;
|
|
377
|
+
padding: 8px 10px 8px 16px;
|
|
378
|
+
|
|
379
|
+
.hds-dropdown-list-item__interactive-text {
|
|
380
|
+
color: var(--token-color-foreground-faint);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.hds-dropdown-list-item__interactive-icon {
|
|
384
|
+
color: var(--token-color-foreground-primary);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
374
388
|
.hds-dropdown-list-item--separator {
|
|
375
389
|
height: 4px;
|
|
376
390
|
position: relative;
|
|
@@ -19,6 +19,7 @@ $hds-link-standalone-border-width: 1px;
|
|
|
19
19
|
border: $hds-link-standalone-border-width solid transparent; // needs to exist AND be transparent for a11y
|
|
20
20
|
display: flex;
|
|
21
21
|
font-family: var(--token-typography-font-stack-text);
|
|
22
|
+
font-weight: var(--token-typography-font-weight-medium);
|
|
22
23
|
justify-content: center;
|
|
23
24
|
// notice: the text decoration is applied directly to the "text" container because of a bug in Safari (see https://github.com/hashicorp/design-system-components/issues/159)
|
|
24
25
|
text-decoration-color: transparent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"description": "HashiCorp Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -35,15 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@hashicorp/design-system-tokens": "^0.8.1",
|
|
38
|
-
"@hashicorp/ember-flight-icons": "^2.0.
|
|
38
|
+
"@hashicorp/ember-flight-icons": "^2.0.8",
|
|
39
39
|
"ember-auto-import": "^2.4.1",
|
|
40
40
|
"ember-cli-babel": "^7.26.11",
|
|
41
41
|
"ember-cli-htmlbars": "^6.0.1",
|
|
42
42
|
"ember-cli-sass": "^10.0.1",
|
|
43
43
|
"ember-keyboard": "^8.1.0",
|
|
44
44
|
"ember-named-blocks-polyfill": "^0.2.5",
|
|
45
|
-
"sass": "^1.43.4"
|
|
46
|
-
"sinon": "^14.0.0"
|
|
45
|
+
"sass": "^1.43.4"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@ember/optional-features": "^2.0.0",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"@embroider/test-setup": "^1.5.0",
|
|
52
51
|
"@glimmer/component": "^1.0.4",
|
|
53
52
|
"@glimmer/tracking": "^1.0.4",
|
|
54
|
-
"@percy/cli": "^1.
|
|
53
|
+
"@percy/cli": "^1.3.1",
|
|
55
54
|
"@percy/ember": "^3.0.0",
|
|
56
55
|
"babel-eslint": "^10.1.0",
|
|
57
56
|
"broccoli-asset-rev": "^3.0.0",
|