@kelvininc/ui-components
Version:
Kelvin UI Components
178 lines (175 loc) • 4.83 kB
CSS
/** HEADINGS **/
/** LABELS **/
/** SPANS **/
/** PARAGRAPHS **/
/** TODO: CODE/CONSOLE **/
@property --rotation {
syntax: "<angle>";
initial-value: 0deg;
inherits: false;
}
@keyframes rotate-border {
to {
--rotation: 360deg;
}
}
/**
* Design Tokens - Auto-generated by Style Dictionary
* Do not edit manually - run `pnpm tokens:build` to regenerate
*/
kv-dropdown-base:not(.hydrated) > [slot=list] {
display: none;
}
:host {
/**
* @prop --toaster-large-height: Toaster height with two messages.
* @prop --toaster-small-height: Toaster height with one message.
* @prop --toaster-width: Toaster width.
* @prop --toaster-top-space: Space between Toaster and top of page.
* @prop --background-color-default: Toaster background color.
* @prop --toaster-icon-height: Toaster icon height.
* @prop --toaster-icon-width: Toaster icon width.
*/
--toaster-large-height: 76px;
--toaster-small-height: 56px;
--toaster-width: 360px;
--toaster-top-space: var(--spacing-2xl);
--background-color-default: var(--toast-background-default);
--toaster-icon-width: var(--toast-icon-size-large);
--toaster-icon-height: var(--toast-icon-size-large);
}
.toaster-container {
position: absolute;
top: var(--toaster-top-space);
left: 0;
right: 0;
margin: 0 auto;
width: var(--toaster-width);
min-height: var(--toaster-small-height);
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--toast-gap-vertical);
z-index: 1000;
padding: var(--toast-padding-y-default) var(--toast-padding-x-default);
border-left: solid var(--toast-border-thickness-default) var(--background-color-default);
background-color: var(--background-color-default);
box-sizing: border-box;
overflow: hidden;
}
.toaster-container .toaster-icon kv-icon {
--icon-width: var(--toaster-icon-width);
--icon-height: var(--toaster-icon-height);
}
.toaster-container.toaster-type--info {
border-color: var(--toast-border-color-info);
}
.toaster-container.toaster-type--info .toaster-icon kv-icon {
--icon-color: var(--toast-icon-color-info);
--icon-background-color: var(--icon-container-neutral-inverse);
}
.toaster-container.toaster-type--warning {
border-color: var(--toast-border-color-warning);
}
.toaster-container.toaster-type--warning .toaster-icon kv-icon {
--icon-color: var(--toast-icon-color-warning);
}
.toaster-container.toaster-type--error {
border-color: var(--toast-border-color-error);
}
.toaster-container.toaster-type--error .toaster-icon kv-icon {
--icon-color: var(--toast-icon-color-error);
--icon-background-color: var(--icon-container-neutral-inverse);
}
.toaster-container.toaster-type--success {
border-color: var(--toast-border-color-success);
}
.toaster-container.toaster-type--success .toaster-icon kv-icon {
--icon-color: var(--toast-icon-color-success);
--icon-background-color: var(--icon-container-neutral-inverse);
}
.toaster-container.animate-fade-in {
animation-duration: 0.5s;
animation-name: animate-fade-in-small;
animation-fill-mode: backwards;
}
.toaster-container.animate-fade-out {
animation-duration: 0.5s;
animation-name: animate-fade-out-small;
animation-fill-mode: forwards;
}
.toaster-container.toaster-container--large {
min-height: var(--toaster-large-height);
}
.toaster-container.toaster-container--large.animate-fade-in {
animation-name: animate-fade-in-large;
}
.toaster-container.toaster-container--large.animate-fade-out {
animation-name: animate-fade-out-large;
}
.toaster-container .toaster-icon {
display: flex;
align-items: center;
}
.toaster-container .message-content {
flex-grow: 1;
display: flex;
flex-direction: column;
gap: var(--toast-gap-horizontal);
}
.toaster-container .message-content .main-message {
font-family: Proxima Nova;
font-weight: 600;
font-size: 14px;
line-height: 20px;
letter-spacing: 0;
color: var(--toast-main-message-default);
}
.toaster-container .message-content .secondary-message {
font-family: Proxima Nova;
font-weight: 400;
font-size: 14px;
line-height: 20px;
letter-spacing: 0;
color: var(--toast-secondary-message-default);
}
@keyframes animate-fade-in-large {
from {
opacity: 0;
margin-top: calc(-1 * var(--toaster-large-height));
}
to {
opacity: 1;
margin-top: 0;
}
}
@keyframes animate-fade-out-large {
from {
opacity: 1;
margin-top: 0;
}
to {
opacity: 0;
margin-top: calc(-1 * var(--toaster-large-height));
}
}
@keyframes animate-fade-in-small {
from {
opacity: 0;
margin-top: calc(-1 * var(--toaster-small-height));
}
to {
opacity: 1;
margin-top: 0;
}
}
@keyframes animate-fade-out-small {
from {
opacity: 1;
margin-top: 0;
}
to {
opacity: 0;
margin-top: calc(-1 * var(--toaster-small-height));
}
}