vault/ui/app/styles/core/file.scss
Vault Automation 796c5fb294
[HDS-5060] UI: Align typography styles to HDS tokens (#10193) (#10360)
Co-authored-by: Dylan Hyun <dylan.hyun@hashicorp.com>
2025-10-23 16:37:36 -04:00

105 lines
2.2 KiB
SCSS

@use '../utils/box-shadow_variables';
@use '../utils/size_variables';
@use '../core/buttons.scss';
@use '../core/inputs.scss';
/**
* Copyright IBM Corp. 2016, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
// This file defines the styles for file, file-cta, file-delete-button, file-icon, file-input, file-label, file-name.
.file {
user-select: none;
}
.file-cta {
align-items: center;
border: box-shadow_variables.$base-border;
border-radius: var(--token-border-radius-x-small);
display: inline-flex;
height: 2.25em;
justify-content: flex-start;
min-width: auto;
padding-bottom: calc(0.375em - 1px);
padding-left: 1em;
padding-right: 1em;
padding-top: calc(0.375em - 1px);
position: relative;
vertical-align: top;
white-space: nowrap;
&.button {
height: size_variables.$size-2; // in older parts of the code (Ex: shamir-modal-flow) this class is not a button. In newer parts of the code it is, and height needs to match the height of a button (2.5rem).
}
&:disabled {
cursor: not-allowed;
}
.icon:first-child:last-child {
display: inline-block;
margin-right: 0.1rem;
vertical-align: middle;
}
}
.file-delete-button {
@extend .button;
@extend .is-transparent;
color: var(--token-color-palette-neutral-400);
position: absolute;
right: size_variables.$spacing-8;
}
.file-icon {
align-items: center;
display: flex;
height: 1em;
justify-content: center;
margin-right: 0.5em;
width: 1em;
}
.file-input {
height: 0.01em;
left: 0;
outline: 0;
position: absolute;
top: 0;
width: 0.01em;
visibility: hidden;
}
.file-label {
align-items: stretch;
cursor: pointer;
display: flex;
justify-content: flex-start;
position: relative;
}
.file-name {
@extend .input;
border: box-shadow_variables.$base-border;
border-radius: var(--token-border-radius-x-small);
box-shadow: 0 4px 1px rgba(10, 10, 10, 0.06) inset;
display: block;
font-size: 1em;
line-height: var(--token-typography-body-300-line-height);
overflow: hidden;
padding-bottom: calc(0.375em - 1px);
padding-left: 1em;
padding-right: 1em;
padding-top: calc(0.375em - 1px);
position: relative;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
&:disabled {
cursor: not-allowed;
}
}