refactor styles
This commit is contained in:
@@ -0,0 +1,736 @@
|
||||
.documents-panel {
|
||||
padding: 0 0.75rem 0.75rem 0.75rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.tags-panel,
|
||||
.correspondents-panel {
|
||||
padding: 1.25rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.folder-row.is-drop-target {
|
||||
outline: 2px dashed var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.documents-panel .panel-section__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.documents-panel .panel-section__header .header-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.documents-panel__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.documents-panel__breadcrumbs {
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.documents-panel .panel-section__body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.panel-floating {
|
||||
position: absolute;
|
||||
top: calc(50% + 0.25rem);
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: color-mix(in oklch, var(--surface) 100%, transparent);
|
||||
border: 1px solid color-mix(in oklch, var(--border) 95%, transparent);
|
||||
padding: 0.45rem 0.85rem;
|
||||
border-radius: 1rem;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 400;
|
||||
color: var(--fg);
|
||||
box-shadow: 0 2px 6px color-mix(in oklch, var(--shadow-soft) 60%, transparent);
|
||||
pointer-events: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 0.75rem;
|
||||
z-index: 2000000;
|
||||
}
|
||||
|
||||
.panel-floating__label {
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
font-size: 0.95rem;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.selection-summary {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.selection-summary__token {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.selection-summary__count {
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.selection-summary__icon {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.selection-summary--text {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.selection-summary__separator {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.panel-floating-actions {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
flex-wrap: nowrap;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.panel-floating-actions .quick-add {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.panel-floating-actions .quick-add__trigger {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.panel-floating-actions .quick-add__trigger[disabled] {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.panel-floating-actions__button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
pointer-events: auto;
|
||||
font-size: 1.35rem;
|
||||
}
|
||||
|
||||
.panel-floating-actions__button .icon-inline {
|
||||
display: inline-flex;
|
||||
width: 1.35rem;
|
||||
height: 1.35rem;
|
||||
}
|
||||
|
||||
.documents-panel .documents-scroll {
|
||||
overflow-y: auto;
|
||||
background: transparent;
|
||||
min-height: 0;
|
||||
padding-right: 0.3rem;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.documents-panel .documents-scroll:focus-visible {
|
||||
outline: 2px solid var(--selection-ring);
|
||||
outline-offset: 2px;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.documents-panel table {
|
||||
max-width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.88rem;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
|
||||
.documents-panel thead th {
|
||||
background-color: var(--surface);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
padding: 0.45rem 0.6rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
|
||||
.documents-panel th,
|
||||
.documents-panel td {
|
||||
padding: 0.45rem 0.6rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.documents-panel--view-grid .documents-scroll {
|
||||
padding: 0.35rem 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.documents-panel th.thumb-column,
|
||||
.documents-panel td.thumb-cell {
|
||||
width: 54px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.documents-panel--view-grid .document-thumbnail-wrapper {
|
||||
width: var(--documents-grid-icon-size);
|
||||
height: var(--documents-grid-icon-size);
|
||||
padding: 8px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.documents-panel--view-grid .folder-card__icon {
|
||||
width: var(--documents-grid-icon-size);
|
||||
height: var(--documents-grid-icon-size);
|
||||
padding: 8px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.document-thumbnail-inner {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.document-thumbnail-inner--multipage::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-image: url('../../assets/papercorner.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.documents-panel--view-grid .document-thumbnail-inner--multipage::after {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.document-thumbnail {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
box-shadow: 0 1px 6px var(--shadow-medium);
|
||||
}
|
||||
|
||||
.documents-panel--view-grid .document-thumbnail {
|
||||
box-shadow: 0 1px 12px var(--shadow-medium);
|
||||
}
|
||||
|
||||
.thumb-placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 1px;
|
||||
background: var(--surface-subtle);
|
||||
color: var(--muted);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.68rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
box-shadow: 0 1px 3px var(--shadow-medium);
|
||||
}
|
||||
|
||||
.documents-panel--view-grid .thumb-placeholder {
|
||||
font-size: 1.1rem;
|
||||
letter-spacing: 0.12em;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.thumb-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.thumb-icon__image {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.documents-panel th.actions-column,
|
||||
.documents-panel td.actions {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.documents-panel td.doc-list__name {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.doc-title-edit {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.doc-title-edit input[type='text'] {
|
||||
padding: 0.3rem 0.55rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
color: var(--fg);
|
||||
min-width: 8rem;
|
||||
}
|
||||
|
||||
.doc-title-edit input[type='text']:focus-visible {
|
||||
outline: 2px solid var(--selection-ring);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.doc-title-edit .icon-button {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.documents-panel .doc-name__primary {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.documents-panel .doc-name__primary-text {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
|
||||
.doc-entry {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.doc-entry--with-thumb .doc-entry__thumb {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.doc-entry__thumb .document-thumbnail-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.doc-entry__main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.35rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.doc-entry__name {
|
||||
font-weight: 600;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.doc-entry__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.documents-panel td.actions .action-buttons {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr {
|
||||
background: transparent;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.folder {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.folder.focused {
|
||||
box-shadow: inset 2px 0 0 var(--accent-outline);
|
||||
background: var(--sidebar-hover-bg);
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document.selected,
|
||||
.documents-panel tbody tr.folder.selected {
|
||||
background: var(--selection-soft);
|
||||
box-shadow: inset 2px 0 0 var(--accent-outline-strong);
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document,
|
||||
.documents-panel tbody tr.document * {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document.focused:not(.selected) {
|
||||
box-shadow: inset 2px 0 0 var(--accent-outline);
|
||||
}
|
||||
|
||||
.doc-name {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.documents-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(var(--documents-grid-icon-size), 1fr));
|
||||
gap: 0.3rem 1.3rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.document-card {
|
||||
padding: 0rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.document-card.selected .document-thumbnail-wrapper,
|
||||
.folder-card.selected .folder-card__icon {
|
||||
background-color: var(--selection-soft);
|
||||
}
|
||||
|
||||
.document-card:focus-visible .document-thumbnail-wrapper {
|
||||
background-color: var(--selection-ring);
|
||||
}
|
||||
|
||||
.document-card.is-dragging {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.document-card__meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.document-card__title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.document-card__title-row {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.document-card__title-badge {
|
||||
padding: 0.2rem 0.7rem;
|
||||
border-radius: 1rem;
|
||||
max-width: 100%;
|
||||
word-break: break-word;
|
||||
font-size: var(--documents-grid-title-size);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.document-card .doc-correspondent-link {
|
||||
font-size: var(--documents-grid-title-size);
|
||||
}
|
||||
|
||||
.document-card.selected .document-card__title-badge {
|
||||
background-color: var(--accent);
|
||||
color: var(--on-accent);
|
||||
}
|
||||
|
||||
.document-card__subtitle {
|
||||
font-size: 0.78rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.document-card__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.folder-card {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.folder-card__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: var(--documents-grid-icon-size);
|
||||
height: var(--documents-grid-icon-size);
|
||||
}
|
||||
|
||||
.folder-card__icon-svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.folder-card__meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.28rem;
|
||||
padding-top: 0.35rem;
|
||||
}
|
||||
|
||||
.folder-card__label-row {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.folder-card__name {
|
||||
color: var(--fg);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: break-word;
|
||||
font-size: var(--documents-grid-title-size);
|
||||
padding: 0.2rem 0.7rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.folder-card__edit {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.folder-card.selected .folder-card__name {
|
||||
background-color: var(--accent);
|
||||
color: var(--on-accent);
|
||||
}
|
||||
|
||||
|
||||
.doc-name__title {
|
||||
max-width: 100%;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.doc-name__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.doc-correspondents {
|
||||
display: inline;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.doc-correspondent-link {
|
||||
background: none;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
box-shadow: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.doc-correspondent-link:not(.is-static):hover,
|
||||
.doc-correspondent-link:not(.is-static):focus-visible {
|
||||
color: var(--accent-strong, var(--accent));
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 1.5px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.doc-correspondent-link:not(.is-static):focus-visible {
|
||||
outline: 2px solid currentColor;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document.selected .doc-correspondents,
|
||||
.documents-panel tbody tr.document.selected .doc-correspondent-link,
|
||||
.document-card.selected .doc-correspondent-link {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.document-card.selected .doc-correspondents {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.doc-correspondent-link.is-active {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.doc-correspondent-link.is-static {
|
||||
color: inherit;
|
||||
cursor: default;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.doc-correspondent-link__separator {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document.dragging {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.documents-panel tbody tr.document.tag-drop-target {
|
||||
background: var(--accent-soft);
|
||||
box-shadow: inset 0 0 0 2px var(--accent);
|
||||
}
|
||||
|
||||
.document-card.tag-drop-target {
|
||||
box-shadow: 0 0 0 2px var(--accent);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.document-card.tag-drop-target .document-card__title {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.filter-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.32rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.filter-bar input[type='search'] {
|
||||
flex: 1;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
display: flex;
|
||||
gap: 0.32rem;
|
||||
}
|
||||
|
||||
.search-hint {
|
||||
margin-top: 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0.15rem 0.35rem;
|
||||
border-radius: 2px;
|
||||
background: var(--surface-subtle);
|
||||
color: var(--fg);
|
||||
font-size: 0.74rem;
|
||||
}
|
||||
|
||||
.tag-chip {
|
||||
gap: 0.25rem;
|
||||
border-radius: 1rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tag-chip--more {
|
||||
background: transparent;
|
||||
border-color: var(--border-strong);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.tag-chip--removable {
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.tag-chip__remove {
|
||||
background: none;
|
||||
border: none;
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.tag-chip__remove:hover,
|
||||
.tag-chip__remove:focus-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tag-chip__remove:focus-visible {
|
||||
outline: 2px solid currentColor;
|
||||
outline-offset: 2px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
border: 1px dashed var(--border);
|
||||
border-radius: 0;
|
||||
text-align: center;
|
||||
padding: 1.1rem 0.9rem;
|
||||
color: var(--muted);
|
||||
margin-top: 0.75rem;
|
||||
background: var(--surface-subtle);
|
||||
}
|
||||
|
||||
.empty-state--global {
|
||||
border-style: solid;
|
||||
}
|
||||
Reference in New Issue
Block a user