Skip to content

Commit 1767aa5

Browse files
dchyunKristinLBradleydidooLilithJames-HDSheatherlarsen
authored
[Website] 4.21 Release Docs (#2975)
Co-authored-by: Kristin Bradley <[email protected]> Co-authored-by: Cristiano Rastelli <[email protected]> Co-authored-by: Cristiano Rastelli <[email protected]> Co-authored-by: LilithJames-HDS <[email protected]> Co-authored-by: Heather Larsen <[email protected]> Co-authored-by: Lee White <[email protected]> Co-authored-by: Majed <[email protected]> Co-authored-by: Jory Tindall <[email protected]> Co-authored-by: shleewhite <[email protected]> Co-authored-by: Zack Moore <[email protected]>
1 parent f500715 commit 1767aa5

File tree

98 files changed

+2312
-207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2312
-207
lines changed

website/app/styles/doc-components/form/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
@use "./label";
99
@use "./filter";
1010
@use "./select";
11-
11+
@use "./layout";
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright (c) HashiCorp, Inc.
3+
* SPDX-License-Identifier: MPL-2.0
4+
*/
5+
6+
// FORM LAYOUT HELPER COMPONENTS
7+
8+
#show-content-components-form-layout {
9+
.doc-form-layout-mobile-view {
10+
position: relative;
11+
max-width: 280px;
12+
padding: 16px 16px 65px;
13+
background: #fff;
14+
border: 1px solid;
15+
border-radius: 16px;
16+
aspect-ratio: 9 / 16;
17+
18+
// home button
19+
&::before {
20+
position: absolute;
21+
inset: auto 0 15px 0;
22+
width: 40px;
23+
height: 40px;
24+
margin: 0 auto;
25+
background: var(--token-color-palette-neutral-200);
26+
border-radius: 50%;
27+
content: "";
28+
}
29+
30+
// simulate responsive layout
31+
.hds-form__section-multi-field-group {
32+
flex-direction: column;
33+
align-items: start;
34+
}
35+
}
36+
}

website/app/styles/pages/components/advanced-table.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,17 @@
1111
margin-top: 16px;
1212
}
1313
}
14+
15+
.doc-advanced-table-cell-content-div {
16+
display: flex;
17+
align-items: center;
18+
min-width: 0;
19+
}
20+
21+
.doc-advanced-table-text-truncate {
22+
width: 100%;
23+
overflow: hidden;
24+
white-space: nowrap;
25+
text-overflow: ellipsis;
26+
}
1427
}

website/cspell-config/dictionary-docs-examples.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ O’Shaughnessy
66
pharell
77
Picoult
88
Tartt
9+
Maxene
10+
Aishah
911

1012
# Example Spanish words
1113
adicional
@@ -22,4 +24,4 @@ Tcqv
2224
tyng
2325

2426
# Example incorrectly spelled word
25-
organisation
27+
organisation

