@hashicorp/design-system-components 0.3.2 → 0.5.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 +24 -0
- package/addon/components/hds/breadcrumb/index.js +8 -3
- package/addon/components/hds/button/index.hbs +1 -7
- package/addon/components/hds/button/index.js +0 -10
- package/app/styles/components/badge.scss +1 -1
- package/app/styles/components/button.scss +5 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 0.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#133](https://github.com/hashicorp/design-system/pull/133) [`6ed18c7f`](https://github.com/hashicorp/design-system/commit/6ed18c7f9bf211141ac38005e6bd3aea2dbbf1c7) Thanks [@didoo](https://github.com/didoo)! - small change to the “noop“ guard in the “@didInsert“ method of the “Disclosure“ component
|
|
8
|
+
|
|
9
|
+
## 0.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#125](https://github.com/hashicorp/design-system/pull/125) [`b0ff180c`](https://github.com/hashicorp/design-system/commit/b0ff180c85ff920e704d46c9b823b3fa261b1b1e) Thanks [@didoo](https://github.com/didoo)! - updated border radius of “Badge” from 4px to 5px
|
|
18
|
+
|
|
19
|
+
* [#126](https://github.com/hashicorp/design-system/pull/126) [`7b639915`](https://github.com/hashicorp/design-system/commit/7b63991586b242973bad45c6108c447453772d0a) Thanks [@didoo](https://github.com/didoo)! - updated the internal padding of the “Button” component to match design specifications
|
|
20
|
+
|
|
21
|
+
## 0.4.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [#117](https://github.com/hashicorp/design-system/pull/117) [`e78f6df8`](https://github.com/hashicorp/design-system/commit/e78f6df8f7488f9f97e8de2a5dc3464b2a390725) Thanks [@didoo](https://github.com/didoo)! - added a stacking context for the “Button” component so that the focus z-index is isolated in the button
|
|
26
|
+
|
|
3
27
|
## 0.3.2
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const NOOP = () => {};
|
|
4
4
|
|
|
5
5
|
export default class HdsBreadcrumbComponent extends Component {
|
|
6
6
|
/**
|
|
@@ -9,8 +9,13 @@ export default class HdsBreadcrumbComponent extends Component {
|
|
|
9
9
|
* @default () => {}
|
|
10
10
|
*/
|
|
11
11
|
get didInsert() {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
let { didInsert } = this.args;
|
|
13
|
+
|
|
14
|
+
if (typeof didInsert === 'function') {
|
|
15
|
+
return didInsert;
|
|
16
|
+
} else {
|
|
17
|
+
return NOOP;
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
/**
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
<button
|
|
2
|
-
class={{this.classNames}}
|
|
3
|
-
...attributes
|
|
4
|
-
aria-label={{if this.isIconOnly this.text null}}
|
|
5
|
-
type={{this.type}}
|
|
6
|
-
disabled={{if this.isDisabled "disabled" null}}
|
|
7
|
-
>
|
|
1
|
+
<button class={{this.classNames}} ...attributes aria-label={{if this.isIconOnly this.text null}} type={{this.type}}>
|
|
8
2
|
{{#if this.isIconOnly}}
|
|
9
3
|
<div class="hds-button__icon">
|
|
10
4
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
@@ -155,16 +155,6 @@ export default class HdsButtonIndexComponent extends Component {
|
|
|
155
155
|
return this.args.isFullWidth ?? false;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
/**
|
|
159
|
-
* @param isDisabled
|
|
160
|
-
* @type {boolean}
|
|
161
|
-
* @default null
|
|
162
|
-
* @description Sets the native HTML attribute `disabled` on the button element. Default is null (doesn't render the attribute).
|
|
163
|
-
*/
|
|
164
|
-
get isDisabled() {
|
|
165
|
-
return this.args.isDisabled ?? null;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
158
|
/**
|
|
169
159
|
* Get the class names to apply to the component.
|
|
170
160
|
* @method Button#classNames
|
|
@@ -21,6 +21,7 @@ $hds-button-focus-border-width: 3px;
|
|
|
21
21
|
box-sizing: border-box; // TODO https://github.com/hashicorp/design-system-components/issues/46
|
|
22
22
|
display: flex;
|
|
23
23
|
font-family: var(--token-typography-font-stack-text);
|
|
24
|
+
isolation: isolate;
|
|
24
25
|
justify-content: center;
|
|
25
26
|
outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
|
|
26
27
|
outline-color: transparent; // We need this to be transparent for a11y
|
|
@@ -98,23 +99,23 @@ $hds-button-focus-border-width: 3px;
|
|
|
98
99
|
$size-props: (
|
|
99
100
|
"small": (
|
|
100
101
|
"font-size": 0.8125rem, // 13px;
|
|
101
|
-
"line-height":
|
|
102
|
+
"line-height": 0.875rem, // 14px - we need to make it even (so we set it slighly larger than the font-size; notice: in Figma is 12px but this would cut some ascendants/descendants)
|
|
102
103
|
"min-height": 1.75rem, // 28px
|
|
103
|
-
"padding": 0
|
|
104
|
+
"padding": 0.375rem 0.6875rem, // 6px 11px - here we're taking into account the 1px border
|
|
104
105
|
"icon-size": 0.75rem, // 12px
|
|
105
106
|
),
|
|
106
107
|
"medium": (
|
|
107
108
|
"font-size": 0.875rem, // 14px
|
|
108
109
|
"line-height": 1rem,// 16px
|
|
109
110
|
"min-height": 2.25rem, // 36px
|
|
110
|
-
"padding": 0.
|
|
111
|
+
"padding": 0.5625rem 0.9375rem, // 9px 15px - here we're taking into account the 1px border
|
|
111
112
|
"icon-size": 1rem, // 16px
|
|
112
113
|
),
|
|
113
114
|
"large": (
|
|
114
115
|
"font-size": 1rem, //16px
|
|
115
116
|
"line-height": 1.5rem, // 24px
|
|
116
117
|
"min-height": 3rem, // 48px
|
|
117
|
-
"padding": 0.
|
|
118
|
+
"padding": 0.6875rem 1.1875rem, // 11px 19px - here we're taking into account the 1px border
|
|
118
119
|
"icon-size": 1.5rem, // 24px
|
|
119
120
|
)
|
|
120
121
|
);
|