@hashicorp/design-system-components 2.9.0 → 2.11.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 +44 -0
- package/addon/components/hds/copy/button/index.js +1 -1
- package/addon/components/hds/copy/snippet/index.hbs +1 -1
- package/addon/components/hds/copy/snippet/index.js +1 -1
- package/addon/components/hds/form/file-input/base.hbs +6 -0
- package/addon/components/hds/form/file-input/field.hbs +24 -0
- package/addon/components/hds/form/indicator/index.hbs +1 -1
- package/addon/components/hds/form/masked-input/base.hbs +8 -0
- package/addon/components/hds/form/masked-input/base.js +14 -1
- package/addon/components/hds/form/masked-input/field.hbs +1 -0
- package/addon/components/hds/icon-tile/index.js +0 -1
- package/addon/components/hds/tabs/index.hbs +2 -0
- package/addon/components/hds/tabs/index.js +17 -1
- package/addon/components/hds/tabs/panel.hbs +1 -0
- package/addon/components/hds/tabs/panel.js +9 -0
- package/addon/components/hds/tabs/tab.hbs +1 -0
- package/addon/components/hds/tabs/tab.js +9 -0
- package/addon/components/hds/text/body.hbs +14 -0
- package/addon/components/hds/text/body.js +73 -0
- package/addon/components/hds/text/code.hbs +14 -0
- package/addon/components/hds/text/code.js +73 -0
- package/addon/components/hds/text/display.hbs +14 -0
- package/addon/components/hds/text/display.js +85 -0
- package/addon/components/hds/text/index.hbs +8 -0
- package/addon/components/hds/text/index.js +148 -0
- package/app/components/hds/form/file-input/base.js +6 -0
- package/app/components/hds/form/file-input/field.js +6 -0
- package/app/components/hds/text/body.js +6 -0
- package/app/components/hds/text/code.js +6 -0
- package/app/components/hds/text/display.js +6 -0
- package/app/components/hds/{copy → text}/index.js +1 -1
- package/app/styles/@hashicorp/design-system-components.scss +1 -0
- package/app/styles/components/alert.scss +5 -5
- package/app/styles/components/form/file-input.scss +94 -0
- package/app/styles/components/form/index.scss +1 -0
- package/app/styles/components/form/masked-input.scss +11 -0
- package/app/styles/components/segmented-group.scss +4 -4
- package/app/styles/components/table.scss +4 -0
- package/app/styles/components/text.scss +25 -0
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1490](https://github.com/hashicorp/design-system/pull/1490) [`4dafcb7d7`](https://github.com/hashicorp/design-system/commit/4dafcb7d7568027c495cb92d01026359a040507a) Thanks [@didoo](https://github.com/didoo)! - `Hds::Text` - Added new `Text` component
|
|
8
|
+
|
|
9
|
+
- [#1587](https://github.com/hashicorp/design-system/pull/1587) [`57e7a42cb`](https://github.com/hashicorp/design-system/commit/57e7a42cb8353af83d8be5be0a318f951b00d3e3) Thanks [@alex-ju](https://github.com/alex-ju)! - `Hds::Form::MaskedInput` - Add `hasCopyButton` argument
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#1577](https://github.com/hashicorp/design-system/pull/1577) [`8aa9a5889`](https://github.com/hashicorp/design-system/commit/8aa9a5889cf14fc28100a462dfd42754a3bdb42b) Thanks [@DingoEatingFuzz](https://github.com/DingoEatingFuzz)! - Remove aria-hidden from the "optional" span in Form::Indicator
|
|
14
|
+
|
|
15
|
+
- [#1606](https://github.com/hashicorp/design-system/pull/1606) [`7ac4526db`](https://github.com/hashicorp/design-system/commit/7ac4526dbddda6bea0e6e9f542addc5c97914fa8) Thanks [@Dhaulagiri](https://github.com/Dhaulagiri)! - Remove `ember-named-blocks-polyfill` as all consumers of HDS are on Ember 3.25 or later now. This can be installed locally if it is still needed.
|
|
16
|
+
|
|
17
|
+
- [#1576](https://github.com/hashicorp/design-system/pull/1576) [`e16c88ba9`](https://github.com/hashicorp/design-system/commit/e16c88ba959dcd0b186fd823fc3fccacf39674e8) Thanks [@KristinLBradley](https://github.com/KristinLBradley)! - `Alert`, `Toast`: Fixed an issue with anchor tag color styles within Description that had been overriding `Hds::Link` color; changed the default color for HTML links within Description to "neutral" to better align with existing guidance for links in the actions and improve accessible contrast.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies []:
|
|
20
|
+
- @hashicorp/ember-flight-icons@3.1.1
|
|
21
|
+
|
|
22
|
+
## 2.10.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- [#1535](https://github.com/hashicorp/design-system/pull/1535) [`2daa95479`](https://github.com/hashicorp/design-system/commit/2daa95479307fea0b94b2af413126d09525462c8) Thanks [@KristinLBradley](https://github.com/KristinLBradley)! - Add new `FileInput` component
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- [#1570](https://github.com/hashicorp/design-system/pull/1570) [`7bf297996`](https://github.com/hashicorp/design-system/commit/7bf297996e06a15cb2506bfb23f43d71ecc9b492) Thanks [@Dhaulagiri](https://github.com/Dhaulagiri)! - Remove unnecessary export of `hds/copy/index.js`
|
|
31
|
+
|
|
32
|
+
- [#1575](https://github.com/hashicorp/design-system/pull/1575) [`0362019ca`](https://github.com/hashicorp/design-system/commit/0362019ca043ef955364f18b23dbcd36f0bfb2bf) Thanks [@alex-ju](https://github.com/alex-ju)! - `Hds::Tabs` - Fix missing tab indicator when used in Modal or Flyout
|
|
33
|
+
|
|
34
|
+
- [#1567](https://github.com/hashicorp/design-system/pull/1567) [`384faeec2`](https://github.com/hashicorp/design-system/commit/384faeec244011f8090f3bcce0def89da1563164) Thanks [@MelSumner](https://github.com/MelSumner)! - Add support for container in Copy::Snippet and update API docs
|
|
35
|
+
|
|
36
|
+
- [#1571](https://github.com/hashicorp/design-system/pull/1571) [`8ad8a5908`](https://github.com/hashicorp/design-system/commit/8ad8a59080d0c0c855f2f746f0a10ddf4440e461) Thanks [@alex-ju](https://github.com/alex-ju)! - `Hds::Tabs` - Fix tabs and panels misbehaving on route change
|
|
37
|
+
|
|
38
|
+
- [#1568](https://github.com/hashicorp/design-system/pull/1568) [`dbe2e437d`](https://github.com/hashicorp/design-system/commit/dbe2e437d7d465cda3b69c7a28b01cbfb2849b79) Thanks [@MelSumner](https://github.com/MelSumner)! - Update error icon for copy components
|
|
39
|
+
|
|
40
|
+
- [#1555](https://github.com/hashicorp/design-system/pull/1555) [`90a615161`](https://github.com/hashicorp/design-system/commit/90a61516156ea58898febaa5bd66b31386256151) Thanks [@alex-ju](https://github.com/alex-ju)! - `Hds::SegmentedGroup` - prevent `border-radius` from interfering with underlying elements
|
|
41
|
+
|
|
42
|
+
- [#1565](https://github.com/hashicorp/design-system/pull/1565) [`60154db1a`](https://github.com/hashicorp/design-system/commit/60154db1a00f877b2c3bc4a9c4069556e8af809b) Thanks [@MelSumner](https://github.com/MelSumner)! - Resolved issue where ThSort was not supporting right-aligned text properly
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`8b8d6bcfa`](https://github.com/hashicorp/design-system/commit/8b8d6bcfa67efa5de1a2cc419167a962e747a8c9)]:
|
|
45
|
+
- @hashicorp/ember-flight-icons@3.1.0
|
|
46
|
+
|
|
3
47
|
## 2.9.0
|
|
4
48
|
|
|
5
49
|
### Minor Changes
|
|
@@ -12,7 +12,7 @@ export const DEFAULT_SIZE = 'medium';
|
|
|
12
12
|
export const SIZES = ['small', 'medium'];
|
|
13
13
|
export const DEFAULT_ICON = 'clipboard-copy';
|
|
14
14
|
export const SUCCESS_ICON = 'clipboard-checked';
|
|
15
|
-
export const ERROR_ICON = 'clipboard';
|
|
15
|
+
export const ERROR_ICON = 'clipboard-x';
|
|
16
16
|
export const DEFAULT_STATUS = 'idle';
|
|
17
17
|
|
|
18
18
|
export default class HdsCopyButtonComponent extends Component {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<button
|
|
6
6
|
type="button"
|
|
7
7
|
class={{this.classNames}}
|
|
8
|
-
{{clipboard text=@textToCopy onError=this.onError onSuccess=this.onSuccess}}
|
|
8
|
+
{{clipboard text=@textToCopy container=@container onError=this.onError onSuccess=this.onSuccess}}
|
|
9
9
|
...attributes
|
|
10
10
|
>
|
|
11
11
|
<span class="hds-copy-snippet__text hds-typography-code-100 {{if @isTruncated 'hds-copy-snippet__text--truncated'}}">
|
|
@@ -12,7 +12,7 @@ export const DEFAULT_COLOR = 'primary';
|
|
|
12
12
|
export const COLORS = ['primary', 'secondary'];
|
|
13
13
|
export const DEFAULT_ICON = 'clipboard-copy';
|
|
14
14
|
export const SUCCESS_ICON = 'clipboard-checked';
|
|
15
|
-
export const ERROR_ICON = 'clipboard';
|
|
15
|
+
export const ERROR_ICON = 'clipboard-x';
|
|
16
16
|
export const DEFAULT_STATUS = 'idle';
|
|
17
17
|
|
|
18
18
|
export default class HdsCopySnippetIndexComponent extends Component {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
<Hds::Form::Field
|
|
6
|
+
@layout="vertical"
|
|
7
|
+
@extraAriaDescribedBy={{@extraAriaDescribedBy}}
|
|
8
|
+
@isRequired={{@isRequired}}
|
|
9
|
+
@isOptional={{@isOptional}}
|
|
10
|
+
@id={{@id}}
|
|
11
|
+
as |F|
|
|
12
|
+
>
|
|
13
|
+
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
|
+
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
16
|
+
<F.Control>
|
|
17
|
+
<Hds::Form::FileInput::Base
|
|
18
|
+
required={{@isRequired}}
|
|
19
|
+
...attributes
|
|
20
|
+
id={{F.id}}
|
|
21
|
+
aria-describedby={{F.ariaDescribedBy}}
|
|
22
|
+
/>
|
|
23
|
+
</F.Control>
|
|
24
|
+
</Hds::Form::Field>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
SPDX-License-Identifier: MPL-2.0
|
|
4
4
|
}}
|
|
5
5
|
{{#if @isOptional}}
|
|
6
|
-
<span
|
|
6
|
+
<span class={{this.classNames}}>(Optional)</span>
|
|
7
7
|
{{/if}}
|
|
8
8
|
{{#if @isRequired}}
|
|
9
9
|
<Hds::Badge aria-hidden="true" class={{this.classNames}} @size="small" @color="neutral" @text="Required" />
|
|
@@ -31,4 +31,12 @@
|
|
|
31
31
|
<FlightIcon @name={{if this.isMasked "eye" "eye-off"}} @size="16" @isInlineBlock={{false}} />
|
|
32
32
|
<span class="sr-only" aria-live="polite">{{this.ariaMessageText}}</span>
|
|
33
33
|
</button>
|
|
34
|
+
{{#if @hasCopyButton}}
|
|
35
|
+
<Hds::Copy::Button
|
|
36
|
+
class="hds-form-masked-input__copy-button"
|
|
37
|
+
@text={{this.copyButtonText}}
|
|
38
|
+
@isIconOnly={{true}}
|
|
39
|
+
@textToCopy="{{@value}}"
|
|
40
|
+
/>
|
|
41
|
+
{{/if}}
|
|
34
42
|
</div>
|
|
@@ -41,7 +41,7 @@ export default class HdsFormMaskedInputBaseComponent extends Component {
|
|
|
41
41
|
/**
|
|
42
42
|
* @param ariaMessageText
|
|
43
43
|
* @type {string}
|
|
44
|
-
* @default ''
|
|
44
|
+
* @default 'Input content is now hidden'
|
|
45
45
|
*/
|
|
46
46
|
get ariaMessageText() {
|
|
47
47
|
if (this.args.ariaMessageText) {
|
|
@@ -53,6 +53,19 @@ export default class HdsFormMaskedInputBaseComponent extends Component {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* @param copyButtonText
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @default 'Copy masked content'
|
|
60
|
+
*/
|
|
61
|
+
get copyButtonText() {
|
|
62
|
+
if (this.args.copyButtonText) {
|
|
63
|
+
return this.args.copyButtonText;
|
|
64
|
+
} else {
|
|
65
|
+
return 'Copy masked content';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
56
69
|
/**
|
|
57
70
|
* Get the class names to apply to the component.
|
|
58
71
|
* @method classNames
|
|
@@ -133,7 +133,6 @@ export default class HdsIconTileIndexComponent extends Component {
|
|
|
133
133
|
get entity() {
|
|
134
134
|
let entity;
|
|
135
135
|
|
|
136
|
-
// TODO: discuss if we want these kind of tests
|
|
137
136
|
assert(
|
|
138
137
|
`you can't pass both @logo and @icon properties to the "Hds::IconTile" component`,
|
|
139
138
|
!(this.args.logo && this.args.icon)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
Tab=(component
|
|
12
12
|
"hds/tabs/tab"
|
|
13
13
|
didInsertNode=this.didInsertTab
|
|
14
|
+
willDestroyNode=this.willDestroyTab
|
|
14
15
|
tabIds=this.tabIds
|
|
15
16
|
panelIds=this.panelIds
|
|
16
17
|
selectedTabIndex=this.selectedTabIndex
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
Panel=(component
|
|
29
30
|
"hds/tabs/panel"
|
|
30
31
|
didInsertNode=this.didInsertPanel
|
|
32
|
+
willDestroyNode=this.willDestroyPanel
|
|
31
33
|
tabIds=this.tabIds
|
|
32
34
|
panelIds=this.panelIds
|
|
33
35
|
selectedTabIndex=this.selectedTabIndex
|
|
@@ -7,6 +7,7 @@ import Component from '@glimmer/component';
|
|
|
7
7
|
import { tracked } from '@glimmer/tracking';
|
|
8
8
|
import { action } from '@ember/object';
|
|
9
9
|
import { assert } from '@ember/debug';
|
|
10
|
+
import { schedule } from '@ember/runloop';
|
|
10
11
|
|
|
11
12
|
export default class HdsTabsIndexComponent extends Component {
|
|
12
13
|
@tracked tabNodes = [];
|
|
@@ -28,7 +29,10 @@ export default class HdsTabsIndexComponent extends Component {
|
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
this.selectedTabIndex = initialTabIndex;
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
schedule('afterRender', () => {
|
|
34
|
+
this.setTabIndicator(initialTabIndex);
|
|
35
|
+
});
|
|
32
36
|
|
|
33
37
|
assert('Only one tab may use isSelected argument', selectedCount <= 1);
|
|
34
38
|
|
|
@@ -44,12 +48,24 @@ export default class HdsTabsIndexComponent extends Component {
|
|
|
44
48
|
this.tabIds = [...this.tabIds, element.id];
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
@action
|
|
52
|
+
willDestroyTab(element) {
|
|
53
|
+
this.tabNodes = this.tabNodes.filter((node) => node.id !== element.id);
|
|
54
|
+
this.tabIds = this.tabIds.filter((tabId) => tabId !== element.id);
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
@action
|
|
48
58
|
didInsertPanel(panelId, element) {
|
|
49
59
|
this.panelNodes = [...this.panelNodes, element];
|
|
50
60
|
this.panelIds = [...this.panelIds, panelId];
|
|
51
61
|
}
|
|
52
62
|
|
|
63
|
+
@action
|
|
64
|
+
willDestroyPanel(element) {
|
|
65
|
+
this.panelNodes = this.panelNodes.filter((node) => node.id !== element.id);
|
|
66
|
+
this.panelIds = this.panelIds.filter((panelId) => panelId !== element.id);
|
|
67
|
+
}
|
|
68
|
+
|
|
53
69
|
@action
|
|
54
70
|
onClick(tabIndex, event) {
|
|
55
71
|
this.selectedTabIndex = tabIndex;
|
|
@@ -42,4 +42,13 @@ export default class HdsTabsIndexComponent extends Component {
|
|
|
42
42
|
didInsertNode(this.elementId, ...arguments);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
@action
|
|
47
|
+
willDestroyNode() {
|
|
48
|
+
let { willDestroyNode } = this.args;
|
|
49
|
+
|
|
50
|
+
if (typeof willDestroyNode === 'function') {
|
|
51
|
+
willDestroyNode(...arguments);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
45
54
|
}
|
|
@@ -54,6 +54,15 @@ export default class HdsTabsIndexComponent extends Component {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
@action
|
|
58
|
+
willDestroyNode() {
|
|
59
|
+
let { willDestroyNode } = this.args;
|
|
60
|
+
|
|
61
|
+
if (typeof willDestroyNode === 'function') {
|
|
62
|
+
willDestroyNode(...arguments);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
57
66
|
@action
|
|
58
67
|
onClick() {
|
|
59
68
|
let { onClick } = this.args;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
6
|
+
<Hds::Text
|
|
7
|
+
@group="body"
|
|
8
|
+
@size={{this.size}}
|
|
9
|
+
@weight={{this.weight}}
|
|
10
|
+
@align={{@align}}
|
|
11
|
+
@color={{@color}}
|
|
12
|
+
@tag={{@tag}}
|
|
13
|
+
...attributes
|
|
14
|
+
>{{yield}}</Hds::Text>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { assert } from '@ember/debug';
|
|
8
|
+
|
|
9
|
+
// notice: only some combinations of size + font-weight are allowed (per design specs)
|
|
10
|
+
// see: https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/HDS-Product---Foundations?node-id=1262%3A9192
|
|
11
|
+
|
|
12
|
+
export const DEFAULT_SIZE = '200';
|
|
13
|
+
export const AVAILABLE_SIZES = [300, 200, 100];
|
|
14
|
+
|
|
15
|
+
export const DEFAULT_WEIGHT = 'regular';
|
|
16
|
+
export const AVAILABLE_WEIGHTS_PER_SIZE = {
|
|
17
|
+
300: ['regular', 'medium', 'semibold'],
|
|
18
|
+
200: ['regular', 'medium', 'semibold'],
|
|
19
|
+
100: ['regular', 'medium', 'semibold'],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default class HdsTextBodyComponent extends Component {
|
|
23
|
+
/**
|
|
24
|
+
* Sets the "size" for the text
|
|
25
|
+
* Accepted values: see AVAILABLE_SIZES
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
*
|
|
29
|
+
* @param size
|
|
30
|
+
*/
|
|
31
|
+
get size() {
|
|
32
|
+
let { size = DEFAULT_SIZE } = this.args;
|
|
33
|
+
|
|
34
|
+
// let's be a bit forgiving with the consumers
|
|
35
|
+
if (typeof size === 'string') {
|
|
36
|
+
size = parseInt(size, 10);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
assert(
|
|
40
|
+
`@size for "Hds::Text::Body" must be one of the following: ${AVAILABLE_SIZES.join(
|
|
41
|
+
', '
|
|
42
|
+
)}; received: ${size}`,
|
|
43
|
+
AVAILABLE_SIZES.includes(size)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
return size;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Sets the "weight" for the text
|
|
51
|
+
* Accepted values: see AVAILABLE_WEIGHTS_PER_SIZE
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
*
|
|
55
|
+
* @param variant
|
|
56
|
+
*/
|
|
57
|
+
get weight() {
|
|
58
|
+
let { weight = DEFAULT_WEIGHT } = this.args;
|
|
59
|
+
|
|
60
|
+
const availableWeights = AVAILABLE_WEIGHTS_PER_SIZE[this.size];
|
|
61
|
+
|
|
62
|
+
assert(
|
|
63
|
+
`@weight for "Hds::Text::Body" with @size=${
|
|
64
|
+
this.size
|
|
65
|
+
} must be one of the following: ${availableWeights.join(
|
|
66
|
+
', '
|
|
67
|
+
)}; received: ${weight}`,
|
|
68
|
+
availableWeights.includes(weight)
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return weight;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
6
|
+
<Hds::Text
|
|
7
|
+
@group="code"
|
|
8
|
+
@size={{this.size}}
|
|
9
|
+
@weight={{this.weight}}
|
|
10
|
+
@align={{@align}}
|
|
11
|
+
@color={{@color}}
|
|
12
|
+
@tag={{@tag}}
|
|
13
|
+
...attributes
|
|
14
|
+
>{{yield}}</Hds::Text>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { assert } from '@ember/debug';
|
|
8
|
+
|
|
9
|
+
// notice: only some combinations of size + font-weight are allowed (per design specs)
|
|
10
|
+
// see: https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/HDS-Product---Foundations?node-id=1262%3A9192
|
|
11
|
+
|
|
12
|
+
export const DEFAULT_SIZE = '200';
|
|
13
|
+
export const AVAILABLE_SIZES = [300, 200, 100];
|
|
14
|
+
|
|
15
|
+
export const DEFAULT_WEIGHT = 'regular';
|
|
16
|
+
export const AVAILABLE_WEIGHTS_PER_SIZE = {
|
|
17
|
+
300: ['regular', 'bold'],
|
|
18
|
+
200: ['regular', 'bold'],
|
|
19
|
+
100: ['regular', 'bold'],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default class HdsTextCodeComponent extends Component {
|
|
23
|
+
/**
|
|
24
|
+
* Sets the "size" for the text
|
|
25
|
+
* Accepted values: see AVAILABLE_SIZES
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
*
|
|
29
|
+
* @param size
|
|
30
|
+
*/
|
|
31
|
+
get size() {
|
|
32
|
+
let { size = DEFAULT_SIZE } = this.args;
|
|
33
|
+
|
|
34
|
+
// let's be a bit forgiving with the consumers
|
|
35
|
+
if (typeof size === 'string') {
|
|
36
|
+
size = parseInt(size, 10);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
assert(
|
|
40
|
+
`@size for "Hds::Text::Code" must be one of the following: ${AVAILABLE_SIZES.join(
|
|
41
|
+
', '
|
|
42
|
+
)}; received: ${size}`,
|
|
43
|
+
AVAILABLE_SIZES.includes(size)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
return size;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Sets the "weight" for the text
|
|
51
|
+
* Accepted values: see AVAILABLE_WEIGHTS_PER_SIZE
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
*
|
|
55
|
+
* @param variant
|
|
56
|
+
*/
|
|
57
|
+
get weight() {
|
|
58
|
+
let { weight = DEFAULT_WEIGHT } = this.args;
|
|
59
|
+
|
|
60
|
+
const availableWeights = AVAILABLE_WEIGHTS_PER_SIZE[this.size];
|
|
61
|
+
|
|
62
|
+
assert(
|
|
63
|
+
`@weight for "Hds::Text::Code" with @size=${
|
|
64
|
+
this.size
|
|
65
|
+
} must be one of the following: ${availableWeights.join(
|
|
66
|
+
', '
|
|
67
|
+
)}; received: ${weight}`,
|
|
68
|
+
availableWeights.includes(weight)
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return weight;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
6
|
+
<Hds::Text
|
|
7
|
+
@group="display"
|
|
8
|
+
@size={{this.size}}
|
|
9
|
+
@weight={{this.weight}}
|
|
10
|
+
@align={{@align}}
|
|
11
|
+
@color={{@color}}
|
|
12
|
+
@tag={{@tag}}
|
|
13
|
+
...attributes
|
|
14
|
+
>{{yield}}</Hds::Text>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { assert } from '@ember/debug';
|
|
8
|
+
|
|
9
|
+
// notice: only some combinations of size + font-weight are allowed (per design specs)
|
|
10
|
+
// see: https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/HDS-Product---Foundations?node-id=1262%3A9192
|
|
11
|
+
|
|
12
|
+
export const DEFAULT_SIZE = '200';
|
|
13
|
+
export const AVAILABLE_SIZES = [500, 400, 300, 200, 100];
|
|
14
|
+
|
|
15
|
+
export const DEFAULT_WEIGHTS_PER_SIZE = {
|
|
16
|
+
500: ['bold'],
|
|
17
|
+
400: ['semibold'],
|
|
18
|
+
300: ['semibold'],
|
|
19
|
+
200: ['semibold'],
|
|
20
|
+
100: ['medium'],
|
|
21
|
+
};
|
|
22
|
+
export const AVAILABLE_WEIGHTS_PER_SIZE = {
|
|
23
|
+
500: ['bold'],
|
|
24
|
+
400: ['medium', 'semibold', 'bold'],
|
|
25
|
+
300: ['medium', 'semibold', 'bold'],
|
|
26
|
+
200: ['semibold'],
|
|
27
|
+
100: ['medium'],
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default class HdsTextDisplayComponent extends Component {
|
|
31
|
+
/**
|
|
32
|
+
* Sets the "size" for the text
|
|
33
|
+
* Accepted values: see AVAILABLE_SIZES
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
*
|
|
37
|
+
* @param size
|
|
38
|
+
*/
|
|
39
|
+
get size() {
|
|
40
|
+
let { size = DEFAULT_SIZE } = this.args;
|
|
41
|
+
|
|
42
|
+
// let's be a bit forgiving with the consumers
|
|
43
|
+
if (typeof size === 'string') {
|
|
44
|
+
size = parseInt(size, 10);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
assert(
|
|
48
|
+
`@size for "Hds::Text::Display" must be one of the following: ${AVAILABLE_SIZES.join(
|
|
49
|
+
', '
|
|
50
|
+
)}; received: ${size}`,
|
|
51
|
+
AVAILABLE_SIZES.includes(size)
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return size;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Sets the "weight" for the text
|
|
59
|
+
* Accepted values: see AVAILABLE_WEIGHTS_PER_SIZE
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
*
|
|
63
|
+
* @param variant
|
|
64
|
+
*/
|
|
65
|
+
get weight() {
|
|
66
|
+
let { weight } = this.args;
|
|
67
|
+
|
|
68
|
+
if (weight) {
|
|
69
|
+
const availableWeights = AVAILABLE_WEIGHTS_PER_SIZE[this.size];
|
|
70
|
+
assert(
|
|
71
|
+
`@weight for "Hds::Text::Display" with @size=${
|
|
72
|
+
this.size
|
|
73
|
+
} must be one of the following: ${availableWeights.join(
|
|
74
|
+
', '
|
|
75
|
+
)}; received: ${weight}`,
|
|
76
|
+
availableWeights.includes(weight)
|
|
77
|
+
);
|
|
78
|
+
} else {
|
|
79
|
+
// use the default (first item in the array)
|
|
80
|
+
weight = DEFAULT_WEIGHTS_PER_SIZE[this.size];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return weight;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { assert } from '@ember/debug';
|
|
8
|
+
|
|
9
|
+
export const AVAILABLE_ALIGNS = ['left', 'center', 'right'];
|
|
10
|
+
|
|
11
|
+
export const AVAILABLE_COLORS = [
|
|
12
|
+
'primary',
|
|
13
|
+
'strong',
|
|
14
|
+
'faint',
|
|
15
|
+
'disabled',
|
|
16
|
+
'high-contrast',
|
|
17
|
+
'action',
|
|
18
|
+
'action-hover',
|
|
19
|
+
'action-active',
|
|
20
|
+
'highlight',
|
|
21
|
+
'highlight-on-surface',
|
|
22
|
+
'highlight-high-contrast',
|
|
23
|
+
'success',
|
|
24
|
+
'success-on-surface',
|
|
25
|
+
'success-high-contrast',
|
|
26
|
+
'warning',
|
|
27
|
+
'warning-on-surface',
|
|
28
|
+
'warning-high-contrast',
|
|
29
|
+
'critical',
|
|
30
|
+
'critical-on-surface',
|
|
31
|
+
'critical-high-contrast',
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export default class HdsTextIndexComponent extends Component {
|
|
35
|
+
/**
|
|
36
|
+
* Get a tag to render based on the `@tag` argument passed or the value of `this.size` (via mapping)
|
|
37
|
+
*
|
|
38
|
+
* @method #componentTag
|
|
39
|
+
* @return {string} The html tag to use in the dynamic render of the component
|
|
40
|
+
*/
|
|
41
|
+
get componentTag() {
|
|
42
|
+
let { tag = 'span' } = this.args;
|
|
43
|
+
|
|
44
|
+
return tag;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Sets the "variant" (style) for the text
|
|
49
|
+
* Accepted values: see AVAILABLE_VARIANTS
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
*
|
|
53
|
+
* @param variant
|
|
54
|
+
*/
|
|
55
|
+
get variant() {
|
|
56
|
+
let { group, size } = this.args;
|
|
57
|
+
|
|
58
|
+
// notice: for performance reasons we don't do any other extra check on these values
|
|
59
|
+
// we assume they've already been validated by the "parent" components
|
|
60
|
+
return `${group}-${size}`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets the alignment of the text
|
|
65
|
+
* Accepted values: see AVAILABLE_ALIGNS
|
|
66
|
+
*
|
|
67
|
+
* @param align
|
|
68
|
+
* @type {string}
|
|
69
|
+
*/
|
|
70
|
+
get align() {
|
|
71
|
+
let { align } = this.args;
|
|
72
|
+
|
|
73
|
+
if (align) {
|
|
74
|
+
assert(
|
|
75
|
+
`@align for "Hds::Text" must be one of the following: ${AVAILABLE_ALIGNS.join(
|
|
76
|
+
', '
|
|
77
|
+
)}; received: ${align}`,
|
|
78
|
+
AVAILABLE_ALIGNS.includes(align)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return align;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Sets the color of the text as pre-defined value
|
|
87
|
+
* Accepted values: see AVAILABLE_COLORS
|
|
88
|
+
*
|
|
89
|
+
* @param color
|
|
90
|
+
* @type {string}
|
|
91
|
+
*/
|
|
92
|
+
get predefinedColor() {
|
|
93
|
+
let { color } = this.args;
|
|
94
|
+
|
|
95
|
+
console.log(color, AVAILABLE_COLORS.includes(color));
|
|
96
|
+
|
|
97
|
+
if (AVAILABLE_COLORS.includes(color)) {
|
|
98
|
+
return color;
|
|
99
|
+
} else {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Sets the color of the text as custom value (via inline style)
|
|
106
|
+
*
|
|
107
|
+
* @param color
|
|
108
|
+
* @type {string}
|
|
109
|
+
*/
|
|
110
|
+
get customColor() {
|
|
111
|
+
let { color } = this.args;
|
|
112
|
+
|
|
113
|
+
if (!AVAILABLE_COLORS.includes(color)) {
|
|
114
|
+
return color;
|
|
115
|
+
} else {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Get the class names to apply to the component.
|
|
122
|
+
* @method #classNames
|
|
123
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
124
|
+
*/
|
|
125
|
+
get classNames() {
|
|
126
|
+
let classes = ['hds-text'];
|
|
127
|
+
|
|
128
|
+
// add a (helper) class based on the "group + size" variant
|
|
129
|
+
classes.push(`hds-typography-${this.variant}`);
|
|
130
|
+
|
|
131
|
+
// add a (helper) class based on the @weight argument
|
|
132
|
+
if (this.args.weight) {
|
|
133
|
+
classes.push(`hds-font-weight-${this.args.weight}`);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// add a class based on the @align argument
|
|
137
|
+
if (this.align) {
|
|
138
|
+
classes.push(`hds-text--align-${this.align}`);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// add a (helper) class based on the @color argument (if pre-defined)
|
|
142
|
+
if (this.predefinedColor) {
|
|
143
|
+
classes.push(`hds-foreground-${this.predefinedColor}`);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return classes.join(' ');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
border-radius: 5px;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
//
|
|
67
|
-
a {
|
|
68
|
-
color: var(--token-color-foreground-
|
|
66
|
+
// Default styling for bare HTML links not using HDS::Link components
|
|
67
|
+
a:not([class*="hds-"]) {
|
|
68
|
+
color: var(--token-color-foreground-strong);
|
|
69
69
|
|
|
70
70
|
&:focus,
|
|
71
71
|
&:focus-visible {
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
&:hover {
|
|
78
|
-
color: var(--token-color-foreground-
|
|
78
|
+
color: var(--token-color-foreground-primary);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
&:active {
|
|
82
|
-
color: var(--token-color-foreground-
|
|
82
|
+
color: var(--token-color-foreground-faint);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
// FORM > FILE-INPUT
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
@use "../../mixins/button" as *;
|
|
11
|
+
|
|
12
|
+
.hds-form-file-input {
|
|
13
|
+
margin: -4px 0 -4px -4px; // offset shadow padding + default 1px spacing
|
|
14
|
+
padding: 3px 0 3px 3px; // add padding so button shadow is visible
|
|
15
|
+
color: var(--token-color-foreground-primary);
|
|
16
|
+
|
|
17
|
+
&:focus,
|
|
18
|
+
&:focus-visible {
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/::file-selector-button
|
|
24
|
+
// https://caniuse.com/?search=file-selector-button
|
|
25
|
+
|
|
26
|
+
// Button
|
|
27
|
+
.hds-form-file-input::file-selector-button {
|
|
28
|
+
min-height: 36px;
|
|
29
|
+
margin-right: 16px;
|
|
30
|
+
padding: 7px 16px 7px 37px; // padding in code altered to match Figma visual design
|
|
31
|
+
color: var(--token-color-foreground-primary);
|
|
32
|
+
font: inherit;
|
|
33
|
+
background-color: var(--token-color-surface-faint);
|
|
34
|
+
// upload icon
|
|
35
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cg fill='%233b3d45'%3E%3Cpath d='M4.24 5.8a.75.75 0 001.06-.04l1.95-2.1v6.59a.75.75 0 001.5 0V3.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.101.001L4.2 4.74a.75.75 0 00.04 1.06z'/%3E%3Cpath d='M1.75 9a.75.75 0 01.75.75v3c0 .414.336.75.75.75h9.5a.75.75 0 00.75-.75v-3a.75.75 0 011.5 0v3A2.25 2.25 0 0112.75 15h-9.5A2.25 2.25 0 011 12.75v-3A.75.75 0 011.75 9z'/%3E%3C/g%3E%3C/svg%3E");
|
|
36
|
+
background-repeat: no-repeat;
|
|
37
|
+
background-position: 15px 50%;
|
|
38
|
+
background-size: var(--token-form-text-input-background-image-size);
|
|
39
|
+
border: $hds-button-border-width solid var(--token-color-border-strong);
|
|
40
|
+
border-radius: $hds-button-border-radius;
|
|
41
|
+
box-shadow: var(--token-elevation-low-box-shadow);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Button states
|
|
46
|
+
.hds-form-file-input::file-selector-button:hover,
|
|
47
|
+
.hds-form-file-input.mock-hover::file-selector-button {
|
|
48
|
+
color: var(--token-color-foreground-primary);
|
|
49
|
+
background-color: var(--token-color-surface-primary);
|
|
50
|
+
border-color: var(--token-color-border-strong);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.hds-form-file-input:focus-within::file-selector-button,
|
|
54
|
+
.hds-form-file-input.mock-focus::file-selector-button {
|
|
55
|
+
color: var(--token-color-foreground-primary);
|
|
56
|
+
background-color: var(--token-color-surface-faint);
|
|
57
|
+
border-color: var(--token-color-focus-action-internal);
|
|
58
|
+
outline: 3px solid var(--token-color-focus-action-external);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Fix issue with button focus style which was displaying after button was activated
|
|
62
|
+
.hds-form-file-input:not(:focus, .mock-focus) {
|
|
63
|
+
&::file-selector-button {
|
|
64
|
+
border-color: var(--token-color-border-strong);
|
|
65
|
+
outline: 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.hds-form-file-input::file-selector-button:active,
|
|
70
|
+
.hds-form-file-input.mock-active::file-selector-button {
|
|
71
|
+
color: var(--token-color-foreground-primary);
|
|
72
|
+
background-color: var(--token-color-surface-interactive-active);
|
|
73
|
+
border-color: var(--token-color-border-strong);
|
|
74
|
+
box-shadow: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hds-form-file-input {
|
|
78
|
+
&:disabled,
|
|
79
|
+
&[disabled],
|
|
80
|
+
&.mock-disabled,
|
|
81
|
+
&:disabled:focus,
|
|
82
|
+
&[disabled]:focus,
|
|
83
|
+
&.mock-disabled:focus,
|
|
84
|
+
&:disabled:hover,
|
|
85
|
+
&[disabled]:hover,
|
|
86
|
+
&.mock-disabled:hover {
|
|
87
|
+
color: var(--token-color-foreground-disabled);
|
|
88
|
+
|
|
89
|
+
&::file-selector-button {
|
|
90
|
+
@include hds-button-state-disabled();
|
|
91
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cg fill='%238c909c'%3E%3Cpath d='M4.24 5.8a.75.75 0 001.06-.04l1.95-2.1v6.59a.75.75 0 001.5 0V3.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.101.001L4.2 4.74a.75.75 0 00.04 1.06z'/%3E%3Cpath d='M1.75 9a.75.75 0 01.75.75v3c0 .414.336.75.75.75h9.5a.75.75 0 00.75-.75v-3a.75.75 0 011.5 0v3A2.25 2.25 0 0112.75 15h-9.5A2.25 2.25 0 011 12.75v-3A.75.75 0 011.75 9z'/%3E%3C/g%3E%3C/svg%3E");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -11,9 +11,13 @@ $hds-form-masked-input-button-size: 24px;
|
|
|
11
11
|
|
|
12
12
|
.hds-form-masked-input {
|
|
13
13
|
position: relative;
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-areas: "input copy-button";
|
|
16
|
+
grid-template-columns: 1fr auto;
|
|
14
17
|
width: 100%;
|
|
15
18
|
|
|
16
19
|
.hds-form-masked-input__control {
|
|
20
|
+
grid-area: input;
|
|
17
21
|
padding-right: calc(var(--token-form-control-padding) + $hds-form-masked-input-button-size);
|
|
18
22
|
}
|
|
19
23
|
}
|
|
@@ -36,6 +40,7 @@ $hds-form-masked-input-button-size: 24px;
|
|
|
36
40
|
position: absolute;
|
|
37
41
|
top: calc(var(--token-form-control-padding) - var(--token-form-control-border-width));
|
|
38
42
|
right: calc(var(--token-form-control-padding) - var(--token-form-control-border-width));
|
|
43
|
+
grid-area: input;
|
|
39
44
|
width: $hds-form-masked-input-button-size;
|
|
40
45
|
height: $hds-form-masked-input-button-size;
|
|
41
46
|
padding: 2px;
|
|
@@ -44,3 +49,9 @@ $hds-form-masked-input-button-size: 24px;
|
|
|
44
49
|
border-color: transparent;
|
|
45
50
|
cursor: pointer;
|
|
46
51
|
}
|
|
52
|
+
|
|
53
|
+
.hds-form-masked-input__copy-button {
|
|
54
|
+
grid-area: copy-button;
|
|
55
|
+
align-self: flex-start;
|
|
56
|
+
margin-left: 8px;
|
|
57
|
+
}
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
.hds-segmented-group {
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
|
|
13
|
-
.hds-button,
|
|
14
|
-
.hds-dropdown,
|
|
15
|
-
.hds-form-select,
|
|
16
|
-
.hds-form-text-input {
|
|
13
|
+
> .hds-button,
|
|
14
|
+
> .hds-dropdown,
|
|
15
|
+
> .hds-form-select,
|
|
16
|
+
> .hds-form-text-input {
|
|
17
17
|
&:first-child {
|
|
18
18
|
border-top-right-radius: 0;
|
|
19
19
|
border-bottom-right-radius: 0;
|
|
@@ -159,6 +159,10 @@ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to a
|
|
|
159
159
|
text-align: right;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
.hds-table__th-sort--text-right .hds-table__th-sort--button-content {
|
|
163
|
+
justify-content: flex-end;
|
|
164
|
+
}
|
|
165
|
+
|
|
162
166
|
.hds-table__th-sort--text-center,
|
|
163
167
|
.hds-table__th--text-center,
|
|
164
168
|
.hds-table__td--text-center {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
// TEXT
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
// .hds-text {}
|
|
11
|
+
|
|
12
|
+
// ALIGNMENT
|
|
13
|
+
|
|
14
|
+
.hds-text--align-left {
|
|
15
|
+
text-align: left;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hds-text--align-center {
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hds-text--align-right {
|
|
23
|
+
text-align: right;
|
|
24
|
+
}
|
|
25
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@ember/render-modifiers": "^2.0.5",
|
|
43
43
|
"@ember/test-waiters": "^3.0.2",
|
|
44
44
|
"@hashicorp/design-system-tokens": "^1.7.0",
|
|
45
|
-
"@hashicorp/ember-flight-icons": "^3.
|
|
45
|
+
"@hashicorp/ember-flight-icons": "^3.1.1",
|
|
46
46
|
"dialog-polyfill": "^0.5.6",
|
|
47
47
|
"ember-a11y-refocus": "^3.0.2",
|
|
48
48
|
"ember-auto-import": "^2.6.3",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"ember-composable-helpers": "^4.5.0",
|
|
55
55
|
"ember-focus-trap": "^1.0.2",
|
|
56
56
|
"ember-keyboard": "^8.2.0",
|
|
57
|
-
"ember-named-blocks-polyfill": "^0.2.5",
|
|
58
57
|
"ember-stargate": "^0.4.3",
|
|
59
58
|
"ember-style-modifier": "^3.0.1",
|
|
60
59
|
"ember-truth-helpers": "^3.1.1",
|