Refactor from Tailwind CSS to SCSS/Bootstrap
Major changes: - Replace Tailwind with SCSS using Bootstrap-compatible variables - Add Gulp build system for SCSS and JS compilation - Split JS into modular partials (_events, _filters, _preview, etc.) CSS fixes: - Fix preview popover visibility (remove conflicting modal.scss rule) - Fix search input max-width override for parent form styles - Add filter panel styling (toggle buttons, chips, values row) - Add group-body padding with negative margins on modifiers - Style filter-group-toggle with eye icon for preview JS additions: - Add showGroupPreviewPopover for group count badge clicks - Add showItemsPopover for rendering preview popover - Add renderPreviewItems for product list rendering - Add eye icon to filter toggle button generation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
242
sources/scss/components/_value-picker.scss
Normal file
242
sources/scss/components/_value-picker.scss
Normal file
@@ -0,0 +1,242 @@
|
||||
/**
|
||||
* Value Picker Component
|
||||
* Search boxes, input types, range inputs
|
||||
*/
|
||||
|
||||
@use '../variables' as *;
|
||||
@use '../mixins' as *;
|
||||
|
||||
.target-conditions-trait,
|
||||
.entity-selector-trait {
|
||||
|
||||
// Value picker container
|
||||
.value-picker {
|
||||
padding: $es-spacing-sm 0;
|
||||
|
||||
&[style*="display: none"],
|
||||
&[style*="display:none"] {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.include-picker,
|
||||
.exclude-picker {
|
||||
// Section-specific picker styles
|
||||
}
|
||||
|
||||
// Entity search box
|
||||
.entity-search-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $es-spacing-sm;
|
||||
padding: $es-spacing-xs;
|
||||
background: $es-white;
|
||||
border: 1px solid $es-border-color;
|
||||
border-radius: $es-radius-md;
|
||||
transition: all $es-transition-fast;
|
||||
|
||||
&:focus-within {
|
||||
border-color: $es-primary;
|
||||
box-shadow: 0 0 0 2px rgba($es-primary, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.entity-search-icon {
|
||||
color: $es-text-muted;
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// Override parent form's max-width on search input
|
||||
input.entity-search-input,
|
||||
input.entity-search-input[type="text"] {
|
||||
@include input-reset;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
width: auto !important;
|
||||
max-width: none !important;
|
||||
padding: 0.375rem;
|
||||
font-size: $es-font-size-sm;
|
||||
color: $es-text-primary;
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
box-shadow: none !important;
|
||||
|
||||
&::placeholder {
|
||||
color: $es-text-muted;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.search-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: $es-primary;
|
||||
|
||||
i {
|
||||
animation: spin 0.6s linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
// Numeric range box
|
||||
.numeric-range-box,
|
||||
.multi-range-input-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $es-spacing-xs;
|
||||
}
|
||||
|
||||
.range-min-input,
|
||||
.range-max-input {
|
||||
@include input-base;
|
||||
width: 100px;
|
||||
padding: $es-spacing-sm;
|
||||
text-align: center;
|
||||
font-size: $es-font-size-sm;
|
||||
|
||||
&::-webkit-inner-spin-button,
|
||||
&::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
.range-separator {
|
||||
color: $es-text-muted;
|
||||
font-size: $es-font-size-sm;
|
||||
font-weight: $es-font-weight-medium;
|
||||
}
|
||||
|
||||
.btn-add-range {
|
||||
@include button-reset;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
color: $es-white;
|
||||
background: $es-primary;
|
||||
border-radius: $es-radius-md;
|
||||
transition: all $es-transition-fast;
|
||||
|
||||
&:hover {
|
||||
background: $es-primary-hover;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
// Multi-range container
|
||||
.multi-range-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $es-spacing-sm;
|
||||
}
|
||||
|
||||
// Date range box
|
||||
.date-range-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $es-spacing-xs;
|
||||
}
|
||||
|
||||
.date-from-input,
|
||||
.date-to-input {
|
||||
@include input-base;
|
||||
width: 140px;
|
||||
padding: $es-spacing-sm;
|
||||
font-size: $es-font-size-sm;
|
||||
}
|
||||
|
||||
// Multi-select tiles
|
||||
.multi-select-tiles {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: $es-spacing-xs;
|
||||
}
|
||||
|
||||
.tile-option {
|
||||
@include button-reset;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
padding: 0.375rem 0.625rem;
|
||||
color: $es-text-secondary;
|
||||
background: $es-slate-100;
|
||||
border: 1px solid transparent;
|
||||
border-radius: $es-radius-sm;
|
||||
font-size: $es-font-size-xs;
|
||||
font-weight: $es-font-weight-medium;
|
||||
cursor: pointer;
|
||||
transition: all $es-transition-fast;
|
||||
|
||||
&:hover {
|
||||
background: $es-slate-200;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
color: $es-primary;
|
||||
background: $es-primary-light;
|
||||
border-color: $es-primary;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.tile-label {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// Select input box
|
||||
.select-input-box {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.select-value-input {
|
||||
@include input-base;
|
||||
padding: $es-spacing-sm $es-spacing-md;
|
||||
font-size: $es-font-size-sm;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
// Boolean input box
|
||||
.boolean-input-box {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: $es-spacing-sm $es-spacing-md;
|
||||
background: $es-success-light;
|
||||
color: $es-success-dark;
|
||||
border-radius: $es-radius-md;
|
||||
font-size: $es-font-size-sm;
|
||||
font-weight: $es-font-weight-medium;
|
||||
}
|
||||
|
||||
.boolean-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
|
||||
&::before {
|
||||
content: '\2713';
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
// Condition match count badge
|
||||
.condition-match-count {
|
||||
@include count-badge($es-primary);
|
||||
margin-left: $es-spacing-sm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user