first wokring prototype

This commit is contained in:
2026-06-10 04:10:02 +02:00
parent 50d779a537
commit 7491c0a1b4
90 changed files with 10799 additions and 1 deletions

454
src/styles/components.css Normal file
View File

@@ -0,0 +1,454 @@
/* Shared application components: loading indicator, mail-address editor and toggle switch. */
.page-title-with-loader {
display: inline-flex;
align-items: center;
gap: 10px;
}
.loading-indicator {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
vertical-align: middle;
}
.loading-indicator-sm { width: 22px; height: 22px; }
.loading-indicator-md { width: 30px; height: 30px; }
.loading-envelope {
position: relative;
display: inline-block;
width: 18px;
height: 13px;
border: 2px solid #8c8881;
border-radius: 3px;
background: rgba(255,255,255,.7);
animation: loading-envelope-float .74s ease-in-out infinite alternate;
}
.loading-envelope::before,
.loading-envelope::after {
content: "";
position: absolute;
top: 1px;
width: 10px;
height: 10px;
border-top: 2px solid #8c8881;
}
.loading-envelope::before {
left: 1px;
transform: rotate(36deg);
transform-origin: top left;
}
.loading-envelope::after {
right: 1px;
transform: rotate(-36deg);
transform-origin: top right;
}
@keyframes loading-envelope-float {
from { transform: translateY(0) rotate(-3deg); opacity: .62; }
to { transform: translateY(-2px) rotate(3deg); opacity: 1; }
}
.email-address-input {
display: grid;
gap: 10px;
}
.email-chip-list {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
min-height: 34px;
}
.email-chip {
display: inline-flex;
align-items: center;
gap: 7px;
max-width: 100%;
border: 1px solid #c9c5bd;
border-radius: 999px;
background: linear-gradient(#ffffff, #f2f1ef);
box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 1px 1px rgba(0,0,0,.05);
padding: 5px 8px 5px 11px;
color: var(--text-strong);
font-size: 13px;
line-height: 1.2;
}
.email-chip.invalid {
border-color: #c96b63;
background: #f6e3df;
color: #873c35;
}
.email-chip-main {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 700;
}
.email-chip-address {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--muted);
font-size: 12px;
}
.email-chip-remove {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
border: 0;
border-radius: 999px;
background: rgba(0,0,0,.08);
color: #57534d;
cursor: pointer;
font-size: 14px;
line-height: 1;
padding: 0;
}
.email-chip-remove:hover { background: rgba(0,0,0,.15); }
.email-chip-empty {
color: var(--muted);
font-size: 13px;
}
.email-address-hint {
margin-top: 8px;
color: var(--muted);
font-size: 12px;
line-height: 1.35;
}
.recipient-editor-table th:nth-child(2),
.recipient-editor-table td:nth-child(2) { min-width: 430px; }
.recipient-editor-table th:last-child,
.recipient-editor-table td:last-child { width: 92px; text-align: right; }
.recipient-field-input,
.recipient-attachments-input {
min-width: 150px;
font-size: 12px;
}
.recipient-attachments-input {
min-width: 260px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.card-title-node,
.card-heading-with-loader {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--text-strong);
font-weight: 800;
}
.card-heading-with-loader {
font-size: 18px;
}
/* Mail-style address editor: textarea surface + pills + add dialog. */
.email-address-editor {
position: relative;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 7px;
min-height: 44px;
border: 1px solid var(--line);
border-radius: 8px;
background: #fff;
box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 1px 2px rgba(0,0,0,.035);
padding: 7px 8px;
}
.email-address-editor:focus-within {
border-color: #9bb7d3;
box-shadow: 0 0 0 3px rgba(82, 130, 177, .14), inset 0 1px 0 rgba(255,255,255,.8);
}
.email-address-editor.has-error {
border-color: #c96b63;
box-shadow: 0 0 0 3px rgba(201, 107, 99, .13);
}
.email-address-editor .email-chip-list {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 7px;
min-height: 0;
}
.email-address-textarea {
flex: 1 1 230px;
min-width: 190px;
min-height: 26px;
max-height: 96px;
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
resize: none;
overflow: hidden;
padding: 4px 2px;
font: inherit;
line-height: 1.35;
}
.email-address-textarea:focus {
outline: none;
box-shadow: none;
}
.email-address-input.has-add-button .email-address-editor {
padding-right: 42px;
}
.email-address-plus {
position: absolute;
top: 8px;
right: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border: 1px solid #c7c2b8;
border-radius: 999px;
background: linear-gradient(#fff, #f0efec);
color: #4f4b46;
cursor: pointer;
font-size: 19px;
font-weight: 800;
line-height: 1;
padding: 0;
}
.email-address-plus:hover {
border-color: #aaa49a;
background: linear-gradient(#fff, #e9e7e3);
}
.email-address-popover {
position: absolute;
z-index: 12;
top: calc(100% + 7px);
right: 0;
width: min(360px, calc(100vw - 64px));
display: grid;
gap: 10px;
border: 1px solid var(--line-dark);
border-radius: 8px;
background: #fff;
box-shadow: var(--shadow-popover);
padding: 14px;
}
.email-address-popover h4 {
margin: 0;
color: var(--text-strong);
font-size: 15px;
}
.email-address-popover label {
display: grid;
gap: 5px;
color: var(--muted);
font-size: 12px;
font-weight: 700;
}
.email-address-popover input {
font-size: 14px;
}
.email-address-suggestions {
display: grid;
gap: 4px;
max-width: 560px;
border: 1px solid var(--line);
border-radius: 8px;
background: #fff;
box-shadow: 0 8px 24px rgba(0,0,0,.08);
padding: 6px;
}
.email-address-suggestions button {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--text-strong);
cursor: pointer;
padding: 7px 8px;
text-align: left;
}
.email-address-suggestions button:hover {
background: var(--panel-soft);
}
.email-address-suggestions small {
color: var(--muted);
}
.email-address-input.compact {
min-width: 420px;
}
.email-address-input.compact .email-address-editor {
min-height: 40px;
}
.email-address-input.compact .email-address-textarea {
flex-basis: 180px;
min-width: 150px;
}
.email-address-input.disabled .email-address-editor {
background: var(--panel-soft);
}
.email-address-input.disabled .email-address-plus,
.email-address-input.disabled .email-address-textarea,
.email-address-input.disabled .email-address-suggestions,
.email-address-input.disabled .email-address-popover {
display: none;
}
/* Bootstrap-like switch controls without importing Bootstrap. */
.toggle-switch-row {
display: flex;
align-items: center;
gap: 10px;
min-height: 42px;
color: var(--text);
cursor: pointer;
font-weight: 700;
}
.toggle-switch-row.disabled {
cursor: default;
opacity: .72;
}
.toggle-switch-input {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
}
.toggle-switch-track {
position: relative;
flex: 0 0 auto;
width: 42px;
height: 24px;
border: 1px solid #aeb4bb;
border-radius: 999px;
background: #cfd4da;
box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.toggle-switch-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 18px;
height: 18px;
border-radius: 999px;
background: #fff;
box-shadow: 0 1px 2px rgba(0,0,0,.22);
transition: transform .16s ease;
}
.toggle-switch-input:checked + .toggle-switch-track {
border-color: #0d6efd;
background: #0d6efd;
}
.toggle-switch-input:checked + .toggle-switch-track .toggle-switch-thumb {
transform: translateX(18px);
}
.toggle-switch-input:focus-visible + .toggle-switch-track {
box-shadow: 0 0 0 3px rgba(13,110,253,.2), inset 0 1px 2px rgba(0,0,0,.12);
}
.toggle-switch-input:disabled + .toggle-switch-track {
filter: grayscale(.15);
opacity: .7;
}
.toggle-switch-copy {
display: grid;
gap: 2px;
}
.toggle-switch-label {
color: var(--text-strong);
}
.toggle-switch-help {
color: var(--muted);
font-size: 12px;
font-weight: 500;
line-height: 1.3;
}
@media (max-width: 900px) {
.email-address-input.compact { min-width: 260px; }
.email-address-input.has-add-button .email-address-editor { padding-right: 39px; }
.email-address-popover {
left: 0;
right: auto;
width: min(340px, calc(100vw - 48px));
}
}
/* Reusable inline help markers for form labels and compact contextual hints. */
.field-label {
display: inline-flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.field-label-text {
min-width: 0;
}
.inline-help {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
outline: none;
}
.inline-help-mark {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
border-radius: 999px;
color: #686560;
background: var(--line-dark);
font-size: 11px;
font-weight: 800;
line-height: 1;
}
.inline-help:focus-visible .inline-help-mark {
box-shadow: var(--focus-ring);
}
.inline-help-bubble {
position: absolute;
z-index: 40;
left: 50%;
bottom: calc(100% + 9px);
width: max-content;
max-width: min(320px, calc(100vw - 48px));
transform: translate(-50%, 3px);
border: 1px solid var(--line-dark);
border-radius: 7px;
background: var(--surface);
box-shadow: var(--shadow-popover);
color: var(--text);
font-size: 12px;
font-weight: 500;
line-height: 1.4;
padding: 9px 10px;
white-space: normal;
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: opacity .14s ease .35s, transform .14s ease .35s, visibility 0s linear .49s;
}
.inline-help-bubble::after {
content: "";
position: absolute;
left: 50%;
top: 100%;
width: 9px;
height: 9px;
border-right: 1px solid var(--line-dark);
border-bottom: 1px solid var(--line-dark);
background: var(--surface);
transform: translate(-50%, -5px) rotate(45deg);
}
.inline-help:hover .inline-help-bubble,
.inline-help:focus-within .inline-help-bubble {
visibility: visible;
opacity: 1;
transform: translate(-50%, 0);
transition-delay: .35s, .35s, .35s;
}