@hashicorp/design-system-components 2.0.0 → 2.2.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 +72 -20
- package/HOW-TO-TEST-A-COMPONENT-IN-CLOUD-UI.md +28 -3
- package/addon/components/hds/app-frame/index.hbs +24 -0
- package/addon/components/hds/app-frame/index.js +52 -0
- package/addon/components/hds/app-frame/parts/footer.hbs +7 -0
- package/addon/components/hds/{empty-state → app-frame/parts}/header.hbs +2 -2
- package/addon/components/hds/{empty-state/body.hbs → app-frame/parts/main.hbs} +2 -2
- package/addon/components/hds/app-frame/parts/modals.hbs +6 -0
- package/addon/components/hds/{empty-state/footer.hbs → app-frame/parts/sidebar.hbs} +2 -2
- package/addon/components/hds/application-state/body.hbs +13 -0
- package/addon/components/hds/application-state/footer.hbs +7 -0
- package/addon/components/hds/application-state/footer.js +35 -0
- package/addon/components/hds/application-state/header.hbs +20 -0
- package/addon/components/hds/application-state/index.hbs +13 -0
- package/addon/components/hds/dropdown/footer.hbs +5 -0
- package/addon/components/hds/dropdown/header.hbs +5 -0
- package/addon/components/hds/dropdown/index.hbs +2 -2
- package/addon/components/hds/dropdown/index.js +18 -2
- package/addon/components/hds/dropdown/list-item/checkbox.hbs +5 -0
- package/addon/components/hds/dropdown/list-item/checkbox.js +5 -0
- package/addon/components/hds/dropdown/list-item/checkmark.hbs +5 -0
- package/addon/components/hds/dropdown/list-item/checkmark.js +5 -0
- package/addon/components/hds/dropdown/list-item/radio.hbs +5 -0
- package/addon/components/hds/dropdown/list-item/radio.js +5 -0
- package/addon/components/hds/dropdown/toggle/chevron.hbs +5 -0
- package/addon/components/hds/flyout/footer.hbs +7 -0
- package/addon/components/hds/flyout/index.hbs +1 -0
- package/addon/components/hds/side-nav/base.hbs +14 -0
- package/addon/components/hds/side-nav/{home-link.js → header/home-link.js} +2 -2
- package/addon/components/hds/side-nav/{icon-button.hbs → header/icon-button.hbs} +1 -1
- package/addon/components/hds/side-nav/{icon-button.js → header/icon-button.js} +2 -2
- package/addon/components/hds/side-nav/{header.hbs → header/index.hbs} +2 -2
- package/addon/components/hds/side-nav/index.hbs +40 -0
- package/addon/components/hds/side-nav/index.js +107 -0
- package/addon/components/hds/side-nav/list/index.hbs +2 -0
- package/addon/components/hds/side-nav/portal/index.hbs +12 -0
- package/addon/components/hds/side-nav/portal/target.hbs +14 -0
- package/addon/components/hds/side-nav/portal/target.js +156 -0
- package/app/components/hds/{empty-state/body.js → app-frame/index.js} +1 -1
- package/app/components/hds/app-frame/parts/footer.js +6 -0
- package/app/components/hds/app-frame/parts/header.js +6 -0
- package/app/components/hds/{empty-state/footer.js → app-frame/parts/main.js} +1 -1
- package/app/components/hds/app-frame/parts/modals.js +6 -0
- package/app/components/hds/app-frame/parts/sidebar.js +6 -0
- package/app/components/hds/application-state/body.js +6 -0
- package/app/components/hds/application-state/footer.js +6 -0
- package/app/components/hds/application-state/header.js +6 -0
- package/app/components/hds/application-state/index.js +6 -0
- package/app/components/hds/dropdown/footer.js +5 -0
- package/app/components/hds/dropdown/header.js +5 -0
- package/app/components/hds/dropdown/list-item/checkbox.js +5 -0
- package/app/components/hds/dropdown/list-item/checkmark.js +5 -0
- package/app/components/hds/dropdown/list-item/radio.js +5 -0
- package/app/components/hds/{side-nav/wrapper.js → flyout/footer.js} +1 -1
- package/app/components/hds/side-nav/base.js +6 -0
- package/app/components/hds/side-nav/{home-link.js → header/home-link.js} +1 -1
- package/app/components/hds/side-nav/{icon-button.js → header/icon-button.js} +1 -1
- package/app/components/hds/{empty-state → side-nav}/index.js +1 -1
- package/app/components/hds/{empty-state/header.js → side-nav/portal/index.js} +1 -1
- package/app/components/hds/side-nav/portal/target.js +6 -0
- package/app/styles/@hashicorp/design-system-components.scss +2 -1
- package/app/styles/@hashicorp/design-system-power-select-overrides.scss +33 -3
- package/app/styles/components/app-frame.scss +60 -0
- package/app/styles/components/application-state.scss +55 -0
- package/app/styles/components/dropdown.scss +11 -0
- package/app/styles/components/flyout.scss +15 -1
- package/app/styles/components/form/checkbox.scss +1 -1
- package/app/styles/components/form/radio.scss +1 -1
- package/app/styles/components/form/text-input.scss +1 -1
- package/app/styles/components/form/textarea.scss +2 -1
- package/app/styles/components/side-nav/a11y-refocus.scss +30 -0
- package/app/styles/components/side-nav/content.scss +156 -0
- package/app/styles/components/side-nav/header.scss +102 -0
- package/app/styles/components/side-nav/index.scss +10 -0
- package/app/styles/components/side-nav/main.scss +202 -0
- package/app/styles/components/side-nav/vars.scss +36 -0
- package/blueprints/hds-component-test/files/tests/integration/components/hds/__name__/index-test.js +14 -11
- package/package.json +6 -4
- package/addon/components/hds/empty-state/index.hbs +0 -13
- package/addon/components/hds/side-nav/wrapper.hbs +0 -18
- package/app/styles/components/empty-state.scss +0 -37
- package/app/styles/components/side-nav.scss +0 -275
- /package/addon/components/hds/side-nav/{home-link.hbs → header/home-link.hbs} +0 -0
- /package/app/components/hds/side-nav/{header.js → header/index.js} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
6
|
+
<Hds::SideNav::Base class={{this.classNames}} ...attributes {{focus-trap isActive=this.shouldTrapFocus}}>
|
|
7
|
+
<:root>
|
|
8
|
+
{{#if this.hasA11yRefocus}}
|
|
9
|
+
<NavigationNarrator
|
|
10
|
+
@routeChangeValidator={{@a11yRefocusRouteChangeValidator}}
|
|
11
|
+
@skipTo="#{{@a11yRefocusSkipTo}}"
|
|
12
|
+
@skipText={{@a11yRefocusSkipText}}
|
|
13
|
+
@navigationText={{@a11yRefocusNavigationText}}
|
|
14
|
+
/>
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{#if this.isResponsive}}
|
|
17
|
+
{{! template-lint-disable no-invalid-interactive}}
|
|
18
|
+
<div class="hds-side-nav__overlay" {{on "click" this.toggleMinimizedStatus}} />
|
|
19
|
+
{{! template-lint-enable no-invalid-interactive}}
|
|
20
|
+
<button
|
|
21
|
+
class="hds-side-nav__menu-toggle-button"
|
|
22
|
+
type="button"
|
|
23
|
+
{{on "click" this.toggleMinimizedStatus}}
|
|
24
|
+
{{! To be localized - see: https://hashicorp.atlassian.net/browse/HDS-567 }}
|
|
25
|
+
aria-label={{if this.isMinimized "Open menu" "Close menu"}}
|
|
26
|
+
>
|
|
27
|
+
<FlightIcon @name={{if this.isMinimized "menu" "x"}} @size="24" @stretched={{true}} />
|
|
28
|
+
</button>
|
|
29
|
+
{{/if}}
|
|
30
|
+
</:root>
|
|
31
|
+
<:header as |Header|>
|
|
32
|
+
{{yield (hash Header=Header isMinimized=this.isMinimized) to="header"}}
|
|
33
|
+
</:header>
|
|
34
|
+
<:body as |Body|>
|
|
35
|
+
{{yield (hash Body=Body isMinimized=this.isMinimized) to="body"}}
|
|
36
|
+
</:body>
|
|
37
|
+
<:footer as |Footer|>
|
|
38
|
+
{{yield (hash Footer=Footer isMinimized=this.isMinimized) to="footer"}}
|
|
39
|
+
</:footer>
|
|
40
|
+
</Hds::SideNav::Base>
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
import { assert } from '@ember/debug';
|
|
10
|
+
import { registerDestructor } from '@ember/destroyable';
|
|
11
|
+
|
|
12
|
+
export default class HdsSideNavComponent extends Component {
|
|
13
|
+
@tracked isResponsive = this.args.isResponsive ?? true;
|
|
14
|
+
@tracked isMinimized = this.isResponsive; // we set it minimized by default so that if we switch viewport from desktop to mobile its already minimized
|
|
15
|
+
@tracked isDesktop = true;
|
|
16
|
+
hasA11yRefocus = this.args.hasA11yRefocus ?? true;
|
|
17
|
+
|
|
18
|
+
desktopMQVal = getComputedStyle(document.documentElement).getPropertyValue(
|
|
19
|
+
'--hds-app-desktop-breakpoint'
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.desktopMQ = window.matchMedia(`(min-width:${this.desktopMQVal})`);
|
|
25
|
+
this.addEventListeners();
|
|
26
|
+
registerDestructor(this, () => {
|
|
27
|
+
this.removeEventListeners();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (this.args.hasA11yRefocus) {
|
|
31
|
+
assert(
|
|
32
|
+
'@a11yRefocusSkipTo for NavigatorNarrator (a11y-refocus) in "Hds::SideNav" must have a valid value',
|
|
33
|
+
this.args.a11yRefocusSkipTo !== undefined
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
addEventListeners() {
|
|
39
|
+
document.addEventListener('keydown', this.escapePress, true);
|
|
40
|
+
this.desktopMQ.addEventListener('change', this.updateDesktopVariable, true);
|
|
41
|
+
// set initial state based on viewport
|
|
42
|
+
this.updateDesktopVariable({ matches: this.desktopMQ.matches });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
removeEventListeners() {
|
|
46
|
+
document.removeEventListener('keydown', this.escapePress, true);
|
|
47
|
+
this.desktopMQ.removeEventListener(
|
|
48
|
+
'change',
|
|
49
|
+
this.updateDesktopVariable,
|
|
50
|
+
true
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
get shouldTrapFocus() {
|
|
55
|
+
return this.isResponsive && !this.isDesktop && !this.isMinimized;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
get classNames() {
|
|
59
|
+
let classes = []; // `hds-side-nav` is already set by the "Hds::SideNav::Base" component
|
|
60
|
+
|
|
61
|
+
// add specific class names for the different possible states
|
|
62
|
+
if (this.isDesktop) {
|
|
63
|
+
classes.push('hds-side-nav--is-desktop');
|
|
64
|
+
} else {
|
|
65
|
+
classes.push('hds-side-nav--is-mobile');
|
|
66
|
+
}
|
|
67
|
+
if (this.isResponsive) {
|
|
68
|
+
classes.push('hds-side-nav--is-responsive');
|
|
69
|
+
}
|
|
70
|
+
if (this.isMinimized) {
|
|
71
|
+
classes.push('hds-side-nav--is-minimized');
|
|
72
|
+
} else {
|
|
73
|
+
classes.push('hds-side-nav--is-not-minimized');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return classes.join(' ');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@action
|
|
80
|
+
escapePress(event) {
|
|
81
|
+
if (event.key === 'Escape' && !this.isMinimized) {
|
|
82
|
+
this.isMinimized = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@action
|
|
87
|
+
toggleMinimizedStatus() {
|
|
88
|
+
this.isMinimized = !this.isMinimized;
|
|
89
|
+
|
|
90
|
+
let { onToggleMinimizedStatus } = this.args;
|
|
91
|
+
|
|
92
|
+
if (typeof onToggleMinimizedStatus === 'function') {
|
|
93
|
+
onToggleMinimizedStatus(this.isMinimized);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@action
|
|
98
|
+
updateDesktopVariable(event) {
|
|
99
|
+
this.isDesktop = event.matches;
|
|
100
|
+
|
|
101
|
+
let { onDesktopViewportChange } = this.args;
|
|
102
|
+
|
|
103
|
+
if (typeof onDesktopViewportChange === 'function') {
|
|
104
|
+
onDesktopViewportChange(this.isDesktop);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
}}
|
|
5
5
|
|
|
6
6
|
<nav class="hds-side-nav__list-wrapper" ...attributes>
|
|
7
|
+
{{yield (hash extraBefore=(component "hds/yield"))}}
|
|
7
8
|
<ul class="hds-side-nav__list" role="list">
|
|
8
9
|
{{yield
|
|
9
10
|
(hash
|
|
@@ -14,4 +15,5 @@
|
|
|
14
15
|
)
|
|
15
16
|
}}
|
|
16
17
|
</ul>
|
|
18
|
+
{{yield (hash extraAfter=(component "hds/yield"))}}
|
|
17
19
|
</nav>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
6
|
+
<Portal @target={{if @targetName @targetName "hds-side-nav-portal-target"}}>
|
|
7
|
+
<div class="hds-side-nav__content-panel" ...attributes>
|
|
8
|
+
<Hds::SideNav::List aria-label={{@ariaLabel}} as |ListElements|>
|
|
9
|
+
{{yield ListElements}}
|
|
10
|
+
</Hds::SideNav::List>
|
|
11
|
+
</div>
|
|
12
|
+
</Portal>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
|
|
6
|
+
<div class="hds-side-nav__content" ...attributes>
|
|
7
|
+
<PortalTarget
|
|
8
|
+
@multiple={{true}}
|
|
9
|
+
@onChange={{this.panelsChanged}}
|
|
10
|
+
@name={{if @targetName @targetName "hds-side-nav-portal-target"}}
|
|
11
|
+
class="hds-side-nav__content-panels hds-side-nav-hide-when-minimized"
|
|
12
|
+
{{did-update this.didUpdateSubnav this.numSubnavs}}
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { inject as service } from '@ember/service';
|
|
8
|
+
import { tracked } from '@glimmer/tracking';
|
|
9
|
+
import { action } from '@ember/object';
|
|
10
|
+
import { DEBUG } from '@glimmer/env';
|
|
11
|
+
import Ember from 'ember';
|
|
12
|
+
import { debounce } from '@ember/runloop';
|
|
13
|
+
|
|
14
|
+
export default class SidenavPortalTarget extends Component {
|
|
15
|
+
@service router;
|
|
16
|
+
|
|
17
|
+
@tracked numSubnavs = 0;
|
|
18
|
+
|
|
19
|
+
static get prefersReducedMotionOverride() {
|
|
20
|
+
return Ember.testing;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
prefersReducedMotionMQ = window.matchMedia(
|
|
24
|
+
'(prefers-reduced-motion: reduce)'
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
get prefersReducedMotion() {
|
|
28
|
+
return (
|
|
29
|
+
this.constructor.prefersReducedMotionOverride ||
|
|
30
|
+
(this.prefersReducedMotionMQ && this.prefersReducedMotionMQ.matches)
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@action
|
|
35
|
+
panelsChanged(portalCount) {
|
|
36
|
+
this.numSubnavs = portalCount;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@action
|
|
40
|
+
didUpdateSubnav(element, [count]) {
|
|
41
|
+
debounce(this, 'animateSubnav', element, [count], 100);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@action
|
|
45
|
+
animateSubnav(element, [count]) {
|
|
46
|
+
/*
|
|
47
|
+
* Here is what the layout looks like for this setup
|
|
48
|
+
*
|
|
49
|
+
|
|
50
|
+
SideNav
|
|
51
|
+
+----------------------+
|
|
52
|
+
| +------------------+ |
|
|
53
|
+
| | ("header") | |
|
|
54
|
+
| +------------------+ |
|
|
55
|
+
| |
|
|
56
|
+
| +------------------+ |
|
|
57
|
+
| | ("body") | |
|
|
58
|
+
(PortalTarget) | | | |
|
|
59
|
+
+----------------------------------------------+ | |
|
|
60
|
+
| +----------+ +----------+ | +----------+ | | |
|
|
61
|
+
| | (Portal) | | (Portal) | | (Portal) | | | |
|
|
62
|
+
| | | | | | | | | | |
|
|
63
|
+
| | hidden | | hidden | | *active* | | | |
|
|
64
|
+
| | panel | | panel | | | panel | | | |
|
|
65
|
+
| | | | | | | | | |
|
|
66
|
+
| | | | | | | | | | |
|
|
67
|
+
| | | | | | | | | |
|
|
68
|
+
| | | | | | | | | | |
|
|
69
|
+
| | | | | | | | | |
|
|
70
|
+
| | | | | | | | | | |
|
|
71
|
+
| | | | | | | | | |
|
|
72
|
+
| +----------+ +----------+ | +----------+ | | |
|
|
73
|
+
+----------------------------------------------+ | |
|
|
74
|
+
| | | |
|
|
75
|
+
| +------------------+ |
|
|
76
|
+
| |
|
|
77
|
+
| +------------------+ |
|
|
78
|
+
| | ("footer") | |
|
|
79
|
+
| +------------------+ |
|
|
80
|
+
+----------------------+
|
|
81
|
+
|
|
82
|
+
*
|
|
83
|
+
* every time `HcAppFrame::SideNav::Portal` renders, it contains a portaled "panel"
|
|
84
|
+
* that is rendered into the `hds-side-nav__content-panels` (inside the PortalTarget).
|
|
85
|
+
*
|
|
86
|
+
* Rendering or unrendering other `HcAppFrame::SideNav::Portal`s triggers the number of
|
|
87
|
+
* subnavs to change (via `numSubnavs`), so this function runs and slides
|
|
88
|
+
* `hds-side-nav__content-panels` left or right using the `element.animate` api.
|
|
89
|
+
*
|
|
90
|
+
* */
|
|
91
|
+
|
|
92
|
+
let activeIndex = count - 1;
|
|
93
|
+
let targetElement = element;
|
|
94
|
+
let { prefersReducedMotion } = this;
|
|
95
|
+
|
|
96
|
+
let styles = getComputedStyle(targetElement);
|
|
97
|
+
let columnWidth = styles.getPropertyValue(
|
|
98
|
+
'--hds-app-sidenav-width-expanded'
|
|
99
|
+
);
|
|
100
|
+
let slideDuration = prefersReducedMotion ? 0 : 150;
|
|
101
|
+
let fadeDuration = prefersReducedMotion ? 0 : 175;
|
|
102
|
+
let fadeDelay = prefersReducedMotion ? 0 : 50;
|
|
103
|
+
|
|
104
|
+
// slide entire parent panel
|
|
105
|
+
let start = styles.transform;
|
|
106
|
+
let end = `translateX(-${activeIndex * parseInt(columnWidth, 10)}px)`;
|
|
107
|
+
let anim = targetElement.animate(
|
|
108
|
+
[{ transform: start }, { transform: end }],
|
|
109
|
+
{
|
|
110
|
+
duration: slideDuration,
|
|
111
|
+
easing: 'cubic-bezier(0.65, 0, 0.35, 1)',
|
|
112
|
+
fill: 'forwards',
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
// Notice: we don't add the styles by default because it writes a `style` attribute to the element and it causes an additional re-render
|
|
116
|
+
if (DEBUG) {
|
|
117
|
+
anim.commitStyles();
|
|
118
|
+
}
|
|
119
|
+
anim.finished.then(() => {
|
|
120
|
+
// uncomment this if we need/want to scroll the element to the top
|
|
121
|
+
// targetElement.scrollIntoView(true);
|
|
122
|
+
if (activeIndex > 0) {
|
|
123
|
+
let allPrev = Array.from(targetElement.children).slice(0, activeIndex);
|
|
124
|
+
for (let ele of allPrev) {
|
|
125
|
+
ele.ariaHidden = 'true';
|
|
126
|
+
ele.style.setProperty('visibility', 'hidden');
|
|
127
|
+
ele.style.setProperty('opacity', '0');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Notice: we don't add the styles by default because it writes a `style` attribute to the element and it causes an additional re-render
|
|
131
|
+
if (DEBUG) {
|
|
132
|
+
// Check the visibility of the element before attempting to commitStyles.
|
|
133
|
+
if (targetElement.offsetParent !== null) {
|
|
134
|
+
anim.commitStyles();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// fade in next panel
|
|
140
|
+
let nextPanelEl = targetElement.children[activeIndex];
|
|
141
|
+
if (nextPanelEl) {
|
|
142
|
+
nextPanelEl.ariaHidden = 'false';
|
|
143
|
+
nextPanelEl.style.setProperty('visibility', 'visible');
|
|
144
|
+
// this eliminates a flicker if there's only 1 subnav rendering
|
|
145
|
+
if (activeIndex === 0) {
|
|
146
|
+
fadeDelay = 0;
|
|
147
|
+
fadeDuration = 0;
|
|
148
|
+
}
|
|
149
|
+
nextPanelEl.animate([{ opacity: '0' }, { opacity: '1' }], {
|
|
150
|
+
delay: fadeDelay,
|
|
151
|
+
duration: fadeDuration,
|
|
152
|
+
fill: 'forwards',
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
// Notice: this list can be automatically edited by the Ember blueprint, please don't remove the start/end comments
|
|
14
14
|
// START COMPONENTS CSS FILES IMPORTS
|
|
15
15
|
@use "../components/alert";
|
|
16
|
+
@use "../components/app-frame";
|
|
17
|
+
@use "../components/application-state";
|
|
16
18
|
@use "../components/avatar";
|
|
17
19
|
@use "../components/badge";
|
|
18
20
|
@use "../components/badge-count";
|
|
@@ -23,7 +25,6 @@
|
|
|
23
25
|
@use "../components/disclosure";
|
|
24
26
|
@use "../components/dismiss-button";
|
|
25
27
|
@use "../components/dropdown";
|
|
26
|
-
@use "../components/empty-state";
|
|
27
28
|
@use "../components/flyout";
|
|
28
29
|
@use "../components/form"; // multiple components
|
|
29
30
|
@use "../components/icon-tile";
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
background-color: var(--token-form-control-base-surface-color-default);
|
|
93
93
|
border: var(--token-form-control-border-width) solid var(--token-form-control-base-border-color-default);
|
|
94
94
|
border-radius: var(--token-form-control-border-radius);
|
|
95
|
-
box-shadow: var(--
|
|
95
|
+
box-shadow: var(--token-elevation-inset-box-shadow);
|
|
96
96
|
|
|
97
97
|
// PLACEHOLDER
|
|
98
98
|
|
|
@@ -193,6 +193,17 @@
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
.ember-power-select-option--no-matches-message {
|
|
197
|
+
padding: 8px;
|
|
198
|
+
|
|
199
|
+
&:hover {
|
|
200
|
+
color: inherit;
|
|
201
|
+
background-color: inherit;
|
|
202
|
+
border-color: transparent;
|
|
203
|
+
cursor: default;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
196
207
|
.ember-power-select-multiple-trigger {
|
|
197
208
|
padding-top: calc(var(--token-form-control-padding) - 3px);
|
|
198
209
|
padding-bottom: calc(var(--token-form-control-padding) - 3px);
|
|
@@ -203,7 +214,6 @@
|
|
|
203
214
|
.ember-power-select-multiple-option {
|
|
204
215
|
display: inline-flex;
|
|
205
216
|
align-items: stretch;
|
|
206
|
-
float: none;
|
|
207
217
|
margin: 4px 4px 4px 0;
|
|
208
218
|
padding: 3px 10px 5px 10px;
|
|
209
219
|
color: var(--token-color-foreground-primary);
|
|
@@ -212,7 +222,7 @@
|
|
|
212
222
|
font-family: var(--token-typography-font-stack-text);
|
|
213
223
|
line-height: 1rem; // 16px
|
|
214
224
|
vertical-align: middle;
|
|
215
|
-
background-color:
|
|
225
|
+
background-color: inherit;
|
|
216
226
|
border: 1px solid var(--token-color-border-strong);
|
|
217
227
|
border-radius: 50px;
|
|
218
228
|
}
|
|
@@ -232,6 +242,26 @@
|
|
|
232
242
|
}
|
|
233
243
|
}
|
|
234
244
|
|
|
245
|
+
.ember-power-select-trigger-multiple-input {
|
|
246
|
+
margin: 4px 4px 4px 0;
|
|
247
|
+
|
|
248
|
+
&:disabled {
|
|
249
|
+
display: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&::-webkit-search-cancel-button {
|
|
253
|
+
width: var(--token-form-text-input-background-image-size);
|
|
254
|
+
height: var(--token-form-text-input-background-image-size);
|
|
255
|
+
background-image: var(--token-form-text-input-background-image-data-url-search-cancel);
|
|
256
|
+
background-position: center center;
|
|
257
|
+
background-size: var(--token-form-text-input-background-image-size);
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
// stylelint-disable-next-line property-no-vendor-prefix
|
|
260
|
+
-webkit-appearance: none;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
|
|
235
265
|
.hds-power-select__after-options {
|
|
236
266
|
padding: 8px;
|
|
237
267
|
color: var(--token-color-foreground-primary);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
// APP-FRAME
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
.hds-app-frame {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-areas:
|
|
13
|
+
"header header"
|
|
14
|
+
"sidebar main"
|
|
15
|
+
"sidebar footer";
|
|
16
|
+
grid-template-rows: auto 1fr auto;
|
|
17
|
+
grid-template-columns: auto 1fr;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// FRAME'S CONTAINERS
|
|
23
|
+
|
|
24
|
+
.hds-app-frame__header {
|
|
25
|
+
z-index: 7;
|
|
26
|
+
grid-area: header;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.hds-app-frame__sidebar {
|
|
30
|
+
z-index: 6;
|
|
31
|
+
grid-area: sidebar;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.hds-app-frame__main {
|
|
35
|
+
grid-area: main;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.hds-app-frame__footer {
|
|
39
|
+
z-index: 5;
|
|
40
|
+
grid-area: footer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// MODALS "CONTAINER"
|
|
45
|
+
|
|
46
|
+
.hds-app-frame__modals {
|
|
47
|
+
position: fixed;
|
|
48
|
+
top: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
z-index: 100;
|
|
51
|
+
width: 100vw;
|
|
52
|
+
height: 100vh;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
|
|
55
|
+
// since the content is injected via DOM manipulation, there's no issues of whitespace generated by Ember
|
|
56
|
+
// that make this approach unreliable (in some cases), so we can safely use it to controls its display
|
|
57
|
+
&:empty {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
}
|