open-vault/ui/app/styles/components/confirm.scss
Noelle Daley 716f25162a
Ui/redesign delete confirmation (#7271)
* add initial Confirm component to secrets list page

* use ember-wormholes to render confirmation message

* use maybe-in-element instead of ember-wormhole

* hide overlay initially

* animate confirm overlay left and right on click

* hide overlay in the DOM to properly set height

* adjust height when showing/hiding confirm-overlay

* disable confirmation buttons until trigger has been rendered

* adjust height of confirm-wrapper instead of confirm

* move Confirm/ to core

* only add style attribute when a height property exists

* fix indentation

* wip - use new Confirm inside status menu

* add Confirm to Storybook

* ensure confirm links have proper styling in Storybook and outside popup-menu

* fix height transition

* disable no-inline-styles

* add test selector

* remove comment

* consolidate Message into Trigger to make Confirm easier to use

* use new Trigger API in status menu

* remove height transition

* fix binding inline style warning

* rename confirmMessage to message

* update Confirm for Storybook

* fix indentation

* do not pass in onCancel from outer template because it is static

* add jsdoc comments to Trigger

* wip - add trigger and confirm to storybook

* fix status menu styling

* fix styling of confirm stories

* use new Confirm on secrets engine list

* use bulma speed variable

* fix indentation

* re-renable eslint no-inline-styles

* showConfirm when rendered trigger matches id

* fix background color on namespace picker

* do not expose onTrigger

* Revert "re-renable eslint no-inline-styles"

This reverts commit c7b2a9097f177a2876afaaec6020f73b07bad3c7.

* rename Confirm Trigger to Message

* add tests

* update JSDocs

* focus trigger after cancelling the confirm message

* update Confirm JSDocs

* differentiate between ConfirmAction and Confirm

* add Message to Storybook

* re-enable eslint import/extensions

* update confirmButtonText to Revoke token

* remove linebreak and extra whitespace

* fix typo

* add loading to empty button

* fix more typos

* only show Message contents when showConfirm is true

* no need to disable the confirm buttons since they only render in the DOM when showConfirm is true

* use Confirm to delete aws roles

* use Confirm to delete pki roles

* use Confirm to delete ssh roles

* add Confirm to entity alias page

* fix confirm button text on Revoke token in status menu

* ensure you can use tab to revoke a token from status menu

* reset the open trigger after the confirm has been confirmed

* use Confirm on identity list pages

* fix Disable engine confirmation text

* use <PopupMenu /> angle brack syntax

* use Confirm on policies list page

* use Confirm for namespaces

* use Confirm for kmip scopes

* use Confirm for deleting kmip roles

* use Confirm for revoking KMIP credentials

* fix Revoke token triggerText
2019-08-27 15:50:53 -07:00

135 lines
2 KiB
SCSS

.confirm-wrapper {
position: relative;
overflow: hidden;
border-radius: 2px;
box-shadow: $box-shadow, $box-shadow-middle;
}
.confirm {
transition: transform $speed;
padding-top: 2px;
}
.show-confirm {
transform: translateX(-100%);
transition: transform $speed;
}
.confirm.show-confirm {
visibility: hidden;
}
.confirm-overlay {
position: absolute;
background-color: white;
top: 0;
left: 100%;
width: 100%;
}
.confirm,
.confirm-overlay {
button.link,
a {
background-color: $white;
color: $menu-item-color;
&:hover {
background-color: $menu-item-hover-background-color;
color: $menu-item-hover-color;
}
&.is-active {
background-color: $menu-item-active-background-color;
color: $menu-item-active-color;
}
&.is-destroy {
color: $red;
&:hover {
background-color: $red;
color: $white;
}
}
&.disabled {
opacity: 0.5;
&:hover {
background: transparent;
cursor: default;
}
}
}
}
.confirm-action span .button {
display: block;
margin: 0.25rem auto;
width: 95%;
}
.confirm-action > span {
@include from($tablet) {
align-items: center;
display: flex;
}
* {
margin-left: $size-8;
}
.confirm-action-text:not(.is-block) {
text-align: right;
@include until($tablet) {
display: block;
margin-bottom: $size-8;
text-align: left;
}
}
.confirm-action-text.is-block {
text-align: left;
}
}
.confirm-action-message {
margin: 0;
.message {
border: 0;
font-size: $size-8;
line-height: 1.33;
margin: 0;
}
.message-title {
font-size: 1rem;
}
.hs-icon {
color: $yellow;
}
p {
font-weight: $font-weight-semibold;
margin-left: $spacing-l;
padding-left: $spacing-xxs;
padding-top: 0;
}
.confirm-action-options {
border-top: $light-border;
display: flex;
padding: $spacing-xxs;
.link {
flex: 1;
text-align: center;
width: auto;
padding: $spacing-xs;
}
}
}