input field handling
This commit is contained in:
parent
30936c8778
commit
4f0465bad1
|
|
@ -433,3 +433,73 @@
|
|||
text-overflow: ellipsis;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
// Admin / super-user profile menu (Babylon li.user-profile > ul) drawn exactly like the ESS user
|
||||
// menu (.ss-dd.ss-user-dd above): white card, 14px corners, soft shadow, header row with a divider,
|
||||
// .ss-dd-action rows. Appearance only — showing/hiding stays with Babylon's .active-topmenuitem,
|
||||
// and every click, routerLink and @if in the template is unchanged. Desktop only: below 1025px
|
||||
// Babylon turns the whole topbar menu into a static list, which is left as it is.
|
||||
@media (min-width: 1025px) {
|
||||
.layout-topbar .topbar-menu > li.user-profile > ul {
|
||||
width: auto !important; // template has an inline width:250px
|
||||
min-width: 210px;
|
||||
border: none;
|
||||
border-radius: 14px !important; // template has an inline border-radius:20px
|
||||
background: $color-white;
|
||||
box-shadow: 0 8px 32px color-mix(in srgb, $color-black 13%, transparent);
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
animation: ssDropIn 0.14s ease;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
display: none; // Babylon's arrow; the ESS card has none
|
||||
}
|
||||
|
||||
> li > a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 9px 16px;
|
||||
color: $topbar-text-slate;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
transition: background 0.12s;
|
||||
|
||||
i {
|
||||
margin-right: 0;
|
||||
font-size: 13px;
|
||||
color: $gray-500;
|
||||
}
|
||||
|
||||
span {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $topbar-bg-hover-dd-action;
|
||||
color: $topbar-text-dark;
|
||||
}
|
||||
}
|
||||
|
||||
// First row is the signed-in user's name: the ESS header row
|
||||
> li:first-child > a {
|
||||
justify-content: space-between;
|
||||
padding: 13px 16px 9px;
|
||||
border-bottom: 1px solid $topbar-border-faint;
|
||||
color: $topbar-text-charcoal;
|
||||
cursor: default;
|
||||
|
||||
i {
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: transparent;
|
||||
color: $topbar-text-charcoal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1329,15 +1329,8 @@
|
|||
}
|
||||
:host ::ng-deep .k-calendar-header { border-bottom: 2px solid var(--gh-bo); color: var(--gh-lk); font-weight: 700; }
|
||||
:host ::ng-deep .k-calendar-monthview .k-link { padding: 0; font-size: 12px; }
|
||||
.button-container1 { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px; }
|
||||
.access-type-button {
|
||||
display: flex; flex-direction: column; align-items: center; gap: 8px;
|
||||
padding: 12px; border-radius: 12px; border: 2px solid var(--gh-bo);
|
||||
background: var(--gh-tb); cursor: pointer; transition: all 0.2s;
|
||||
&:hover { border-color: var(--gh-btn); background: var(--gh-th); }
|
||||
}
|
||||
.access-type-image { width: 48px; height: 48px; object-fit: contain; }
|
||||
.button-text { font-size: 12px; font-weight: 600; color: var(--gh-lk); }
|
||||
// Access Types dialog: no local styles — it uses the global .button-container1 / .access-type-*
|
||||
// rules in styles.scss, so it looks exactly like the Access Types dialog on the login page.
|
||||
@media (max-width: 768px) {
|
||||
.customGrid { margin: 0; }
|
||||
.stats-row { flex-direction: column; }
|
||||
|
|
|
|||
|
|
@ -223,3 +223,15 @@ img {
|
|||
box-shadow: 0px 2px 5px 0px var(--gh-focus);
|
||||
}
|
||||
|
||||
|
||||
/* Profile Update Request dialog: the embedded <app-profile-update> uses the full dialog width.
|
||||
On its own page (/ess/profile-update) .customGrid keeps its 80px side margins — this only
|
||||
applies inside this dialog, and changes spacing only. */
|
||||
kendo-dialog div.col-12:has(> app-profile-update) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
kendo-dialog app-profile-update ::ng-deep .customGrid {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -745,3 +745,121 @@ input[type=radio] {
|
|||
.layout-dashboard .overview-box.sales {
|
||||
background-color: var(--gh-btn);
|
||||
}
|
||||
|
||||
// =====================================================================================
|
||||
// Form control standard — one height for every Kendo field and the buttons beside them.
|
||||
// Textbox, numeric, dropdown, combobox, autocomplete, date/time picker, masked and search
|
||||
// fields all get --gh-h (34px at 14px, scales with the font size);
|
||||
// inside grid cells and the filter row they get the compact --gh-h-sm (30px).
|
||||
// Only size, inner padding and corner radius are set here — colours, the red/green required
|
||||
// marker, widths and every behaviour stay as they are.
|
||||
// $std (html:not(#gh-std)) carries id-level specificity, so screen-level ::ng-deep overrides and
|
||||
// inline style="height: 28px" can no longer make one field taller or shorter than the rest.
|
||||
// Untouched on purpose: textarea (multi-line), multiselect (grows with its tags, gets only a
|
||||
// min-height), checkbox, radio, switch, slider.
|
||||
// =====================================================================================
|
||||
$std: 'html:not(#gh-std)';
|
||||
:root {
|
||||
--gh-h: calc(var(--gh-fz) * 34 / 14);
|
||||
--gh-h-sm: calc(var(--gh-fz) * 30 / 14);
|
||||
--gh-field-px: 10px;
|
||||
--gh-field-r: 6px;
|
||||
}
|
||||
|
||||
// ---- Fields ----
|
||||
#{$std} :is(.k-input, .k-picker):not(.k-textarea, .k-multiselect) {
|
||||
height: var(--gh-h) !important;
|
||||
min-height: var(--gh-h) !important;
|
||||
box-sizing: border-box;
|
||||
border-radius: var(--gh-field-r) !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#{$std} .k-multiselect {
|
||||
min-height: var(--gh-h) !important;
|
||||
height: auto !important;
|
||||
border-radius: var(--gh-field-r) !important;
|
||||
}
|
||||
// A Kendo field nested in another (the date input inside a date picker) fills its parent
|
||||
#{$std} :is(.k-input, .k-picker) :is(.k-input, .k-picker):not(.k-textarea, .k-multiselect) {
|
||||
height: 100% !important;
|
||||
min-height: 0 !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
// Text area of a wrapper field: full height, vertically centred, standard side padding
|
||||
#{$std} :is(.k-input, .k-picker):not(.k-textarea) > .k-input-inner,
|
||||
#{$std} :is(.k-input, .k-picker):not(.k-textarea) .k-dateinput > .k-input-inner {
|
||||
height: 100% !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
padding-inline: var(--gh-field-px) !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
// Dropdown list: the selected text sits inside .k-input-inner, which already has the padding
|
||||
#{$std} .k-picker .k-input-value-text {
|
||||
padding: 0 !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
// <input kendoTextBox> is the field itself
|
||||
#{$std} input.k-textbox {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
padding-inline: var(--gh-field-px) !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
// Arrow / calendar / clock button and numeric spinners fill the field's height
|
||||
#{$std} :is(.k-input, .k-picker) > :is(.k-input-button, .k-input-spinner) {
|
||||
height: auto !important;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
// ---- Compact fields inside grids (data cells and filter row) ----
|
||||
#{$std} .k-grid :is(td, .k-filter-row th) :is(.k-input, .k-picker):not(.k-textarea, .k-multiselect, .k-input .k-input, .k-picker .k-input) {
|
||||
height: var(--gh-h-sm) !important;
|
||||
min-height: var(--gh-h-sm) !important;
|
||||
}
|
||||
#{$std} .k-grid :is(td, .k-filter-row th) .k-multiselect {
|
||||
min-height: var(--gh-h-sm) !important;
|
||||
}
|
||||
|
||||
// ---- Buttons: the same height as the fields ----
|
||||
// Kendo 25 adds no size class unless size="..." is set, so this targets every Kendo button that is
|
||||
// not explicitly small/large. Buttons that belong to another widget (field arrow, spinner, titlebar
|
||||
// close, pager, calendar, column menu, ...) keep Kendo's own size.
|
||||
// Picture tiles (Access Types / payroll-type chooser, dashboard picture buttons, self-profile
|
||||
// sections) are cards, not action buttons: they keep their own size and layout.
|
||||
$btn-tile: '.access-type-button, :has(img)';
|
||||
$btn-skip: '.k-input, .k-picker, .k-window-titlebar, .k-dialog-titlebar, .k-pager, .k-calendar, .k-grid-header, .k-column-menu, .k-scheduler, .k-editor, .k-toolbar-popup, .k-menu, .k-tabstrip-items, .k-chip-list, .k-treeview, .k-time-list, .k-datetime-container, .k-colorpicker, .k-flatcolorpicker, .k-upload, .k-actionsheet, .k-pdf-viewer, .k-gantt, .k-filter-menu, .k-popup, .k-grid-pager, .k-expander-header';
|
||||
#{$std} .k-button:not(.k-button-sm, .k-button-lg, .k-input-button, .k-spin-button, .k-spinner-increase, .k-spinner-decrease, .k-button-flat):not(:is(#{$btn-skip}) *):not(#{$btn-tile}) {
|
||||
height: var(--gh-h) !important;
|
||||
min-height: var(--gh-h) !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
}
|
||||
// ...compact inside grid data cells
|
||||
#{$std} .k-grid td .k-button:not(.k-button-sm, .k-button-lg, .k-input-button, .k-spin-button, .k-spinner-increase, .k-spinner-decrease, .k-button-flat):not(:is(#{$btn-skip}) *):not(#{$btn-tile}) {
|
||||
height: var(--gh-h-sm) !important;
|
||||
min-height: var(--gh-h-sm) !important;
|
||||
}
|
||||
|
||||
// ---- Icon-only buttons: icon exactly in the middle ----
|
||||
// Kendo always renders a <span class="k-button-text">, empty for icon-only buttons; with the
|
||||
// button's gap that empty span pushed the icon off-centre. Hide it and make the button square.
|
||||
.k-button .k-button-text:empty {
|
||||
display: none;
|
||||
}
|
||||
#{$std} .k-button:not(.k-input-button, .k-spin-button, .k-spinner-increase, .k-spinner-decrease):not(:is(#{$btn-skip}) *):not(#{$btn-tile}):is(.k-icon-button, :has(> .k-button-text:empty)) {
|
||||
aspect-ratio: 1 / 1;
|
||||
min-width: 0 !important;
|
||||
padding-inline: 0 !important;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
}
|
||||
// Buttons whose only content is an <i class="pi ..."> icon (no text) are centred the same way
|
||||
.k-button > .k-button-text:has(> i:only-child) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user