diff --git a/HRM.UI/ClientApp/src/app/form-builder/Basic-Master-View.component.css b/HRM.UI/ClientApp/src/app/form-builder/Basic-Master-View.component.css index 3f13403..5ac2a02 100644 --- a/HRM.UI/ClientApp/src/app/form-builder/Basic-Master-View.component.css +++ b/HRM.UI/ClientApp/src/app/form-builder/Basic-Master-View.component.css @@ -15,4 +15,31 @@ .k-dropdownlist.bm-status-dropdown{ width: 150px !important; flex: 0 0 auto; -} \ No newline at end of file +} +/* Tree toolbar: search box, status dropdown and every action button on one line, all the same + height (the app-wide field/button standard) and evenly spaced. Layout only — which buttons + appear (@if) and when they are enabled ([disabled]) is unchanged. Scoped to .fixedControl, so + the dynamic picker's .ktextbox is not affected. */ +.fixedControl { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + gap: 8px; +} +/* the inline margin-right: 5px on each control and .ktextbox's 10px become one even 8px gap */ +.fixedControl > * { + margin: 0 !important; +} +.fixedControl > kendo-textbox.ktextbox { + width: 240px !important; + flex: 0 0 auto; +} +/* beats the global .k-dropdownlist { width: 100% !important } that pushed it onto its own line */ +.fixedControl > kendo-dropdownlist.k-dropdownlist { + width: 170px !important; + flex: 0 0 auto; +} +.fixedControl > .k-button { + flex: 0 0 auto; +} diff --git a/HRM.UI/ClientApp/src/styles/theme/gohr-theme.scss b/HRM.UI/ClientApp/src/styles/theme/gohr-theme.scss index 9061668..b153838 100644 --- a/HRM.UI/ClientApp/src/styles/theme/gohr-theme.scss +++ b/HRM.UI/ClientApp/src/styles/theme/gohr-theme.scss @@ -704,15 +704,12 @@ input[type=radio] { // ---------- Lists, popups, calendar, tree ---------- .k-list-item.k-selected, .k-list-item.k-selected:hover, -.k-list .k-item.k-state-selected, -.k-treeview .k-in.k-state-selected, -.k-treeview .k-treeview-leaf.k-selected { +.k-list .k-item.k-state-selected { background-color: var(--gh-btn); color: #FFFFFF; } .k-list-item:hover, -.k-list-item.k-hover, -.k-treeview .k-treeview-leaf:hover { +.k-list-item.k-hover { background-color: var(--gh-sel); } .k-calendar .k-calendar-td.k-selected .k-link, @@ -863,3 +860,123 @@ $btn-skip: '.k-input, .k-picker, .k-window-titlebar, .k-dialog-titlebar, .k-page align-items: center; justify-content: center; } + + +// ===================================================================================== +// Tree view (form-builder master trees, role permission, chart of accounts, organogram, +// pickers). Appearance only: nodes, selection, filter, expand/collapse, checkboxes and the +// node templates work exactly as before. Kendo's own trees inside column menus, pivot and +// spreadsheet filters are left alone. +// - roomy rows with rounded corners, palette hover +// - selected node: palette tint + accent bar on the left (as the studio's selected grid row) +// - parent nodes semi-bold; guide line under each expanded parent, joining its children +// - larger, centred expand/collapse toggle +// Kendo indents each level by --kendo-treeview-level × 24px (top level = 1) and pulls the toggle +// 24px into that indent, so a parent's toggle is centred at level × 24px − 12px. +// ===================================================================================== +$tree: '.k-treeview:not(.k-column-menu *, .k-pivotgrid-configurator-content *, .k-spreadsheet-filter-menu *, .k-datainsights-composer-popup *)'; + +#{$tree} { + padding: 6px 4px; + font-size: var(--gh-fz); + color: var(--gh-bt); +} +#{$tree} .k-treeview-group { + gap: 2px; +} +#{$tree} .k-treeview-item-content { + min-height: calc(var(--gh-fz) * 32 / 14); + padding-inline-end: 8px; + border-radius: 8px; + transition: background-color .15s, box-shadow .15s; +} +#{$tree} .k-treeview-item-content:is(:hover, .k-hover) { + color: var(--gh-ht); + background-color: color-mix(in srgb, var(--gh-btn) 7%, transparent); +} +#{$tree} .k-treeview-item-content.k-selected { + color: var(--gh-ht); + background-color: var(--gh-sel); + box-shadow: inset 3px 0 0 var(--gh-lk); +} +#{$tree} .k-treeview-item-content.k-selected:is(:hover, .k-hover) { + background-color: color-mix(in srgb, var(--gh-btn) 16%, var(--gh-tb)); +} +#{$tree} .k-treeview-item-content:is(:focus, .k-focus) { + box-shadow: inset 0 0 0 2px var(--gh-ring); +} +#{$tree} .k-treeview-item-content.k-selected:is(:focus, .k-focus) { + box-shadow: inset 3px 0 0 var(--gh-lk), inset 0 0 0 2px var(--gh-ring); +} +#{$tree} .k-treeview-item-content.k-disabled { + opacity: .55; +} +// Node text +#{$tree} .k-treeview-leaf { + padding-block: 6px; + padding-inline: 8px; + line-height: 1.35; + border-radius: 6px; +} +#{$tree} .k-treeview-item-content.k-selected .k-treeview-leaf { + font-weight: 600; +} +// Parent nodes (those with an expand/collapse toggle) read as headings +#{$tree} .k-treeview-item-content:has(> .k-treeview-toggle) .k-treeview-leaf { + font-weight: 600; + color: var(--gh-ht); +} +// Expand / collapse toggle +#{$tree} .k-treeview-toggle { + width: 24px; + height: 24px; + justify-content: center; + border-radius: 6px; + color: var(--gh-muted); + transition: background-color .15s, color .15s; +} +#{$tree} .k-treeview-toggle:hover { + color: var(--gh-lk); + background-color: color-mix(in srgb, var(--gh-btn) 12%, transparent); +} +#{$tree} .k-treeview-toggle .k-icon, +#{$tree} .k-treeview-toggle .k-svg-icon { + padding: 0; +} +// Guide line from an expanded parent down through its children +#{$tree} .k-treeview-item > .k-treeview-group { + position: relative; +} +#{$tree} .k-treeview-item > .k-treeview-group::before { + content: ""; + position: absolute; + top: 0; + bottom: 6px; + left: calc(var(--kendo-treeview-level, 1) * 24px - 12px); + width: 1px; + background-color: var(--gh-bo); + pointer-events: none; +} +// Filter box above the tree +#{$tree} .k-treeview-filter { + padding: 4px 4px 8px; +} +// "Load more" link +#{$tree} .k-treeview-load-more-button { + color: var(--gh-lk); + font-weight: 500; +} + +// ===================================================================================== +// Dialog backdrop: every kendo-dialog dims the page with the same colour as .blur-background +// (styles.scss). The unscoped `.k-overlay { opacity: 0 }` in vendors/kendo/_misc.scss (and the +// employee picker) hid Kendo's own backdrop everywhere, so dialogs not wrapped in a +// .blur-background element showed the page behind them undimmed. +// A dialog that already sits inside .blur-background is skipped, so the tint is never doubled. +// Screens that style their own overlay (the calendar dialogs) keep their own look. +// Appearance only — opening, closing and Esc behave exactly as before. +// ===================================================================================== +.k-dialog-wrapper > .k-overlay:not(.blur-background *) { + opacity: 1; + background-color: color-mix(in srgb, var(--gh-sb) 40%, transparent); +}