website/docs/components/app-header/partials/code/component-api.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ The `AppHeader::HomeLink` component uses the generic `Hds::Interactive` componen
5050
<C.Property @name="icon" @type="string" @required={{true}}>
5151
Used to show an icon. Any [icon](/icons/library) name is accepted. [See guidance on which icon to use depending on the product](/components/app-header#home-link).
5252
</C.Property>
53+
<C.Property @name="text" @type="string" @required={{true}}>
54+
Used to display text inline with the logo. If `@isIconOnly` is set to `true`, this value will instead be passed to the `aria-label` of the `<a>` tag.
55+
</C.Property>
56+
<C.Property @name="isIconOnly" @type="boolean" @default="true">
57+
Indicates if the Home Link will only contain a icon/logo. If set to `false`, the `@text` property will be rendered adjacent to the logo.
58+
</C.Property>
5359
<C.Property @name="color" @type="string">
5460
Used to specify an optional custom color provided as any valid CSS color. For more details on acceptable values, see the [Icon color argument](/components/icon?tab=code#fill). If unspecified, it will use the App Headers’s default white text color.
5561
</C.Property>
@@ -65,9 +71,6 @@ The `AppHeader::HomeLink` component uses the generic `Hds::Interactive` componen
6571
<C.Property @name="isRouteExternal" @type="boolean" @default="false">
6672
This controls whether the “LinkTo” is external to the Ember engine, in which case it will use a `<LinkToExternal>` for the `@route`.
6773
</C.Property>
68-
<C.Property @name="ariaLabel" @type="string" @required={{true}}>
69-
The value of the aria-label. If no text value is defined, an error will be thrown.
70-
</C.Property>
7174
<C.Property @name="...attributes">
7275
This component supports use of [`...attributes`](https://guides.emberjs.com/release/in-depth-topics/patterns-for-components/#toc_attribute-ordering).
7376
</C.Property>

website/docs/components/app-header/partials/code/how-to-use.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ When adding Dropdown components within the App Header, be sure to set `enableCol
5353

5454
The `Hds::AppHeader::HomeLink` child component should be yielded within the `<:logo>` block. It provides consistent branding and navigates the user to the “home” or main dashboard page.
5555

56-
It requires a value for the `@icon` and `@ariaLabel` arguments.
56+
It requires a value for the `@icon` and `@text` arguments.
5757

5858
It is built on top of the [`Hds::Interactive` component](/utilities/interactive), so it accepts all its routing arguments (eg. `@href`, `@route`, `@query`, `@model(s)`, etc.).
5959

@@ -68,7 +68,7 @@ probably need to be set to `true` (or omitted to rely on defaults)
6868
<:logo>
6969
<Hds::AppHeader::HomeLink
7070
@icon="hashicorp"
71-
@ariaLabel="HashiCorp home menu"
71+
@text="HashiCorp home menu"
7272
@href="/"
7373
/>
7474
</:logo>
@@ -84,6 +84,26 @@ probably need to be set to `true` (or omitted to rely on defaults)
8484
</Hds::AppHeader>
8585
```
8686

87+
When `@isIconOnly` is set to `false`, the `@text` argument displays text inline with the logo and can be used to more deliberately title an application or provide other differentiating text.
88+
89+
```handlebars
90+
<Hds::AppHeader @hasA11yRefocus={{false}}>
91+
<:logo>
92+
<Hds::AppHeader::HomeLink
93+
@icon="terraform"
94+
@text="Admin Console"
95+
@isIconOnly={{false}}
96+
@href="/"
97+
/>
98+
</:logo>
99+
100+
<:utilityActions>
101+
<Doc::Placeholder @height="2em" @width="auto" @text="HelpMenu" @background="#e4e4e4" />
102+
<Doc::Placeholder @height="2em" @width="auto" @text="UserMenu" @background="#e4e4e4" />
103+
</:utilityActions>
104+
</Hds::AppHeader>
105+
```
106+
87107
The `HomeLink` also accepts optional arguments; for example, it’s possible to provide a custom color for the icon if needed:
88108

89109
```handlebars
@@ -95,7 +115,7 @@ probably need to be set to `true` (or omitted to rely on defaults)
95115
<:logo>
96116
<Hds::AppHeader::HomeLink
97117
@icon="terraform"
98-
@ariaLabel="Terraform home menu"
118+
@text="Terraform home menu"
99119
@color="var(--token-color-terraform-brand)"
100120
@href="/"
101121
/>
@@ -125,7 +145,7 @@ probably need to be set to `true` (or omitted to rely on defaults)
125145
<:logo>
126146
<Hds::AppHeader::HomeLink
127147
@icon="hashicorp"
128-
@ariaLabel="HashiCorp home menu"
148+
@text="HashiCorp home menu"
129149
@href="/"
130150
/>
131151
</:logo>
@@ -159,7 +179,7 @@ probably need to be set to `true` (or omitted to rely on defaults)
159179
<:logo>
160180
<Hds::AppHeader::HomeLink
161181
@icon="hashicorp"
162-
@ariaLabel="HashiCorp home menu"
182+
@text="HashiCorp home menu"
163183
@href="/"
164184
/>
165185
</:logo>

website/docs/components/app-header/partials/guidelines/guidelines.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ For cloud products, the icon should always be `hcp`. For standalone or open-sour
3131

3232
![Examples of the Home link using different logos](/assets/components/app-header/app-header-home-link.png)
3333

34+
#### Text
35+
36+
The home link supports an optional `text` property to more explicitly title an application. We recommend using this property sparingly as it's often unnecessary to title a HashiCorp application in such an explicit manner.
37+
38+
![Example of text displayed in the Home Link that reads Admin UI](/assets/components/app-header/app-header-home-link-text.png)
39+
3440
### Context switcher
3541

3642
!!! Info
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Copyright (c) HashiCorp, Inc.
3+
* SPDX-License-Identifier: MPL-2.0
4+
*/
5+
6+
import Component from '@glimmer/component';
7+
import { action } from '@ember/object';
8+
import { tracked } from '@glimmer/tracking';
9+
10+
export default class Index extends Component {
11+
@tracked updatingRowsExampleData = [
12+
{ id: 1, name: 'Judith Maxene', email: '[email protected]' },
13+
{ id: 2, name: 'Elmira Aishah', email: '[email protected]' },
14+
];
15+
@tracked maxRowsExampleData = [
16+
{ id: 1, os: 'darwin' },
17+
{ id: 2, os: 'linux' },
18+
{ id: 3, os: 'windows' },
19+
];
20+
21+
@action
22+
updatingRowsExampleOnAddRow() {
23+
this.updatingRowsExampleData = [
24+
...this.updatingRowsExampleData,
25+
{ name: '', email: '', id: this.updatingRowsExampleData.length + 1 },
26+
];
27+
}
28+
29+
@action
30+
updatingRowsExampleOnDeleteRow(rowToDelete) {
31+
this.updatingRowsExampleData = this.updatingRowsExampleData.filter(
32+
(item) => item.id !== rowToDelete.id,
33+
);
34+
}
35+
36+
@action
37+
maxRowsExampleOnAddRow() {
38+
this.maxRowsExampleData = [
39+
...this.maxRowsExampleData,
40+
{ name: '', email: '', id: this.maxRowsExampleData.length + 1 },
41+
];
42+
}
43+
44+
@action
45+
maxRowsExampleOnDeleteRow(rowToDelete) {
46+
this.maxRowsExampleData = this.maxRowsExampleData.filter(
47+
(item) => item.id !== rowToDelete.id,
48+
);
49+
}
50+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Key Value Inputs
3+
description: >-
4+
Rows of related inputs that can be individually added & deleted.
5+
caption: Rows of related inputs that can be individually added & deleted.
6+
links:
7+
figma: >-
8+
https://www.figma.com/design/iweq3r2Pi8xiJfD9e6lOhF/HDS-Components-v2.0?m=auto&node-id=82680-53759&t=MwE1WlTzeH6NeUOf-1
9+
github: >-
10+
https://github.com/hashicorp/design-system/tree/main/packages/components/src/components/hds/form/key-value-inputs
11+
related:
12+
- components/form/text-input
13+
- components/form/masked-input
14+
- components/form/select
15+
- components/form/textarea
16+
previewImage: assets/illustrations/components/form/key-value-inputs.jpg
17+
navigation:
18+
keywords:
19+
- key
20+
- value
21+
- pair
22+
- input
23+
- form
24+
---
25+
26+
<section data-tab="Guidelines">
27+
@include "partials/guidelines/guidelines.md"
28+
</section>
29+
30+
<section data-tab="Code">
31+
@include "partials/code/how-to-use.md"
32+
@include "partials/code/component-api.md"
33+
</section>
34+
35+
<section data-tab="Specifications">
36+
@include "partials/specifications/anatomy.md"
37+
</section>
38+
39+
<section data-tab="Accessibility">
40+
@include "partials/accessibility/accessibility.md"
41+
</section>
42+
43+
<section data-tab="Version history">
44+
@include "partials/version-history/version-history.md"
45+
</section>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Conformance rating
2+
3+
<Doc::Badge @type="warning">Conditionally conformant</Doc::Badge>
4+
5+
To be conformant, a Legend must be included in the `:header` named block identifying the purpose of the input groups.
6+
7+
## Applicable WCAG Success Criteria
8+
9+
This section is for reference only. This component intends to conform to the following WCAG Success Criteria:
10+
11+
<Doc::WcagList @criteriaList={{array "1.3.1" "1.3.2" "1.3.4" "1.3.5" "1.4.1" "1.4.3" "1.4.4" "1.4.10" "1.4.11" "1.4.12" "2.1.1" "2.1.2" "2.4.6" "2.4.7" "3.2.1" "3.2.2" "3.2.4" "3.3.1" "3.3.2" "4.1.2" }} />
12+
13+
---
14+
15+
<Doc::A11ySupport />

0 commit comments

Comments
 (0)