UNPKG

@kelvininc/ui-components

Version:
144 lines (139 loc) 3.5 kB
/** HEADINGS **/ /** LABELS **/ /** SPANS **/ /** PARAGRAPHS **/ /** CODE/CONSOLE **/ @property --rotation { syntax: "<angle>"; initial-value: 0deg; inherits: false; } @keyframes rotate-border { to { --rotation: 360deg; } } /** HEADINGS **/ /** LABELS **/ /** SPANS **/ /** PARAGRAPHS **/ /** CODE/CONSOLE **/ @property --rotation { syntax: "<angle>"; initial-value: 0deg; inherits: false; } @keyframes rotate-border { to { --rotation: 360deg; } } /** * @prop --text-color-title: Info label's title color. * @prop --text-color-description: Info label's description color. * @prop --expanded-buttom-color: Expandded buttom's color. * @prop --description-fade-height: Description fade height. * @prop --description-fade-shadow: Description fade shadow. */ :host { --text-color-title: var(--kv-neutral-4, #bebebe); --text-color-description: var(--kv-neutral-2, #e5e5e5); --expanded-button-color: var(--kv-neutral-0, #fff); --description-fade-height: 30px; --description-fade-shadow: linear-gradient(to bottom, rgba(32, 32, 32, 0) 0%, rgba(32, 32, 32, 1) 100%); } .info-label { display: flex; flex-direction: column; } .info-label .title { font-family: var(--kv-primary-font, "proxima-nova", sans-serif, "Arial"); font-size: 12px; font-weight: 400; font-stretch: normal; font-style: normal; line-height: 18px; letter-spacing: normal; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-color-title); white-space: nowrap; margin-bottom: var(--kv-spacing-2x, 8px); } .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: var(--kv-primary-font, "proxima-nova", sans-serif, "Arial"); font-size: 14px; font-weight: 400; font-stretch: normal; font-style: normal; line-height: 21px; letter-spacing: normal; text-transform: none; color: var(--text-color-description); } .info-label .expand-description-button { font-family: var(--kv-primary-font, "proxima-nova", sans-serif, "Arial"); font-size: 12px; font-weight: 400; font-stretch: normal; font-style: normal; line-height: 18px; letter-spacing: normal; text-transform: none; display: flex; align-items: center; cursor: pointer; margin-top: var(--kv-spacing-3x, 12px); color: var(--expanded-button-color); } .info-label .expand-description-button kv-icon { --icon-color: var(--expanded-button-color); margin-left: var(--kv-spacing, 4px); 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(--kv-spacing-2x, 8px); 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; } :host { --text-color-title: var(--kv-neutral-4, #bebebe); --text-color-description: var(--kv-neutral-2, #e5e5e5); --expanded-button-color: var(--kv-neutral-0, #fff); }