@kelvininc/ui-components
Version:
Kelvin UI Components
124 lines (119 loc) • 3.19 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 --text-color-title: Info label's title color.
* @prop --text-color-description: Info label's description color.
* @prop --expanded-button-color: Expand button's color.
* @prop --description-fade-height: Description fade height.
* @prop --description-shadow-background: Description shadow background color.
* @prop --description-fade-shadow: Description fade shadow.
*/
--text-color-title: var(--text-surface-neutral-tertiary);
--text-color-description: var(--text-surface-neutral-secondary);
--expanded-button-color: var(--text-surface-neutral-primary);
--description-fade-height: 30px;
--description-shadow-background: var(--background-surface-neutral-default);
--description-fade-shadow: linear-gradient(to bottom, color-mix(in srgb, var(--description-shadow-background) 10%, transparent) 50%, color-mix(in srgb, var(--description-shadow-background) 50%, transparent) 30%);
}
.info-label {
display: flex;
flex-direction: column;
}
.info-label .title {
font-family: Proxima Nova;
font-weight: 400;
font-size: 12px;
line-height: 16px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--text-color-title);
white-space: nowrap;
margin-bottom: var(--spacing-md);
}
.info-label .title.no-description {
margin-bottom: 0;
}
.info-label .description-wrapper {
position: relative;
overflow-y: hidden;
transition: height 0.3s ease-in-out;
height: auto;
}
.info-label .description-wrapper .text {
font-family: Proxima Nova;
font-weight: 400;
font-size: 14px;
line-height: 20px;
letter-spacing: 0;
color: var(--text-color-description);
}
.info-label .expand-description-button {
font-family: Proxima Nova;
font-weight: 400;
font-size: 12px;
line-height: 16px;
letter-spacing: 0;
display: flex;
align-items: center;
cursor: pointer;
margin-top: var(--spacing-xl);
color: var(--expanded-button-color);
}
.info-label .expand-description-button kv-icon {
--icon-color: var(--expanded-button-color);
margin-left: var(--spacing-xs);
transition: transform 0.3s ease-in-out;
}
.info-label .expand-description-button.expanded kv-icon {
--icon-rotation: 180deg;
}
.description {
display: flex;
align-items: center;
}
.description .copy-icon {
opacity: 0;
}
.description:hover .copy-icon {
opacity: 1;
transition: all 200ms ease-in-out;
}
.copy-icon {
margin-left: var(--spacing-md);
cursor: pointer;
user-select: none;
}
.description-fade {
position: absolute;
bottom: -2px;
left: 0;
right: 0;
height: var(--description-fade-height);
background: var(--description-fade-shadow);
pointer-events: none;
transition: background 0.3s ease-in-out;
}
.description-fade--expanded {
background: transparent;
}