feat: implement immutable form definitions
This commit is contained in:
@@ -0,0 +1,265 @@
|
||||
.forms-page,
|
||||
.forms-shell {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.forms-shell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.forms-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 58px;
|
||||
padding: 10px 18px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--surface-raised);
|
||||
}
|
||||
|
||||
.forms-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: min(520px, 100%);
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.forms-search input {
|
||||
min-width: 120px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.forms-toolbar > label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
}
|
||||
|
||||
.forms-toolbar > label > span,
|
||||
.forms-count {
|
||||
color: var(--text-soft);
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.forms-list-viewport {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding: 16px 18px 24px;
|
||||
}
|
||||
|
||||
.forms-list {
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
background: var(--surface-raised);
|
||||
}
|
||||
|
||||
.forms-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(260px, 1fr) minmax(90px, auto) minmax(120px, auto) auto 36px;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
min-height: 64px;
|
||||
padding: 9px 12px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.forms-row:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.forms-row:hover {
|
||||
background: var(--hover-bg);
|
||||
}
|
||||
|
||||
.forms-row > span:first-child {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.forms-row > span:first-child strong,
|
||||
.forms-row > span:first-child small {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.forms-row > span:not(:first-child, .status-badge),
|
||||
.forms-row small {
|
||||
color: var(--text-soft);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.forms-row-action-spacer {
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.forms-empty {
|
||||
padding: 36px 0;
|
||||
color: var(--text-soft);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form-definition-dialog {
|
||||
width: min(1120px, calc(100vw - 32px));
|
||||
height: min(860px, calc(100vh - 32px));
|
||||
}
|
||||
|
||||
.form-definition-editor {
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.form-definition-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px 16px;
|
||||
}
|
||||
|
||||
.form-definition-wide {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.form-definition-toggle {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
min-height: 58px;
|
||||
}
|
||||
|
||||
.form-definition-handoffs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 18px;
|
||||
padding: 10px 0;
|
||||
border-top: 1px solid var(--border);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.form-definition-handoffs > span {
|
||||
margin-right: auto;
|
||||
font-size: 0.84rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.form-field-editor-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.form-field-editor-heading h3 {
|
||||
margin: 0;
|
||||
font-size: 0.98rem;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.form-field-editor-list {
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.form-field-editor-row {
|
||||
display: grid;
|
||||
grid-template-columns: 36px minmax(120px, 0.8fr) minmax(160px, 1.1fr) minmax(130px, 0.8fr) minmax(100px, auto) 36px;
|
||||
align-items: end;
|
||||
gap: 9px;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.form-field-order {
|
||||
display: flex;
|
||||
align-self: stretch;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.form-field-order .icon-button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.form-field-required {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 38px;
|
||||
}
|
||||
|
||||
.form-field-help,
|
||||
.form-field-options,
|
||||
.form-field-constraints {
|
||||
grid-column: 2 / -1;
|
||||
}
|
||||
|
||||
.form-field-constraints {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.forms-toolbar {
|
||||
align-items: stretch;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.forms-search {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.forms-row {
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
}
|
||||
|
||||
.forms-row > span:nth-child(2),
|
||||
.forms-row > span:nth-child(3) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-field-editor-row {
|
||||
grid-template-columns: 36px minmax(0, 1fr) 36px;
|
||||
}
|
||||
|
||||
.form-field-editor-row > .form-field {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.form-field-order {
|
||||
grid-column: 1;
|
||||
grid-row: 1 / span 4;
|
||||
}
|
||||
|
||||
.form-field-required,
|
||||
.form-field-help,
|
||||
.form-field-options,
|
||||
.form-field-constraints {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.form-field-editor-row > .icon-button:last-child {
|
||||
grid-column: 3;
|
||||
grid-row: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.form-definition-grid,
|
||||
.form-field-constraints {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.form-definition-wide {
|
||||
grid-column: auto;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user