-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Add Toolbar #6626
UI: Add Toolbar #6626
Changes from all commits
30a148f
4760a3b
acbcdc6
4855721
8873739
ba6c0e9
1e8d884
85c45f5
e5a2452
7c581bd
07059ae
eecf7b5
fbdc42e
bb13ea0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ export default Component.extend({ | |
baseKey: null, | ||
backendCrumb: null, | ||
model: null, | ||
options: null, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import OuterHTML from './outer-html'; | ||
|
||
export default OuterHTML.extend({}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import DownloadButton from './download-button'; | ||
joshuaogle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export default DownloadButton.extend({ | ||
classNames: ['toolbar-link'], | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import OuterHTML from './outer-html'; | ||
|
||
export default OuterHTML.extend({}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import OuterHTML from './outer-html'; | ||
import { computed } from '@ember/object'; | ||
|
||
export default OuterHTML.extend({ | ||
glyph: computed('type', function() { | ||
if (this.type == 'add') { | ||
return 'plus-plain'; | ||
} else { | ||
return 'chevron-right'; | ||
} | ||
}), | ||
tagName: '', | ||
type: null, | ||
supportsDataTestProperties: true, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import OuterHTML from './outer-html'; | ||
import { computed } from '@ember/object'; | ||
|
||
export default OuterHTML.extend({ | ||
glyph: computed('type', function() { | ||
if (this.type == 'add') { | ||
return 'plus-plain'; | ||
} else { | ||
return 'chevron-right'; | ||
} | ||
}), | ||
tagName: '', | ||
supportsDataTestProperties: true, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import OuterHTML from './outer-html'; | ||
|
||
export default OuterHTML.extend({ | ||
classNames: ['toolbar'], | ||
tagName: 'nav', | ||
}); | ||
joshuaogle marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { computed } from '@ember/object'; | ||
import Controller from '@ember/controller'; | ||
|
||
export default Controller.extend({ | ||
isConfigurable: computed('model.type', function() { | ||
const configurableEngines = ['aws', 'ssh', 'pki']; | ||
return configurableEngines.includes(this.get('model.type')); | ||
}), | ||
}); |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.page-header + .tabs-container { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fancy |
||
box-shadow: none; | ||
} | ||
|
||
.tabs { | ||
box-shadow: inset 0 -1px 0 $grey-light; | ||
|
||
|
@@ -15,25 +19,25 @@ | |
border-color: $blue; | ||
color: $blue; | ||
} | ||
&:first-child a, | ||
&:first-child .tab { | ||
margin-left: $size-5; | ||
} | ||
} | ||
|
||
a, | ||
.tab { | ||
color: $grey-dark; | ||
color: $grey; | ||
font-weight: $font-weight-semibold; | ||
text-decoration: none; | ||
padding: $size-6 $size-8 $size-8; | ||
border-bottom: 2px solid transparent; | ||
transition: border-color $speed; | ||
transition: background-color $speed, border-color $speed; | ||
|
||
&:hover, | ||
&:active { | ||
border-color: $grey-light; | ||
} | ||
|
||
&:hover { | ||
background-color: $ui-gray-050; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hover state has been a part of the design system for a while but hadn't been updated yet in Vault |
||
} | ||
} | ||
|
||
.ember-basic-dropdown-trigger { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
.tabs-container + .toolbar { | ||
border-top: 0; | ||
} | ||
|
||
.toolbar { | ||
background-color: $ui-gray-010; | ||
border: 1px solid $ui-gray-100; | ||
border-bottom-color: $ui-gray-300; | ||
border-top-color: $ui-gray-300; | ||
position: relative; | ||
|
||
&::after { | ||
background: linear-gradient(to right, $ui-gray-010, rgba($ui-gray-010, 0)); | ||
bottom: 0; | ||
content: ''; | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
width: $spacing-xxs; | ||
z-index: 2; | ||
} | ||
|
||
.input, | ||
.select { | ||
min-width: 160px; | ||
} | ||
} | ||
|
||
.toolbar-scroller { | ||
align-items: center; | ||
display: flex; | ||
height: 44px; | ||
justify-content: space-between; | ||
overflow-x: auto; | ||
width: 100%; | ||
|
||
@include from($mobile) { | ||
padding: 0 $spacing-xxs; | ||
} | ||
|
||
&::-webkit-scrollbar { | ||
border-bottom: $base-border; | ||
height: $spacing-xxs; | ||
} | ||
|
||
&::-webkit-scrollbar-thumb { | ||
background: $ui-gray-300; | ||
border-radius: $spacing-xxs; | ||
} | ||
} | ||
|
||
.toolbar-filters, | ||
.toolbar-actions { | ||
align-items: center; | ||
display: flex; | ||
flex: 1; | ||
white-space: nowrap; | ||
} | ||
|
||
.toolbar-filters + .toolbar-actions { | ||
@include until($mobile) { | ||
border-left: $base-border; | ||
margin-left: $spacing-xs; | ||
padding-left: $spacing-xs; | ||
} | ||
} | ||
|
||
.toolbar-actions { | ||
@include from($mobile) { | ||
justify-content: flex-end; | ||
} | ||
} | ||
|
||
.toolbar-link { | ||
@extend .button; | ||
@extend .is-ghost; | ||
@extend .has-icon-right; | ||
border: 0; | ||
color: $black; | ||
transition: background-color $speed; | ||
|
||
&:hover { | ||
background-color: $ui-gray-100; | ||
border: 0; | ||
color: $blue; | ||
} | ||
|
||
&:active { | ||
box-shadow: none; | ||
} | ||
} | ||
|
||
.toolbar-separator { | ||
border-right: $light-border; | ||
height: 32px; | ||
margin: 0 $spacing-xs; | ||
width: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't need this 🔜😂