@hashicorp/design-system-components 0.3.1 → 0.5.0

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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # @hashicorp/design-system-components
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#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
12
+
13
+ * [#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
14
+
15
+ ## 0.4.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#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
20
+
21
+ ## 0.3.2
22
+
23
+ ### Patch Changes
24
+
25
+ - [#112](https://github.com/hashicorp/design-system/pull/112) [`2be08081`](https://github.com/hashicorp/design-system/commit/2be08081582dd7e9c092fdb35c94c063d5ee7f4e) Thanks [@didoo](https://github.com/didoo)! - added missing helpers for “color” and “typography” in “components” package
26
+
3
27
  ## 0.3.1
4
28
 
5
29
  ### Patch Changes
@@ -1,12 +1,4 @@
1
- <nav
2
- class={{this.classNames}}
3
- {{!
4
- TODO: should this string be localized, like in Structure? https://github.com/hashicorp/structure/blob/dffbb0e0ae5246d3b832586ab25bcb981a052b30/packages/pds-ember/addon/components/pds/breadcrumbs/index.hbs#L3
5
- (in which case, we need to expose a prop? or start to have localization in the HDS system?)
6
- }}
7
- aria-label="breadcrumbs"
8
- ...attributes
9
- >
1
+ <nav class={{this.classNames}} aria-label="breadcrumbs" ...attributes>
10
2
  <ol class="hds-breadcrumb__list" {{did-insert this.didInsert}}>
11
3
  {{yield}}
12
4
  </ol>
@@ -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
@@ -1,7 +1,9 @@
1
1
  // these are files coming from the 'design-system-tokens' package
2
2
  @use "tokens";
3
+ @use "helpers/color";
3
4
  @use "helpers/elevation";
4
5
  @use "helpers/focus-ring";
6
+ @use "helpers/typography";
5
7
 
6
8
  @use "../components/badge";
7
9
  @use "../components/badge-count";
@@ -14,7 +14,7 @@
14
14
 
15
15
  .hds-badge {
16
16
  align-items: center;
17
- border-radius: 4px;
17
+ border-radius: 5px;
18
18
  border: $hds-badge-border-width solid transparent;
19
19
  box-sizing: border-box;
20
20
  display: inline-flex;
@@ -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": 1,
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 1rem, // 0 16px
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.625rem 1rem, // 10px 16px
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.75rem 1.25rem, // 12px 20px
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
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashicorp/design-system-components",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "HashiCorp Design System Components",
5
5
  "keywords": [
6
6
  "hashicorp",