Style: integrated chips filter toolbar design
- Wrap filter input in pill-shaped container (.chips-filter-group) - Remove hard border separation between toolbar and chips - Make toolbar feel like part of the chips area with shared background - Smaller, subtler count badge and clear button - Clear button styled as danger pill that fills on hover - Responsive: hide clear text on small screens Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3953,14 +3953,16 @@
|
|||||||
var trans = this.config.trans || {};
|
var trans = this.config.trans || {};
|
||||||
var $picker = $chips.closest('.value-picker');
|
var $picker = $chips.closest('.value-picker');
|
||||||
|
|
||||||
// Create wrapper structure - simple inline toolbar
|
// Create wrapper structure - integrated filter toolbar
|
||||||
var wrapperHtml = '<div class="chips-wrapper">' +
|
var wrapperHtml = '<div class="chips-wrapper">' +
|
||||||
'<div class="chips-toolbar">' +
|
'<div class="chips-toolbar">' +
|
||||||
|
'<span class="chips-filter-group">' +
|
||||||
'<i class="icon-search"></i>' +
|
'<i class="icon-search"></i>' +
|
||||||
'<input type="text" class="chips-search-input" placeholder="' + (trans.filter || 'Filter') + '...">' +
|
'<input type="text" class="chips-search-input" placeholder="' + (trans.filter || 'Filter') + '...">' +
|
||||||
|
'</span>' +
|
||||||
'<span class="chips-count"></span>' +
|
'<span class="chips-count"></span>' +
|
||||||
'<button type="button" class="btn-chips-clear" title="' + (trans.clear_all || 'Clear all') + '">' +
|
'<button type="button" class="btn-chips-clear" title="' + (trans.clear_all || 'Clear all') + '">' +
|
||||||
'<i class="icon-trash"></i> <span class="clear-text">' + (trans.clear_all || 'Clear all') + '</span>' +
|
'<i class="icon-trash"></i> <span class="clear-text">' + (trans.clear || 'Clear') + '</span>' +
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="chips-load-more" style="display:none;"></div>' +
|
'<div class="chips-load-more" style="display:none;"></div>' +
|
||||||
|
|||||||
2
assets/js/admin/entity-selector.min.js
vendored
2
assets/js/admin/entity-selector.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -175,14 +175,16 @@
|
|||||||
var trans = this.config.trans || {};
|
var trans = this.config.trans || {};
|
||||||
var $picker = $chips.closest('.value-picker');
|
var $picker = $chips.closest('.value-picker');
|
||||||
|
|
||||||
// Create wrapper structure - simple inline toolbar
|
// Create wrapper structure - integrated filter toolbar
|
||||||
var wrapperHtml = '<div class="chips-wrapper">' +
|
var wrapperHtml = '<div class="chips-wrapper">' +
|
||||||
'<div class="chips-toolbar">' +
|
'<div class="chips-toolbar">' +
|
||||||
|
'<span class="chips-filter-group">' +
|
||||||
'<i class="icon-search"></i>' +
|
'<i class="icon-search"></i>' +
|
||||||
'<input type="text" class="chips-search-input" placeholder="' + (trans.filter || 'Filter') + '...">' +
|
'<input type="text" class="chips-search-input" placeholder="' + (trans.filter || 'Filter') + '...">' +
|
||||||
|
'</span>' +
|
||||||
'<span class="chips-count"></span>' +
|
'<span class="chips-count"></span>' +
|
||||||
'<button type="button" class="btn-chips-clear" title="' + (trans.clear_all || 'Clear all') + '">' +
|
'<button type="button" class="btn-chips-clear" title="' + (trans.clear_all || 'Clear all') + '">' +
|
||||||
'<i class="icon-trash"></i> <span class="clear-text">' + (trans.clear_all || 'Clear all') + '</span>' +
|
'<i class="icon-trash"></i> <span class="clear-text">' + (trans.clear || 'Clear') + '</span>' +
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="chips-load-more" style="display:none;"></div>' +
|
'<div class="chips-load-more" style="display:none;"></div>' +
|
||||||
|
|||||||
@@ -20,23 +20,40 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chips toolbar - search and actions
|
// Chips toolbar - integrated filter bar inside chips area
|
||||||
.chips-toolbar {
|
.chips-toolbar {
|
||||||
display: none; // Hidden by default, shown via JS when chips exist
|
display: none; // Hidden by default, shown via JS when chips exist
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: $es-spacing-sm;
|
gap: $es-spacing-xs;
|
||||||
padding: $es-spacing-sm $es-spacing-md;
|
padding: $es-spacing-sm $es-spacing-md;
|
||||||
background: $es-white;
|
padding-bottom: 0; // No bottom padding - chips will provide spacing
|
||||||
border-bottom: 1px solid $es-border-color;
|
background: transparent; // Same as chips area
|
||||||
|
|
||||||
&.has-chips {
|
&.has-chips {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Search icon
|
// Filter input styled as a search chip
|
||||||
|
.chips-filter-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25rem;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: $es-white;
|
||||||
|
border: 1px solid $es-border-color;
|
||||||
|
border-radius: $es-radius-full;
|
||||||
|
transition: all $es-transition-fast;
|
||||||
|
|
||||||
|
&:focus-within {
|
||||||
|
border-color: $es-primary;
|
||||||
|
box-shadow: 0 0 0 2px rgba($es-primary, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search icon inside the pill
|
||||||
> i {
|
> i {
|
||||||
color: $es-text-muted;
|
color: $es-text-muted;
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,46 +62,46 @@
|
|||||||
input.chips-search-input,
|
input.chips-search-input,
|
||||||
input.chips-search-input[type="text"] {
|
input.chips-search-input[type="text"] {
|
||||||
flex: 1 !important;
|
flex: 1 !important;
|
||||||
min-width: 80px !important;
|
min-width: 60px !important;
|
||||||
max-width: none !important;
|
max-width: 120px !important;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
padding: 0 !important;
|
padding: 0.125rem 0 !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-bottom: 1px solid transparent !important;
|
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
font-size: $es-font-size-sm !important;
|
font-size: $es-font-size-xs !important;
|
||||||
color: $es-text-primary;
|
color: $es-text-primary;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
transition: border-color $es-transition-fast;
|
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-bottom: 1px solid $es-primary !important;
|
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: $es-text-muted;
|
color: $es-text-muted;
|
||||||
|
font-size: $es-font-size-xs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Count badge - smaller, pill style
|
||||||
.chips-count {
|
.chips-count {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.125rem;
|
||||||
padding: 0.25rem 0.625rem;
|
padding: 0.125rem 0.5rem;
|
||||||
background: $es-primary;
|
background: $es-slate-200;
|
||||||
color: $es-white;
|
color: $es-text-secondary;
|
||||||
font-size: $es-font-size-xs;
|
font-size: 11px;
|
||||||
font-weight: $es-font-weight-semibold;
|
font-weight: $es-font-weight-semibold;
|
||||||
border-radius: $es-radius-full;
|
border-radius: $es-radius-full;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&.has-filter {
|
&.has-filter {
|
||||||
background: $es-cyan-500;
|
background: $es-cyan-100;
|
||||||
|
color: $es-cyan-700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.count-filtered {
|
.count-filtered {
|
||||||
@@ -92,7 +109,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.count-separator {
|
.count-separator {
|
||||||
opacity: 0.7;
|
opacity: 0.6;
|
||||||
|
margin: 0 0.125rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,34 +121,43 @@
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear button - subtle, chip-like
|
||||||
.btn-chips-clear {
|
.btn-chips-clear {
|
||||||
@include button-reset;
|
@include button-reset;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.375rem;
|
gap: 0.25rem;
|
||||||
padding: 0.375rem 0.75rem;
|
padding: 0.25rem 0.5rem;
|
||||||
color: $es-white;
|
color: $es-danger;
|
||||||
font-size: $es-font-size-xs;
|
font-size: 11px;
|
||||||
font-weight: $es-font-weight-semibold;
|
font-weight: $es-font-weight-medium;
|
||||||
background: $es-danger;
|
background: rgba($es-danger, 0.1);
|
||||||
border-radius: $es-radius-sm;
|
border-radius: $es-radius-full;
|
||||||
transition: all $es-transition-fast;
|
transition: all $es-transition-fast;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: darken($es-danger, 8%);
|
background: $es-danger;
|
||||||
|
color: $es-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
i {
|
i {
|
||||||
font-size: 11px;
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-text {
|
||||||
|
// Hide text on small screens, keep icon
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chips container
|
// Chips container - flows naturally from toolbar
|
||||||
.entity-chips {
|
.entity-chips {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: $es-spacing-xs;
|
gap: $es-spacing-xs;
|
||||||
padding: $es-spacing-md;
|
padding: $es-spacing-sm $es-spacing-md $es-spacing-md;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user