@hashicorp/design-system-components 3.2.0 → 3.4.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 +197 -119
- package/addon/components/hds/app-footer/legal-links.js +2 -1
- package/addon/components/hds/button/index.hbs +12 -12
- package/addon/components/hds/button/index.ts +10 -4
- package/addon/components/hds/dropdown/list-item/checkmark.hbs +3 -3
- package/addon/components/hds/dropdown/list-item/interactive.hbs +3 -3
- package/addon/components/hds/form/character-count/index.hbs +28 -0
- package/addon/components/hds/form/character-count/index.js +178 -0
- package/addon/components/hds/form/field/index.hbs +10 -0
- package/addon/components/hds/form/masked-input/field.hbs +1 -1
- package/addon/components/hds/form/text-input/field.hbs +1 -1
- package/addon/components/hds/form/textarea/field.hbs +1 -1
- package/addon/components/hds/link/standalone.hbs +8 -8
- package/addon/components/hds/table/index.js +2 -2
- package/addon/components/hds/tabs/panel.js +1 -1
- package/addon/components/hds/tabs/tab.js +1 -1
- package/app/components/hds/form/character-count/index.js +6 -0
- package/app/styles/components/app-footer.scss +2 -2
- package/app/styles/components/button.scss +13 -4
- package/app/styles/components/dropdown.scss +2 -0
- package/app/styles/components/form/character-count.scss +12 -0
- package/app/styles/components/form/field.scss +4 -0
- package/app/styles/components/form/group.scss +1 -1
- package/app/styles/components/form/index.scss +1 -0
- package/app/styles/components/link/standalone.scss +5 -0
- package/app/styles/components/table.scss +4 -0
- package/app/styles/components/tooltip.scss +2 -0
- package/package.json +2 -2
|
@@ -60,7 +60,8 @@ export default class HdsAppFooterLegalLinksComponent extends Component {
|
|
|
60
60
|
*/
|
|
61
61
|
get hrefForAccessibility() {
|
|
62
62
|
return (
|
|
63
|
-
this.args.hrefForAccessibility ??
|
|
63
|
+
this.args.hrefForAccessibility ??
|
|
64
|
+
'https://www.hashicorp.com/accessibility'
|
|
64
65
|
);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
aria-label={{if this.isIconOnly this.text null}}
|
|
17
17
|
>
|
|
18
18
|
{{#if this.isIconOnly}}
|
|
19
|
-
<
|
|
19
|
+
<span class="hds-button__icon">
|
|
20
20
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
21
|
-
</
|
|
21
|
+
</span>
|
|
22
22
|
{{else}}
|
|
23
23
|
{{#if this.icon}}
|
|
24
24
|
{{#if (eq this.iconPosition "leading")}}
|
|
25
|
-
<
|
|
25
|
+
<span class="hds-button__icon">
|
|
26
26
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
27
|
-
</
|
|
28
|
-
<
|
|
27
|
+
</span>
|
|
28
|
+
<span class="hds-button__text">
|
|
29
29
|
{{this.text}}
|
|
30
|
-
</
|
|
30
|
+
</span>
|
|
31
31
|
{{else}}
|
|
32
|
-
<
|
|
32
|
+
<span class="hds-button__text">
|
|
33
33
|
{{this.text}}
|
|
34
|
-
</
|
|
35
|
-
<
|
|
34
|
+
</span>
|
|
35
|
+
<span class="hds-button__icon">
|
|
36
36
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
37
|
-
</
|
|
37
|
+
</span>
|
|
38
38
|
{{/if}}
|
|
39
39
|
{{else}}
|
|
40
|
-
<
|
|
40
|
+
<span class="hds-button__text">
|
|
41
41
|
{{this.text}}
|
|
42
|
-
</
|
|
42
|
+
</span>
|
|
43
43
|
{{/if}}
|
|
44
44
|
{{/if}}
|
|
45
45
|
</Hds::Interactive>
|
|
@@ -26,6 +26,7 @@ export interface HdsButtonSignature {
|
|
|
26
26
|
icon?: string;
|
|
27
27
|
iconPosition?: HdsButtonIconPosition;
|
|
28
28
|
isIconOnly?: boolean;
|
|
29
|
+
isInline?: boolean;
|
|
29
30
|
isFullWidth?: boolean;
|
|
30
31
|
};
|
|
31
32
|
Element: HdsInteractiveSignature['Element'];
|
|
@@ -165,9 +166,6 @@ export default class HdsButtonIndexComponent extends Component<HdsButtonSignatur
|
|
|
165
166
|
get classNames() {
|
|
166
167
|
let classes = ['hds-button'];
|
|
167
168
|
|
|
168
|
-
// add a class based on the @size argument
|
|
169
|
-
classes.push(`hds-button--size-${this.size}`);
|
|
170
|
-
|
|
171
169
|
// add a class based on the @color argument
|
|
172
170
|
classes.push(`hds-button--color-${this.color}`);
|
|
173
171
|
|
|
@@ -176,11 +174,19 @@ export default class HdsButtonIndexComponent extends Component<HdsButtonSignatur
|
|
|
176
174
|
classes.push('hds-button--width-full');
|
|
177
175
|
}
|
|
178
176
|
|
|
179
|
-
// add a class
|
|
177
|
+
// add a class based on isIconOnly argument
|
|
180
178
|
if (this.isIconOnly) {
|
|
181
179
|
classes.push('hds-button--is-icon-only');
|
|
182
180
|
}
|
|
183
181
|
|
|
182
|
+
// add a class based on the @isInline argument
|
|
183
|
+
if (this.args.isInline) {
|
|
184
|
+
classes.push('hds-button--is-inline');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// add a class based on the @size argument
|
|
188
|
+
classes.push(`hds-button--size-${this.size}`);
|
|
189
|
+
|
|
184
190
|
return classes.join(' ');
|
|
185
191
|
}
|
|
186
192
|
}
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
aria-selected={{if @selected "true" "false"}}
|
|
21
21
|
>
|
|
22
22
|
{{#if @icon}}
|
|
23
|
-
<
|
|
23
|
+
<span class="hds-dropdown-list-item__interactive-icon">
|
|
24
24
|
<FlightIcon @name={{@icon}} @isInlineBlock={{false}} />
|
|
25
|
-
</
|
|
25
|
+
</span>
|
|
26
26
|
{{/if}}
|
|
27
|
-
<Hds::Text::Body @tag="
|
|
27
|
+
<Hds::Text::Body @tag="span" @size="200" @weight="medium" class="hds-dropdown-list-item__interactive-text">
|
|
28
28
|
{{yield}}
|
|
29
29
|
</Hds::Text::Body>
|
|
30
30
|
{{#if @count}}
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
...attributes
|
|
26
26
|
>
|
|
27
27
|
{{#if @icon}}
|
|
28
|
-
<
|
|
28
|
+
<span class="hds-dropdown-list-item__interactive-icon">
|
|
29
29
|
<FlightIcon @name={{@icon}} @isInlineBlock={{false}} />
|
|
30
|
-
</
|
|
30
|
+
</span>
|
|
31
31
|
{{/if}}
|
|
32
|
-
<Hds::Text::Body class="hds-dropdown-list-item__interactive-text" @tag="
|
|
32
|
+
<Hds::Text::Body class="hds-dropdown-list-item__interactive-text" @tag="span" @size="200" @weight="medium">
|
|
33
33
|
{{this.text}}
|
|
34
34
|
</Hds::Text::Body>
|
|
35
35
|
</Hds::Interactive>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
<Hds::Text::Body
|
|
6
|
+
@tag="div"
|
|
7
|
+
@size="100"
|
|
8
|
+
class={{this.classNames}}
|
|
9
|
+
id={{this.id}}
|
|
10
|
+
{{did-insert this.onInsert}}
|
|
11
|
+
{{will-destroy this.willDestroyNode}}
|
|
12
|
+
...attributes
|
|
13
|
+
aria-live="polite"
|
|
14
|
+
>
|
|
15
|
+
{{#if (has-block)}}
|
|
16
|
+
{{yield
|
|
17
|
+
(hash
|
|
18
|
+
minLength=this.minLength
|
|
19
|
+
maxLength=this.maxLength
|
|
20
|
+
currentLength=this.currentLength
|
|
21
|
+
remaining=this.remaining
|
|
22
|
+
shortfall=this.shortfall
|
|
23
|
+
)
|
|
24
|
+
}}
|
|
25
|
+
{{else}}
|
|
26
|
+
{{this.message}}
|
|
27
|
+
{{/if}}
|
|
28
|
+
</Hds::Text::Body>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { tracked } from '@glimmer/tracking';
|
|
8
|
+
import { action } from '@ember/object';
|
|
9
|
+
|
|
10
|
+
const ID_PREFIX = 'character-count-';
|
|
11
|
+
const NOOP = () => {};
|
|
12
|
+
|
|
13
|
+
export default class HdsFormCharacterCountIndexComponent extends Component {
|
|
14
|
+
// The current number of characters in the associated input
|
|
15
|
+
@tracked currentLength;
|
|
16
|
+
inputControl = document.getElementById(this.args.controlId);
|
|
17
|
+
|
|
18
|
+
// Inflector utility function to determine plural or singular for 'character' noun
|
|
19
|
+
pluralize(count, prefix = '', noun = 'character', suffix = 's') {
|
|
20
|
+
return `${count}${prefix ? ' ' + prefix : ''} ${noun}${
|
|
21
|
+
count !== 1 ? suffix : ''
|
|
22
|
+
}`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param maxLength
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @default null
|
|
29
|
+
* @description The maximum number of characters allowed.
|
|
30
|
+
*/
|
|
31
|
+
get maxLength() {
|
|
32
|
+
let { maxLength } = this.args;
|
|
33
|
+
return parseInt(maxLength);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param minLength
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @default null
|
|
40
|
+
* @description The minimum number of characters allowed.
|
|
41
|
+
*/
|
|
42
|
+
get minLength() {
|
|
43
|
+
let { minLength } = this.args;
|
|
44
|
+
return parseInt(minLength);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param remaining
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @default null
|
|
51
|
+
* @description The remaining number of characters.
|
|
52
|
+
*/
|
|
53
|
+
get remaining() {
|
|
54
|
+
return this.maxLength - this.currentLength;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @param shortfall
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @default null
|
|
61
|
+
* @description The number of characters the content is falling short of.
|
|
62
|
+
*/
|
|
63
|
+
get shortfall() {
|
|
64
|
+
return this.minLength - this.currentLength;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param message
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @default null
|
|
71
|
+
* @description The character count message presented to users
|
|
72
|
+
*/
|
|
73
|
+
get message() {
|
|
74
|
+
let messageText = '';
|
|
75
|
+
if (this.minLength && this.currentLength === 0) {
|
|
76
|
+
messageText = `${this.pluralize(this.minLength)} required`;
|
|
77
|
+
} else if (this.minLength && this.currentLength < this.minLength) {
|
|
78
|
+
messageText = `${this.pluralize(this.shortfall, 'more')} required`;
|
|
79
|
+
} else if (this.maxLength && this.currentLength === 0) {
|
|
80
|
+
messageText = `${this.pluralize(this.maxLength)} allowed`;
|
|
81
|
+
} else if (this.maxLength && this.currentLength <= this.maxLength) {
|
|
82
|
+
messageText = `${this.pluralize(this.remaining)} remaining`;
|
|
83
|
+
} else if (this.currentLength > this.maxLength) {
|
|
84
|
+
messageText = `Exceeded by ${this.pluralize(-this.remaining)}`;
|
|
85
|
+
} else {
|
|
86
|
+
messageText = `${this.pluralize(this.currentLength)} entered`;
|
|
87
|
+
}
|
|
88
|
+
return messageText;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Determines the unique ID to assign to the element
|
|
93
|
+
* @method id
|
|
94
|
+
* @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided
|
|
95
|
+
*/
|
|
96
|
+
get id() {
|
|
97
|
+
let { controlId } = this.args;
|
|
98
|
+
if (controlId) {
|
|
99
|
+
return `${ID_PREFIX}${controlId}`;
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @param onInsert
|
|
106
|
+
* @type {function}
|
|
107
|
+
* @default () => {}
|
|
108
|
+
*/
|
|
109
|
+
get onInsert() {
|
|
110
|
+
let { onInsert } = this.args;
|
|
111
|
+
|
|
112
|
+
if (!this.inputControl || this.inputControl.value === undefined) {
|
|
113
|
+
console.error(
|
|
114
|
+
'`Hds::Form::CharacterCount` component - `@controlId` selector provided does not point to a valid input element, check the id',
|
|
115
|
+
this.args.controlId
|
|
116
|
+
);
|
|
117
|
+
} else {
|
|
118
|
+
this.updateCurrentLength();
|
|
119
|
+
this.inputControl.addEventListener(
|
|
120
|
+
'input',
|
|
121
|
+
this.updateCurrentLength,
|
|
122
|
+
true
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// notice: this is a guard used to prevent triggering an error when the component is used as standalone element
|
|
127
|
+
if (typeof onInsert === 'function') {
|
|
128
|
+
return onInsert;
|
|
129
|
+
} else {
|
|
130
|
+
return NOOP;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@action
|
|
135
|
+
willDestroyNode() {
|
|
136
|
+
if (this.inputControl) {
|
|
137
|
+
this.inputControl.removeEventListener(
|
|
138
|
+
'input',
|
|
139
|
+
this.updateCurrentLength,
|
|
140
|
+
true
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@action
|
|
146
|
+
updateCurrentLength() {
|
|
147
|
+
this.currentLength = this.inputControl?.value?.length;
|
|
148
|
+
|
|
149
|
+
if (typeof this.args.onInput === 'function') {
|
|
150
|
+
this.args.onInput({
|
|
151
|
+
inputControl: this.inputControl,
|
|
152
|
+
currentLength: this.currentLength,
|
|
153
|
+
maxLength: this.maxLength,
|
|
154
|
+
minLength: this.minLength,
|
|
155
|
+
remaining: this.remaining,
|
|
156
|
+
shortfall: this.shortfall,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Get the class names to apply to the component.
|
|
163
|
+
* @method classNames
|
|
164
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
165
|
+
*/
|
|
166
|
+
get classNames() {
|
|
167
|
+
let classes = ['hds-form-character-count'];
|
|
168
|
+
|
|
169
|
+
// add a class based on the @contextualClass argument
|
|
170
|
+
// notice: this will *not* be documented for public use
|
|
171
|
+
// the reason for this is that the contextual component declarations don't pass attributes to the component
|
|
172
|
+
if (this.args.contextualClass) {
|
|
173
|
+
classes.push(this.args.contextualClass);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return classes.join(' ');
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
<div class="hds-form-field__control">
|
|
28
28
|
{{yield (hash Control=(component "hds/yield") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}
|
|
29
29
|
</div>
|
|
30
|
+
{{yield
|
|
31
|
+
(hash
|
|
32
|
+
CharacterCount=(component
|
|
33
|
+
"hds/form/character-count"
|
|
34
|
+
controlId=this.id
|
|
35
|
+
onInsert=this.appendDescriptor
|
|
36
|
+
contextualClass="hds-form-field__character-count"
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
}}
|
|
30
40
|
{{yield
|
|
31
41
|
(hash
|
|
32
42
|
Error=(component
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
14
|
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
-
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error CharacterCount=F.CharacterCount)}}
|
|
16
16
|
<F.Control>
|
|
17
17
|
<Hds::Form::MaskedInput::Base
|
|
18
18
|
@hasCopyButton={{@hasCopyButton}}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
14
|
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
-
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error CharacterCount=F.CharacterCount)}}
|
|
16
16
|
<F.Control>
|
|
17
17
|
<div class="hds-form-text-input__wrapper" {{style width=@width}}>
|
|
18
18
|
<Hds::Form::TextInput::Base
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
14
|
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
-
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error CharacterCount=F.CharacterCount)}}
|
|
16
16
|
<F.Control>
|
|
17
17
|
<Hds::Form::Textarea::Base
|
|
18
18
|
@value={{@value}}
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
...attributes
|
|
12
12
|
>
|
|
13
13
|
{{#if (eq this.iconPosition "leading")}}
|
|
14
|
-
<
|
|
14
|
+
<span class="hds-link-standalone__icon">
|
|
15
15
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
16
|
-
</
|
|
17
|
-
<
|
|
16
|
+
</span>
|
|
17
|
+
<span class="hds-link-standalone__text">
|
|
18
18
|
{{this.text}}
|
|
19
|
-
</
|
|
19
|
+
</span>
|
|
20
20
|
{{else}}
|
|
21
|
-
<
|
|
21
|
+
<span class="hds-link-standalone__text">
|
|
22
22
|
{{this.text}}
|
|
23
|
-
</
|
|
24
|
-
<
|
|
23
|
+
</span>
|
|
24
|
+
<span class="hds-link-standalone__icon">
|
|
25
25
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
26
|
-
</
|
|
26
|
+
</span>
|
|
27
27
|
{{/if}}
|
|
28
28
|
</Hds::Interactive>
|
|
@@ -10,7 +10,7 @@ import { assert } from '@ember/debug';
|
|
|
10
10
|
|
|
11
11
|
const DENSITIES = ['short', 'medium', 'tall'];
|
|
12
12
|
const DEFAULT_DENSITY = 'medium';
|
|
13
|
-
const VALIGNMENTS = ['top', 'middle'];
|
|
13
|
+
const VALIGNMENTS = ['top', 'middle', 'baseline'];
|
|
14
14
|
const DEFAULT_VALIGN = 'top';
|
|
15
15
|
|
|
16
16
|
export default class HdsTableIndexComponent extends Component {
|
|
@@ -116,7 +116,7 @@ export default class HdsTableIndexComponent extends Component {
|
|
|
116
116
|
* @param valign
|
|
117
117
|
* @type {string}
|
|
118
118
|
* @default 'top'
|
|
119
|
-
* @description Determines the vertical alignment of the table cells; options are: "top", "middle". If no valign is defined, "top" is used.
|
|
119
|
+
* @description Determines the vertical alignment of the table cells; options are: "top", "middle", "baseline". If no valign is defined, "top" is used.
|
|
120
120
|
*/
|
|
121
121
|
get valign() {
|
|
122
122
|
let { valign = DEFAULT_VALIGN } = this.args;
|
|
@@ -8,7 +8,7 @@ import { cached } from '@glimmer/tracking';
|
|
|
8
8
|
import { guidFor } from '@ember/object/internals';
|
|
9
9
|
import { action } from '@ember/object';
|
|
10
10
|
|
|
11
|
-
export default class
|
|
11
|
+
export default class HdsTabsPanelComponent extends Component {
|
|
12
12
|
/**
|
|
13
13
|
* Generate a unique ID for the Panel
|
|
14
14
|
* @return {string}
|
|
@@ -8,7 +8,7 @@ import { cached } from '@glimmer/tracking';
|
|
|
8
8
|
import { guidFor } from '@ember/object/internals';
|
|
9
9
|
import { action } from '@ember/object';
|
|
10
10
|
|
|
11
|
-
export default class
|
|
11
|
+
export default class HdsTabsTabComponent extends Component {
|
|
12
12
|
/**
|
|
13
13
|
* Generate a unique ID for the Tab
|
|
14
14
|
* @return {string}
|
|
@@ -14,7 +14,7 @@ $app-footer-icon-text-gap: 6px;
|
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-wrap: wrap;
|
|
16
16
|
gap: $app-footer-gap;
|
|
17
|
-
justify-content:
|
|
17
|
+
justify-content: center;
|
|
18
18
|
padding: 24px;
|
|
19
19
|
color: var(--app-footer-foreground-color);
|
|
20
20
|
border-top: 1px solid var(--app-footer-border-top-color);
|
|
@@ -31,7 +31,7 @@ $app-footer-icon-text-gap: 6px;
|
|
|
31
31
|
flex-wrap: wrap;
|
|
32
32
|
gap: $app-footer-gap;
|
|
33
33
|
align-items: center;
|
|
34
|
-
justify-content:
|
|
34
|
+
justify-content: center;
|
|
35
35
|
width: fit-content;
|
|
36
36
|
min-width: 0;
|
|
37
37
|
margin: 0;
|
|
@@ -62,16 +62,17 @@
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
.hds-button__icon {
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
|
|
65
69
|
.hds-button__text {
|
|
70
|
+
display: block;
|
|
66
71
|
flex: 1 0 0;
|
|
67
72
|
// <button> and <a> elements have different intrinsic text alignments, so we need to normalize it
|
|
68
73
|
text-align: center;
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
// SIZE
|
|
73
|
-
@include hds-button-size-classes("hds-button");
|
|
74
|
-
|
|
75
76
|
// COLORS & STATES
|
|
76
77
|
// Note: the order of the pseuo-selectors need to stay the way they are; it doesn't match the Figma file but it's the correct order for browsers to render the styles correctly.
|
|
77
78
|
|
|
@@ -91,6 +92,14 @@
|
|
|
91
92
|
@include hds-button-color-critical();
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
// SIZE
|
|
96
|
+
@include hds-button-size-classes("hds-button");
|
|
97
|
+
|
|
98
|
+
// ISINLINE
|
|
99
|
+
.hds-button--is-inline {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
}
|
|
102
|
+
|
|
94
103
|
|
|
95
104
|
// SPECIAL
|
|
96
105
|
|
|
@@ -409,11 +409,13 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
|
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
.hds-dropdown-list-item__interactive-icon {
|
|
412
|
+
display: block;
|
|
412
413
|
margin-top: 2px;
|
|
413
414
|
margin-right: 8px;
|
|
414
415
|
}
|
|
415
416
|
|
|
416
417
|
.hds-dropdown-list-item__interactive-text {
|
|
418
|
+
display: block;
|
|
417
419
|
flex: 1;
|
|
418
420
|
text-align: left; // the button element was centering text
|
|
419
421
|
}
|
|
@@ -31,7 +31,12 @@ $hds-link-standalone-border-width: 1px;
|
|
|
31
31
|
text-decoration-color: transparent;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.hds-link-standalone__icon {
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
.hds-link-standalone__text {
|
|
39
|
+
display: block;
|
|
35
40
|
flex: 1 0 0;
|
|
36
41
|
text-decoration: underline;
|
|
37
42
|
text-decoration-color: transparent;
|
|
@@ -150,6 +150,10 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
|
|
|
150
150
|
.hds-table--valign-middle & {
|
|
151
151
|
vertical-align: middle;
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
.hds-table--valign-baseline & {
|
|
155
|
+
vertical-align: baseline;
|
|
156
|
+
}
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
// TABLE CELL TEXT ALIGNMENT (LEFT IS DEFAULT)
|
|
@@ -79,6 +79,8 @@
|
|
|
79
79
|
// prevent this container from potentially inheriting other values
|
|
80
80
|
// such as `white-space: nowrap` that would cause content overflow
|
|
81
81
|
white-space: normal;
|
|
82
|
+
// we want to have the text always aligned to the left (by design
|
|
83
|
+
text-align: left;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
// works with Tippy's custom SVG arrow variation:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@ember/string": "^3.1.1",
|
|
45
45
|
"@ember/test-waiters": "^3.1.0",
|
|
46
46
|
"@hashicorp/design-system-tokens": "^1.9.0",
|
|
47
|
-
"@hashicorp/ember-flight-icons": "^4.0.
|
|
47
|
+
"@hashicorp/ember-flight-icons": "^4.0.5",
|
|
48
48
|
"dialog-polyfill": "^0.5.6",
|
|
49
49
|
"ember-a11y-refocus": "^3.0.2",
|
|
50
50
|
"ember-auto-import": "^2.6.3",
|